[Koha-cvs] koha/koha-tmpl/intranet-tmpl/prog/en/includes/j...

Bruno Toumi btoumi at ouestprovence.fr
Wed Aug 23 17:05:19 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Changes by:	Bruno Toumi <btoumi>	06/08/23 15:05:19

Modified files:
	koha-tmpl/intranet-tmpl/prog/en/includes/javascript: members.js 

Log message:
	bug fix :add new condition in javascript to eliminate error when field not exist.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/javascript/members.js?cvsroot=koha&r1=1.4&r2=1.5

Patches:
Index: members.js
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/includes/javascript/members.js,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- members.js	9 Jun 2006 11:34:39 -0000	1.4
+++ members.js	23 Aug 2006 15:05:18 -0000	1.5
@@ -80,7 +80,6 @@
 
 // function to test all fields in forms and nav in different forms(1 ,2 or 3)
  function check_form_borrowers(nav){
-
 var statut=0;
 if (nav < document.form.step.value) {
 	document.form.step.value=nav;
@@ -109,8 +108,9 @@
 		var message ="The following fields are mandatory :\n";
 	var message_champ="";
 		for (var j=0; j<champ_form.length; j++){ 
+		if (document.getElementsByName(""+champ_form[j]+"")[0]){
 			for (var i=0; i<champ_verif.length; i++) {
-				if (eval("document.form.elements['"+champ_verif[i]+"']") && eval("document.form.elements['"+champ_verif[j]+"']")) {
+					if (eval("document.form.elements['"+champ_verif[i]+"']") ) {
 					var val_champ=eval("document.form."+champ_verif[i]+".value");
 					var ref_champ=eval("document.form."+champ_verif[i]);
 					var val_form=eval("document.form."+champ_form[j]+".value");
@@ -135,6 +135,7 @@
 			}
 		}
 	}
+	}
 //borrowers form 2 test if u chcked no to the quetsion of double 
  	if (document.form.step.value==2 && statut!=1 && document.form.check_member.value > 0 )
 	{





More information about the Koha-cvs mailing list