From f4d784eaabf4a73067a9c2bc8aabb43cd8e5dfe0 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 10 Jun 2019 13:30:56 +0000 Subject: [PATCH] Bug 11642: (follow-up) Batch patron deletion/anonymization should not allow permanent destruction of patron data This patch makes some template changes to try to make this interface more consistent with other areas of Koha and to make warnings more clear. I have also changed the phrase "deletion/anonymization" to "deletion and anonymization." To test, apply the patch and test the patron deletion and anonymization process and confirm that the interface is clear and works well. --- .../intranet-tmpl/prog/en/includes/tools-menu.inc | 2 +- .../prog/en/modules/tools/cleanborrowers.tt | 74 +++++++++++++--------- 2 files changed, 46 insertions(+), 30 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc index 67ccf55..3fce8ea 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc @@ -32,7 +32,7 @@
  • Patron card creator
  • [% END %] [% IF ( CAN_user_tools_delete_anonymize_patrons ) %] -
  • Batch patron deletion/anonymization
  • +
  • Batch patron deletion and anonymization
  • [% END %] [% IF ( CAN_user_tools_edit_patrons ) %]
  • Batch patron modification
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt index 0ba2d02..6bb3ed2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt @@ -5,7 +5,7 @@ [% USE Branches %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Tools › Batch patron deletion/anonymization [% IF step == 2 %]› Confirm[% END %][% IF step == 3 %]› Finished[% END %] +Koha › Tools › Batch patron deletion and anonymization [% IF step == 2 %]› Confirm[% END %][% IF step == 3 %]› Finished[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -17,9 +17,9 @@ HomeTools › [% IF step == 1 %] - Batch patron deletion/anonymization + Batch patron deletion and anonymization [% ELSE %] - Batch patron deletion/anonymization › + Batch patron deletion and anonymization › [% END %] [% IF step == 2 %] Confirm [% END %] [% IF step == 3 %] Finished [% END %] @@ -31,6 +31,12 @@
    [% IF !OnlyMine %] + [% IF current_branch == '*' %] +

    Batch patron deletion and anonymization

    + [% ELSE %] +

    Batch patron deletion and anonymization for [% Branches.GetName( current_branch ) | html %]

    + [% END %] + [% IF step == 1 %]
    Select a library :
    - [% IF current_branch == '*' %] -

    Batch patron deletion/anonymization

    - [% ELSE %] -

    Batch patron deletion/anonymization for [% Branches.GetName( current_branch ) | html %]

    - [% END %] + [% END %] [% ELSE %] -

    Batch patron deletion/anonymization for [% Branches.GetName( Branches.GetLoggedInBranchcode ) | html %]

    +

    Batch patron deletion and anonymization for [% Branches.GetName( Branches.GetLoggedInBranchcode ) | html %]

    [% END %] [% IF step == 1 %] @@ -138,30 +140,45 @@
    -
    - Warnings -
      -
    • [% patrons_to_delete.size || 0 | html %] patrons will be deleted
    • -
    • [% patrons_to_anonymize.count || 0 | html %] patron's checkout histories will be anonymized
    • -
    - -
    - [% IF patrons_to_delete.size %] -
    What do you want to do for deleted patrons? - - -
    - - -
    - -
    +
    +

    Warning

    +
      +
    • [% patrons_to_delete.size || 0 | html %] patrons will be deleted
    • +
    • [% patrons_to_anonymize.count || 0 | html %] patrons' checkout histories will be anonymized
    • +
    +
    + [% IF patrons_to_delete.size %] +
    + How should patrons be deleted? +

    + + +

    + Delete patrons directly from the database. Patron data will not be recoverable. +
    +

    +

    + + +

    + Move patrons to the deleted patrons table. They can be deleted permanently by the cleanup_database script. +
    +

    +

    + + +

    +

    +
    [% END %] + [% IF patrons_to_anonymize.count %] +
    Checkout history for [% patrons_to_anonymize.count | html %] patrons will be anonymized +
    [% END %] @@ -174,7 +191,6 @@ -
    Cancel
    @@ -232,7 +248,7 @@ $('#selectlibrary').submit(); }); $("form[name='f2']").on('submit',function(){ - if( $("#delete").attr("checked") ){ + if( $("#delete").prop("checked") ){ if( !confirm(_("These patrons will be permanently removed from the database and cannot be recovered")) ){ return false; } -- 2.1.4