Bug 35356: Show SMS labels only when data exists
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / update-child.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% PROCESS 'i18n.inc' %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% FILTER collapse %]
7     [% t("Choose adult category") | html %] &rsaquo;
8     [% t("Patrons") | html %] &rsaquo;
9     [% t("Koha") | html %]
10 [% END %]</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 </head>
13
14 <body id="pat_update-child" class="pat">
15     <div class="container-fluid">
16
17 [% IF ( MULTI ) %]
18
19     <h1> Choose adult category </h1>
20
21     [% IF patron_categories %]
22         <form method="post" action="update-child.pl">
23             <fieldset>
24                 <table id="catst">
25                     <thead>
26                         <tr>
27                         <th>&nbsp;</th>
28                         <th>Code</th>
29                         <th>Description</th>
30                         </tr>
31                     </thead>
32                     <tbody>
33                         [% FOREACH patron_category IN patron_categories %]
34                             <tr>
35                                 <td>
36                                     <input type="radio" id="catcode[% patron_category.categorycode | html %]" name="catcode" value="[% patron_category.categorycode | html %]" />
37                                 </td>
38                                 <td>[% patron_category.categorycode | html %]</td>
39                                 <td><label for="catcode[% patron_category.categorycode | html %]"><strong>[% patron_category.description | html %]</strong></label></td>
40                             </tr>
41                         [% END %]
42                     </tbody>
43                 </table>
44                 <input type="hidden" name="op" value="update" />
45                 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
46                 <input type="hidden" name="cattype" value="[% cattype | html %]" />
47                 <fieldset class="action">
48                     <input class="submit" type="submit" value="Submit" />
49                     <a href="#" class="cancel close">Cancel</a>
50                 </fieldset>
51             </fieldset>
52         </form>
53     [% END %]
54 [% END %]
55
56
57 [% MACRO jsinclude BLOCK %]
58     [% INCLUDE 'datatables.inc' %]
59     <script>
60
61         $(document).ready(function() {
62             $("#catst").dataTable($.extend(true, {}, dataTablesDefaults, {
63                 "sDom": 't',
64                 "aaSorting": [[ 2, "asc" ]],
65                 "aoColumnDefs": [
66                     { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }
67                 ],
68                 "bPaginate": false
69             }));
70         });
71     </script>
72     [% IF ( SUCCESS ) %]
73         <script>
74             self.opener.location.href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]';
75             window.close();
76         </script>
77     [% END %]
78     [% INCLUDE 'str/members-menu.inc' %]
79     [% Asset.js("js/members-menu.js") | $raw %]
80 [% END %]
81
82 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]