From 4f395a269ed0b4481d18969de04947f69cd5c916 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 5 Mar 2019 18:56:55 +0000 Subject: [PATCH] Bug 7890: Highlight required field in MARC editor This patch modifies the basic MARC editor so that required fields have the standard "Required" label on them instead of a small red asterisk. To test, apply the patch and create a new record in the basic MARC editor. Tags which are marked mandatory in your selected MARC bibliographic framework should be labeled "Required." Signed-off-by: Maryse Simard --- koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index ce906bd..b248af3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -299,7 +299,7 @@ function AreMandatoriesNotOk(){ } 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]).setAttribute('class','input_marceditor noEnterSubmit subfield_not_filled'); $('#' + mandatories[i]).focus(); tabflag[tag+subfield+tagnumber][1]=label[i]; tabflag[tag+subfield+tagnumber][2]=tab[i]; @@ -718,7 +718,6 @@ function Changefwk() { [% UNLESS advancedMARCEditor %] [% IF ( subfield_loo.mandatory ) %][% ELSE %][% END %] [% subfield_loo.marc_lib | $raw %] - [% IF ( subfield_loo.mandatory ) %]*[% END %] [% END %] @@ -758,7 +757,9 @@ function Changefwk() { [% END %] [% END %] - + [% IF ( subfield_loo.mandatory ) %] + Required + [% END %] [% IF ( subfield_loo.repeatable ) %] -- 2.7.4