From 91bd6d96d944f1125870aad0079d20f2df533ba9 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 17 Aug 2012 14:43:29 -0700 Subject: [PATCH] CS-16046: cloudstack 3.0 UI - Edit zone - Local Storage Enabled field is a true/false field. Make it a checkbox in Edit mode. --- ui/scripts/system.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 2ee9a21e3d3..51179d37750 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -3967,7 +3967,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", @@ -4014,13 +4014,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 } } ],