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