From 84c4c269b6ff76d14b6d8aeea9c5c223673ae58f Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 2 Jun 2009 15:05:05 -0500 Subject: [PATCH] bug 3170 followup * tags >= 010, not just > 010, can have subfields * fixed so that mandatory fields are checked regardless of whether a new one is created or an existing one modified Signed-off-by: Galen Charlton --- .../prog/en/modules/authorities/authorities.tmpl | 6 +++--- .../prog/en/modules/cataloguing/addbiblio.tmpl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tmpl index d07bd46a29..31b73c4664 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tmpl @@ -41,7 +41,7 @@ function AreMandatoriesNotOk(){ - mandatoriesfields.push(new Array("","")); + mandatoriesfields.push(new Array("","","")); mandatories.push(""); @@ -68,7 +68,7 @@ function AreMandatoriesNotOk(){ divid = "tag_" + arr[0] + "_" + arr[1]; varegexp = new RegExp("^tag_" + arr[0] + "_code_"); - if(parseInt(arr[0]) > 10){ + if(parseInt(arr[0]) >= 10){ elem = document.getElementById(divid); eleminputs = elem.getElementsByTagName('input'); @@ -76,7 +76,7 @@ function AreMandatoriesNotOk(){ if(eleminputs[j].name.match(varegexp) && eleminputs[j].value){ /* tag_801_subfield_c_841304_545657 */ - inputregexp = new RegExp("^tag_" + arr[0] + "_subfield_" + eleminputs[j].value + "_" + arr[1]); + inputregexp = new RegExp("^tag_" + arr[0] + "_subfield_" + eleminputs[j].value + "_" + arr[2]); for( var k=0; k - mandatoriesfields.push(new Array("","")); + mandatoriesfields.push(new Array("","","")); mandatories.push(""); @@ -124,7 +124,7 @@ function AreMandatoriesNotOk(){ divid = "tag_" + arr[0] + "_" + arr[1]; varegexp = new RegExp("^tag_" + arr[0] + "_code_"); - if(parseInt(arr[0]) > 10){ + if(parseInt(arr[0]) >= 10){ elem = document.getElementById(divid); eleminputs = elem.getElementsByTagName('input'); @@ -132,7 +132,7 @@ function AreMandatoriesNotOk(){ if(eleminputs[j].name.match(varegexp) && eleminputs[j].value){ /* tag_801_subfield_c_841304_545657 */ - inputregexp = new RegExp("^tag_" + arr[0] + "_subfield_" + eleminputs[j].value + "_" + arr[1]); + inputregexp = new RegExp("^tag_" + arr[0] + "_subfield_" + eleminputs[j].value + "_" + arr[2]); for( var k=0; k