- [% IF ( display_patron_image ) %]
+ [% IF ( Koha.Preference('ShowPatronImageInWebBasedSelfCheck') ) %]
[% ELSE %]
@@ -266,7 +266,7 @@
[% ELSE %]
No renewals allowed
[% END %]
- [% IF AllowSelfCheckReturns %]
+ [% IF Koha.Preference('AllowSelfCheckReturns') %]
@@ -291,7 +291,7 @@
- [% END # / IF authbylogin %]
+ [% END %]
[% FOREACH INPUT IN INPUTS %]
@@ -415,5 +415,5 @@
//]]>
- [% IF ( SCOUserJS ) %][% END %]
+ [% IF ( Koha.Preference('SCOUserJS') ) %][% END %]
[% END %]
--- a/opac/sco/sco-main.pl
+++ a/opac/sco/sco-main.pl
@@ -74,25 +74,18 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({
debug => 1,
});
-if (C4::Context->preference('SelfCheckoutByLogin'))
-{
- $template->param(authbylogin => 1);
-}
-
# Get the self checkout timeout preference, or use 120 seconds as a default
my $selfchecktimeout = 120000;
if (C4::Context->preference('SelfCheckTimeout')) {
$selfchecktimeout = C4::Context->preference('SelfCheckTimeout') * 1000;
}
-$template->param(SelfCheckTimeout => $selfchecktimeout);
+$template->param( SelfCheckTimeout => $selfchecktimeout );
# Checks policy laid out by AllowSelfCheckReturns, defaults to 'on' if preference is undefined
my $allowselfcheckreturns = 1;
if (defined C4::Context->preference('AllowSelfCheckReturns')) {
$allowselfcheckreturns = C4::Context->preference('AllowSelfCheckReturns');
}
-$template->param(AllowSelfCheckReturns => $allowselfcheckreturns);
-
my $issuerid = $loggedinuser;
my ($op, $patronid, $patronlogin, $patronpw, $barcode, $confirmed) = (
@@ -268,10 +261,7 @@ if ($borrower->{cardnumber}) {
);
if (C4::Context->preference('ShowPatronImageInWebBasedSelfCheck')) {
my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber});
- $template->param(
- display_patron_image => 1,
- cardnumber => $borrower->{cardnumber},
- ) if $patron_image;
+ $template->param( image_exists => 1 ) if $patron_image;
}
} else {
$template->param(
@@ -280,9 +270,4 @@ if ($borrower->{cardnumber}) {
);
}
-$template->param(
- SCOUserJS => C4::Context->preference('SCOUserJS'),
- SCOUserCSS => C4::Context->preference('SCOUserCSS'),
-);
-
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
--
@@ -76,7 +76,7 @@
Please see a member of the library staff.
- [% IF ( returnitem && AllowSelfCheckReturns ) %]
+ [% IF ( returnitem && Koha.Preference('AllowSelfCheckReturns') ) %]
- [% IF ( display_patron_image ) %]
+ [% IF ( Koha.Preference('ShowPatronImageInWebBasedSelfCheck') && image_exists ) %]