Bug 15773: Fix and standardise checkboxes code in framework
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 9 Feb 2016 17:02:05 +0000 (17:02 +0000)
committerFrédéric Demians <f.demians@tamil.fr>
Wed, 27 Apr 2016 14:24:23 +0000 (16:24 +0200)
commit9bf48192b74f3e5260d1422487551e3a32921898
tree6d83bd9e1315c8703e73cee3556a035c9e4410c0
parent8fd14b9b6b6e41cd3242948ba3fa7b8d165af446
Bug 15773: Fix and standardise checkboxes code in framework

When creating a new subfield for an authority framework, the checkboxes
don't behave as they should.
If you click on the 'repeatable', 'mandatory' or 'is url' checkbox's
label, the checkbox from the second tab will be checked/unchecked.
This is caused by a non-unique id of the input element.

I have found this bug when working on the removal of CGI::checkbox in
both admin/auth_subfields_structure.pl and
admin/marc_subfields_structure.pl scripts.

This patch remove the use of CGI::checkbox as well as the generation of
html code from these 2 pl scripts (which should be avoided).
The code these scripts are now pretty similar.

Test plan:
Add/modify/remove subfield for a MARC framework and an Authority
framework.
Use as many field as possible and confirm that the values are correctly
inserted/displayed.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit 39597b86ae299a9b4c0c1e8221f51f9e8dd300ed)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 60e601bf5f485a46b36bf14d2145adf9c25fe098)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
admin/auth_subfields_structure.pl
admin/marc_subfields_structure.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt