From d7526b7044b7fcd734ca1a149ee66a9d24a2ca30 Mon Sep 17 00:00:00 2001 From: btoumi Date: Wed, 7 Jun 2006 14:55:36 +0000 Subject: [PATCH] members.js :translate javascript message moremember.tmpl:change wrong url Members.pm: change wrong field name in sql request(sub newmember) memberentryA.tmpl : change wrong field name memberentry.pl:change test condition (checkuniquemember) --- C4/Members.pm | 18 ++++++------- .../prog/en/includes/javascript/members.js | 27 ++++++++++++------- .../prog/en/members/memberentryA.tmpl | 6 ++--- .../prog/en/members/moremember.tmpl | 2 +- members/memberentry.pl | 21 ++++++++------- 5 files changed, 42 insertions(+), 32 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index e03d1d4569..cb0619ecea 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -465,15 +465,15 @@ sub newmember { . $dbh->quote( $data{'dateexpiry'} ) . ",contactnote=" . $dbh->quote( $data{'contactnote'} ) - . ",b_address=" + . ",B_address=" . $dbh->quote( $data{'b_address'} ) - . ",b_zipcode=" + . ",B_zipcode=" . $dbh->quote( $data{'b_zipcode'} ) - . ",b_city=" + . ",B_city=" . $dbh->quote( $data{'b_city'} ) - . ",b_phone=" + . ",B_phone=" . $dbh->quote( $data{'b_phone'} ) - . ",b_email=" + . ",B_email=" . $dbh->quote( $data{'b_email'}, ) . ",password=" . $dbh->quote( $data{'password'} ) @@ -497,9 +497,9 @@ sub newmember { . $dbh->quote( $data{'flags'} ) . ",relationship=" . $dbh->quote( $data{'relationship'} ) - . ",b_streetnumber=" + . ",B_streetnumber=" . $dbh->quote( $data{'b_streetnumber'}) - . ",b_streettype=" + . ",B_streettype=" . $dbh->quote( $data{'b_streettype'}) . ",gonenoaddress=" . $dbh->quote( $data{'gonenoaddress'}) @@ -515,8 +515,8 @@ sub newmember { my $sth = $dbh->prepare($query); $sth->execute; $sth->finish; - $data{'borrowerid'} = $dbh->{'mysql_insertid'}; - return $data{'borrowerid'}; + $data{'borrowernumber'} = $dbh->{'mysql_insertid'}; + return $data{'borrowernumber'}; } sub changepassword { diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/javascript/members.js b/koha-tmpl/intranet-tmpl/prog/en/includes/javascript/members.js index c6f91fc2e1..d2e09377b8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/javascript/members.js +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/javascript/members.js @@ -11,17 +11,21 @@ function CheckDate(d) { var m=(d.substring(3,5)); var a=(d.substring(6)); var ok=1; + var msg; if ( ((isNaN(j))||(j<1)||(j>31)) && (ok==1) ) { - alert("Le jour n'est pas correct."); ok=0; + msg = _("day not correct."); + alert(msg); ok=0; } if ( ((isNaN(m))||(m<1)||(m>12)) && (ok==1) ) { - alert("Le mois n'est pas correct."); ok=0; + msg = _("month not correct."); + alert(msg); ok=0; } if ( ((isNaN(a))||(aamax)) && (ok==1) ) { - alert("L'année n'est pas correcte."); ok=0; + msg = _("years not correct."); + alert(msg); ok=0; } if ( ((d.substring(2,3)!=separateur)||(d.substring(5,6)!=separateur)) && (ok==1) ) { - alert("Les séparateurs doivent être des "+separateur); ok=0; + alert("Separator must be "+separateur); ok=0; } return ok; } @@ -32,15 +36,19 @@ function CheckDate(d) { //function test if member is unique and if it's right the member is registred function unique() { +var msg1; +var msg2; if ( document.form.check_member.value==1){ - if (document.form.categorycode.value!="I"){ + if (document.form.categorycode.value != "I"){ - alert("ATTENTION !!!! Ce Lecteur existe déja"); + msg1 += _("Warning !!!! Duplicate borrower!!!!"); + alert(msg1); check_form_borrowers(0); document.form.submit(); }else{ - alert("ATTENTION !!!! Cette Collectivité existe déja"); + msg2 += _("Warning !!!! Duplicate organisation!!!!"); + alert(msg2); check_form_borrowers(0); } } @@ -60,7 +68,8 @@ var myDate2=document.form.dateexpiry.value.split ('/'); if ((myDate1[2]>myDate2[2])||(myDate1[2]==myDate2[2] && myDate1[1]>myDate2[1])||(myDate1[2]==myDate2[2] && myDate1[1]>=myDate2[1] && myDate1[0]>=myDate2[0])) { - alert("ATTENTION !!! Vérifiez la saisie de la date d'éxpiration qui ne doit pas être antérieure ou égale a la date d'inscription"); + var msg = _("Warning !!! check date expiry > date enrolment"); + alert(msg); document.form.dateexpiry.value=""; document.form.dateexpiry.setfocus; } @@ -134,7 +143,7 @@ if (nav< document.form.step.value) { if (!(document.form_double.answernodouble.checked)){ message =""; - message_champ="Vous devez confirmez que la suspicion de doublon est fausse !!! "; + message_champ+=_("Please confirm suspicious duplicate borrower !!! "); statut=1; document.form.nodouble.value=0; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl b/koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl index feecf3d82c..84f849ccc9 100755 --- a/koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl @@ -57,7 +57,7 @@ "> "> - "> + "> "> " /> " /> @@ -240,7 +240,7 @@ "> "> - "> + "> "> " /> " /> @@ -466,7 +466,7 @@ "> "> - "> + "> "> " /> " /> diff --git a/koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl index 49576ff324..06f3983be6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl @@ -7,7 +7,7 @@