Bug 29001: (QA follow-up) Remove code duplication
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / marc_subfields_structure.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>
6     [%- IF ( add_form ) -%]
7         [%- IF ( use_heading_flags_p ) -%]
8             [%- IF ( heading_edit_subfields_p ) -%]
9                 Edit MARC subfields constraints &rsaquo; MARC subfield structure
10             [%- END -%]
11
12         [%- ELSE -%]
13             [%- action | html -%] &rsaquo; MARC subfield structure
14         [%- END -%]
15
16     [%- END -%]
17
18     [%- IF ( delete_confirm ) -%]
19
20         MARC subfield structure &rsaquo; Confirm deletion of subfield [%- mss.tagsubfield | html -%]
21
22         Confirm deletion of subfield [%- tagsubfield | html -%] &rsaquo; MARC subfield structure
23     [%- END -%]
24
25     [%- IF ( delete_confirmed ) -%]
26         Subfield deleted &rsaquo; MARC subfield structure
27
28     [%- END -%]
29
30     [%- IF ( else ) -%]
31         MARC subfield structure
32     [%- END -%] &rsaquo; Administration &rsaquo; Koha
33 </title>
34 [% INCLUDE 'doc-head-close.inc' %]
35 <style>.constraints::after { content:  " "; clear: both; display:block; }</style>
36 </head>
37
38 <body id="admin_marc_subfields_structure" class="admin">
39     [% INCLUDE 'header.inc' %]
40     [% INCLUDE 'prefs-admin-search.inc' %]
41
42     <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
43         <ol>
44             <li>
45                 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
46             </li>
47             <li>
48                 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
49             </li>
50             <li>
51                 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
52             </li>
53             <li>
54                 <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode | uri %]&amp;searchfield=[% tagfield | uri %]">
55                     [% IF ( frameworkcode ) %]
56                         [% frameworkcode | html %]
57                     [% ELSE %]
58                         <span>Default</span>
59                     [% END %] <span>framework structure</span>
60                 </a>
61             </li>
62
63             [% IF ( add_form ) %]
64                 [% IF ( use_heading_flags_p ) %]
65                     [% IF ( heading_edit_subfields_p ) %]
66                         <li>
67                             <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&amp;frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] subfield structure</a>
68                         </li>
69                         <li>
70                             <a href="#" aria-current="page">
71                                 Edit subfields constraints
72                             </a>
73                         </li>
74                     [% END %]
75                 [% ELSE %]
76                     <li>
77                         <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&amp;frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] Subfield structure</a>
78                     </li>
79                     <li>
80                         <a href="#" aria-current="page">
81                             [% action | html %]
82                         </a>
83                     </li>
84                 [% END %]
85             [% END %]
86
87             [% IF ( delete_confirm ) %]
88                 <li>
89                     <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% mss.tagfield | uri %]&amp;frameworkcode=[% mss.frameworkcode | uri %]">Tag [% mss.tagfield | html %] Subfield structure</a>
90                 </li>
91                 <li>
92                     <a href="#" aria-current="page">
93                         Confirm deletion of subfield [% mss.tagsubfield | html %]i
94                     </a>
95                 </li>
96             [% END %]
97
98             [% IF ( else ) %]
99                 <li>
100                     <a href="#" aria-current="page">
101                         Tag [% tagfield | html %] Subfield structure
102                     </a>
103                 </li>
104             [% END %]
105         </ol>
106     </nav> <!-- /#breadcrumbs -->
107
108     <div class="main container-fluid">
109         <div class="row">
110             <div class="col-sm-10 col-sm-push-2">
111                 <main>
112
113                     [% IF ( add_form ) %]
114                         <h1>
115                             [% IF ( use_heading_flags_p ) %]
116                                 [% IF ( heading_edit_subfields_p ) %]<span>Tag</span> [% tagfield | html %] <span>Subfield constraints</span>[% END %]
117                             [% ELSE %]
118                                 [% action | html %]
119                             [% END %]
120                         </h1>
121
122                         <form action="[% script_name | html %]" name="Aform" method="post">
123                             <input type="hidden" name="op" value="add_validate" />
124                             <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
125                             <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
126
127                             [% BLOCK outputsubfield %][% FILTER collapse %]
128                                 [% SWITCH ( subfieldanchor ) %]
129                                     [%   CASE "@" %]
130                                     AT
131                                     [%   CASE "%" %]
132                                     %
133                                     [%   CASE  %]
134                                     [% subfieldanchor | html %]
135                                 [% END %]
136                             [% END %][% END %]
137
138                             <div id="subfieldtabs" class="toptabs numbered">
139                                  <ul class="nav nav-tabs" role="tablist">
140                                     [% FOREACH loo IN loop %]
141                                         <li id="tab_subfield_[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]" class="tab-item" role="presentation">
142                                             [% IF ( loo.new_subfield ) %]
143                                                 <a href="#sub[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]field" aria-controls="sub[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]field" role="tab" data-toggle="tab" title="[% loo.liblibrarian | html_entity %]">New</a>
144                                             [% ELSE %]
145                                                 <a href="#sub[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]field" aria-controls="sub[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]field" role="tab" data-toggle="tab" title="[% loo.liblibrarian | html_entity %]">
146                                                     [% loo.subfieldcode | html %]
147                                                 </a>
148                                             [% END %]
149                                         </li>
150                                     [% END %]
151                                 </ul>
152
153                                 <div class="tab-content">
154
155                                     [% FOREACH loo IN loop %]
156                                         <div class="constraints tab-pane" role="tabpanel" id="sub[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]field">
157                                             <input type="hidden" name="tab_id" value="[% loo.row | html %]" />
158                                             <div id="basic[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]" class="contraints">
159                                                 <fieldset class="rows">
160                                                     <legend>Basic constraints</legend>
161                                                     <ol>
162                                                         [% IF ( subfieldcode == 0 || subfieldcode ) %]
163                                                             <li>
164                                                                 <span class="label">Subfield code:</span>
165                                                                 [% loo.subfieldcode | html %]
166                                                                 <input type="hidden" name="tagsubfield" value="[% loo.subfieldcode | html %]" />
167                                                             </li>
168                                                         [% ELSE %]
169                                                             <li>
170                                                                 <label for="tagsubfield[% loo.row | html %]">Subfield code:</label>
171                                                                     <input type="text" id="tagsubfield[% loo.row | html %]" name="tagsubfield" value="[% loo.subfieldcode | html %]" />
172                                                                 </li>
173                                                         [% END %]
174                                                         <li>
175                                                             <label for="liblibrarian[% loo.row | html %]">Text for librarian: </label>
176                                                             <input id="liblibrarian[% loo.row | html %]" type="text" name="liblibrarian_[% loo.row | html %]" value="[% loo.liblibrarian | html_entity %]" size="40" maxlength="80" />
177                                                         </li>
178                                                         <li>
179                                                             <label for="libopac[% loo.row | html %]">Text for OPAC: </label>
180                                                             <input type="text" id="libopac[% loo.row | html %]" name="libopac_[% loo.row | html %]" value="[% loo.libopac | html_entity %]" size="40" maxlength="80" />
181                                                         </li>
182                                                         <li>
183                                                             <label for="repeatable[% loo.row | html %]">Repeatable: </label>
184                                                             [% IF loo.repeatable %]
185                                                                 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable_[% loo.row | html %]" checked="checked" value="1" />
186                                                             [% ELSE %]
187                                                                 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable_[% loo.row | html %]" value="1" />
188                                                             [% END %]
189                                                         </li>
190                                                         <li>
191                                                             <label for="mandatory[% loo.row | html %]">Mandatory: </label>
192                                                             [% IF loo.mandatory %]
193                                                                 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory_[% loo.row | html %]" checked="checked" value="1" />
194                                                             [% ELSE %]
195                                                                 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory_[% loo.row | html %]" value="1" />
196                                                             [% END %]
197                                                         </li>
198                                                         <li>
199                                                             <label for="important[% loo.row | html %]">Important: </label>
200                                                             [% IF loo.important %]
201                                                                 <input type="checkbox" id="important[% loo.row | html %]" name="important_[% loo.row | html %]" checked="checked" value="1" />
202                                                             [% ELSE %]
203                                                                 <input type="checkbox" id="important[% loo.row | html %]" name="important_[% loo.row | html %]" value="1" />
204                                                             [% END %]
205                                                         </li>
206                                                         <li><label for="tab[% loo.row | html %]">Managed in tab: </label>
207                                                             <select name="tab_[% loo.row | html %]" tabindex="" id="tab[% loo.row | html %]">
208                                                             [%- IF ( loo.tab ==  -1 ) -%]
209                                                                 <option value="-1" selected="selected">ignore</option>
210                                                             [%- ELSE -%]
211                                                                 <option value="-1">ignore</option>
212                                                             [%- END -%]
213                                                             [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -%]
214                                                                 [%- IF ( loo.tab ==  t ) -%]
215                                                                 <option value="[%- t | html -%]" selected="selected">[%- t | html -%]</option>
216                                                                 [%- ELSE -%]
217                                                                 <option value="[%- t | html -%]">[%- t | html -%]</option>
218                                                                 [%- END -%]
219                                                             [%- END -%]
220                                                             [%- IF ( loo.tab ==  10 ) -%]
221                                                                 <option value="10" selected="selected">items (10)</option>
222                                                             [%- ELSE -%]
223                                                                 <option value="10">items (10)</option>
224                                                             [%- END -%]
225                                                             </select>
226                                                             <div class="hint">Ignore means that the subfield does not display in the record editor</div>
227                                                         </li>
228                                                     </ol>
229                                                 </fieldset> <!-- /.rows -->
230                                             </div> <!-- /#basic[%- PROCESS outputsubfield subfieldanchor = subfieldcode -%] -->
231
232                                             <div id="advanced[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]" class="contraints">
233                                                 <fieldset class="rows">
234                                                     <legend>Advanced constraints</legend>
235                                                     <ol>
236                                                         <li>
237                                                             <label for="defaultvalue[% loo.row | html %]">Default value:</label>
238                                                             <input type="text" name="defaultvalue_[% loo.row | html %]" id="defaultvalue[% loo.row | html %]" value="[% loo.defaultvalue | html %]" />
239                                                         </li>
240                                                         <li>
241                                                             <label for="maxlength[% loo.row | html %]">Max length:</label>
242                                                             <input type="text" id="maxlength[% loo.row | html %]" name="maxlength_[% loo.row | html %]" value="[% loo.maxlength | html %]" size="4" />
243                                                         </li>
244                                                         <li>
245                                                             [% IF loo.hidden_protected %]
246                                                                 <input type="hidden" id="hidden-[% loo.row | html %]" name="hidden_[% loo.row | html %]" value="[% loo.hidden | html %]" data-koha-protected="1" />
247                                                             [% ELSE %]
248                                                                 <input type="hidden" id="hidden-[% loo.row | html %]" name="hidden_[% loo.row | html %]" value="[% loo.hidden | html %]" />
249                                                             [% END %]
250                                                             <label for="hidden[% loo.row | html %]">Visibility: </label>
251                                                             <input type="checkbox" id="hidden_opac_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_opac_[% loo.row | html %]"/>
252                                                             <label for="hidden_opac_[% loo.row | html %]" style="float: none;">OPAC</label>
253                                                             <input type="checkbox" id="hidden_intranet_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_intranet_[% loo.row | html %]"/>
254                                                             <label for="hidden_intranet_[% loo.row | html %]" style="float: none;">Intranet</label>
255                                                             <input type="checkbox" id="hidden_editor_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_editor_[% loo.row | html %]"/>
256                                                             <label for="hidden_editor_[% loo.row | html %]" style="float: none;">Editor</label>
257                                                             <input type="checkbox" id="hidden_collapsed_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_collapsed_[% loo.row | html %]"/>
258                                                             <label for="hidden_collapsed_[% loo.row | html %]" style="float: none;">Collapsed</label>
259                                                             <input type="checkbox" id="hidden_flagged_[% loo.row | html %]" name="flagged_[% loo.row | html %]"/>
260                                                             <label for="hidden_flagged_[% loo.row | html %]" style="float: none;">Flagged</label>
261                                                         </li>
262                                                         <li>
263                                                             <label for="isurl[% loo.row | html %]">Is a URL:</label>
264                                                             [% IF loo.isurl %]
265                                                                 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl_[% loo.row | html %]" checked="checked" value="1" />
266                                                             [% ELSE %]
267                                                                 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl_[% loo.row | html %]" value="1" />
268                                                             [% END %]
269                                                             <span class="hint">If checked, it means that the subfield is a URL and can be clicked</span>
270                                                         </li>
271                                                         <li>
272                                                             <label for="link[% loo.row | html %]">Link:</label>
273                                                             <input type="text" id="link[% loo.row | html %]" name="link_[% loo.row | html %]" value="[% loo.link | html %]" size="10" maxlength="80" />
274                                                             <div class="hint">An index name, e.g. title or Local-Number</div>
275                                                         </li>
276                                                         <li>
277                                                             <label for="kohafield[% loo.row | html %]">Koha link:</label>
278                                                             <!-- This select should be DISABLED; value is submitted by the following hidden input -->
279                                                             <select name="kohafield_[% loo.row | html %]" id="kohafield[% loo.row | html %]" disabled>
280                                                             [% FOREACH value IN loo.kohafields %]
281                                                             [% IF ( value == loo.kohafield ) %]
282                                                                 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
283                                                             [% ELSE %]
284                                                                 <option value="[% value | html %]">[% value | html %]</option>
285                                                             [% END %]
286                                                             [% END %]
287                                                             </select>
288                                                             <!-- Do NOT remove this next hidden input! We need it to save kohafield. -->
289                                                             <input type="hidden" name="kohafield_[% loo.row | html %]" value="[% loo.kohafield | html %]"/>
290                                                         </li>
291                                                     </ol>
292                                                 </fieldset> <!-- /.rows -->
293                                             </div> <!-- /#advanced[%- PROCESS outputsubfield subfieldanchor = subfieldcode -%] -->
294
295                                             <div id="oth[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]" class="constraints">
296                                                 <fieldset class="rows">
297                                                     <legend>Other options (choose one)</legend>
298                                                     <ol>
299                                                         <li>
300                                                             <label for="authorised_value[% loo.row | html %]">Authorized value:</label>
301                                                             <select name="authorised_value_[% loo.row | html %]" id="authorised_value[% loo.row | html %]">
302                                                             <option value=""></option>
303                                                             [% FOREACH value IN loo.authorised_values %]
304                                                                 [% IF ( value == loo.authorised_value ) %]
305                                                                     <option value="[% value | html %]" selected="selected">[% value | html %]</option>
306                                                                 [% ELSE %]
307                                                                     <option value="[% value | html %]">[% value | html %]</option>
308                                                                 [% END %]
309                                                             [% END %]
310                                                             </select>
311                                                         </li>
312                                                         <li>
313                                                             <label for="authtypecode[% loo.row | html %]">Thesaurus:</label>
314                                                             <select name="authtypecode_[% loo.row | html %]" id="authtypecode[% loo.row | html %]">
315                                                             [% FOREACH value IN loo.authtypes %]
316                                                                 [% IF ( value == loo.authtypecode ) %]
317                                                                     <option value="[% value | html %]" selected="selected">[% value | html %]</option>
318                                                                 [% ELSE %]
319                                                                     <option value="[% value | html %]">[% value | html %]</option>
320                                                                 [% END %]
321                                                             [% END %]
322                                                             </select>
323                                                         </li>
324                                                         <li>
325                                                             <label for="value_builder[% loo.row | html %]">Plugin:</label>
326                                                             <select name="value_builder_[% loo.row | html %]" id="value_builder[% loo.row | html %]">
327                                                             [% FOREACH value IN loo.value_builders %]
328                                                                 [% IF ( value == loo.value_builder ) %]
329                                                                     <option value="[% value | html %]" selected="selected">[% value | html %]</option>
330                                                                 [% ELSE %]
331                                                                     <option value="[% value | html %]">[% value | html %]</option>
332                                                                 [% END %]
333                                                             [% END %]
334                                                             </select>
335                                                         </li>
336                                                     </ol>
337                                                 </fieldset> <!-- /.rows -->
338                                             </div> <!-- /#oth[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%] -->
339                                         </div><!-- /constraints -->
340                                     [% END # /FOREACH loo %]
341                                 </div> <!-- /.tab-content -->
342                             </div><!-- /subfieldtabs -->
343
344                             <fieldset class="action">
345                                 <input type="submit" value="Save changes" /> <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield  | uri %]&amp;frameworkcode=[% frameworkcode | uri %]" class="cancel">Cancel</a>
346                             </fieldset>
347                         </form>
348                     [% END # /IF ( add_form ) %]
349
350                     [% IF ( delete_confirm ) %]
351                         <div class="dialog alert">
352                             <h1>Confirm deletion of subfield [% mss.tagsubfield | html %]?</h1>
353                             <p>Subfield: [% mss.tagsubfield | html %]</p>
354                             <p>Description: [% mss.liblibrarian | html_entity %]</p>
355
356                             <form action="[% delete_link | html %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
357                                 <input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
358                                 <input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
359                                 <input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
360                                 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this subfield</button>
361                             </form>
362
363
364                             <form action="[% script_name | html %]" method="post">
365                                 <input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
366                                 <input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
367                                 <input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
368                                 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
369                             </form>
370                         </div> <!-- /.dialog.alert -->
371                     [% END # /IF ( delete_confirm ) %]
372
373                     [% IF ( else ) %]
374                         <h1>MARC subfield structure admin for [% tagfield | html %] [% IF ( frameworkcode ) %](framework [% frameworkcode | html %])[% ELSE %](default framework)[% END %]</h1>
375
376                         <p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit.</p>
377                         <p>The column 'Koha field' shows that the subfield is linked with a Koha field.</p>
378
379                         <table id="table_marcsubfieldstructure">
380                             <thead>
381                                 <tr>
382                                     <th>Subfield</th>
383                                     <th>Text</th>
384                                     <th>Constraints</th>
385                                     <th class="NoSort noExport">Actions</th>
386                                 </tr>
387                             </thead>
388                             <tbody>
389                                 [% FOREACH loo IN loop %]
390                                     <tr>
391                                         <td><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&amp;tagfield=[% loo.tagfield | uri %]&amp;frameworkcode=[% frameworkcode | uri %]#sub[% loo.tagsubfield | uri %]field">[% loo.tagsubfield | html %]</a></td>
392                                         <td>
393                                             [% IF loo.tab == -1 %]
394                                                 <em>[% loo.liblibrarian | html_entity %]</em>
395                                             [% ELSE %]
396                                                 [% loo.liblibrarian | html_entity %]
397                                             [% END %]
398                                         </td>
399                                         <td>
400                                             [% IF loo.tab == -1 %]
401                                                 <em>subfield ignored</em>
402                                             [% ELSE %]
403                                                 <span>Tab:</span>[% loo.tab | html %],
404                                                 [% IF ( loo.kohafield ) %] | <span>Koha field:</span> [% loo.kohafield | html %], [% END %]
405                                                 [% IF ( loo.repeatable ) %]<span>Repeatable</span>, [% ELSE %]<span>Not repeatable</span>,[% END %]
406                                                 [% IF ( loo.mandatory ) %]<span>Mandatory</span>, [% ELSE %]<span>Not mandatory</span>,[% END %]
407                                                 [% IF ( loo.important ) %]<span>Important</span>, [% ELSE %]<span>Not important</span>,[% END %]
408                                                 [% IF ( loo.seealso ) %] | <span>See also:</span> [% loo.seealso | html %],[% END %]
409                                                 [% IF ( loo.hidden ) %]<span>hidden</span>,[% END %]
410                                                 [% IF ( loo.isurl ) %]<span>is a URL</span>,[% END %]
411                                                 [% IF ( loo.authorised_value ) %] | <span>Auth value:</span>[% loo.authorised_value | html %],[% END %]
412                                                 [% IF ( loo.authtypecode ) %] | <span>Authority:</span>[% loo.authtypecode | html %],[% END %]
413                                                 [% IF ( loo.value_builder ) %] | <span>Plugin:</span>[% loo.value_builder | html %],[% END %]
414                                                 [% IF ( loo.link ) %] | <span>Link:</span>[% loo.link | html %],[% END %]
415                                             [% END %]
416                                         </td>
417                                         <td class="actions">
418                                             <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&amp;tagfield=[% loo.tagfield | uri %]&tagsubfield=[% loo.tagsubfield | uri %]&amp;frameworkcode=[% frameworkcode | uri %]#sub[% loo.tagsubfield | uri %]field" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
419                                             <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=delete_confirm&amp;tagfield=[% loo.tagfield | uri %]&amp;tagsubfield=[% loo.tagsubfield | uri %]&amp;frameworkcode=[% frameworkcode | uri %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
420                                         </td>
421                                     </tr>
422                                 [% END %]
423                             </tbody>
424                         </table> <!-- /#table_marcsubfieldstructure -->
425
426                         <form action="[% script_name | html %]" method="get">
427                             <fieldset class="action"><input type="hidden" name="op" value="add_form" />
428                                 <input type="hidden" name="tagfield" value="[% edit_tagfield | html %]" />
429                                 <input type="hidden" name="frameworkcode" value="[% edit_frameworkcode | html %]" />
430                                 <input type="submit" value="Edit subfields" />
431                                 <a class="cancel" href="marctagstructure.pl?searchfield=[% tagfield | uri %]&amp;frameworkcode=[% frameworkcode | html %]">Cancel</a>
432                             </fieldset>
433                         </form>
434
435                     [% END # /IF else %]
436
437                 </main>
438             </div> <!-- /.col-sm-10.col-sm-push-2 -->
439
440             <div class="col-sm-2 col-sm-pull-10">
441                 <aside>
442                     [% INCLUDE 'admin-menu.inc' %]
443                 </aside>
444             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
445         </div> <!-- /.row -->
446
447     [% MACRO jsinclude BLOCK %]
448         [% INCLUDE 'datatables.inc' %]
449         [% Asset.js("js/admin-menu.js") | $raw %]
450         <script>
451             var tagsubfield = "[% tagsubfield | html %]";
452         </script>
453         [% Asset.js("js/marc_subfields_structure.js") | $raw %]
454     [% END %]
455
456     [% INCLUDE 'intranet-bottom.inc' %]