Merge remote branch 'kc/new/bug_5446' into kcmaster

This commit is contained in:
Chris Cormack 2010-12-19 21:26:06 +13:00
commit 8902ee5684
1 changed files with 12 additions and 9 deletions

View File

@ -40,16 +40,19 @@ function Check(ff) {
_(") exceeds budget available (") + actTotal+")";
}
var empty_item_mandatory = 0;
for (i = 0; i < ff.field_value.length; i++) {
if (ff.field_value[i].value.length == 0 && ff.mandatory[i].value == 1) {
empty_item_mandatory++;
if ( ff.field_value ) {
var empty_item_mandatory = 0;
for (i = 0; i < ff.field_value.length; i++) {
//alert("i = " + i + " => " + ff.kohafield[i] );
if (ff.field_value[i].value.length == 0 && ff.mandatory[i].value == 1) {
empty_item_mandatory++;
}
}
if (empty_item_mandatory > 0) {
ok = 1;
_alertString +=
"\n- " + empty_item_mandatory + _(" item mandatory fields empty");
}
}
if (empty_item_mandatory > 0) {
ok = 1;
_alertString +=
"\n- " + empty_item_mandatory + _(" item mandatory fields empty");
}
if (ok) {