Bug 15494: Update display of renewal errors
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / renew.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5
6 <title>Koha &rsaquo; Circulation &rsaquo; Renew [% title | html %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 </head>
9
10 <body id="circ_renew" class="circ">
11
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'circ-search.inc' %]
14
15 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Renew</div>
16
17 [% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc" class="yui-t7">[% END %]
18     <div id="bd">
19         <div id="yui-main">
20             [% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
21                 [% IF error %]
22                     <div class="dialog alert">
23                         <h3>Cannot renew:</h3>
24
25                             [% IF error == "no_item" %]
26
27                                 <p>No item matches this barcode</p>
28
29                             [% ELSIF error == "no_checkout" %]
30
31                                 <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblio.biblionumber | uri %]">[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %]</a> ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber | html %]&amp;biblionumber=[% item.biblio.biblionumber | html %]&amp;bi=[% item.biblioitemnumber.biblioitemnumber | html %]#item[% item.itemnumber | html %]">[% item.barcode | html %]</a> ) is not checked out to a patron.</p>
32
33                             [% ELSIF error == "too_many" %]
34
35                                 <p>[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% 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>
36
37                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
38                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
39                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
40                                         <input type="hidden" name="override_limit" value="1" />
41                                         <button type="submit" class="approve"><i class="fa fa-check"></i> Override limit and renew</button>
42                                     </form>
43                                 [% END %]
44
45                             [% ELSIF error == "too_soon" %]
46
47                                 <p>[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) cannot be renewed before [% soonestrenewdate | $KohaDates %]. </p>
48
49                                 [% IF Koha.Preference('AllowRenewalLimitOverride') %]
50                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
51                                         <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
52                                         <input type="hidden" name="override_limit" value="1" />
53                                         <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
54                                     </form>
55                                 [% END %]
56
57                             [% ELSIF error == "auto_too_soon" %]
58
59                                 <p>[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed before [% soonestrenewdate | $KohaDates %]. </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 and renew</button>
66                                     </form>
67                                 [% END %]
68
69                             [% ELSIF error == "auto_too_late" %]
70
71                                 <p>[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed anymore since [% latestautorenewdate | $KohaDates %]. </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                                         <input type="submit" class="approve" value="Override and renew" />
78                                     </form>
79                                 [% END %]
80
81                             [% ELSIF error == "auto_account_expired" %]
82
83                                 <p>[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed because the patron's account is expired</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                                         <input type="submit" class="approve" value="Override and renew" />
90                                     </form>
91                                 [% END %]
92
93                             [% ELSIF error == "auto_renew" or error == "auto_too_much_oweing" %]
94
95                                 <p>[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal. </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 limit and renew</button>
102                                     </form>
103                                 [% END %]
104
105                             [% ELSIF error == "on_reserve" %]
106
107                                 <p>This item is on hold for another patron.</p>
108
109                                 <form method="post" action="/cgi-bin/koha/circ/renew.pl">
110                                     <input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
111                                     <input type="hidden" name="override_limit" value="1" />
112                                     <input type="hidden" name="override_holds" value="1" />
113                                     <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
114                                 </form>
115
116                             [% ELSIF error == "patron_restricted" %]
117
118                                 <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>
119
120                             [% ELSIF error == "item_denied_renewal" %]
121
122                                 <p>Item is not allowed renewal.</p>
123
124                             [% ELSE %]
125
126                                 [% error | html %]
127
128                             [% END %]
129
130                                 <form method="get" action="/cgi-bin/koha/circ/renew.pl">
131                                     <button type="submit" class="deny"><i class="fa fa-times"></i> Continue without renewing</button>
132                                 </form>
133                     </div>
134                 [% END %]
135
136                 [% IF date_due %]
137                     <div class="dialog message">
138                         <h3>Item renewed:</h3>
139                         <p>
140                             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblio.biblionumber | uri %]">[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %]</a>
141                             ( <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> )
142                             renewed for
143                             [% borrower.firstname | html %] [% borrower.surname | html %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber | uri %]"> [% borrower.cardnumber | html %] </a> )
144                             now due on [% date_due | $KohaDates %]
145                         </p>
146                     </div>
147                 [% END %]
148
149             <div class="yui-g">
150
151             [% UNLESS error %]
152                 <form method="post" action="/cgi-bin/koha/circ/renew.pl" autocomplete="off" >
153
154                     <div class="yui-u first">
155                         <fieldset>
156                             <legend>Renew</legend>
157
158                             <label for="barcode">Enter item barcode: </label>
159
160                             <input name="barcode" id="barcode" size="14" class="focus" type="text" />
161
162                             <input type="submit" class="submit" value="Submit" />
163                         </fieldset>
164                     </div>
165
166                 </form>
167             [% END %]
168
169         </div>
170     </div>
171
172 [% IF Koha.Preference('CircSidebar') %]
173 </div>
174
175 <div class="yui-b noprint">
176     [% INCLUDE 'circ-nav.inc' %]
177 </div>
178 [% END %]
179 <div>
180
181 [% MACRO jsinclude BLOCK %]
182     [% IF error %]
183         <script type="text/javascript">
184             $( document ).ready(function() {
185                 removeFocus();
186             });
187         </script>
188     [% END %]
189 [% END %]
190
191 [% INCLUDE 'intranet-bottom.inc' %]