bug 13501:

Don't let user go next if no template/iso is selected on step 2

status 13501: resolved fixed
This commit is contained in:
Brian Federle 2012-02-09 11:11:46 -08:00
parent d2284e4439
commit d9aa7d43a0

View File

@ -604,9 +604,16 @@
// Events
$wizard.click(function(event) {
var $target = $(event.target);
var $activeStep = $form.find('.step:visible');
// Next button
if ($target.closest('div.button.next').size()) {
// Make sure ISO or template is selected
if ($activeStep.hasClass('select-iso') &&
!$activeStep.find('.content:visible input:checked').size()) {
cloudStack.dialog.notice({ message: 'message.step.1.continue' });
return false;
}
if (!$form.valid()) {
if ($form.find('input.error:visible, select.error:visible').size()) {
return false;