Bug 30417: Switch to Bootstrap tabs on the basic library transfer limit page

This patch updates the basic library transfer limits  page to use
Bootstrap tabs instead of jQueryUI.

To test, apply the patch and go to Administraion -> Library transfer
limits.

Test that the tabs look correct and work correctly. The functionality of
the page should be unchanged.

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Owen Leonard 2022-03-31 13:16:46 +00:00 committed by Fridolin Somers
parent 87e5601d53
commit 711139190c

View file

@ -53,14 +53,18 @@
<div id="transferlimit_tabs" class="toptabs">
<ul class="ui-tabs-nav">
[% FOREACH codes_loo IN codes_loop %]<li><a href="#[% codes_loo.code | uri %]set">[% codes_loo.code | html %]</a></li>[% END %]
<ul class="nav nav-tabs" role="tablist">
[% FOREACH codes_loo IN codes_loop %]
<li role="presentation">
<a href="#[% codes_loo.code | uri %]set" aria-controls="[% codes_loo.code | uri %]set" role="tab" data-toggle="tab">[% codes_loo.code | html %]</a>
</li>
[% END %]
</ul>
<form method="post" action="branch_transfer_limits.pl">
<div class="tab-content">
[% FOREACH codes_loo IN codes_loop %]
<div id="[% codes_loo.code | html %]set">
<div role="tabpanel" class="tab-pane" id="[% codes_loo.code | html %]set">
<h4>Policy for [% codes_loo.limit_phrase | html %]: [% codes_loo.code | html %]</h4>
<p><a id="CheckAll[% codes_loo.code | html %]table" data-cb="[% codes_loo.code | html %]" class="checkall" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="UncheckAll[% codes_loo.code | html %]table" data-cb="[% codes_loo.code | html %]" class="uncheckall" href="#"><i class="fa fa-remove"></i> Clear all</a></p>
@ -90,6 +94,7 @@
</table>
</div>
[% END %]
</div>
<fieldset class="action">
<input type="hidden" name="updateLimits" value="1" />
@ -128,7 +133,10 @@
$(this).prop("checked", false);
});
});
$('#transferlimit_tabs').tabs();
if( $(".tab-pane.active").length < 1 ){
$("#transferlimit_tabs a:first").tab("show");
}
$('#branchselect').change(function() {
$('#selectlibrary').submit();