Signed-off-by: Joshua Ferraro <jmf@liblime.com>
ok=1;
_alertString += "- description missing\n";
}
- if (!isNum(ff.upperagelimit,0)) {
+ if (!isNum(ff.upperagelimit,0) && ff.category_type.value=='C') {
ok=1;
- _alertString += "- upperagelimit is not a number\n";
+ _alertString += "- upperagelimit is not a number\n";
+
}
if (ok) { // if there is a problem
alert(_alertString);
- return;
+ return false;
}
// if all is good
ff.submit();
</li></ol>
</fieldset>
- <fieldset class="action"><input type="submit" value="Save" onclick="Check(this.form);" /> </fieldset>
+ <fieldset class="action"><input type="button" value="Save" onclick="Check(this.form);" /> </fieldset>
</form>
<!-- /TMPL_IF -->
my $age = GetAge($newdata{dateofbirth});
my $borrowercategory=GetBorrowercategory($newdata{'categorycode'});
my ($low,$high) = ($borrowercategory->{'dateofbirthrequired'}, $borrowercategory->{'upperagelimit'});
- if (($age > $high) or ($age < $low)) {
+ if (($high && ($age > $high)) or ($age < $low)) {
push @errors, 'ERROR_age_limitations';
$template->param('ERROR_age_limitations' => "$low to $high");
}