[Koha] On-site check out

Nicolas Legrand nicolas.legrand at bulac.fr
Wed Sep 25 21:53:16 NZST 2019


Hiya,

Le mer. 25 sept. 2019 à 10:38, Ma. Victoria H. Silva-Manuel <
mavicsilva at gmail.com> a écrit :

> Hi.
> Is there a way to make the "On-site check out" checked by default?
> We have patrons with on-site check out only privilege. It is kind of
> troublesome to repeatedly ticked the box and often it is forgotten.
>
>
we had the problem here and added a quick patch that recalls when the
precedent onsite checkout has been checked. If so, the box is checked for
the next check out. It looks like this (the diff is against the 18.05.x
branch) :

diff --git a/circ/circulation.pl b/circ/circulation.pl
index 1617584..405b6a1 100755
--- a/circ/circulation.pl
+++ b/circ/circulation.pl
@@ -151,6 +151,10 @@ if (!C4::Auth::haspermission(
C4::Context->userenv->{id} , { circulate => 'force
 }

 my $onsite_checkout = $query->param('onsite_checkout');
+if ($onsite_checkout) {
+    $template->param(onsite_checkout => $onsite_checkout)
+}
+

 my @failedrenews = $query->multi_param('failedrenew');    # expected to be
itemnumbers
 our %renew_failed = ();


diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
index a6e6ba0..e9ac74b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
@@ -591,7 +591,7 @@ No patron matched <span class="ex">[% message | html
%]</span>
                         <input type="hidden" name="onsite_checkout"
checked="checked" value="1" />
                     </div>
                 [% ELSE %]
-                    <input type="checkbox" id="onsite_checkout"
name="onsite_checkout" class="circ_setting" /> <label
for="onsite_checkout">On-site checkout</label>
+                    <input type="checkbox" id="onsite_checkout"
name="onsite_checkout" class="circ_setting" [% IF (onsite_checkout) %]
checked="checked"[% END %] /> <label for="onsite_checkout">On-site
checkout</label>
                 [% END %]
             </div>
         [% END %]

I will certainly make a Bugzilla for this one in the coming weeks or even
in the hackfest in Marseille next week. I presume I will have to add a
syspref to make it pass the QA phase.

Regards,

-- 
*Nicolas Legrand*
Administration technique et développements du système de gestion de la
bibliothèque

[image: Logo BULAC]

Bibliothèque universitaire
des langues et civilisations

65 rue des Grands Moulins
F-75013 PARIS
T +33 1 81 69 *18 22*
www.bulac.fr


More information about the Koha mailing list