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

(-)a/installer/data/mysql/atomicupdate/bug_20028-add_allowgdprpatronexport_syspref.perl (+16 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    # you can use $dbh here like:
4
    # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" );
5
6
    # or perform some test and warn
7
    # if( !column_exists( 'biblio', 'biblionumber' ) ) {
8
    #    warn "There is something wrong";
9
    # }
10
11
    $dbh->do( "INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES  ('AllowGDPRPatronExport', '1', '', 'Allow patron GDPR export from staff interface.', 'yesno')" );
12
13
    # Always end with this (adjust the bug info)
14
    SetVersion( $DBversion );
15
    print "Upgrade to $DBversion done (Bug 20028 - Export all patron related personal data in one package)\n";
16
}
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 17-22 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
17
('AllFinesNeedOverride','1','0','If on, staff will be asked to override every fine, even if it is below noissuescharge.','YesNo'),
17
('AllFinesNeedOverride','1','0','If on, staff will be asked to override every fine, even if it is below noissuescharge.','YesNo'),
18
('AllowAllMessageDeletion','0','','Allow any Library to delete any message','YesNo'),
18
('AllowAllMessageDeletion','0','','Allow any Library to delete any message','YesNo'),
19
('AllowFineOverride','0','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','YesNo'),
19
('AllowFineOverride','0','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','YesNo'),
20
('AllowGDPRPatronExport','1','','If set all data for a patron can be exported from the staff interface.','YesNo'),
20
('AllowHoldDateInFuture','0','','If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','YesNo'),
21
('AllowHoldDateInFuture','0','','If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','YesNo'),
21
('AllowHoldItemTypeSelection','0','','If enabled, patrons and staff will be able to select the itemtype when placing a hold','YesNo'),
22
('AllowHoldItemTypeSelection','0','','If enabled, patrons and staff will be able to select the itemtype when placing a hold','YesNo'),
22
('AllowHoldPolicyOverride','0',NULL,'Allow staff to override hold policies when placing holds','YesNo'),
23
('AllowHoldPolicyOverride','0',NULL,'Allow staff to override hold policies when placing holds','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (+3 lines)
Lines 91-96 Link Here
91
                        <li><a id="exportcheckins" href="#">Export today's checked in barcodes</a></li>
91
                        <li><a id="exportcheckins" href="#">Export today's checked in barcodes</a></li>
92
                    [% END %]
92
                    [% END %]
93
                [% END %]
93
                [% END %]
94
                [% IF Koha.Preference('AllowGDPRPatronExport') %]
95
                    <li><a id="exportgdprdata" href="#">Export patron's GDPR data</a></li>
96
                [% END %]
94
            </ul>
97
            </ul>
95
    </div>
98
    </div>
96
</div>
99
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+6 lines)
Lines 1-6 Link Here
1
Patrons:
1
Patrons:
2
    General:
2
    General:
3
     -
3
     -
4
         - pref: AllowGDPRPatronExport
5
           choices:
6
               yes: "Allow export"
7
               no: "Don't allow export"
8
         - of patron data for GDPR compliance.
9
     -
4
         - pref: AutoEmailOpacUser
10
         - pref: AutoEmailOpacUser
5
           choices:
11
           choices:
6
               yes: Send
12
               yes: Send
(-)a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js (-1 / +8 lines)
Lines 73-78 $(document).ready(function(){ Link Here
73
        $(".btn-group").removeClass("open");
73
        $(".btn-group").removeClass("open");
74
        return false;
74
        return false;
75
    });
75
    });
76
    $("#exportgdprdata").click(function(){
77
        export_gdpr_data();
78
        $(".btn-group").removeClass("open");
79
        return false;
80
    });
76
    $("#printsummary").click(function(){
81
    $("#printsummary").click(function(){
77
        printx_window("page");
82
        printx_window("page");
78
        $(".btn-group").removeClass("open");
83
        $(".btn-group").removeClass("open");
Lines 144-149 function confirm_reregistration() { Link Here
144
function export_barcodes() {
149
function export_barcodes() {
145
    window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=' + borrowernumber + '&amp;op=export_barcodes');
150
    window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=' + borrowernumber + '&amp;op=export_barcodes');
146
}
151
}
152
function export_gdpr_data() {
153
    window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=' + borrowernumber + '&amp;op=export_gdprdata');
154
}
147
var slip_re = /slip/;
155
var slip_re = /slip/;
148
function printx_window(print_type) {
156
function printx_window(print_type) {
149
    var handler = print_type.match(slip_re) ? "printslip" : "summary-print";
157
    var handler = print_type.match(slip_re) ? "printslip" : "summary-print";
150
- 

Return to bug 20028