diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index e821ee3d76..c71688438f 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -4588,6 +4588,9 @@ function fillTemplatePopUp(request, response){ var context = template.CONTEXT; var context_section = $('li#contextTab', $create_template_dialog); + $("#ssh_context", context_section).removeAttr('checked'); + $("#network_context", context_section).removeAttr('checked'); + if (context) { var file_ds_regexp = /\$FILE\[IMAGE_ID=([0-9]+)+/g; var net_regexp = /^NETWORK$/;; @@ -4598,8 +4601,6 @@ function fillTemplatePopUp(request, response){ var net_flag = false; var files = []; - $("#ssh_context", context_section).removeAttr('checked'); - $("#network_context", context_section).removeAttr('checked'); $.each(context, function(key, value){ if (ssh_regexp.test(key)) { $("#ssh_context", context_section).attr('checked','checked');