Lines 8-14
if (d!="") {
Link Here
|
8 |
var ok=1; |
8 |
var ok=1; |
9 |
var msg; |
9 |
var msg; |
10 |
if ( (date.length < 2) && (ok==1) ) { |
10 |
if ( (date.length < 2) && (ok==1) ) { |
11 |
msg = _("Separator must be /"); |
11 |
msg = MSG_SEPARATOR+field.name; |
12 |
alert(msg); ok=0; field.focus(); |
12 |
alert(msg); ok=0; field.focus(); |
13 |
return; |
13 |
return; |
14 |
} |
14 |
} |
Lines 17-35
if (d!="") {
Link Here
|
17 |
var yyyy = date[2]; |
17 |
var yyyy = date[2]; |
18 |
// checking days |
18 |
// checking days |
19 |
if ( ((isNaN(dd))||(dd<1)||(dd>31)) && (ok==1) ) { |
19 |
if ( ((isNaN(dd))||(dd<1)||(dd>31)) && (ok==1) ) { |
20 |
msg = _("day not correct."); |
20 |
msg = MSG_INCORRECT_DAY+field.name; |
21 |
alert(msg); ok=0; field.focus(); |
21 |
alert(msg); ok=0; field.focus(); |
22 |
return false; |
22 |
return false; |
23 |
} |
23 |
} |
24 |
// checking months |
24 |
// checking months |
25 |
if ( ((isNaN(mm))||(mm<1)||(mm>12)) && (ok==1) ) { |
25 |
if ( ((isNaN(mm))||(mm<1)||(mm>12)) && (ok==1) ) { |
26 |
msg = _("month not correct."); |
26 |
msg = MSG_INCORRECT_MONTH+field.name; |
27 |
alert(msg); ok=0; field.focus(); |
27 |
alert(msg); ok=0; field.focus(); |
28 |
return false; |
28 |
return false; |
29 |
} |
29 |
} |
30 |
// checking years |
30 |
// checking years |
31 |
if ( ((isNaN(yyyy))||(yyyy<amin)||(yyyy>amax)) && (ok==1) ) { |
31 |
if ( ((isNaN(yyyy))||(yyyy<amin)||(yyyy>amax)) && (ok==1) ) { |
32 |
msg = _("years not correct."); |
32 |
msg = MSG_INCORRECT_YEAR+field.name; |
33 |
alert(msg); ok=0; field.focus(); |
33 |
alert(msg); ok=0; field.focus(); |
34 |
return false; |
34 |
return false; |
35 |
} |
35 |
} |
Lines 43-55
var msg2;
Link Here
|
43 |
if ( document.form.check_member.value==1){ |
43 |
if ( document.form.check_member.value==1){ |
44 |
if (document.form.categorycode.value != "I"){ |
44 |
if (document.form.categorycode.value != "I"){ |
45 |
|
45 |
|
46 |
msg1 += ("Warning !!!! Duplicate patron!!!!"); |
46 |
msg1 += MSG_DUPLICATE_PATRON; |
47 |
alert(msg1); |
47 |
alert(msg1); |
48 |
check_form_borrowers(0); |
48 |
check_form_borrowers(0); |
49 |
document.form.submit(); |
49 |
document.form.submit(); |
50 |
|
50 |
|
51 |
}else{ |
51 |
}else{ |
52 |
msg2 += ("Warning !!!! Duplicate organisation!!!!"); |
52 |
msg2 += MSG_DUPLICATE_ORGANIZATION; |
53 |
alert(msg2); |
53 |
alert(msg2); |
54 |
check_form_borrowers(0); |
54 |
check_form_borrowers(0); |
55 |
} |
55 |
} |
Lines 73-79
var myDate2=document.form.dateexpiry.value.split ('/');
Link Here
|
73 |
|
73 |
|
74 |
{ |
74 |
{ |
75 |
document.form.dateenrolled.focus(); |
75 |
document.form.dateenrolled.focus(); |
76 |
var msg = ("Warning !!! check date expiry >= date enrolment"); |
76 |
var msg = MSG_LATE_EXPIRY; |
77 |
alert(msg); |
77 |
alert(msg); |
78 |
} |
78 |
} |
79 |
} |
79 |
} |
Lines 101-107
function check_form_borrowers(nav){
Link Here
|
101 |
else |
101 |
else |
102 |
{ |
102 |
{ |
103 |
var champ_verif = document.form.BorrowerMandatoryField.value.split ('|'); |
103 |
var champ_verif = document.form.BorrowerMandatoryField.value.split ('|'); |
104 |
var message ="The following fields are mandatory :\n"; |
104 |
var message = MSG_MISSING_MANDATORY |
|
|
105 |
message += "\n"; |
105 |
var message_champ=""; |
106 |
var message_champ=""; |
106 |
for (var i=0; i<champ_verif.length; i++) { |
107 |
for (var i=0; i<champ_verif.length; i++) { |
107 |
if (document.getElementsByName(""+champ_verif[i]+"")[0]) { |
108 |
if (document.getElementsByName(""+champ_verif[i]+"")[0]) { |
Lines 131-137
function check_form_borrowers(nav){
Link Here
|
131 |
if (statut!=1 && document.form.check_member.value > 0 ) { |
132 |
if (statut!=1 && document.form.check_member.value > 0 ) { |
132 |
if (!(document.form_double.answernodouble.checked)){ |
133 |
if (!(document.form_double.answernodouble.checked)){ |
133 |
message =""; |
134 |
message =""; |
134 |
message_champ+=("Please confirm suspicious duplicate patron !!! "); |
135 |
message_champ+= MSG_DUPLICATE_SUSPICION; |
135 |
statut=1; |
136 |
statut=1; |
136 |
document.form.nodouble.value=0; |
137 |
document.form.nodouble.value=0; |
137 |
} else { |
138 |
} else { |