From 927d3e698230bbdee1c09823bd0986ae50726c78 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Thu, 30 Apr 2009 15:09:36 +0200 Subject: [PATCH] (bug #3170) check if mandatory fields are not empty This patch make authority and biblio add/edit to check that at least one subfield of mandatory fields are filled-in. Signed-off-by: Galen Charlton --- .../en/modules/authorities/authorities.tmpl | 51 +++++++++++++++++-- .../en/modules/cataloguing/addbiblio.tmpl | 46 ++++++++++++++++- 2 files changed, 91 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 8b89e921f5..f32e4458e2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tmpl @@ -35,12 +35,22 @@ */ function AreMandatoriesNotOk(){ var mandatories = new Array(); + var mandatoriesfields = new Array(); var tab = new Array(); var label = new Array(); - mandatories.push(""); - tab.push(""); - label.push(""); - + + + + mandatoriesfields.push(new Array("","")); + + + mandatories.push(""); + tab.push(""); + label.push(""); + + + + var StrAlert = ""; for(var i=0,len=mandatories.length; imandatories.push(""); + + + + mandatoriesfields.push(new Array("","")); + + + mandatories.push(""); tab.push(""); label.push(""); - + + + + var StrAlert = _("Can't save this record because the following field aren't filled :\n\n"); for(var i=0,len=mandatories.length; i