It was tricky to write the previous patch so I decided to clean the
ground (a bit) for later, taking advantage of having people who are
going to test the whole area.
We can move it to its own bug report if QA wants to.
Sponsored-by: Orex Digital
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
my$sth=$dbh->prepare("select * from auth_subfield_structure where tagfield=? and authtypecode=? order by display_order");# and tagsubfield='$tagsubfield'");
# my $sth=$dbh->prepare("replace auth_subfield_structure (authtypecode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,frameworkcode,value_builder,hidden,isurl)
[% ELSE %]<a href="/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=[% tagfield | uri %]&tagsubfield=[% tagsubfield | uri %]&authtypecode=[% authtypecode |uri %]">Authority MARC subfield structure for [% tagfield | html %]</a> ›
[% END %]
[% IF ( delete_confirm ) %]Confirm deletion of subfield [% tagsubfield | html %]?[% END %]
[% IF ( delete_confirmed ) %]Data deleted[% END %]
[% IF ( add_form ) %]
[% IF ( use_heading_flags_p ) %]
[% IF ( heading_edit_subfields_p ) %]Edit MARC subfields constraints[% END %]
@ -111,7 +110,7 @@
<ol>
<li><label for="ohidden[% loo.row | html %]">Select to display or not:</label>
<select name="ohidden" size="1" id="ohidden[% loo.row | html %]">
<h1>Authority MARC subfield structure admin for [% tagfield | html %] (authority: [% authtypecode | html %])</h1>
<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>
@ -279,14 +268,14 @@
<a href="/cgi-bin/koha/admin/auth_subfields_structure.pl?op=add_form&tagfield=[% tagfield | uri %]&authtypecode=[% authtypecode | uri %]#sub[% loo.tagsubfield | uri %]field">[% loo.tagsubfield | html %]</a>
</td>
<td>
[% IF ( loo.subfield_ignored ) %]
[% IF loo.tab == -1 %]
<em>[% loo.liblibrarian | html_entity %]</em>
[% ELSE %]
[% loo.liblibrarian | html_entity %]
[% END %]
</td>
<td>
[% IF ( loo.subfield_ignored ) %]
[% IF loo.subfield_ignored == -1 %]
<em>subfield ignored</em>
[% ELSE %]
<strong>Tab:</strong>[% loo.tab | html %],
@ -323,16 +312,6 @@
<a class="cancel" href="auth_tag_structure.pl?searchfield=[% tagfield | uri %]&authtypecode=[% authtypecode | uri %]">Cancel</a></fieldset>
</form>
[% IF ( previous ) %]
<input type="image" src="[% interface | html %]/[% theme | html %]/images/1leftarrow.png" title="previous" alt="previous" />
</a>
[% END %]
[% IF ( next ) %]
[% next | html %]
<input type="image" src="[% interface | html %]/[% theme | html %]/images/1rightarrow.png" title="next" alt="next" />
<input type="hidden" name="searchfield" value="[% searchfield | html %]" />
<input type="hidden" name="tagfield" value="[% tagfield | html %]" />
<input type="hidden" name="tagsubfield" value="[% tagsubfield | html %]" />
<input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
<input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
<input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
<input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
<button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this subfield</button>
</form>
<form action="[% script_name | html %]" method="post">
<input type="hidden" name="searchfield" value="[% searchfield | html %]" />
<input type="hidden" name="tagfield" value="[% tagfield | html %]" />
<input type="hidden" name="tagsubfield" value="[% tagsubfield | html %]" />
<input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
<input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
<input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
<input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
<button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
</form>
</div> <!-- /.dialog.alert -->
[% END # /IF ( delete_confirm ) %]
[% IF ( delete_confirmed ) %]
<h3>Data deleted</h3>
<form action="[% script_name | html %]" method="post">
<input type="hidden" name="tagfield" value="[% tagfield | html %]" />
<input type="submit" value="OK" />
</form>
[% END %]
[% IF ( else ) %]
<h1>MARC subfield structure admin for [% tagfield | html %] [% IF ( frameworkcode ) %](framework [% frameworkcode | html %])[% ELSE %](default framework)[% END %]</h1>
@ -337,14 +321,14 @@
<tr>
<td><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=[% loo.tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]#sub[% loo.tagsubfield | uri %]field">[% loo.tagsubfield | html %]</a></td>