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 <maryse.simard@inlibro.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> (cherry picked from commit93c9b5d553) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit8710c15c8a) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
02e14bb316
commit
5d7cd47718
|
|
@ -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 ) %]<span class="subfield subfield_mandatory">[% ELSE %]<span class="subfield">[% END %]
|
||||
[% subfield_loo.marc_lib | $raw %]
|
||||
[% IF ( subfield_loo.mandatory ) %]<span class="mandatory_marker" title="This field is mandatory">*</span>[% END %]
|
||||
</span>
|
||||
</label>
|
||||
[% END %]
|
||||
|
|
@ -702,7 +701,9 @@ function Changefwk() {
|
|||
[% END %]
|
||||
</select>
|
||||
[% END %]
|
||||
|
||||
[% IF ( subfield_loo.mandatory ) %]
|
||||
<span class="required">Required</span>
|
||||
[% END %]
|
||||
<span class="subfield_controls">
|
||||
[% IF ( subfield_loo.repeatable ) %]
|
||||
<a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]','[% advancedMARCEditor | html %]'); return false;">
|
||||
|
|
|
|||
Loading…
Reference in New Issue