From 9607859909ea5d0143079795fb9db129fd8e164e Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Fri, 1 Apr 2011 03:53:13 +0200 Subject: [PATCH] Fixes feature #547: Improve add network in wizard. Added correct check not to allow adding a network when none is selected. --- src/sunstone/public/js/plugins/vms-tab.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index a0280be076..d69f2b410f 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -277,7 +277,7 @@ var create_vm_tmpl = \ \
\ -
\ +
\ \ \ @@ -1456,11 +1456,12 @@ function setupCreateVMDialog(){ //network, or that the ip or mac are set //TODO: Improve this check var nicFilter = function(){ - var network = $('select#NETWORK :selected',section_networks).attr('id'); - var ip = $('#IP',section_networks).val(); - var mac = $('#MAC',section_networks).val(); - - return (network != "no_network" || ip.length || mac.length); + return mandatory_filter(section_networks); + //~ var network = $('select#NETWORK :selected',section_networks).attr('id'); + //~ var ip = $('#IP',section_networks).val(); + //~ var mac = $('#MAC',section_networks).val(); +//~ + //~ return (network != "no_network" || ip.length || mac.length); }; $('#add_nic_button',section_networks).click(function(){