Bug 19103: Fix Stored XSS in itemtypes.pl
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / branch_transfer_limits.tt
1 [% USE Branches %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Administration &rsaquo; Library checkin and transfer policy</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6 [% INCLUDE 'datatables.inc' %]
7 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
8 <script type="text/javascript">
9 //<![CDATA[
10         $(document).ready(function(){
11         $("#CheckAll").click(function(){ $("#transferlimit_tabs").checkCheckboxes(); return false; });
12         $("#UncheckAll").click(function(){ $("#transferlimit_tabs").unCheckCheckboxes(); return false; });
13         $('#transferlimit_tabs').tabs();
14
15                  $('#branchselect').change(function() {
16                     $('#selectlibrary').submit();
17                  });
18
19                 var checkall = $(".checkall");
20                 var uncheckall = $(".uncheckall");
21
22                 $(checkall).click(function(){
23                         var tid = $(this).attr("id");
24                         tid = tid.replace("CheckAll","");
25                         $("#"+tid).checkCheckboxes();
26                         return false;
27                 });
28
29                 $(uncheckall).click(function(){
30                         var tid = $(this).attr("id");
31                         tid = tid.replace("UncheckAll","");
32                         $("#"+tid).unCheckCheckboxes();
33                         return false;
34                 });
35         $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
36             "aoColumnDefs": [
37                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
38             ],
39             'bPaginate': false
40         }));
41         });
42 //]]>
43 </script>
44 <style type="text/css">td { text-align: center; } .sorted { min-width: 50%; }</style>
45 </head>
46 <body id="admin_branch_transfer_limits" class="admin">
47 [% INCLUDE 'header.inc' %]
48 [% INCLUDE 'prefs-admin-search.inc' %]
49
50 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; Set library checkin and transfer policy</div>
51
52 <div id="doc3" class="yui-t1">
53
54 <div id="bd">
55      <div id="yui-main">
56     <div class="yui-b">
57
58 <h1>Library [% branchcode %] - [% Branches.GetName( branchcode ) %] Checkin and transfer policy</h1>
59     <form method="get" action="/cgi-bin/koha/admin/branch_transfer_limits.pl" id="selectlibrary">
60         <label for="branchselect">Select a library :</label>
61         <select name="branchcode" id="branchselect">
62             [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
63         </select>
64     </form>
65
66 <p class="help">Check the boxes for the libraries you accept to checkin items from.</p>
67 <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>
68
69
70   <div id="transferlimit_tabs" class="toptabs">
71         <ul class="ui-tabs-nav">
72       [% FOREACH codes_loo IN codes_loop %]<li><a href="#[% codes_loo.code %]set">[% codes_loo.code %]</a></li>[% END %]
73         </ul>
74
75                 <form method="post" action="branch_transfer_limits.pl">
76
77         [% FOREACH codes_loo IN codes_loop %]
78         <div id="[% codes_loo.code %]set">
79                 <h4>Policy for [% codes_loo.limit_phrase %]: [% codes_loo.code %]</h4>
80     <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>
81         
82                 <table id="[% codes_loo.code %]table" class="sorted">
83                         <thead>
84                                 <tr>
85                                     <th>Library</th>
86                                     <th>Allow transfer?</th>
87                                 </tr>
88                         </thead>
89
90                         <tbody>
91                                         [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
92                         <tr>
93                             <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>
94                                                         <td>
95                                                         [% IF ( to_branch_loo.isChecked ) %]
96                                                                 <input type="checkbox" id="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row" name="[% to_branch_loo.code %]_[% to_branch_loo.toBranch %]" checked="checked" />
97                                                         [% ELSE %]
98                                                                 <input type="checkbox" id="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row" name="[% to_branch_loo.code %]_[% to_branch_loo.toBranch %]" />
99                                                         [% END %]
100                                                         </td>
101                                                 </tr>
102                                         [% END %]
103                         </tbody>
104                 </table>
105                 </div>
106                                 [% END %]
107                 
108                 <fieldset class="action">
109                     <input type="hidden" name="updateLimits" value="1" />
110                     <input type="hidden" name="branchcode" value="[% branchcode %]" />
111                     <input type="submit" value="Save" /> 
112                     <a class="cancel" href="/cgi-bin/koha/admin/admin-home.pl">Cancel</a>
113                 </fieldset>
114                 </form>
115                 </div>
116   </div>
117 </div>
118 <div class="yui-b">
119   [% INCLUDE 'admin-menu.inc' %]
120 </div>
121 </div>
122 [% INCLUDE 'intranet-bottom.inc' %]