[Koha-patches] [PATCH] [SIGNED-OFF] Bug 5569: Corrections to addbiblio.tmpl to be able to delete repetable mandatory subfields
Julian Maurice
julian.maurice at biblibre.com
Thu Mar 10 16:45:40 CET 2011
From: Janusz Kaczmarek <januszop at gmail.com>
Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>
---
.../prog/en/modules/cataloguing/addbiblio.tmpl | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
index be98543..ba59280 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
@@ -130,9 +130,11 @@ function AreMandatoriesNotOk(){
var tag=mandatories[i].substr(4,3);
var subfield=mandatories[i].substr(17,1);
var tagnumber=mandatories[i].substr(19,mandatories[i].lastIndexOf("_")-19);
- tabflag[tag+subfield+tagnumber]=new Array();
- tabflag[tag+subfield+tagnumber][0]=0;
- if( ! document.getElementById(mandatories[i]).value){
+ if (tabflag[tag+subfield+tagnumber] == null) {
+ tabflag[tag+subfield+tagnumber]=new Array();
+ tabflag[tag+subfield+tagnumber][0]=0;
+ }
+ if( tabflag[tag+subfield+tagnumber][0] != 1 && (document.getElementById(mandatories[i]) != null && ! document.getElementById(mandatories[i]).value || document.getElementById(mandatories[i]) == null)){
tabflag[tag+subfield+tagnumber][0] = 0 + tabflag[tag+subfield+tagnumber] ;
document.getElementById(mandatories[i]).setAttribute('class','subfield_not_filled');
document.getElementById(mandatories[i]).focus();
--
1.7.1
More information about the Koha-patches
mailing list