diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index 18485c3ae4..e60ff6898b 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -542,7 +542,7 @@ function generate_capacity_tab_content() { ''+ ''+ '
'+ - '
'+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>.")+'
'+ + '
'+tr("Name that the VM will get for description purposes.")+'
'+ '
'+ ''+ '
'+ @@ -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);