From feb1dbae44c10cbcf8ef37ddc310da29a07ed82b 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) Improve Batch patron deletion and anonymization GUI to make consequences clearer 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. Signed-off-by: Mark Tompsett Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize (cherry picked from commit 7e29b5775f4c378e93f5a4b06f90b50f14a6c1e1) Signed-off-by: Fridolin Somers (cherry picked from commit 4974960e3361f5b58da8f99214bb79962f7edd03) Signed-off-by: Lucas Gass --- .../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 67ccf5507e..3fce8ea0e0 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 0ba2d02ebe..6bb3ed21b2 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.39.5