From 100099d429c3b092d9c3a9a7c65427499092d4b6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Sat, 30 Oct 2010 01:52:47 -0400 Subject: [PATCH] Fix for Bug 5056, Untranslatable strings in members.js Signed-off-by: Galen Charlton Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/js/members.js | 19 ++++++++++--------- .../en/modules/members/memberentrygen.tmpl | 12 ++++++++++-- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/members.js b/koha-tmpl/intranet-tmpl/prog/en/js/members.js index 145e95f3f3..796db0a880 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/members.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/members.js @@ -8,7 +8,7 @@ if (d!="") { var ok=1; var msg; if ( (date.length < 2) && (ok==1) ) { - msg = _("Separator must be /"); + msg = MSG_SEPARATOR+field.name; alert(msg); ok=0; field.focus(); return; } @@ -17,19 +17,19 @@ if (d!="") { var yyyy = date[2]; // checking days if ( ((isNaN(dd))||(dd<1)||(dd>31)) && (ok==1) ) { - msg = _("day not correct."); + msg = MSG_INCORRECT_DAY+field.name; alert(msg); ok=0; field.focus(); return false; } // checking months if ( ((isNaN(mm))||(mm<1)||(mm>12)) && (ok==1) ) { - msg = _("month not correct."); + msg = MSG_INCORRECT_MONTH+field.name; alert(msg); ok=0; field.focus(); return false; } // checking years if ( ((isNaN(yyyy))||(yyyyamax)) && (ok==1) ) { - msg = _("years not correct."); + msg = MSG_INCORRECT_YEAR+field.name; alert(msg); ok=0; field.focus(); return false; } @@ -43,13 +43,13 @@ var msg2; if ( document.form.check_member.value==1){ if (document.form.categorycode.value != "I"){ - msg1 += ("Warning !!!! Duplicate patron!!!!"); + msg1 += MSG_DUPLICATE_PATRON; alert(msg1); check_form_borrowers(0); document.form.submit(); }else{ - msg2 += ("Warning !!!! Duplicate organisation!!!!"); + msg2 += MSG_DUPLICATE_ORGANIZATION; alert(msg2); check_form_borrowers(0); } @@ -73,7 +73,7 @@ var myDate2=document.form.dateexpiry.value.split ('/'); { document.form.dateenrolled.focus(); - var msg = ("Warning !!! check date expiry >= date enrolment"); + var msg = MSG_LATE_EXPIRY; alert(msg); } } @@ -101,7 +101,8 @@ function check_form_borrowers(nav){ else { var champ_verif = document.form.BorrowerMandatoryField.value.split ('|'); - var message ="The following fields are mandatory :\n"; + var message = MSG_MISSING_MANDATORY + message += "\n"; var message_champ=""; for (var i=0; i 0 ) { if (!(document.form_double.answernodouble.checked)){ message =""; - message_champ+=("Please confirm suspicious duplicate patron !!! "); + message_champ+= MSG_DUPLICATE_SUSPICION; statut=1; document.form.nodouble.value=0; } else { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl index 50a7bb11aa..bf5ea1a698 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl @@ -2,7 +2,6 @@ Koha › Patrons › <!-- 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--> - + -- 2.39.5