mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
Feature #3748: Img wizard: fix missing persistent input, use abide required inputs
This commit is contained in:
parent
2c17583272
commit
55ebb65967
@ -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" : {
|
||||
|
@ -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();
|
||||
|
@ -7,7 +7,7 @@
|
||||
{{tr "Name that the Image will get. Every image must have a unique name."}}
|
||||
</span>
|
||||
</label>
|
||||
<input type="text" name="img_name" id="img_name" />
|
||||
<input required type="text" name="img_name" id="img_name" />
|
||||
</div>
|
||||
<div class="medium-8 columns">
|
||||
<label for="img_desc">
|
||||
@ -49,16 +49,18 @@
|
||||
</label>
|
||||
<div id="img_datastore" name="img_datastore"></div>
|
||||
</div>
|
||||
<div class="large-6 columns">
|
||||
{{#if persistentActionEnabled}}
|
||||
<input type="checkbox" id="img_persistent" name="img_persistent" value="YES" />
|
||||
<label for="img_persistent">
|
||||
{{tr "Persistent"}}
|
||||
<span class="tip">{{tr "Persistence of the image"}}</span>
|
||||
</label>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{#isTabActionEnabled "images-tab" "Image.persistent"}}
|
||||
<div class="row">
|
||||
<div class="large-4 columns">
|
||||
<input type="checkbox" id="img_persistent" name="img_persistent" value="YES" />
|
||||
<label for="img_persistent">
|
||||
{{tr "Persistent"}}
|
||||
<span class="tip">{{tr "Persistence of the image"}}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{{/isTabActionEnabled}}
|
||||
<br>
|
||||
<fieldset>
|
||||
<legend>{{tr "Image location"}}:</legend>
|
||||
@ -73,7 +75,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="img_param row">
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<label for="img_path">
|
||||
{{tr "Path"}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user