|
Lines 58-60
Link Here
|
| 58 |
</option> |
58 |
</option> |
| 59 |
[% END %] |
59 |
[% END %] |
| 60 |
[% END %] |
60 |
[% END %] |
|
|
61 |
|
| 62 |
[% BLOCK subfields_for_item %] |
| 63 |
<ol> |
| 64 |
[% FOREACH subfield IN subfields %] |
| 65 |
[% IF subfield.kohafield == 'items.more_subfields_xml' %] |
| 66 |
[% SET kohafield = 'items.more_subfields_xml_' _ subfield.subfield %] |
| 67 |
[% ELSE %] |
| 68 |
[% SET kohafield = subfield.kohafield %] |
| 69 |
[% END %] |
| 70 |
|
| 71 |
<li> |
| 72 |
<div class="subfield_line" style="[% subfield.visibility | html %]" id="subfield[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]"> |
| 73 |
[% IF ( subfield.mandatory ) %] |
| 74 |
<label class="required">[% subfield.subfield | html %] - [% subfield.marc_lib | $raw %]</label> |
| 75 |
[% ELSE %] |
| 76 |
<label>[% subfield.subfield | html %] - [% subfield.marc_lib | $raw %]</label> |
| 77 |
[% END %] |
| 78 |
|
| 79 |
[% SET mv = subfield.marc_value %] |
| 80 |
[% IF ( mv.type == 'hidden' ) %] |
| 81 |
<input type="hidden" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]"> |
| 82 |
[% ELSIF ( mv.type == 'select' ) %] |
| 83 |
[% IF ( mv.readonly || subfield.IS_RETURN_CLAIM ) %] |
| 84 |
<select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor" readonly="readonly" disabled="disabled" data-width="50%"> |
| 85 |
[% ELSE %] |
| 86 |
<select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor select2" data-category="[% mv.category | html %]" data-width="50%"> |
| 87 |
[% END %] |
| 88 |
|
| 89 |
[% FOREACH aval IN mv.values %] |
| 90 |
[% IF aval == mv.default %] |
| 91 |
<option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option> |
| 92 |
[% ELSE %] |
| 93 |
[% IF subfield.IS_LOST_AV && Koha.Preference("ClaimReturnedLostValue") && aval == Koha.Preference("ClaimReturnedLostValue") %] |
| 94 |
<option disabled="disabled" value="[%- aval | html -%]" title="Return claims must be processed from the patron details page">[%- mv.labels.$aval | html -%]</option> |
| 95 |
[% ELSE %] |
| 96 |
<option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option> |
| 97 |
[% END %] |
| 98 |
[% END %] |
| 99 |
[% END %] |
| 100 |
</select> |
| 101 |
[% ELSIF ( mv.type == 'text_auth' ) %] |
| 102 |
[% IF mv.readonly %] |
| 103 |
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" /> |
| 104 |
[% ELSE %] |
| 105 |
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" /> |
| 106 |
[% SET dopop = "Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=\"${mv.authtypecode}\"&index=${mv.id}','${mv.id}')" %] |
| 107 |
<a href="#" class="buttonDot" onclick="[%- dopop | html -%]; return false;" title="Tag editor">...</a> |
| 108 |
[% END %] |
| 109 |
[% ELSIF ( mv.type == 'text_plugin' ) %] |
| 110 |
[% IF mv.readonly %] |
| 111 |
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" /> |
| 112 |
[% ELSE %] |
| 113 |
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" /> |
| 114 |
[% IF ( mv.nopopup ) %] |
| 115 |
<a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="No popup">...</a> |
| 116 |
[% ELSE %] |
| 117 |
<a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="Tag editor">...</a> |
| 118 |
[% END %] |
| 119 |
[%- mv.javascript | $raw -%] |
| 120 |
[% END %] |
| 121 |
[% ELSIF ( mv.type == 'text' ) %] |
| 122 |
[% IF mv.readonly %] |
| 123 |
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" /> |
| 124 |
[% ELSE %] |
| 125 |
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" /> |
| 126 |
[% END %] |
| 127 |
[% ELSIF ( mv.type == 'textarea' ) %] |
| 128 |
[% IF mv.readonly %] |
| 129 |
<textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" readonly="readonly" >[% mv.value | html %]</textarea> |
| 130 |
[% ELSE %] |
| 131 |
<textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" >[% mv.value | html %]</textarea> |
| 132 |
[% END %] |
| 133 |
[% END %] |
| 134 |
|
| 135 |
[% IF subfield.kohafield == 'items.more_subfields_xml' %] |
| 136 |
<input type="hidden" name="items.more_subfields_xml" value="[% subfield.subfield | html %]" /> |
| 137 |
[% END %] |
| 138 |
<input type="hidden" name="tag" value="[% subfield.tag | html %]" /> |
| 139 |
<input type="hidden" name="subfield" value="[% subfield.subfield | html %]" /> |
| 140 |
<input type="hidden" name="mandatory" value="[% subfield.mandatory | html %]" /> |
| 141 |
<input type="hidden" name="important" value="[% subfield.important | html %]" /> |
| 142 |
|
| 143 |
[% IF add_regex %] |
| 144 |
<span name="regex_fields" style="display: none;"> |
| 145 |
s/<input type="text" id="[% mv.id | html %]" name="regex_search" placeholder="regex pattern" />/ |
| 146 |
<input type="text" id="[% mv.id | html %]" name="regex_replace" placeholder="regex replacement" />/ |
| 147 |
<input type="text" id="[% mv.id | html %]" name="regex_modifiers" placeholder="ig" size="3" /> |
| 148 |
</span> |
| 149 |
[% END %] |
| 150 |
|
| 151 |
[% IF add_delete_checkbox %] |
| 152 |
[% UNLESS ( subfield.mandatory ) %] |
| 153 |
<input type="checkbox" id="row[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]" title="Check to delete subfield [% subfield.subfield | html %]" name="disable_input" value="[% subfield.subfield | html %]" /> |
| 154 |
[% ELSE %] |
| 155 |
<span class="required">Required</span> |
| 156 |
[% END %] |
| 157 |
[% ELSE %] |
| 158 |
[% IF ( subfield.mandatory ) %] <span class="required">Required</span> |
| 159 |
[% ELSIF ( subfield.important ) %] <span class="important">Important</span> |
| 160 |
[% END %] |
| 161 |
[% END %] |
| 162 |
|
| 163 |
[% IF add_regex %] |
| 164 |
[% IF (mv.type == 'text' || mv.type == 'text2' || mv.type == 'textarea' ) %] |
| 165 |
<a href="#" name="field_regex" id="[% subfield.id | html %]" >RegEx</a> |
| 166 |
[% END %] |
| 167 |
[% END %] |
| 168 |
|
| 169 |
[% IF ( subfield.repeatable ) %] |
| 170 |
<a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode.parentNode); return false;"> |
| 171 |
<img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" /> |
| 172 |
</a> |
| 173 |
[% END %] |
| 174 |
|
| 175 |
<span class="hint" id="hint[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]"></span> |
| 176 |
|
| 177 |
</div> |
| 178 |
</li> |
| 179 |
[% END %] |
| 180 |
</ol> |
| 181 |
[% END %] |