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

(-)a/installer/data/mysql/atomicupdate/bug_24476_opt_out_of_auto_renewal.perl (-4 / +4 lines)
Lines 1-16 Link Here
1
$DBversion = 'XXX';
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
2
if( CheckVersion( $DBversion ) ) {
3
    unless( column_exists('borrowers','autorenew_checkouts') ){
3
    unless( column_exists('borrowers','autorenew_checkouts') ){
4
        $dbh->do( "ALTER TABLE borrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1" );
4
        $dbh->do( "ALTER TABLE borrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1 AFTER anonymized" );
5
    }
5
    }
6
    unless( column_exists('deletedborrowers','autorenew_checkouts') ){
6
    unless( column_exists('deletedborrowers','autorenew_checkouts') ){
7
        $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1" );
7
        $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1 AFTER anonymized" );
8
    }
8
    }
9
    $dbh->do(q{
9
    $dbh->do(q{
10
        INSERT INTO systempreferences
10
        INSERT IGNORE INTO systempreferences
11
        ( `variable`, `value`, `options`, `explanation`, `type` )
11
        ( `variable`, `value`, `options`, `explanation`, `type` )
12
        VALUES
12
        VALUES
13
        ('AllowPatronToControlAutorenewal','0',NULL,'If enabled, patrons will have a field in their account tp choose whether their checkouts are auto renewed or not','YesNo')
13
        ('AllowPatronToControlAutorenewal','0',NULL,'If enabled, patrons will have a field in their account to choose whether their checkouts are auto renewed or not','YesNo')
14
    });
14
    });
15
    SetVersion( $DBversion );
15
    SetVersion( $DBversion );
16
    print "Upgrade to $DBversion done (Bug 24476 - Allow patrons to opt-out of autorenewal)\n";
16
    print "Upgrade to $DBversion done (Bug 24476 - Allow patrons to opt-out of autorenewal)\n";
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 34-40 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
34
('AllowMultipleIssuesOnABiblio',1,'Allow/Don\'t allow patrons to check out multiple items from one biblio','','YesNo'),
34
('AllowMultipleIssuesOnABiblio',1,'Allow/Don\'t allow patrons to check out multiple items from one biblio','','YesNo'),
35
('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'),
35
('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'),
36
('AllowOfflineCirculation','0','','If on, enables HTML5 offline circulation functionality.','YesNo'),
36
('AllowOfflineCirculation','0','','If on, enables HTML5 offline circulation functionality.','YesNo'),
37
('AllowPatronToControlAutorenewal','0',NULL,'If enabled, patrons will have a field in their account tp choose whether their checkouts are auto renewed or not','YesNo'),
37
('AllowPatronToControlAutorenewal','0',NULL,'If enabled, patrons will have a field in their account to choose whether their checkouts are auto renewed or not','YesNo'),
38
('AllowPatronToSetCheckoutsVisibilityForGuarantor',  '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor',  'YesNo'),
38
('AllowPatronToSetCheckoutsVisibilityForGuarantor',  '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor',  'YesNo'),
39
('AllowPatronToSetFinesVisibilityForGuarantor',  '0', NULL, 'If enabled, the patron can set fines to be visible to his or her guarantor',  'YesNo'),
39
('AllowPatronToSetFinesVisibilityForGuarantor',  '0', NULL, 'If enabled, the patron can set fines to be visible to his or her guarantor',  'YesNo'),
40
('AllowPKIAuth','None','None|Common Name|emailAddress','Use the field from a client-side SSL certificate to look a user in the Koha database','Choice'),
40
('AllowPKIAuth','None','None|Common Name|emailAddress','Use the field from a client-side SSL certificate to look a user in the Koha database','Choice'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +1 lines)
Lines 256-262 Patrons: Link Here
256
           choices:
256
           choices:
257
               yes: Allow patrons
257
               yes: Allow patrons
258
               no: Allow only staff
258
               no: Allow only staff
259
         - "to allow/disallow auto-renewal for account. If allowed a patron will be able to update their own account to allow/disallow autorenewals"
259
         - "to allow/disallow auto renewal for account. If allowed a patron will be able to update their own account to allow/disallow auto renewals"
260
260
261
    Privacy:
261
    Privacy:
262
     -
262
     -
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-3 / +2 lines)
Lines 52-58 Link Here
52
                    [% IF Koha.Preference('AllowPatronToControlAutorenewal') %]
52
                    [% IF Koha.Preference('AllowPatronToControlAutorenewal') %]
53
                    <form id="autorenewal_option" action="/cgi-bin/koha/opac-user.pl" method="post">
53
                    <form id="autorenewal_option" action="/cgi-bin/koha/opac-user.pl" method="post">
54
                            <label for="yes-autorenew_checkouts">
54
                            <label for="yes-autorenew_checkouts">
55
                                Allow auto-renewal:
55
                                Allow auto renewal:
56
                            </label>
56
                            </label>
57
                                [% IF ( borrower.autorenew_checkouts ) %]
57
                                [% IF ( borrower.autorenew_checkouts ) %]
58
                                    <label class="radio inline" for="yes-autorenew_checkouts">
58
                                    <label class="radio inline" for="yes-autorenew_checkouts">
Lines 76-82 Link Here
76
                                [% END %]
76
                                [% END %]
77
                        <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
77
                        <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
78
                        <input type="hidden" name="update_arc" value="1" />
78
                        <input type="hidden" name="update_arc" value="1" />
79
                        <input type="submit" value="Update autorenewal preference" />
79
                        <input type="submit" value="Update auto renewal preference" />
80
                    </form>
80
                    </form>
81
                    [% END %]
81
                    [% END %]
82
                    [% IF ( patronupdate ) %]<div class="alert alert-info"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
82
                    [% IF ( patronupdate ) %]<div class="alert alert-info"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
83
- 

Return to bug 24476