diff --git a/client/WEB-INF/classes/resources/resource.properties b/client/WEB-INF/classes/resources/resource.properties index 27da32e667e..53a3f177047 100644 --- a/client/WEB-INF/classes/resources/resource.properties +++ b/client/WEB-INF/classes/resources/resource.properties @@ -22,4 +22,6 @@ please.confirm.you.want.to.enable.HA.for.your.virtual.machine.once.HA.is.enabled please.confirm.you.want.to.disable.HA.for.the.virtual.machine.once.HA.is.disabled.the.virtual.machine.will.no.longer.be.automatically.restarted.in.the.event.of.a.failure = Please confirm you want to disable HA for the virtual machine. Once HA is disabled, the virtual machine will no longer be be automatically restarted in the event of a failure. the.ISO.is.used.by.all.zones.please.confirm.you.want.to.delete.it.from.all.zones = The ISO is used by all zones. Please confirm you want to delete it from all zones. please.confirm.you.want.to.delete.the.ISO = Please confirm you want to delete the ISO +the.template.is.used.by.all.zones.please.confirm.you.want.to.delete.it.from.all.zones = The template is used by all zones. Please confirm you want to delete it from all zones. +please.confirm.you.want.to.delete.the.template = Please confirm you want to delete the template diff --git a/ui/new/jsp/template.jsp b/ui/new/jsp/template.jsp index e6170b9d823..898622d14ff 100644 --- a/ui/new/jsp/template.jsp +++ b/ui/new/jsp/template.jsp @@ -333,3 +333,15 @@ + + + + diff --git a/ui/new/scripts/cloud.core2.template.js b/ui/new/scripts/cloud.core2.template.js index 135a7652330..1a6ead76c46 100644 --- a/ui/new/scripts/cloud.core2.template.js +++ b/ui/new/scripts/cloud.core2.template.js @@ -152,6 +152,9 @@ function afterLoadTemplateJSP() { }); //initialize dialog box *** + initDialog("dialog_confirmation_delete_template_all_zones"); + initDialog("dialog_confirmation_delete_template"); + activateDialog($("#dialog_add_template").dialog({ width:450, autoOpen: false, @@ -438,14 +441,13 @@ function doDeleteTemplate($actionLink, listAPIMap, $detailsTab) { if (zoneId != null) moreCriteria.push("&zoneid="+zoneId); - var htmlMsg; + var $dialog1; if(jsonObj.crossZones == "true") - htmlMsg = "

Template "+name+" is used by all zones. Please confirm you want to delete it from all zones.

"; + $dialog1 = $("#dialog_confirmation_delete_template_all_zones"); else - htmlMsg = "

Please confirm you want to delete template "+name+".

"; - - $("#dialog_confirmation") - .html(htmlMsg) + $dialog1 = $("#dialog_confirmation_delete_template"); + + $dialog1 .dialog('option', 'buttons', { "Confirm": function() { $(this).dialog("close");