From 1c2362c163e68041553b8307b421f1060166cd3a Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Fri, 26 Jul 2013 14:29:55 -0700 Subject: [PATCH] Instance wizard: Fix logic preventing VPC network from being unchecked --- ui/scripts/ui-custom/instanceWizard.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js index c1407fedfbe..b9012ef2de4 100644 --- a/ui/scripts/ui-custom/instanceWizard.js +++ b/ui/scripts/ui-custom/instanceWizard.js @@ -123,10 +123,15 @@ $select.siblings('.single-select:visible').find('input[type=checkbox]') .attr('checked', false); - if (!$('input[name=new-network]:visible').is(':checked')) { + var $checkedOtherSelect = $otherSelects.filter(function() { + return $(this).not('.single-select') && + $(this).find('input[type=checkbox]:checked').size() && + $(this).find('input[type=radio]:checked').size(); + }); + + if (!$checkedOtherSelect.size() && + !$('.new-network:visible input[type=radio]:checked').size()) { $(this).closest('.select').find('input[type=radio]').click(); - } else { - $newNetwork.find('input[type=radio]').click(); } }