1 [% BLOCK options_for_libraries %]
2 [% FOREACH l IN libraries %]
4 <option value="[% prefix | html %][% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
6 <option value="[% prefix | html %][% l.branchcode | html %]">[% l.branchname | html %]</option>
11 [% BLOCK options_for_desks %]
12 <option id="nodesk" value="">---</option>
13 [% FOREACH d IN desks %]
14 [% IF d.branchcode == branch %]
15 [% IF selected == d.desk_id %]
16 <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" selected="selected">[% d.desk_name | html %]</option>
18 <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" >[% d.desk_name | html %]</option>
21 <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" disabled hidden>[% d.desk_name | html %]</option>
26 [% BLOCK options_for_registers %]
27 [% FOREACH r IN registers %]
28 [% IF r.branch == Branches.GetLoggedInBranchcode %]
30 <option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]" selected="selected">[% r.name | html %]</option>
32 <option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]">[% r.name | html %]</option>
35 <option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]" disabled style="display: none">[% r.name | html %]</option>
40 [% BLOCK options_for_authorised_value_categories %]
41 [% FOREACH avc IN authorised_value_categories %]
43 <option value="[% avc.category | html %]" selected="selected">[% avc.category | html %]</option>
45 <option value="[% avc.category | html %]">[% avc.category | html %]</option>
50 [% BLOCK options_for_item_types %]
51 [% FOREACH itemtype IN itemtypes %]
52 [% IF itemtype.itemtype == selected_itemtype %]
53 <option value="[% itemtype.itemtype | html %]" selected="selected">
55 <option value="[% itemtype.itemtype | html %]">
57 [% itemtype.translated_description | html %]
62 [% BLOCK subfields_for_item %]
64 [% FOREACH subfield IN subfields %]
65 [% IF subfield.kohafield == 'items.more_subfields_xml' %]
66 [% SET kohafield = 'items.more_subfields_xml_' _ subfield.subfield %]
68 [% SET kohafield = subfield.kohafield %]
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>
76 <label>[% subfield.subfield | html %] - [% subfield.marc_lib | $raw %]</label>
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%">
86 <select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor select2" data-category="[% mv.category | html %]" data-width="50%">
89 [% FOREACH aval IN mv.values %]
90 [% IF aval == mv.default %]
91 <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
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>
96 <option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>
101 [% ELSIF ( mv.type == 'text_auth' ) %]
103 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
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>
109 [% ELSIF ( mv.type == 'text_plugin' ) %]
111 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
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>
117 <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="Tag editor">...</a>
119 [% UNLESS no_plugin %][%# FIXME - from batchMod-edit, jQuery is included at the end of the template and cataloguing plugins are not working in this situation %]
120 [%- mv.javascript | $raw -%]
123 [% ELSIF ( mv.type == 'text' ) %]
125 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
127 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
129 [% ELSIF ( mv.type == 'textarea' ) %]
131 <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" readonly="readonly" >[% mv.value | html %]</textarea>
133 <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" >[% mv.value | html %]</textarea>
137 [% IF subfield.kohafield == 'items.more_subfields_xml' %]
138 <input type="hidden" name="items.more_subfields_xml" value="[% subfield.subfield | html %]" />
140 <input type="hidden" name="tag" value="[% subfield.tag | html %]" />
141 <input type="hidden" name="subfield" value="[% subfield.subfield | html %]" />
142 <input type="hidden" name="mandatory" value="[% subfield.mandatory | html %]" />
143 <input type="hidden" name="important" value="[% subfield.important | html %]" />
146 <span name="regex_fields" style="display: none;">
147 s/<input type="text" name="[% kohafield | html %]_regex_search" class="regex_search" placeholder="regex pattern" />/
148 <input type="text" name="[% kohafield | html %]_regex_replace" class="regex_replace" placeholder="regex replacement" />/
149 <input type="text" name="[% kohafield | html %]_regex_modifiers" class="regex_modifiers" placeholder="ig" size="3" />
153 [% IF add_delete_checkbox %]
154 [% UNLESS ( subfield.mandatory ) %]
155 <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 %]" />
157 <span class="required">Required</span>
160 [% IF ( subfield.mandatory ) %] <span class="required">Required</span>
161 [% ELSIF ( subfield.important ) %] <span class="important">Important</span>
166 [% IF (mv.type == 'text' || mv.type == 'text2' || mv.type == 'textarea' ) %]
167 <a href="#" name="[% kohafield | html %]_field_regex" class="field_regex" id="[% subfield.id | html %]" >RegEx</a>
171 [% IF ( subfield.repeatable ) %]
172 <a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode.parentNode); return false;">
173 <img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
177 <span class="hint" id="hint[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]"></span>