Bug 19981: Switch single-column templates to Bootstrap grid: Course reserves
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / update-child.tt
1 [% SET footerjs = 1 %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Choose adult category</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
6 </head>
7
8 <body id="pat_update-child" class="pat">
9     <div class="container-fluid">
10
11 [% IF ( MULTI ) %]
12
13     <h3> Choose adult category </h3>
14
15     [% IF patron_categories %]
16         <form method="post" action="update-child.pl">
17             <fieldset>
18                 <table id="catst">
19                     <thead>
20                         <tr>
21                         <th>&nbsp;</th>
22                         <th>Code</th>
23                         <th>Description</th>
24                         </tr>
25                     </thead>
26                     <tbody>
27                         [% FOREACH patron_category IN patron_categories %]
28                             <tr>
29                                 <td>
30                                     <input type="radio" id="catcode[% patron_category.categorycode %]" name="catcode" value="[% patron_category.categorycode %]" />
31                                 </td>
32                                 <td>[% patron_category.categorycode  %]</td>
33                                 <td><label for="catcode[% patron_category.categorycode %]"><strong>[% patron_category.description %]</strong></label></td>
34                             </tr>
35                         [% END %]
36                     </tbody>
37                 </table>
38                 <input type="hidden" name="op" value="update" />
39                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
40                 <input type="hidden" name="catcode" value="[% catcode %]" />
41                 <input type="hidden" name="cattype" value="[% cattype %]" />
42                 <input type="hidden" name="catcode_multi" value="[% CATCODE_MULTI %]" />
43                 <fieldset class="action">
44                     <input class="submit" type="submit" value="Submit" />
45                     <a href="#" class="cancel close">Cancel</a>
46                 </fieldset>
47             </fieldset>
48         </form>
49     [% END %]
50 [% END %]
51
52
53 [% MACRO jsinclude BLOCK %]
54     [% INCLUDE 'datatables.inc' %]
55     <script type="text/javascript">
56
57         /* Set some variables needed in members-menu.js */
58         var advsearch = "[% advsearch %]";
59         var dateformat = "[% dateformat %]";
60         var CAN_user_borrowers = "[% CAN_user_borrowers %]";
61         var CAN_user_borrowers_edit_borrowers = "[% CAN_user_borrowers_edit_borrowers %]";
62         var NorwegianPatronDBEnable = "[% NorwegianPatronDBEnable %]";
63         var CATCODE_MULTI = "[% CATCODE_MULTI %]";
64         var catcode = "[% catcode %]";
65         var destination = "[% destination %]";
66
67         $(document).ready(function() {
68             $("#catst").dataTable($.extend(true, {}, dataTablesDefaults, {
69                 "sDom": 't',
70                 "aaSorting": [[ 2, "asc" ]],
71                 "aoColumnDefs": [
72                     { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }
73                 ],
74                 "bPaginate": false
75             }));
76         });
77     </script>
78     [% IF ( CONFIRM ) %]
79         <script type="text/javascript">
80             function confirm_updatechild() {
81                 var is_confirmed = window.confirm('Are you sure you want to update this child to an Adult category?  This cannot be undone.');
82                 if (is_confirmed) {
83                         window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=[% borrowernumber %]&catcode=[% catcode %]&catcode_multi=[% CATCODE_MULTI %]';
84                 }
85             }
86
87             confirm_updatechild([% borrowernumber %]);
88         </script>
89     [% END %]
90     [% IF ( SUCCESS ) %]
91         <script type="text/javascript">
92             self.opener.location.href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]';
93             window.close();
94         </script>
95     [% END %]
96     <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
97 [% END %]
98
99 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]