Bug 9573: Lost items report - Add a new itemlost_on column
[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 <style type="text/css">
7     #custom-doc { width:29em;*width:28.3em;min-width:377px; margin:auto; text-align:left; }
8 </style>
9 </head>
10
11 <body id="pat_update-child" class="pat">
12
13 <div id="custom-doc" class="yui-t7">
14 <div id="bd">
15
16 [% IF ( MULTI ) %]
17
18     <h3> Choose adult category </h3>
19
20     [% IF patron_categories %]
21         <form method="post" action="update-child.pl">
22             <fieldset>
23                 <table id="catst">
24                     <thead>
25                         <tr>
26                         <th>&nbsp;</th>
27                         <th>Code</th>
28                         <th>Description</th>
29                         </tr>
30                     </thead>
31                     <tbody>
32                         [% FOREACH patron_category IN patron_categories %]
33                             <tr>
34                                 <td>
35                                     <input type="radio" id="catcode[% patron_category.categorycode %]" name="catcode" value="[% patron_category.categorycode %]" />
36                                 </td>
37                                 <td>[% patron_category.categorycode  %]</td>
38                                 <td><label for="catcode[% patron_category.categorycode %]"><strong>[% patron_category.description %]</strong></label></td>
39                             </tr>
40                         [% END %]
41                     </tbody>
42                 </table>
43                 <input type="hidden" name="op" value="update" />
44                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
45                 <input type="hidden" name="catcode" value="[% catcode %]" />
46                 <input type="hidden" name="cattype" value="[% cattype %]" />
47                 <input type="hidden" name="catcode_multi" value="[% CATCODE_MULTI %]" />
48                 <fieldset class="action">
49                     <input class="submit" type="submit" value="Submit" />
50                     <a href="#" class="cancel close">Cancel</a>
51                 </fieldset>
52             </fieldset>
53         </form>
54     [% END %]
55 [% END %]
56 </div>
57
58 [% MACRO jsinclude BLOCK %]
59     <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
60     [% INCLUDE 'datatables.inc' %]
61     <script type="text/javascript">
62         $(document).ready(function() {
63             $("#catst").dataTable($.extend(true, {}, dataTablesDefaults, {
64                 "sDom": 't',
65                 "aaSorting": [[ 2, "asc" ]],
66                 "aoColumnDefs": [
67                     { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }
68                 ],
69                 "bPaginate": false
70             }));
71         });
72     </script>
73     [% IF ( CONFIRM ) %]
74         <script type="text/javascript">
75             function confirm_updatechild() {
76                 var is_confirmed = window.confirm('Are you sure you want to update this child to an Adult category?  This cannot be undone.');
77                 if (is_confirmed) {
78                         window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=[% borrowernumber %]&catcode=[% catcode %]&catcode_multi=[% CATCODE_MULTI %]';
79                 }
80             }
81
82             confirm_updatechild([% borrowernumber %]);
83         </script>
84     [% END %]
85     [% IF ( SUCCESS ) %]
86         <script type="text/javascript">
87             self.opener.location.href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]';
88             window.close();
89         </script>
90     [% END %]
91 [% END %]
92
93 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]