[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Tools › Patron lists › New list</title>
+<title>Koha › Tools › Patron lists › [% list.name %] › Add patrons</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
$(document).ready(function() {
$('#patrons_to_add_fieldset').hide();
- $('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults));
+ $('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults, {
+ "aoColumns": [
+ null,null,null,null,null,null,null,{ "sType": "title-string" },null
+ ],
+ "aoColumnDefs": [
+ { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
+ ]
+ } ));
$( "#find_patron" ).autocomplete({
source: "/cgi-bin/koha/circ/ysearch.pl",
var cardnumber = divid.replace("borrower_","");
RemovePatron(cardnumber);
});
+
+ var checkBoxes = $("input[type='checkbox']","#patron-list-table");
+
+ $("#CheckAll").click(function(e){
+ e.preventDefault();
+ checkBoxes.each(function(){
+ $(this).prop("checked",1);
+ });
+ });
+ $("#CheckNone").click(function(e){
+ e.preventDefault();
+ checkBoxes.each(function(){
+ $(this).prop("checked",0);
+ });
+ });
+
+ $("#remove_patrons").submit(function(){
+ var checkedItems = $("input:checked");
+ if ($(checkedItems).size() == 0) {
+ alert(_("You must select one or more patrons to remove"));
+ return false;
+ }
+ $(checkedItems).parents('tr').addClass("warn");
+ if( confirm(_("Are you sure you want to remove the selected patrons?")) ) {
+ return true;
+ } else {
+ $(checkedItems).parents('tr').removeClass("warn");
+ return false;
+ }
+ });
});
function AddPatron( name, cardnumber ) {
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="lists.pl">Patron lists</a> › Add patrons</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="lists.pl">Patron lists</a> › <a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% list.id %]">[% list.name %]</a> › Add patrons</div>
<div class="yui-t7">
<div class="yui-main">
<h1>[% list.name %]</h1>
- <form action="list.pl" method="post">
+ <form action="list.pl" id="add_patrons" method="post">
<fieldset>
<legend>Add patrons</legend>
<fieldset id="patrons_to_add_fieldset">
<legend>Patrons to be added</legend>
<div id="patrons_to_add"></div>
+
+ <fieldset class="action">
+ <input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" />
+ <input type="submit" value="Add patrons" />
+ <a href="lists.pl" class="cancel">Cancel</a>
+ </fieldset>
</fieldset>
</fieldset>
+ </form>
+
+ <form action="list.pl" id="remove_patrons" method="post">
- <p>
- <input type="submit" class="btn" value="Update" />
- <a href="lists.pl" class="cancel">Cancel</a>
- </p>
+ <div id="searchheader">
+ <span class="checkall"><a id="CheckAll" href="#">Select all</a></span> |
+ <span class="clearall"><a id="CheckNone" href="#">Clear all</a></span> |
+ <div class="btn-group">
+ <button class="btn btn-mini list-remove" type="submit"><i class="icon-remove-sign"></i> Remove selected</button>
+ </div>
+ </div>
<table id="patron-list-table">
<thead>
<tr>
- <th><i title="Remove patron from list" class="icon-trash"></i></th>
+ <th> </th>
<th>Card</th>
<th>Firstname</th>
<th>Surname</th>
</td>
<td>[% p.borrowernumber.categorycode.description %] ([% p.borrowernumber.categorycode.categorycode %])</td>
<td>[% p.borrowernumber.branchcode.branchname %]</td>
- <td>[% p.borrowernumber.dateexpiry | $KohaDates %]</td>
+ <td><span title="[% p.borrowernumber.dateexpiry %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</span></td>
<td>[% p.borrowernumber.borrowernotes %]</td>
</tr>
[% END %]
</table>
<input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" />
- <input type="submit" class="btn" value="Update" />
- <a href="lists.pl" class="cancel">Cancel</a>
+ <input type="submit" value="Remove selected patrons" />
</form>
</div>
</div>