Bug 29394: Remove flatpickr instantiations from most of the tt files
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / renew.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7
8 <title>Renew [% title | html %] &rsaquo; Circulation &rsaquo; Koha</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 </head>
11
12 <body id="circ_renew" class="circ">
13
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'circ-search.inc' %]
16
17 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
18     <ol>
19         <li>
20             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21         </li>
22         <li>
23             <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
24         </li>
25         <li>
26             <a href="#" aria-current="page">
27                 Renew
28             </a>
29         </li>
30     </ol>
31 </nav>
32
33 <div class="main container-fluid">
34     <div class="row">
35         <div class="col-sm-12">
36             <main>
37                 <div class="row">
38
39                 [% IF Koha.Preference('CircSidebar') %]
40                     <div class="col-sm-10 col-sm-push-2">
41                 [% ELSE %]
42                     <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
43                 [% END %]
44
45                 [% IF error %]
46                     <div class="dialog alert">
47                         <h3>Cannot renew:</h3>
48
49                             [% IF error == "no_item" %]
50
51                                 <p>No item matches this barcode</p>
52
53                             [% ELSIF error == "no_checkout" %]
54
55                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber | uri %]&amp;biblionumber=[% item.biblio.biblionumber | uri %]&amp;bi=[% item.biblioitemnumber.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a> ) is not checked out to a patron.</p>
56
57                             [% ELSIF error == "too_many" %]
58
59                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) has been renewed the maximum number of times by [% borrower.firstname | html %] [% borrower.surname | html %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber | uri %]"> [% borrower.cardnumber | html %] </a> )</p>
60
61                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
62                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
63                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
64                                         <input type="hidden" name="override_limit" value="1" />
65                                         <button type="submit" class="approve"><i class="fa fa-check"></i> Override limit and renew</button>
66                                     </form>
67                                 [% END %]
68
69                             [% ELSIF error == "too_unseen" %]
70
71                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) has been renewed the maximum number of consecutive times without being seen by the library )</p>
72
73                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
74                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
75                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
76                                         <input type="hidden" name="override_limit" value="1" />
77                                         <button type="submit" class="approve"><i class="fa fa-check"></i> Override limit and renew</button>
78                                     </form>
79                                 [% END %]
80
81                             [% ELSIF error == "too_soon" %]
82
83                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) cannot be renewed before [% soonestrenewdate | $KohaDates %]. </p>
84
85                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
86                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
87                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
88                                         <input type="hidden" name="override_limit" value="1" />
89                                         <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
90                                     </form>
91                                 [% END %]
92
93                             [% ELSIF error == "auto_too_soon" %]
94
95                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed before [% soonestrenewdate | $KohaDates %]. </p>
96
97                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
98                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
99                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
100                                         <input type="hidden" name="override_limit" value="1" />
101                                         <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
102                                     </form>
103                                 [% END %]
104
105                             [% ELSIF error == "auto_too_late" %]
106
107                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed anymore since [% latestautorenewdate | $KohaDates %]. </p>
108
109                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
110                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
111                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
112                                         <input type="hidden" name="override_limit" value="1" />
113                                         <input type="submit" class="approve" value="Override and renew" />
114                                     </form>
115                                 [% END %]
116
117                             [% ELSIF error == "auto_account_expired" %]
118
119                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed because the patron's account is expired</p>
120
121                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
122                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
123                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
124                                         <input type="hidden" name="override_limit" value="1" />
125                                         <input type="submit" class="approve" value="Override and renew" />
126                                     </form>
127                                 [% END %]
128
129                             [% ELSIF error == "auto_renew" or error == "auto_too_much_oweing" %]
130
131                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal. </p>
132
133                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
134                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
135                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
136                                         <input type="hidden" name="override_limit" value="1" />
137                                         <button type="submit" class="approve"><i class="fa fa-check"></i> Override limit and renew</button>
138                                     </form>
139                                 [% END %]
140
141                             [% ELSIF error == "on_reserve" %]
142
143                                 <p>[% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %] ( [% item.barcode | html %] ): This item is on hold for another patron.</p>
144
145                                 <form method="post" action="/cgi-bin/koha/circ/renew.pl">
146                                     <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
147                                     <input type="hidden" name="override_limit" value="1" />
148                                     <input type="hidden" name="override_holds" value="1" />
149                                     <div>
150                                         <label for="renewonholdduedate">Renewal due date:</label>
151                                         <input type="text" size="20" id="renewonholdduedate" name="renewonholdduedate" value="" class="flatpickr" data-flatpickr-futuredate="true" data-flatpickr-enable-time="true" />
152                                     </div>
153                                     <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
154                                 </form>
155
156                             [% ELSIF error == "patron_restricted" %]
157
158                                 <p>[% borrower.firstname | html %] [% borrower.surname | html %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber | uri %]"> [% borrower.cardnumber | html %] </a> ) is currently restricted.</p>
159
160                             [% ELSIF error == "item_denied_renewal" %]
161
162                                 <p>Item is not allowed renewal.</p>
163
164                             [% ELSIF error == "onsite_checkout" %]
165                                 <p>Item cannot be renewed because it's an onsite checkout</p>
166
167                             [% ELSE %]
168
169                                 [% error | html %]
170
171                             [% END %]
172
173                                 <form method="get" action="/cgi-bin/koha/circ/renew.pl">
174                                     [% IF Koha.Preference('SpecifyDueDate') %]
175                                         <input type="hidden" name="hard_due_date" value="[% hard_due_date | html %]" class="flatpickr flatpickr-enable-time" />
176                                     [% ELSE %]
177                                         <input type="hidden" name="hard_due_date" value="[% hard_due_date | html %]" />
178                                     [% END %]
179                                     <button type="submit" class="deny"><i class="fa fa-times"></i> Continue without renewing</button>
180                                 </form>
181                     </div>
182                 [% END %]
183
184                 [% IF date_due %]
185                     <div class="dialog message">
186                         <h3>Item renewed:</h3>
187                         <p>
188                             [% INCLUDE 'biblio-title.inc' biblio=item.biblio link = 1 %]
189                             ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber | uri %]&amp;biblionumber=[% item.biblio.biblionumber | uri %]&amp;bi=[% item.biblioitemnumber.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a> )
190                             renewed for
191                             [% borrower.firstname | html %] [% borrower.surname | html %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber | uri %]"> [% borrower.cardnumber | html %] </a> )
192                             now due on [% date_due | $KohaDates %]
193                         </p>
194                     </div>
195                 [% END %]
196
197             [% UNLESS error %]
198                 <form method="post" action="/cgi-bin/koha/circ/renew.pl" autocomplete="off" >
199
200                     <fieldset>
201                         <h2>Renew</h2>
202
203                         [% IF Koha.Preference('UnseenRenewals') %]
204                             <div class="renew_formfield">
205                                 <div>
206                                     <label for="barcode" class="hint">Enter item barcode: </label>
207                                 </div>
208                                 <input name="barcode" id="barcode" size="14" class="barcode focus" type="text" />
209                             </div>
210                             <div class="renew_formfield">
211                                 <label for="unseen" class="hint">Record renewal as unseen if appropriate: </label>
212                                 <input value="1" name="unseen" id="unseen" type="checkbox" />
213                             </div>
214                         [% ELSE %]
215                             <div>
216                                 <label for="barcode" class="hint">Enter item barcode: </label>
217                             </div>
218
219                             <input name="barcode" id="barcode" size="14" class="barcode focus" type="text" />
220
221                         [% END %]
222                         <button type="submit" class="btn btn-default">Submit</button>
223
224                         <div class="circ-settings show">
225                             <div class="date-select" id="renew_date_override_fields">
226                                 <div><label for="hard_due_date" class="hint">Renewal due date [% INCLUDE 'date-format.inc' %]:</label></div>
227                                 <input type="text" size="20" id="hard_due_date" name="hard_due_date" value="[% hard_due_date | $KohaDates with_hours => 1 %]" />
228                             </div> <!-- /.date-select -->
229                         </div>
230                     </fieldset>
231
232
233                 </form>
234             [% END %]
235
236                     [% IF Koha.Preference('CircSidebar') %]
237                             </div> <!-- /.col-sm-10.col-sm-push-2 -->
238                             <div class="col-sm-2 col-sm-pull-10">
239                                 <aside>
240                                     [% INCLUDE 'circ-nav.inc' %]
241                                 </aside>
242                             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
243                         </div> <!-- /.row -->
244                     [% END %]
245
246             </main>
247         </div> <!-- /.col-sm-12 -->
248     </div> <!-- /.row -->
249
250 [% MACRO jsinclude BLOCK %]
251     [% INCLUDE 'calendar.inc' %]
252     [% IF error %]
253         <script>
254             $( document ).ready(function() {
255                 removeFocus();
256             });
257         </script>
258     [% END %]
259 [% END %]
260
261 [% INCLUDE 'intranet-bottom.inc' %]