diff --git a/ui/jsp/volume.jsp b/ui/jsp/volume.jsp index c94a9943e37..b50325a90ce 100644 --- a/ui/jsp/volume.jsp +++ b/ui/jsp/volume.jsp @@ -754,6 +754,13 @@ +
diff --git a/ui/scripts/cloud.core.volume.js b/ui/scripts/cloud.core.volume.js index ac2d76c7154..45624ed6ef1 100644 --- a/ui/scripts/cloud.core.volume.js +++ b/ui/scripts/cloud.core.volume.js @@ -57,6 +57,11 @@ function afterLoadVolumeJSP() { initDialog("dialog_create_template_from_snapshot", 450); initDialog("dialog_confirmation_delete_snapshot"); initDialog("dialog_download_volume"); + + if(isAdmin()) + $("#dialog_create_template_from_snapshot").find("#isfeatured_container").show(); + else + $("#dialog_create_template_from_snapshot").find("#isfeatured_container").hide(); $.ajax({ data: createURL("command=listOsTypes"), @@ -1046,6 +1051,11 @@ function doCreateTemplateFromSnapshotInVolumePage($actionLink, $subgridItem) { var password = thisDialog.find("#password").val(); array1.push("&passwordEnabled="+password); + if(thisDialog.find("#isfeatured_container").css("display")!="none") { + var isFeatured = thisDialog.find("#isfeatured").val(); + array1.push("&isfeatured="+isFeatured); + } + var id = jsonObj.id; var apiCommand = "command=createTemplate&snapshotid="+id+array1.join(""); doActionToSubgridItem(id, $actionLink, apiCommand, $subgridItem);