From 736a57a1b53cee8837b92a98ef1c630b6ba80a90 Mon Sep 17 00:00:00 2001 From: Jarrett Jordaan Date: Tue, 26 Jan 2010 11:38:26 +0200 Subject: [PATCH] PT-2280457: Country needed for registration. --- setup/wizard/resources/js/wizard.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/setup/wizard/resources/js/wizard.js b/setup/wizard/resources/js/wizard.js index e133216..078a75f 100644 --- a/setup/wizard/resources/js/wizard.js +++ b/setup/wizard/resources/js/wizard.js @@ -84,6 +84,7 @@ wizard.prototype.valRegHelper = function() { var first = $("#first"); var last = $("#last"); var email = $("#email"); + var country = $("#country"); if(first.attr('value').length < 1) { $("#reg_error").html('Enter a First Name'); w.focusElement(first); @@ -109,7 +110,23 @@ wizard.prototype.valRegHelper = function() { w.focusElement(email); return false; } + if(!w.countryCheck(country.attr('value'))) { + $("#reg_error").html('Please select a Country.'); + w.focusElement(country); + return false; + } + + return true; +} +wizard.prototype.countryCheck = function(str) { + //str = w.trim(str); + //alert(str); + if(str == "Select Country...") { + return false; + } else { + return true; + } return true; } @@ -192,7 +209,6 @@ wizard.prototype.dummy = function () { // pre-submit callback wizard.prototype.showRequest = function (formData, jqForm, options) { - //$.blockUI({message:''}); $.blockUI({overlayCSS:{opacity:0.1}, fadeIn:500, fadeOut:500, message:''}); $('#loading').attr('style', 'display:block;'); } -- libgit2 0.21.4