diff --git a/src/sunstone/public/app/tabs/images-tab/actions.js b/src/sunstone/public/app/tabs/images-tab/actions.js index 0f4b9e57af..1666e6e2cd 100644 --- a/src/sunstone/public/app/tabs/images-tab/actions.js +++ b/src/sunstone/public/app/tabs/images-tab/actions.js @@ -20,7 +20,10 @@ define(function(require) { Sunstone.getDataTable(TAB_ID).addElement(request, response); Notifier.notifyCustom(Locale.tr("Image created"), " ID: " + response[XML_ROOT].ID, false); }, - error: Notifier.onError, + error: function(request, response) { + Sunstone.hideFormPanelLoading(TAB_ID); + Notifier.onError(request, response); + }, }, "Image.create_dialog" : { diff --git a/src/sunstone/public/app/tabs/images-tab/form-panels/create.js b/src/sunstone/public/app/tabs/images-tab/form-panels/create.js index f5b02ec528..b7c4cfb966 100644 --- a/src/sunstone/public/app/tabs/images-tab/form-panels/create.js +++ b/src/sunstone/public/app/tabs/images-tab/form-panels/create.js @@ -113,16 +113,25 @@ define(function(require) { case "path": $('#img_fstype,#img_size,#file-uploader', dialog).closest('.row').hide(); $('#img_path', dialog).closest('.row').show(); + + $('#img_path', dialog).attr('required', ''); + $('#img_size', dialog).removeAttr('required'); break; case "datablock": $('#img_path,#file-uploader', dialog).closest('.row').hide(); $('#img_fstype,#img_size', dialog).closest('.row').show(); + + $('#img_path', dialog).removeAttr('required'); + $('#img_size', dialog).attr('required', ''); break; case "upload": $('#img_path,#img_fstype,#img_size', dialog).closest('.row').hide(); $('#file-uploader', dialog).closest('.row').show(); + + $('#img_path', dialog).removeAttr('required'); + $('#img_size', dialog).removeAttr('required'); break; - }; + } }); $('#path_image', dialog).click(); diff --git a/src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs b/src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs index c0df6cd2b3..4bd320b0a4 100644 --- a/src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs +++ b/src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs @@ -7,7 +7,7 @@ {{tr "Name that the Image will get. Every image must have a unique name."}} - +
-
- {{#if persistentActionEnabled}} - - - {{/if}} -
+ {{#isTabActionEnabled "images-tab" "Image.persistent"}} +
+
+ + +
+
+ {{/isTabActionEnabled}}
{{tr "Image location"}}: @@ -73,7 +75,7 @@
-
+