CLOUDSTACK-5354: UI > update ISO > make isExtractable, isFeatured checkbox non-editable to normal user.

This commit is contained in:
Jessica Wang 2013-12-06 16:31:31 -08:00
parent d931718ab2
commit 90d29ac86a
1 changed files with 18 additions and 8 deletions

View File

@ -623,7 +623,7 @@
//zoneid: args.context.templates[0].zoneid //can't update template/ISO in only one zone. It always get updated in all zones.
};
//if args.data.ispublic is undefined, do not pass ispublic to API call.
//if args.data.ispublic is undefined(i.e. checkbox is hidden), do not pass ispublic to API call.
if (args.data.ispublic == "on") {
$.extend(data, {
ispublic: true
@ -633,7 +633,7 @@
ispublic: false
});
}
//if args.data.isfeatured is undefined, do not pass isfeatured to API call.
//if args.data.isfeatured is undefined(i.e. checkbox is hidden), do not pass isfeatured to API call.
if (args.data.isfeatured == "on") {
$.extend(data, {
isfeatured: true
@ -643,7 +643,7 @@
isfeatured: false
});
}
//if args.data.isextractable is undefined, do not pass isextractable to API call.
//if args.data.isextractable is undefined(i.e. checkbox is hidden), do not pass isextractable to API call.
if (args.data.isextractable == "on") {
$.extend(data, {
isextractable: true
@ -1439,7 +1439,7 @@
id: args.context.isos[0].id,
//zoneid: args.context.isos[0].zoneid //can't update template/ISO in only one zone. It always get updated in all zones.
};
//if args.data.ispublic is undefined, do not pass ispublic to API call.
//if args.data.ispublic is undefined(i.e. checkbox is hidden), do not pass ispublic to API call.
if (args.data.ispublic == "on") {
$.extend(data, {
ispublic: true
@ -1449,7 +1449,7 @@
ispublic: false
});
}
//if args.data.isfeatured is undefined, do not pass isfeatured to API call.
//if args.data.isfeatured is undefined(i.e. checkbox is hidden), do not pass isfeatured to API call.
if (args.data.isfeatured == "on") {
$.extend(data, {
isfeatured: true
@ -1459,7 +1459,7 @@
isfeatured: false
});
}
//if args.data.isextractable is undefined, do not pass isextractable to API call.
//if args.data.isextractable is undefined(i.e. checkbox is hidden), do not pass isextractable to API call.
if (args.data.isextractable == "on") {
$.extend(data, {
isextractable: true
@ -1699,7 +1699,12 @@
isextractable: {
label: 'extractable',
isBoolean: true,
isEditable: true,
isEditable: function() {
if (isAdmin())
return true;
else
return false;
},
converter: cloudStack.converters.toBooleanText
},
bootable: {
@ -1715,7 +1720,12 @@
isfeatured: {
label: 'label.featured',
isBoolean: true,
isEditable: true,
isEditable: function() {
if (isAdmin())
return true;
else
return false;
},
converter: cloudStack.converters.toBooleanText
},
crossZones: {