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

(-)a/installer/data/mysql/atomicupdate/bug_37451.pl (+27 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "37451",
6
    description => "Add the syspref DischargeOverride",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        # Do you stuffs here
12
        my $syspref_exists = $dbh->do(
13
            "select * from systempreferences where variable = 'DischargeOverride'", undef
14
        ) eq "0E0" ? '0' : '1';
15
16
        if ($syspref_exists){
17
            say $out "System preference 'DischargeOverride' already added";
18
        } else {
19
            $dbh->do("
20
                INSERT INTO systempreferences
21
                (variable, value, options, explanation, type)
22
                VALUES ('DischargeOverride', '', NULL, 'Allow librarians to override the discharge suspension.', 'YesNo')
23
            ");
24
            say $out "Added new system preference 'DischargeOverride'";
25
        }
26
    },
27
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 215-220 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
215
('DefaultToLoggedInLibraryCircRules',  '0', NULL ,  'If enabled, circ rules editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
215
('DefaultToLoggedInLibraryCircRules',  '0', NULL ,  'If enabled, circ rules editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
216
('DefaultToLoggedInLibraryNoticesSlips',  '0', NULL ,  'If enabled,slips and notices editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
216
('DefaultToLoggedInLibraryNoticesSlips',  '0', NULL ,  'If enabled,slips and notices editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
217
('DefaultToLoggedInLibraryOverdueTriggers',  '0', NULL ,  'If enabled, overdue status triggers editor will default to the logged in library''s rules, rather than the ''default'' rules.',  'YesNo'),
217
('DefaultToLoggedInLibraryOverdueTriggers',  '0', NULL ,  'If enabled, overdue status triggers editor will default to the logged in library''s rules, rather than the ''default'' rules.',  'YesNo'),
218
('DischargeOverride', '', NULL, 'Allow librarians to override the discharge suspension.', "YesNo"),
218
('Display856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding staff interface XSLT option must be on','Choice'),
219
('Display856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding staff interface XSLT option must be on','Choice'),
219
('DisplayClearScreenButton','no','no|issueslip|issueqslip','If set to ON, a clear screen button will appear on the circulation page.','Choice'),
220
('DisplayClearScreenButton','no','no|issueslip|issueqslip','If set to ON, a clear screen button will appear on the circulation page.','Choice'),
220
('displayFacetCount','0',NULL,NULL,'YesNo'),
221
('displayFacetCount','0',NULL,NULL,'YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc (-1 / +1 lines)
Lines 40-46 Link Here
40
                    <td>[% restriction.created | $KohaDates %]</td>
40
                    <td>[% restriction.created | $KohaDates %]</td>
41
                    [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
41
                    [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
42
                        <td>
42
                        <td>
43
                            [% IF restriction.type.code != "DISCHARGE" %]
43
                            [% IF restriction.type.code != "DISCHARGE" || Koha.Preference("DischargeOverride")  %]
44
                            <form method="post" action="/cgi-bin/koha/members/mod_debarment.pl">
44
                            <form method="post" action="/cgi-bin/koha/members/mod_debarment.pl">
45
                                [% INCLUDE 'csrf-token.inc' %]
45
                                [% INCLUDE 'csrf-token.inc' %]
46
                                <input type="hidden" name="op" value="cud-del" />
46
                                <input type="hidden" name="op" value="cud-del" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +6 lines)
Lines 92-97 Patrons: Link Here
92
               1: Allow
92
               1: Allow
93
               0: "Don't allow"
93
               0: "Don't allow"
94
         - librarians to discharge borrowers and borrowers to request a discharge.
94
         - librarians to discharge borrowers and borrowers to request a discharge.
95
     -
96
         - pref: DischargeOverride
97
           choices:
98
               1: Allow
99
               0: "Don't allow"
100
         - librarians override suspensions due to discharges.
95
     -
101
     -
96
         - pref: FeeOnChangePatronCategory
102
         - pref: FeeOnChangePatronCategory
97
           choices:
103
           choices:
98
- 

Return to bug 37451