Bug 8399: Display tab number on the mandatory field alert (authority)
authorJonathan Druart <jonathan.druart@biblibre.com>
Tue, 31 Mar 2015 13:29:49 +0000 (15:29 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 18 May 2015 15:11:23 +0000 (12:11 -0300)
A wrong variable scope was used here, the number value is contained in
the BIG_LOOP (note for later: change this variable name...).

Test plan:
1/ Define 1+ mandatory fields for an authority type
2/ Create an authority and don't fill the mandatory fields
3/ Try to save: the popup alert should display the number of the tab.

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt

index de0d2ab..d6b3a2e 100644 (file)
@@ -62,7 +62,7 @@ function AreMandatoriesNotOk(){
             [% END %]
                [% FOREACH subfield_loo IN innerloo.subfield_loop %]
                        [% IF ( subfield_loo.mandatory ) %]mandatories.push("[% subfield_loo.id %]");
-                       tab.push("[% subfield_loo.number %]");
+                    tab.push("[% BIG_LOO.number %]");
                        label.push("[% subfield_loo.marc_lib |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]");
                        [% END %]
                        [% END %]