Fridolin Somers
7a306d72ab
In branch transfer limits, tables are paginated with 20 rows by default. The bug is that datatable not only hides rows, they are not in form. So when submitting form, rows not visible are erased. Test plan : Wihout patch : - Create 22 branches, you can hack the creation form by manualling calling URL : /cgi-bin/koha/admin/branches.pl?op=add_validate&branchcode=Bxx&branchname=Bxx - Go to Administration > Library transfer limits - You see table first page : only 20 first rows are shown - You see all checkboxes are checked - Go to second page of this table - Save => You see table first page with all checkboxes unchecked With patch the is no pagination, all checkboxes are shown when you save Signed-off-by: Axelle Clarisse <axelle.clarisse@univ-amu.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
122 lines
4.8 KiB
Text
122 lines
4.8 KiB
Text
[% USE Branches %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Administration › Library checkin and transfer policy</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(document).ready(function(){
|
|
$("#CheckAll").click(function(){ $("#transferlimit_tabs").checkCheckboxes(); return false; });
|
|
$("#UncheckAll").click(function(){ $("#transferlimit_tabs").unCheckCheckboxes(); return false; });
|
|
$('#transferlimit_tabs').tabs();
|
|
|
|
$('#branchselect').change(function() {
|
|
$('#selectlibrary').submit();
|
|
});
|
|
|
|
var checkall = $(".checkall");
|
|
var uncheckall = $(".uncheckall");
|
|
|
|
$(checkall).click(function(){
|
|
var tid = $(this).attr("id");
|
|
tid = tid.replace("CheckAll","");
|
|
$("#"+tid).checkCheckboxes();
|
|
return false;
|
|
});
|
|
|
|
$(uncheckall).click(function(){
|
|
var tid = $(this).attr("id");
|
|
tid = tid.replace("UncheckAll","");
|
|
$("#"+tid).unCheckCheckboxes();
|
|
return false;
|
|
});
|
|
$(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aoColumnDefs": [
|
|
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
|
|
],
|
|
'bPaginate': false
|
|
}));
|
|
});
|
|
//]]>
|
|
</script>
|
|
<style type="text/css">td { text-align: center; } .sorted { min-width: 50%; }</style>
|
|
</head>
|
|
<body id="admin_branch_transfer_limits" class="admin">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'prefs-admin-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Set library checkin and transfer policy</div>
|
|
|
|
<div id="doc3" class="yui-t1">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<h1>Library [% branchcode %] - [% Branches.GetName( branchcode ) %] Checkin and transfer policy</h1>
|
|
<form method="get" action="/cgi-bin/koha/admin/branch_transfer_limits.pl" id="selectlibrary">
|
|
<label for="branchselect">Select a library :</label>
|
|
<select name="branchcode" id="branchselect">
|
|
[% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
|
|
</select>
|
|
</form>
|
|
|
|
<p class="help">Check the boxes for the libraries you accept to checkin items from.</p>
|
|
<fieldset>[% IF ( limitType == 'ccode' ) %]<strong>For all collection codes: </strong>[% ELSE %]<strong>For all item types: </strong>[% END %]<a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="UncheckAll" href="#"><i class="fa fa-remove"></i> Clear all</a></fieldset>
|
|
|
|
|
|
<div id="transferlimit_tabs" class="toptabs">
|
|
<ul class="ui-tabs-nav">
|
|
[% FOREACH codes_loo IN codes_loop %]<li><a href="#[% codes_loo.code %]set">[% codes_loo.code %]</a></li>[% END %]
|
|
</ul>
|
|
|
|
<form method="post" action="branch_transfer_limits.pl">
|
|
|
|
[% FOREACH codes_loo IN codes_loop %]
|
|
<div id="[% codes_loo.code %]set">
|
|
<h4>Policy for [% codes_loo.limit_phrase %]: [% codes_loo.code %]</h4>
|
|
<p><a id="CheckAll[% codes_loo.code %]table" class="checkall" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="UncheckAll[% codes_loo.code %]table" class="uncheckall" href="#"><i class="fa fa-remove"></i> Clear all</a></p>
|
|
|
|
<table id="[% codes_loo.code %]table" class="sorted">
|
|
<thead>
|
|
<tr>
|
|
<th>Library</th>
|
|
<th>Allow transfer?</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
[% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
|
|
<tr>
|
|
<td><label style="min-width:400px;" for="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row">[% to_branch_loo.toBranch %] - [% Branches.GetName( to_branch_loo.toBranch ) %]</label></td>
|
|
<td>
|
|
[% IF ( to_branch_loo.isChecked ) %]
|
|
<input type="checkbox" id="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row" name="[% to_branch_loo.code %]_[% to_branch_loo.toBranch %]" checked="checked" />
|
|
[% ELSE %]
|
|
<input type="checkbox" id="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row" name="[% to_branch_loo.code %]_[% to_branch_loo.toBranch %]" />
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
[% END %]
|
|
|
|
<fieldset class="action">
|
|
<input type="hidden" name="updateLimits" value="1" />
|
|
<input type="hidden" name="branchcode" value="[% branchcode %]" />
|
|
<input type="submit" value="Save" />
|
|
<a class="cancel" href="/cgi-bin/koha/admin/admin-home.pl">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'admin-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|