mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
Bug #1956: Template name is now mandatory
This commit is contained in:
1 parent
e416b1e4b5
commit
2f22a18eaf
1 file changed
+9
-1
@@ -542,7 +542,7 @@ function generate_capacity_tab_content() {
|
||||
'<input type="text" id="NAME" name="name"/>'+
|
||||
'</div>'+
|
||||
'<div class="one columns">'+
|
||||
'<div class="tip">'+tr("Name that the VM will get for description purposes. If NAME is not supplied a name generated by one will be in the form of one-<VID>.")+'</div>'+
|
||||
'<div class="tip">'+tr("Name that the VM will get for description purposes.")+'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="row">'+
|
||||
@@ -3512,6 +3512,14 @@ function setupCreateTemplateDialog(){
|
||||
//wrap it in the "vmtemplate" object
|
||||
var vm_json = build_template();
|
||||
vm_json = {vmtemplate: vm_json};
|
||||
|
||||
if (vm_json.vmtemplate.NAME == undefined ||
|
||||
vm_json.vmtemplate.NAME.length == 0 ) {
|
||||
|
||||
notifyError(tr("Virtual Machine name missing!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
//validate form
|
||||
Sunstone.runAction("Template.create",vm_json);
|
||||
|
||||
|
||||
Reference in new issue
Block a user