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

(-)a/installer/data/mysql/atomicupdate/bug_30226.pl (+16 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "30226",
5
    description => "Add the system preference AllowSetAutomaticRenewal",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Add system preference AllowSetAutomaticRenewal
10
        $dbh->do(q{
11
            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')
12
        });
13
        # Finished adding system preference AllowSetAutomaticRenewal
14
        say $out "Added system preference AllowSetAutomaticRenewal";
15
    },
16
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 43-48 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
43
('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'),
43
('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'),
44
('AllowRenewalOnHoldOverride','0',NULL,'If ON, allow items on hold to be renewed with a specified due date','YesNo'),
44
('AllowRenewalOnHoldOverride','0',NULL,'If ON, allow items on hold to be renewed with a specified due date','YesNo'),
45
('AllowReturnToBranch','anywhere','anywhere|homebranch|holdingbranch|homeorholdingbranch','Where an item may be returned','Choice'),
45
('AllowReturnToBranch','anywhere','anywhere|homebranch|holdingbranch|homeorholdingbranch','Where an item may be returned','Choice'),
46
('AllowSetAutomaticRenewal','1',NULL,'If ON, allows staff to set items for automatic renewal on the check out page','YesNo'),
46
('AllowStaffToSetCheckoutsVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.',  'YesNo'),
47
('AllowStaffToSetCheckoutsVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.',  'YesNo'),
47
('AllowStaffToSetFinesVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s fines to be visible to linked patrons from the opac.',  'YesNo'),
48
('AllowStaffToSetFinesVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s fines to be visible to linked patrons from the opac.',  'YesNo'),
48
('AllowTooManyOverride','1','','If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts','YesNo'),
49
('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 (+6 lines)
Lines 182-187 Circulation: Link Here
182
                  1: Don't
182
                  1: Don't
183
                  0: Do
183
                  0: Do
184
            - require librarians to manually confirm a checkout where the item is already checked out to another patron.
184
            - require librarians to manually confirm a checkout where the item is already checked out to another patron.
185
        -
186
            - pref: AllowSetAutomaticRenewal
187
              choices:
188
                  1: Allow
189
                  0: "Don't allow"
190
            - staff to flag items for autorenewal on the checkout page.
185
        -
191
        -
186
            - pref: AllowTooManyOverride
192
            - pref: AllowTooManyOverride
187
              choices:
193
              choices:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-21 / +22 lines)
Lines 632-662 Link Here
632
                                                [% END %]
632
                                                [% END %]
633
633
634
                                                [% UNLESS ( noissues ) %]
634
                                                [% UNLESS ( noissues ) %]
635
                                                    <div id="set-automatic-renewal" class="circ-setting">
635
                                                    [% IF Koha.Preference('AllowSetAutomaticRenewal') %]
636
                                                        [% IF NEEDSCONFIRMATION %]
636
                                                        <div id="set-automatic-renewal" class="circ-setting">
637
                                                            [% IF auto_renew %]
637
                                                            [% IF NEEDSCONFIRMATION %]
638
                                                                [% IF patron.autorenew_checkouts %]
638
                                                                [% IF auto_renew %]
639
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
639
                                                                    [% IF patron.autorenew_checkouts %]
640
                                                                    title="Patron has opted out of auto-renewal"/>
640
                                                                        <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
641
                                                                        title="Patron has opted out of auto-renewal"/>
642
                                                                    [% ELSE %]
643
                                                                        <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" checked="checked" />
644
                                                                    [% END %]
641
                                                                [% ELSE %]
645
                                                                [% ELSE %]
642
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" checked="checked" />
646
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
643
                                                                [% END %]
647
                                                                [% END %]
644
                                                            [% ELSE %]
648
                                                            [% ELSE %]
645
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
649
                                                                [% IF ( auto_renew && patron.autorenew_checkouts ) %]
646
                                                            [% END %]
650
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" checked="checked" />
647
                                                        [% ELSE %]
651
                                                                [% ELSIF patron.autorenew_checkouts %]
648
                                                            [% IF ( auto_renew && patron.autorenew_checkouts ) %]
652
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
649
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" checked="checked" />
653
                                                                [% ELSE %]
650
                                                            [% ELSIF patron.autorenew_checkouts %]
654
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
651
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
655
                                                                    title="Patron has opted out of auto-renewal"/>
652
                                                            [% ELSE %]
656
                                                                [% END %]
653
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
654
                                                                title="Patron has opted out of auto-renewal"/>
655
                                                            [% END %]
657
                                                            [% END %]
656
                                                        [% END %]
657
658
658
                                                        <label for="auto_renew">Automatic renewal</label>
659
                                                            <label for="auto_renew">Automatic renewal</label>
659
                                                    </div>
660
                                                        </div>
661
                                                    [% END %]
660
                                                    [% IF Koha.Preference('decreaseLoanHighHolds') %]
662
                                                    [% IF Koha.Preference('decreaseLoanHighHolds') %]
661
                                                        <div id="set_high_holds_overrride" class="circ-setting">
663
                                                        <div id="set_high_holds_overrride" class="circ-setting">
662
                                                            [% IF NEEDSCONFIRMATION %]
664
                                                            [% IF NEEDSCONFIRMATION %]
663
- 

Return to bug 30226