Bug #1146: Prevent users from creating a VDC when no zones have been defined.

(cherry picked from commit 443d7aa00c)
This commit is contained in:
Hector Sanjuan authored and Ruben S. Montero committed 2012-02-29 10:37:25 +01:00
1 parent 625908025c
commit 38269de9b0
1 file changed
+4
@@ -516,6 +516,10 @@ function setupCreateVDCDialog(){
function openCreateVDCDialog(){
var dialog = $('div#create_vdc_dialog')
if (!zones_select){
notifyError(tr("No zones defined: You need to create at least 1 zone before creating an VDC"));
return false;
};
$('select#zoneid',dialog).html(zones_select);
$('select#zoneid',dialog).trigger("change");
$('#vdc_available_hosts_list',dialog).empty();