CS-16046: cloudstack 3.0 UI - Edit zone - Local Storage Enabled field is a true/false field. Make it a checkbox in Edit mode.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/fbdd65fe Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/fbdd65fe Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/fbdd65fe Branch: refs/heads/javelin Commit: fbdd65fe6b6233268f146a5a80e8c5de4c664766 Parents: ad55c0e Author: Jessica Wang <[email protected]> Authored: Fri Aug 17 14:43:29 2012 -0700 Committer: Brian Federle <[email protected]> Committed: Wed Sep 12 12:25:32 2012 -0700 ---------------------------------------------------------------------- ui/scripts/system.js | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/fbdd65fe/ui/scripts/system.js ---------------------------------------------------------------------- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index d1d185e..e71529f 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -3973,7 +3973,7 @@ array1.push("&internaldns1=" + todb(args.data.internaldns1)); array1.push("&internaldns2=" + todb(args.data.internaldns2)); //internaldns2 can be empty ("") when passed to API array1.push("&domain=" + todb(args.data.domain)); - array1.push("&localstorageenabled=" + todb(args.data.localstorageenabled)); + array1.push("&localstorageenabled=" + (args.data.localstorageenabled == 'on')); $.ajax({ url: createURL("updateZone&id=" + args.context.physicalResources[0].id + array1.join("")), dataType: "json", @@ -4020,13 +4020,9 @@ }, localstorageenabled: { label: 'label.local.storage.enabled', - converter: function(args) { - if(args) - return "true"; - else - return "false"; - }, - isEditable: true + isBoolean: true, + isEditable: true, + converter:cloudStack.converters.toBooleanText } } ],
