Bug 2720 - Overdues which debar automatically should undebar automatically when returned
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / borrower_debarments.inc
1 <script type="text/javascript">
2    //<![CDATA[
3
4         function confirm_remove_restriction() {
5             return confirm(_("Remove restriction?"));
6         }
7
8     //]]>
9 </script>
10
11 <div id="reldebarments">
12     [% UNLESS debarments %]<p>Patron is currently unrestricted.</p>[% END %]
13
14     <table>
15         <thead>
16             <tr>
17                  <th>Type</th>
18                  <th>Comment</th>
19                  <th>Expiration</th>
20                  [% IF ( CAN_user_borrowers ) %]
21                      <th>&nbsp;</th>
22                  [% END %]
23             </tr>
24         </thead>
25
26         <tbody>
27             [% FOREACH d IN debarments %]
28                 <tr>
29                     <td>[% d.type %]</td>
30                     <td>[% d.comment %]</td>
31                     <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
32                     [% IF ( CAN_user_borrowers )%]
33                         <td>
34                             <a href="/cgi-bin/koha/members/mod_debarment.pl?borrowernumber=[% borrowernumber %]&amp;borrower_debarment_id=[% d.borrower_debarment_id %]&amp;action=del" onclick="return confirm_remove_restriction()">
35                                 Remove
36                             </a>
37                         </td>
38                     [% END %]
39                 </tr>
40             [% END %]
41         </tbody>
42
43         [% IF ( CAN_user_borrowers )%]
44             <form method="post" action="/cgi-bin/koha/members/mod_debarment.pl">
45                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
46                 <input type="hidden" name="action" value="add" />
47
48                 <tfoot>
49                     <tr>
50                         <td>MANUAL</td>
51                         <td><input type="text" name="comment" /></td>
52                         <td>
53                             <input name="expiration" id="expiration" size="10" readonly="readonly" value="" class="datepicker" />
54                             <a href='#' onclick="document.getElementById('expiration').value='';">Clear Date</a>
55                         </td>
56                         <td>
57                             <input type="submit" value="Add restriction" />
58                         </td>
59                     </tr>
60                 </tfoot>
61             </form>
62         [% END %]
63     </table>
64 </div>