diff --git a/client/WEB-INF/classes/resources/resource.properties b/client/WEB-INF/classes/resources/resource.properties
index 53a3f177047..8b1c06f5ec1 100644
--- a/client/WEB-INF/classes/resources/resource.properties
+++ b/client/WEB-INF/classes/resources/resource.properties
@@ -24,4 +24,14 @@ 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
+please.specify.limits.to.the.various.resources.-1.means.the.resource.has.no.limits = Please specify limits to the various resources. -1 means the resource has no limits.
+instance.limit = Instance Limit
+public.ip.limit = Public IP Limit
+disk.volume.limit = Disk Volume Limit
+snapshot.limit = Snapshot Limit
+template.limit = Template Limit
+please.confirm.you.want.to.disable.account.that.will.prevent.account.access.to.the.cloud.and.shut.down.all.existing.virtual.machines = Please confirm you want to disable account that will prevent account access to the cloud and shut down all existing virtual machines.
+please.confirm.you.want.to.lock.account.that.will.prevent.account.access.to.the.cloud = Please confirm you want to lock account that will prevent account access to the cloud.
+please.confirm.you.want.to.enable.account = Please confirm you want to enable account.
+
diff --git a/ui/new/jsp/account.jsp b/ui/new/jsp/account.jsp
index 9b39eddd060..99446c9aed3 100644
--- a/ui/new/jsp/account.jsp
+++ b/ui/new/jsp/account.jsp
@@ -142,32 +142,34 @@
-
Please specify limits to the various resources. A "-1" means the resource has no limits.
+
+ <%=t.t("please.specify.limits.to.the.various.resources.-1.means.the.resource.has.no.limits")%>
+
-
Please confirm you want to disable account that will prevent account access to the cloud and shut down all existing virtual instances.
+
+ <%=t.t("please.confirm.you.want.to.disable.account.that.will.prevent.account.access.to.the.cloud.and.shut.down.all.existing.virtual.machines")%>
+
-
Please confirm you want to lock account that will prevent account access to the cloud.
+
+ <%=t.t("please.confirm.you.want.to.lock.account.that.will.prevent.account.access.to.the.cloud")%>
+
-
Please confirm you want to enable account.
+
+ <%=t.t("please.confirm.you.want.to.enable.account")%>
+
\ No newline at end of file
diff --git a/ui/new/scripts/cloud.core2.account.js b/ui/new/scripts/cloud.core2.account.js
index 9802692caaf..9aeb16b47d2 100644
--- a/ui/new/scripts/cloud.core2.account.js
+++ b/ui/new/scripts/cloud.core2.account.js
@@ -2,26 +2,10 @@ var systemAccountId = 1;
var adminAccountId = 2;
function afterLoadAccountJSP() {
- activateDialog($("#dialog_resource_limits").dialog({
- autoOpen: false,
- modal: true,
- zIndex: 2000
- }));
- activateDialog($("#dialog_disable_account").dialog({
- autoOpen: false,
- modal: true,
- zIndex: 2000
- }));
- activateDialog($("#dialog_lock_account").dialog({
- autoOpen: false,
- modal: true,
- zIndex: 2000
- }));
- activateDialog($("#dialog_enable_account").dialog({
- autoOpen: false,
- modal: true,
- zIndex: 2000
- }));
+ initDialog("dialog_resource_limits");
+ initDialog("dialog_disable_account");
+ initDialog("dialog_lock_account");
+ initDialog("dialog_enable_account");
}
function accountToMidmenu(jsonObj, $midmenuItem1) {
diff --git a/ui/new/scripts/cloud.core2.instance.js b/ui/new/scripts/cloud.core2.instance.js
index e6f1fbcdc00..bd96d3e61e8 100644
--- a/ui/new/scripts/cloud.core2.instance.js
+++ b/ui/new/scripts/cloud.core2.instance.js
@@ -72,14 +72,8 @@ function clickInstanceGroupHeader($arrowIcon) {
initDialog("dialog_change_service_offering");
initDialog("dialog_confirmation_change_root_password");
initDialog("dialog_confirmation_enable_ha");
- initDialog("dialog_confirmation_disable_ha");
-
- activateDialog($("#dialog_create_template").dialog({
- width: 400, //this dialog box has dropdown fields, so need to fix width as 400 instead of 600.
- autoOpen: false,
- modal: true,
- zIndex: 2000
- }));
+ initDialog("dialog_confirmation_disable_ha");
+ initDialog("dialog_create_template", 400);
//***** switch between different tabs (begin) ********************************************************************
var tabArray = ["tab_details", "tab_volume", "tab_statistics", "tab_router"];
diff --git a/ui/new/scripts/cloud.core2.js b/ui/new/scripts/cloud.core2.js
index 5be8f609661..2d77a9480b7 100644
--- a/ui/new/scripts/cloud.core2.js
+++ b/ui/new/scripts/cloud.core2.js
@@ -743,13 +743,22 @@ function setVmStateInRightPanel(stateValue, $stateField) {
$stateField.text(stateValue).removeClass("green red").addClass("gray");
}
-function initDialog(elementId) {
- $("#"+elementId).dialog({
- width: 600,
- autoOpen: false,
- modal: true,
- zIndex: 2000
- });
+function initDialog(elementId, width1) {
+ if(width1 == null) {
+ $("#"+elementId).dialog({
+ autoOpen: false,
+ modal: true,
+ zIndex: 2000
+ });
+ }
+ else {
+ $("#"+elementId).dialog({
+ width: width1,
+ autoOpen: false,
+ modal: true,
+ zIndex: 2000
+ });
+ }
}