Bug 19096: Do not allow changes to kohafield within MARC frameworks
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 7 Aug 2017 13:02:10 +0000 (15:02 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 7 Dec 2017 17:44:15 +0000 (14:44 -0300)
commit18f4a89ce6108bcabf042e74bfa582f14184e463
tree63d6e509a5dbfc3ff032d488730bc3188c995db2
parent5a63523f593736e282d4b8dc590f250f0339c2eb
Bug 19096: Do not allow changes to kohafield within MARC frameworks

This patch makes two changes in the script for managing the MARC
frameworks in order to support making the Default authoritative
as for Koha to MARC mappings:

[1] Disable the kohafield select combo. Add a hidden input to save value.
[2] When a new subfield is added, the kohafield is still empty and should
    be overwritten with its Default counterpart.
    Note: Although we could leave the field empty, since Koha looks at the
    Default framework only, it does not cost much to keep these fields in
    sync with Default and perhaps catch a bug when someone somewhere looks
    in the wrong framework.

Note: The description of Koha to MARC mapping on admin-home has been
adjusted accordingly (removing last two lines).

Test plan:
[1] Add a new tag and subfield in Default.
[2] Map it to a kohafield in koha2marclinks.pl
[3] Add the same tag and subfield in another framework.
    Verify that the kohafield is updated after you saved the subfield.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
admin/marc_subfields_structure.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt