Browse Source

Bug 10469: Display more when editing subfields in frameworks

This patch removes the accordion feature from the MARC subfields
structure editor. The form is not long, and I think in this case the
accordion makes the process more difficult to navigate.

To test, apply the patch and go to Administration -> MARC frameworks ->
Framework structure -> Subfield structure -> Edit. Choose a tag with
multiple subfields to best test the changes.

The whole form should apppear, and tabs functionality should work
correctly. Test that making changes under multiple tabs works correctly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Owen Leonard 5 years ago
committed by Martin Renvoize
parent
commit
5be3ed3fe4
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 14
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt
  2. 1
      koha-tmpl/intranet-tmpl/prog/js/marc_subfields_structure.js

14
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt

@ -5,6 +5,7 @@
<title>Koha &rsaquo; Administration &rsaquo;[% IF ( add_form ) %][% IF ( use_heading_flags_p ) %][% IF ( heading_edit_subfields_p ) %] MARC subfield structure &rsaquo; Edit MARC subfields constraints[% END %][% ELSE %] MARC subfield structure &rsaquo; [% action | html %][% END %][% END %]
[% IF ( delete_confirm ) %] MARC subfield structure &rsaquo; Confirm deletion of subfield [% tagsubfield | html %][% END %][% IF ( delete_confirmed ) %] MARC subfield structure &rsaquo; Subfield deleted[% END %][% IF ( else ) %]MARC subfield structure[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<style>.constraints::after { content: " "; clear: both; display:block; }</style>
</head>
<body id="admin_marc_subfields_structure" class="admin">
@ -60,9 +61,9 @@
[% FOREACH loo IN loop %]
<div class="constraints" id="sub[% loo.urisubfieldcode | html %]field">
<h3><a href="#basic[% loo.urisubfieldcode | uri %]">Basic constraints</a></h3>
<div id="basic[% loo.urisubfieldcode | html %]">
<div id="basic[% loo.urisubfieldcode | html %]" class="contraints">
<fieldset class="rows">
<legend>Basic constraints</legend>
<ol>
[% IF ( subfieldcode == 0 || subfieldcode ) %]
<li><span class="label">Subfield code:</span> [% loo.subfieldcode | html %] <input type="hidden" name="tagsubfield" value="[% loo.subfieldcode | html %]" /></li>
@ -114,9 +115,9 @@
</div>
<h3><a href="#advanced[% loo.urisubfieldcode | uri %]">Advanced constraints</a></h3>
<div id="advanced[% loo.urisubfieldcode | html %]">
<div id="advanced[% loo.urisubfieldcode | html %]" class="contraints">
<fieldset class="rows">
<legend>Advanced constraints</legend>
<ol><li><label for="defaultvalue[% loo.row | html %]">Default value:</label>
<input type="text" name="defaultvalue" id="defaultvalue[% loo.row | html %]" value="[% loo.defaultvalue | html %]" /></li>
<li><label for="maxlength[% loo.row | html %]">Max length:</label><input type="text" id="maxlength[% loo.row | html %]" name="maxlength" value="[% loo.maxlength | html %]" size="4" /> (see online help)</li>
@ -161,9 +162,10 @@
</ol>
</fieldset>
</div>
<h3><a href="#oth[% loo.urisubfieldcode | uri %]">Other options (choose one)</a></h3>
<div id="oth[% loo.urisubfieldcode | html %]">
<div id="oth[% loo.urisubfieldcode | html %]" class="contraints">
<fieldset class="rows">
<legend>Other options (choose one)</legend>
<ol>
<li>
<label for="authorised_value[% loo.row | html %]">Authorized value:</label>

1
koha-tmpl/intranet-tmpl/prog/js/marc_subfields_structure.js

@ -1,5 +1,4 @@
$(document).ready(function() {
$( ".constraints" ).accordion();
$('#subfieldtabs').tabs();
$("input[id^='hidden_']").click(setHiddenValue);
$("input[id^='hidden-']").each(function() {

Loading…
Cancel
Save