@@ -, +, @@ --- .../data/mysql/atomicupdate/bug_30226.pl | 16 +++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../admin/preferences/circulation.pref | 6 +++ .../prog/en/modules/circ/circulation.tt | 42 ++++++++++--------- 4 files changed, 45 insertions(+), 20 deletions(-) create mode 100755 installer/data/mysql/atomicupdate/bug_30226.pl --- a/installer/data/mysql/atomicupdate/bug_30226.pl +++ a/installer/data/mysql/atomicupdate/bug_30226.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => "30226", + description => "Add the system preference AllowSetAutomaticRenewal", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + # Add system preference AllowSetAutomaticRenewal + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type` ) VALUES('AllowSetAutomaticRenewal', '1', '|yes|no', 'Allow or Prevent staff from flagging items for autorenewal on the checkout page', 'YesNo') + }); + # Finished adding system preference AllowSetAutomaticRenewal + say $out "Added system preference AllowSetAutomaticRenewal"; + }, +}; --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -43,6 +43,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'), ('AllowRenewalOnHoldOverride','0',NULL,'If ON, allow items on hold to be renewed with a specified due date','YesNo'), ('AllowReturnToBranch','anywhere','anywhere|homebranch|holdingbranch|homeorholdingbranch','Where an item may be returned','Choice'), +('AllowSetAutomaticRenewal','1',NULL,'If ON, allows staff to set items for automatic renewal on the check out page','YesNo'), ('AllowStaffToSetCheckoutsVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.', 'YesNo'), ('AllowStaffToSetFinesVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s fines to be visible to linked patrons from the opac.', 'YesNo'), ('AllowTooManyOverride','1','','If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts','YesNo'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -182,6 +182,12 @@ Circulation: 1: Don't 0: Do - require librarians to manually confirm a checkout where the item is already checked out to another patron. + - + - pref: AllowSetAutomaticRenewal + choices: + 1: Allow + 0: "Don't allow" + - staff to flag items for autorenewal on the checkout page. - - pref: AllowTooManyOverride choices: --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -632,31 +632,33 @@ [% END %] [% UNLESS ( noissues ) %] -
- [% IF NEEDSCONFIRMATION %] - [% IF auto_renew %] - [% IF patron.autorenew_checkouts %] - + [% IF Koha.Preference('AllowSetAutomaticRenewal') %] +
+ [% IF NEEDSCONFIRMATION %] + [% IF auto_renew %] + [% IF patron.autorenew_checkouts %] + + [% ELSE %] + + [% END %] [% ELSE %] - + [% END %] [% ELSE %] - - [% END %] - [% ELSE %] - [% IF ( auto_renew && patron.autorenew_checkouts ) %] - - [% ELSIF patron.autorenew_checkouts %] - - [% ELSE %] - + [% IF ( auto_renew && patron.autorenew_checkouts ) %] + + [% ELSIF patron.autorenew_checkouts %] + + [% ELSE %] + + [% END %] [% END %] - [% END %] - -
+ +
+ [% END %] [% IF Koha.Preference('decreaseLoanHighHolds') %]
[% IF NEEDSCONFIRMATION %] --