diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index c490f7b9cc3..7b15f6aa399 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -744,6 +744,7 @@ }, createForm: { title: 'label.create.template', + preFilter: cloudStack.preFilter.createTemplate, desc: '', fields: { name: { label: 'label.name', validation: { required: true }}, @@ -767,7 +768,8 @@ } }, isPublic: { label: 'label.public', isBoolean: true }, - isPasswordEnabled: { label: 'label.password.enabled', isBoolean: true } + isPasswordEnabled: { label: 'label.password.enabled', isBoolean: true }, + isFeatured: { label: "label.featured", isBoolean: true } } }, action: function(args) { @@ -786,6 +788,8 @@ array1.push("&osTypeId=" + args.data.osTypeId); array1.push("&isPublic=" + (args.data.isPublic=="on")); array1.push("&passwordEnabled=" + (args.data.isPasswordEnabled=="on")); + if(args.$form.find('.form-item[rel=isFeatured]').css("display") != "none") + array1.push("&isfeatured=" + (args.data.isFeatured == "on")); $.ajax({ url: createURL("createTemplate&volumeId=" + args.context.volumes[0].id + array1.join("")),