View | Details | Raw Unified | Return to bug 8955
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/prog/en/css/sco.css (+4 lines)
Lines 138-143 div.message { Link Here
138
 
138
 
139
.dialog input.back {
139
.dialog input.back {
140
    background : #FFF url(/opac-tmpl/lib/famfamfam/silk/arrow_left.png) no-repeat 4px center;
140
    background : #FFF url(/opac-tmpl/lib/famfamfam/silk/arrow_left.png) no-repeat 4px center;
141
    border: 1px solid #BCBCBC;
141
	padding : .4em .4em .4em 25px;	
142
	padding : .4em .4em .4em 25px;	
142
 }
143
 }
143
 
144
 
Lines 336-338 span.lang{ Link Here
336
div.ft {
337
div.ft {
337
	clear : both;
338
	clear : both;
338
}
339
}
340
.inline {
341
    display: inline;
342
}
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt (-43 / +51 lines)
Lines 10-19 Link Here
10
<script type="text/javascript" src="[% themelang %]/lib/jquery/jquery.js"></script>
10
<script type="text/javascript" src="[% themelang %]/lib/jquery/jquery.js"></script>
11
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
11
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
12
<script type="text/javascript">//<![CDATA[
12
<script type="text/javascript">//<![CDATA[
13
function sco_init(valid_session) {
13
function sco_init() {
14
    if (valid_session == 1) {
14
    setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]);
15
        setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]); 
16
    }
17
}
15
}
18
function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
16
function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
19
    // alert("dofocus called");
17
    // alert("dofocus called");
Lines 28-40 function checkout_confirm(patronid) { Link Here
28
        window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
26
        window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
29
        return false;
27
        return false;
30
    }
28
    }
31
    if (this.valid_session == 0) {
32
        // probably should force logout like above ? --atz 6/09
33
        if (confirm('Session has expired.  Click \'OK\' to continue processing this item.  Click Cancel if you are not ' + patronid)){
34
            this.op.value='logout';
35
            this.patronid.value='';
36
        }
37
    }
38
    return true;
29
    return true;
39
}
30
}
40
31
Lines 75-83 $.tablesorter.addParser({ Link Here
75
});
66
});
76
67
77
$(document).ready(function() {
68
$(document).ready(function() {
78
    [% IF ( patronid ) %] sco_init(1);
69
    dofocus();
79
    [% ELSIF ( timedout ) %] sco_init(1);
70
    [% IF ( patronid ) %]sco_init();[% END %]
80
    [% END %]
81
    $("#loanTable").tablesorter({
71
    $("#loanTable").tablesorter({
82
        [% IF ( dateformat_metric ) %]
72
        [% IF ( dateformat_metric ) %]
83
            dateFormat: 'uk',
73
            dateFormat: 'uk',
Lines 117-123 $(document).ready(function() { Link Here
117
   [% IF ( circ_error_UNKNOWN_BARCODE ) %]
107
   [% IF ( circ_error_UNKNOWN_BARCODE ) %]
118
    <em>MESSAGE 1:</em> The system does not recognize this barcode.
108
    <em>MESSAGE 1:</em> The system does not recognize this barcode.
119
   [% ELSIF ( circ_error_TOO_MANY ) %]
109
   [% ELSIF ( circ_error_TOO_MANY ) %]
120
    <em>MESSAGE 2:</em> You have borrowed too many items and can't check out any more.
110
    <em>MESSAGE 2:</em> You have checked out too many items and can't check out any more.
121
   [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
111
   [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
122
    <em>MESSAGE 3:</em> This item is checked out to someone else.
112
    <em>MESSAGE 3:</em> This item is checked out to someone else.
123
   [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
113
   [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
Lines 125-137 $(document).ready(function() { Link Here
125
   [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
115
   [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
126
    <em>MESSAGE 5:</em> This item is not for loan.
116
    <em>MESSAGE 5:</em> This item is not for loan.
127
   [% ELSIF ( circ_error_DEBT ) %]
117
   [% ELSIF ( circ_error_DEBT ) %]
128
    <em>MESSAGE 6:</em> You owe the library [% amount %] and cannot borrow.
118
    <em>MESSAGE 6:</em> You owe the library [% amount %] and cannot check out.
129
   [% ELSIF ( circ_error_WTHDRAWN ) %]
119
   [% ELSIF ( circ_error_WTHDRAWN ) %]
130
    <em>MESSAGE 7:</em> This item has been withdrawn from the collection.
120
    <em>MESSAGE 7:</em> This item has been withdrawn from the collection.
131
   [% ELSIF ( circ_error_RESTRICTED ) %]
121
   [% ELSIF ( circ_error_RESTRICTED ) %]
132
    <em>MESSAGE 8:</em>
122
    <em>MESSAGE 8:</em>
133
   [% ELSIF ( circ_error_RESERVED ) %]
123
   [% ELSIF ( circ_error_RESERVED ) %]
134
    <em>MESSAGE 9:</em> This item is reserved for another patron.
124
    <em>MESSAGE 9:</em> This item is on hold for another patron.
135
   [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
125
   [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
136
    <em>MESSAGE 10:</em>
126
    <em>MESSAGE 10:</em>
137
   [% ELSIF ( circ_error_EXPIRED ) %]
127
   [% ELSIF ( circ_error_EXPIRED ) %]
Lines 147-190 $(document).ready(function() { Link Here
147
   [% END %]
137
   [% END %]
148
   Please see a member of the library staff.
138
   Please see a member of the library staff.
149
</p>
139
</p>
150
<form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" method="post">
151
<input type="hidden" name="op" value="login" />
152
<input type="hidden" name="patronid" value="[% patronid %]" />
153
[% IF ( returnitem ) %]
140
[% IF ( returnitem ) %]
154
[% IF ( AllowSelfCheckReturns ) %]
141
[% IF ( AllowSelfCheckReturns ) %]
155
<input type="hidden" name="barcode" value="[% barcode %]" />
142
<form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
156
<input type="button" name="returnbook" value="Return this item" class="return" onclick="this.form.op.value='returnbook';this.form.submit();"  />
143
    <input type="hidden" name="op" value="returnbook" />
144
    <input type="hidden" name="patronid" value="[% patronid %]" />
145
    <input type="hidden" name="barcode" value="[% barcode %]" />
146
    <input type="submit" name="returnbook" value="Return this item" class="return" />
147
</form>
148
<form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
149
    <input type="hidden" name="op" value="" />
150
    <input type="hidden" name="patronid" value="[% patronid %]" />
151
    <input type="hidden" name="barcode" value="[% barcode %]" />
152
    <input type="submit" name= "confirm" value="Return to account summary" class="back focus" />
153
</form>
157
[% END %]
154
[% END %]
158
[% END %]
155
[% END %]
159
<input type="submit" name= "confirm" value="Return to Account Summary" class="back focus" />
160
</form>
161
[% END %]
156
[% END %]
162
[% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
157
[% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
163
<div class="dialog alert"><h3>Please confirm the checkout:</h3>
158
<div class="dialog alert"><h3>Please confirm the checkout:</h3>
164
<p>[% IF ( confirm_renew_issue ) %]This item is already checked out to you.[% END %]</p>
159
<p>[% IF ( confirm_renew_issue ) %]This item is already checked out to you.[% END %]</p>
165
160
166
<form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" method="post">
167
<input type="hidden" name="op" value="checkout" />
168
<input type="hidden" name="patronid" value="[% patronid %]" />
169
<input type="hidden" name="barcode" value="[% barcode %]" />
170
<input type="hidden" name="confirmed" value="" />
171
[% IF ( renew ) %]
161
[% IF ( renew ) %]
172
[% IF ( AllowSelfCheckReturns ) %]
162
[% IF ( AllowSelfCheckReturns ) %]
173
<input type="button" value="Return item" name="confirm" class="return" onclick="this.form.op.value='returnbook';this.form.submit();"  />
163
    <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
164
        <input type="hidden" name="op" value="returnbook" />
165
        <input type="hidden" name="patronid" value="[% patronid %]" />
166
        <input type="hidden" name="barcode" value="[% barcode %]" />
167
        <input type="hidden" name="confirmed" value="" />
168
        <input type="submit" value="Return item" name="confirm" class="return" />
169
    </form>
174
[% END %]
170
[% END %]
175
[% END %]
171
[% END %]
176
[% UNLESS ( renew ) %]<input type="button" value="Renew item" name="confirm" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />
172
177
[% ELSE %]<input type="button" value="Renew item" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />[% END %]
173
[% UNLESS ( renew ) %]
178
<input type="button" value="Cancel" class="cancel" onclick="this.form.op.value='';this.form.submit();return true;"  />
174
    <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
179
</form>
175
        <input type="hidden" name="op" value="checkout" />
176
        <input type="hidden" name="patronid" value="[% patronid %]" />
177
        <input type="hidden" name="barcode" value="[% barcode %]" />
178
        <input type="hidden" name="confirmed" value="1" />
179
        <input type="submit" value="Renew item" name="confirm" class="renew" />
180
      </form>
181
[% ELSE %]
182
    <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
183
        <input type="hidden" name="op" value="checkout" />
184
        <input type="hidden" name="patronid" value="[% patronid %]" />
185
        <input type="hidden" name="barcode" value="[% barcode %]" />
186
        <input type="hidden" name="confirmed" value="1" />
187
        <input type="submit" value="Renew item" class="renew" />
188
    </form>
189
[% END %]
190
    <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
191
      <input type="hidden" name="op" value="" />
192
      <input type="hidden" name="patronid" value="[% patronid %]" />
193
      <input type="submit" value="Cancel" class="cancel" />
194
    </form>
180
</div>
195
</div>
181
[% END %]
196
[% END %]
182
197
183
[% IF ( nopermission ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Access denied</h3>
198
[% IF ( nopermission ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Access denied</h3>
184
Sorry, this self-checkout station has lost authentication.  Please contact the administrator to resolve this problem. </div>
199
Sorry, this self-checkout station has lost authentication.  Please contact the administrator to resolve this problem. </div>
185
[% END %]
200
[% END %]
186
[% IF ( timed_out ) %]<!-- This is what is displayed if login has timed out -->
187
<div class="dialog alert"><h3>Session timed out</h3>Sorry, your session has timed out, please log in again.</div>[% END %]
188
[% IF ( different_ip ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Session lost</h3>You are accessing self-checkout from a different IP address! please log in again.</div>[% END %]
201
[% IF ( different_ip ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Session lost</h3>You are accessing self-checkout from a different IP address! please log in again.</div>[% END %]
189
[% IF ( invalid_username_or_password ) %]
202
[% IF ( invalid_username_or_password ) %]
190
<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Record not found</h3><p>Your userid was not found in the database.  Please try again.</p></div>[% END %]
203
<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Record not found</h3><p>Your userid was not found in the database.  Please try again.</p></div>[% END %]
Lines 211-230 Sorry, this self-checkout station has lost authentication. Please contact the a Link Here
211
	[% END %]
224
	[% END %]
212
	[% END %]
225
	[% END %]
213
226
214
	[% IF ( timedout ) %]
215
	<div class="dialog message"><h4>Sorry</h4><p>Your session has timed out due to inactivity.  Please sign in.</p></div>
216
	<br />
217
	[% END %]
218
	[% IF ( validuser ) %]
227
	[% IF ( validuser ) %]
219
  [% IF ( display_patron_image ) %]<div class="yui-ge"><div class="yui-u first">[% END %]
228
  [% IF ( display_patron_image ) %]<div class="yui-ge"><div class="yui-u first">[% END %]
220
	<div id="newcheckout" class="sco_entry">
229
	<div id="newcheckout" class="sco_entry">
221
	<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
230
	<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
222
	<fieldset><legend> Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend>
231
	<fieldset><legend> Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend>
223
	<label for="barcode">Scan a new item or enter its barcode:</label>
232
	<label for="barcode">Scan a new item or enter its barcode:</label>
224
	<input id="barcode" name="barcode" size="20" class="focus" />
233
    <input id="barcode" name="barcode" size="20" class="focus" autocomplete="off" />
225
	<input type="hidden" name="op" value="checkout" />
234
	<input type="hidden" name="op" value="checkout" />
226
	<input type="hidden" name="patronid" value="[% patronid %]" />
235
	<input type="hidden" name="patronid" value="[% patronid %]" />
227
	<input type="hidden" name="valid_session" value="1" />
228
	<input type="submit" value="Submit" class="submit" /></fieldset>
236
	<input type="submit" value="Submit" class="submit" /></fieldset>
229
	</form>
237
	</form>
230
	<div><form method="post" action="/cgi-bin/koha/sco/sco-main.pl?op=logout" ><input type="submit" value="Finish" class="finish" /></form></div>
238
	<div><form method="post" action="/cgi-bin/koha/sco/sco-main.pl?op=logout" ><input type="submit" value="Finish" class="finish" /></form></div>
Lines 292-298 Sorry, this self-checkout station has lost authentication. Please contact the a Link Here
292
	<input type="password" id="patronpw" size="20" name="patronpw" />
300
	<input type="password" id="patronpw" size="20" name="patronpw" />
293
       [% ELSE %]
301
       [% ELSE %]
294
	<fieldset class="checkout"><label for="patronid">Please enter your card number:</label> 
302
	<fieldset class="checkout"><label for="patronid">Please enter your card number:</label> 
295
	<input type="text" id="patronid" class="focus" size="20" name="patronid" />
303
    <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
296
	[% END %]
304
	[% END %]
297
305
298
 	[% FOREACH INPUT IN INPUTS %]<input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">[% END %]
306
 	[% FOREACH INPUT IN INPUTS %]<input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">[% END %]
(-)a/opac/sco/sco-main.pl (-3 / +1 lines)
Lines 91-104 $template->param(AllowSelfCheckReturns => $allowselfcheckreturns); Link Here
91
91
92
92
93
my $issuerid = $loggedinuser;
93
my $issuerid = $loggedinuser;
94
my ($op, $patronid, $patronlogin, $patronpw, $barcode, $confirmed, $timedout) = (
94
my ($op, $patronid, $patronlogin, $patronpw, $barcode, $confirmed) = (
95
    $query->param("op")         || '',
95
    $query->param("op")         || '',
96
    $query->param("patronid")   || '',
96
    $query->param("patronid")   || '',
97
    $query->param("patronlogin")|| '',
97
    $query->param("patronlogin")|| '',
98
    $query->param("patronpw")   || '',
98
    $query->param("patronpw")   || '',
99
    $query->param("barcode")    || '',
99
    $query->param("barcode")    || '',
100
    $query->param("confirmed")  || '',
100
    $query->param("confirmed")  || '',
101
    $query->param("timedout")   || '', #not actually using this...
102
);
101
);
103
102
104
my $issuenoconfirm = 1; #don't need to confirm on issue.
103
my $issuenoconfirm = 1; #don't need to confirm on issue.
105
- 

Return to bug 8955