From 5d7cd4771863ea94a6a81db1f8e136a272aad06a 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 Signed-off-by: Chris Cormack Signed-off-by: Martin Renvoize (cherry picked from commit 93c9b5d553261acda55f1f29f8687c5f4c276e04) Signed-off-by: Fridolin Somers (cherry picked from commit 8710c15c8aa074d54d6a04f6cbd2d8c0a3796d67) Signed-off-by: Lucas Gass --- .../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 18ce4b5949..4e6b23675b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -272,7 +272,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]; @@ -662,7 +662,6 @@ function Changefwk() { [% UNLESS advancedMARCEditor %] [% IF ( subfield_loo.mandatory ) %][% ELSE %][% END %] [% subfield_loo.marc_lib | $raw %] - [% IF ( subfield_loo.mandatory ) %]*[% END %] [% END %] @@ -702,7 +701,9 @@ function Changefwk() { [% END %] [% END %] - + [% IF ( subfield_loo.mandatory ) %] + Required + [% END %] [% IF ( subfield_loo.repeatable ) %] -- 2.39.5