View | Details | Raw Unified | Return to bug 5056
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/js/members.js (-9 / +10 lines)
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 {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl (-3 / +10 lines)
Lines 2-8 Link Here
2
<title>Koha &rsaquo; Patrons &rsaquo; 
2
<title>Koha &rsaquo; Patrons &rsaquo; 
3
<!-- TMPL_IF NAME="opadd" -->	Add<!-- TMPL_ELSE --> Modify<!--/TMPL_IF--> <!--TMPL_IF Name="categoryname"--> <!--TMPL_VAR Name="categoryname"--> patron<!-- TMPL_ELSE --><!--TMPL_IF Name="I"--> Organization patron<!--/TMPL_IF --><!--TMPL_IF Name="A"--> Adult patron<!--/TMPL_IF --><!--TMPL_IF Name="C"--> Child patron<!--/TMPL_IF --><!--TMPL_IF Name="P"--> Professional patron<!--/TMPL_IF --><!--TMPL_IF Name="S"--> Staff patron<!--/TMPL_IF --><!--/TMPL_IF --><!--TMPL_UNLESS Name="opadd"--> <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR name="firstname" --><!--/TMPL_UNLESS--></title>
3
<!-- TMPL_IF NAME="opadd" -->	Add<!-- TMPL_ELSE --> Modify<!--/TMPL_IF--> <!--TMPL_IF Name="categoryname"--> <!--TMPL_VAR Name="categoryname"--> patron<!-- TMPL_ELSE --><!--TMPL_IF Name="I"--> Organization patron<!--/TMPL_IF --><!--TMPL_IF Name="A"--> Adult patron<!--/TMPL_IF --><!--TMPL_IF Name="C"--> Child patron<!--/TMPL_IF --><!--TMPL_IF Name="P"--> Professional patron<!--/TMPL_IF --><!--TMPL_IF Name="S"--> Staff patron<!--/TMPL_IF --><!--/TMPL_IF --><!--TMPL_UNLESS Name="opadd"--> <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR name="firstname" --><!--/TMPL_UNLESS--></title>
4
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
5
<script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/members.js"></script>
6
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
5
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
7
<script type="text/JavaScript" language="JavaScript">
6
<script type="text/JavaScript" language="JavaScript">
8
//<![CDATA[
7
//<![CDATA[
Lines 48-56 Link Here
48
        });
47
        });
49
        original.parentNode.insertBefore(clone, original.nextSibling);
48
        original.parentNode.insertBefore(clone, original.nextSibling);
50
    }
49
    }
51
50
		var MSG_SEPARATOR = _("Separator must be / in field ");
51
        var MSG_INCORRECT_DAY = _("Invalid day entered in field ");
52
        var MSG_INCORRECT_MONTH = _("Invalid month entered in field ");
53
        var MSG_INCORRECT_YEAR = _("Invalid year entered in field ");
54
        var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
55
        var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
56
        var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
57
        var MSG_MISSING_MANDATORY = _("The following fields are mandatory:");
58
        var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
52
//]]>
59
//]]>
53
</script>
60
</script>
61
<script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/members.js"></script>
54
</head>
62
</head>
55
<body>
63
<body>
56
<!-- TMPL_INCLUDE NAME="header.inc" -->
64
<!-- TMPL_INCLUDE NAME="header.inc" -->
57
- 

Return to bug 5056