if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force_checkout' } )) {
$force_allow_issue = 0;
}
-
my $onsite_checkout = $query->param('onsite_checkout');
+if (C4::Context->preference("OnSiteCheckoutAutoCheck") && $onsite_checkout eq "on") {
+ $template->param(onsite_checkout => $onsite_checkout);
+}
+
my @failedrenews = $query->multi_param('failedrenew'); # expected to be itemnumbers
our %renew_failed = ();
for (@failedrenews) { $renew_failed{$_} = 1; }
--- /dev/null
+$DBversion = 'XXX';
+if( CheckVersion( $DBversion ) ) {
+
+ $dbh->do(qq{
+ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES
+ ('OnSiteCheckoutAutoCheck','0','','onsite Checkout by default if last checkout was an onsite checkout box','YesNo')
+ });
+}
('RecordedBooksLibraryID','','','Library ID for RecordedBooks integration','Integer'),
('OnSiteCheckouts','0','','Enable/Disable the on-site checkouts feature','YesNo'),
('OnSiteCheckoutsForce','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'),
+('OnSiteCheckoutAutoCheck','0','','onsite Checkout by default if last checkout was an onsite checkout box','YesNo'),
('INTRAdidyoumean','',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
('IntranetBiblioDefaultView','normal','normal|marc|isbd|labeled_marc','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','Choice'),
('intranetbookbag','1','','If ON, enables display of Cart feature in the intranet','YesNo'),
<input type="hidden" name="onsite_checkout" checked="checked" value="1" />
</div>
[% ELSE %]
+ [% IF Koha.Preference('OnSiteCheckoutAutoCheck') && onsite_checkout == "on" %]
+ <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" checked="checked" /> <label for="onsite_checkout">On-site checkout</label>
+ [% ELSE %]
<input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" /> <label for="onsite_checkout">On-site checkout</label>
+ [% END %]
[% END %]
</div>
[% END %]