From 6a208f66328d3fa3a52c82a22cd9567322b2dc6b Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Mon, 3 Jan 2011 04:52:14 +0200 Subject: [PATCH] Corrections to addbiblio.tmpl to be able to delete repetable mandatory subfields Content-Type: text/plain; charset="utf-8" --- .../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 0fa4dc1..1bd0dac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl @@ -131,9 +131,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.5.6.5