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