Bug 27631: reports and serials folders
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / subscription-renew.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 [% IF subscription %]
6 <title>Serials subscription renew #[% subscription.subscriptionid | html %] &rsaquo; Koha</title>
7 [% ELSE %]
8 <title>Serials subscription renew &rsaquo; Koha</title>
9 [% END %]
10 [% INCLUDE 'doc-head-close.inc' %]
11 </head>
12
13 <body id="ser_subscription-renew" class="ser">
14     <div class="container-fluid">
15
16         <h1>Serials subscription renew</h1>
17
18 [% INCLUDE 'blocking_errors.inc' %]
19
20 [% IF op == 'renew' OR op =='multi_renew' %]
21     [% IF op == 'renew' %]
22         <span>Subscription renewed.<span>
23     [% ELSE %]
24         <span>Subscriptions renewed.<span>
25     [% END %]
26
27     <div id="closewindow">
28         <a class="btn btn-default btn-default close" href="#">Close</a>
29     </div>
30 [% ELSE %]
31
32 <form name="f" action="/cgi-bin/koha/serials/subscription-renew.pl" method="post">
33                 <input type="hidden" name="op" value="renew" />
34                 <input type="hidden" name="subscriptionid" value="[% subscription.subscriptionid | html %]" />
35                 <fieldset class="rows"><legend>Subscription renewal for [% subscription.bibliotitle | html %]</legend>
36         <ol>
37             <li>
38                 <label for="startdate">Start date: </label>
39                 <input type="text" size="10" id="startdate" name="startdate" value="[% startdate | html %]" class="flatpickr"/>
40                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
41             </li>
42     <li>
43     <label>Subscription length:</label>
44     <select name="subtype" id="subtype">
45         [% FOREACH st IN [['numberlength', 'issues'], ['weeklength', 'weeks'], ['monthlength', 'months']] %]
46             [% SET subtype = st.0 %]
47             [% SET value = st.1 %]
48             [% IF subscription.$subtype %]
49                 <option value="[% value | html %]" selected="selected">
50             [% ELSE %]
51                 <option value="[% value | html %]">
52             [% END %]
53             [% SWITCH subtype %]
54                 [% CASE 'numberlength' %]<span>issues</span>
55                 [% CASE 'weeklength'   %]<span>weeks</span>
56                 [% CASE 'monthlength'  %]<span>months</span>
57             [% END %]
58             </option>
59         [% END %]
60     </select>
61     <input type="text" name="sublength" id="sublength" size="3" value="[% subscription.numberlength || subscription.weeklength || subscription.monthlength | html %]" />(enter amount in numerals)
62     <input type="hidden" name="issuelengthcount">
63     </li>
64
65     [% IF Koha.Preference('RenewSerialAddsSuggestion') %]
66         <li>
67             <label for="branchcode">Library:</label>
68             <select name="branchcode" id="branchcode" style="width: 20em;">
69                 [% UNLESS ( Independentbranches ) %]
70                     <option value="">None</option>
71                 [% END %]
72                 [% IF CAN_user_serials_superserials %]
73                     [% PROCESS options_for_libraries libraries => Branches.all(selected => subscription.branchcode) %]
74                 [% END %]
75             </select> (select a library)
76         </li>
77
78         <li>
79             <label for="note">Note for the librarian that will manage your renewal request: </label>
80             <textarea name="note" id="note" rows="5" cols="50"></textarea>
81         </li>
82     [% END %]
83 </ol>
84 </fieldset>
85 <fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
86 </form>
87 [% END %]
88
89 [% MACRO jsinclude BLOCK %]
90     [% INCLUDE 'calendar.inc' %]
91     <script>
92         $(document).ready(function(){
93             $(".close").on("click", function(e){
94                 e.preventDefault();
95                 window.opener.location.reload(false);
96                 self.close();
97             });
98         });
99     </script>
100 [% END %]
101
102 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]