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 <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
f897ff77c8
commit
7e29b5775f
2 changed files with 46 additions and 30 deletions
|
@ -32,7 +32,7 @@
|
||||||
<li><a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a></li>
|
<li><a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a></li>
|
||||||
[% END %]
|
[% END %]
|
||||||
[% IF ( CAN_user_tools_delete_anonymize_patrons ) %]
|
[% IF ( CAN_user_tools_delete_anonymize_patrons ) %]
|
||||||
<li><a href="/cgi-bin/koha/tools/cleanborrowers.pl">Batch patron deletion/anonymization</a></li>
|
<li><a href="/cgi-bin/koha/tools/cleanborrowers.pl">Batch patron deletion and anonymization</a></li>
|
||||||
[% END %]
|
[% END %]
|
||||||
[% IF ( CAN_user_tools_edit_patrons ) %]
|
[% IF ( CAN_user_tools_edit_patrons ) %]
|
||||||
<li><a href="/cgi-bin/koha/tools/modborrowers.pl">Batch patron modification</a></li>
|
<li><a href="/cgi-bin/koha/tools/modborrowers.pl">Batch patron modification</a></li>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
[% USE Branches %]
|
[% USE Branches %]
|
||||||
[% SET footerjs = 1 %]
|
[% SET footerjs = 1 %]
|
||||||
[% INCLUDE 'doc-head-open.inc' %]
|
[% INCLUDE 'doc-head-open.inc' %]
|
||||||
<title>Koha › Tools › Batch patron deletion/anonymization [% IF step == 2 %]› Confirm[% END %][% IF step == 3 %]› Finished[% END %]</title>
|
<title>Koha › Tools › Batch patron deletion and anonymization [% IF step == 2 %]› Confirm[% END %][% IF step == 3 %]› Finished[% END %]</title>
|
||||||
[% INCLUDE 'doc-head-close.inc' %]
|
[% INCLUDE 'doc-head-close.inc' %]
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@
|
||||||
<a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
|
||||||
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
|
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
|
||||||
[% IF step == 1 %]
|
[% IF step == 1 %]
|
||||||
Batch patron deletion/anonymization
|
Batch patron deletion and anonymization
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
<a href="/cgi-bin/koha/tools/cleanborrowers.pl">Batch patron deletion/anonymization</a> ›
|
<a href="/cgi-bin/koha/tools/cleanborrowers.pl">Batch patron deletion and anonymization</a> ›
|
||||||
[% END %]
|
[% END %]
|
||||||
[% IF step == 2 %] Confirm [% END %]
|
[% IF step == 2 %] Confirm [% END %]
|
||||||
[% IF step == 3 %] Finished [% END %]
|
[% IF step == 3 %] Finished [% END %]
|
||||||
|
@ -31,6 +31,12 @@
|
||||||
<main>
|
<main>
|
||||||
|
|
||||||
[% IF !OnlyMine %]
|
[% IF !OnlyMine %]
|
||||||
|
[% IF current_branch == '*' %]
|
||||||
|
<h1>Batch patron deletion and anonymization</h1>
|
||||||
|
[% ELSE %]
|
||||||
|
<h1>Batch patron deletion and anonymization for [% Branches.GetName( current_branch ) | html %]</h1>
|
||||||
|
[% END %]
|
||||||
|
[% IF step == 1 %]
|
||||||
<form method="get" action="/cgi-bin/koha/tools/cleanborrowers.pl" id="selectlibrary">
|
<form method="get" action="/cgi-bin/koha/tools/cleanborrowers.pl" id="selectlibrary">
|
||||||
Select a library :
|
Select a library :
|
||||||
<select name="branch" id="branch" style="width:20em;">
|
<select name="branch" id="branch" style="width:20em;">
|
||||||
|
@ -44,13 +50,9 @@
|
||||||
[% END %]
|
[% END %]
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</form>
|
||||||
[% IF current_branch == '*' %]
|
[% END %]
|
||||||
<h1>Batch patron deletion/anonymization</h1>
|
|
||||||
[% ELSE %]
|
|
||||||
<h1>Batch patron deletion/anonymization for [% Branches.GetName( current_branch ) | html %]</h1>
|
|
||||||
[% END %]
|
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
<h1>Batch patron deletion/anonymization for [% Branches.GetName( Branches.GetLoggedInBranchcode ) | html %]</h1>
|
<h1>Batch patron deletion and anonymization for [% Branches.GetName( Branches.GetLoggedInBranchcode ) | html %]</h1>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% IF step == 1 %]
|
[% IF step == 1 %]
|
||||||
|
@ -138,30 +140,45 @@
|
||||||
<!-- STEP 2 START -->
|
<!-- STEP 2 START -->
|
||||||
<div id="step2">
|
<div id="step2">
|
||||||
<form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
|
<form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
|
||||||
<fieldset>
|
|
||||||
<legend>Warnings</legend>
|
|
||||||
<ul>
|
|
||||||
<li>[% patrons_to_delete.size || 0 | html %] patrons will be deleted</li>
|
|
||||||
<li>[% patrons_to_anonymize.count || 0 | html %] patron's checkout histories will be anonymized</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<br />
|
<div class="dialog alert">
|
||||||
|
<h3>Warning</h3>
|
||||||
|
<ul>
|
||||||
|
<li>[% patrons_to_delete.size || 0 | html %] patrons will be deleted</li>
|
||||||
|
<li>[% patrons_to_anonymize.count || 0 | html %] patrons' checkout histories will be anonymized</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
[% IF patrons_to_delete.size %]
|
[% IF patrons_to_delete.size %]
|
||||||
<fieldset><legend>What do you want to do for deleted patrons?</legend>
|
<fieldset>
|
||||||
<input id="delete" type="radio" name="radio" value="delete" title="Delete patrons directly from the database, not recoverable"/>
|
<legend>How should patrons be deleted?</legend>
|
||||||
<label for="delete">Permanently delete these patrons</label>
|
<p>
|
||||||
|
<input id="delete" type="radio" name="radio" value="delete" />
|
||||||
<br /><input id="trash" type="radio" name="radio" value="trash" title="Move patrons to the deleted borrowers table, they can be deleted permanently by the cleanup_database script"/>
|
<label for="delete">Permanently delete these patrons</label>
|
||||||
<label for="trash">Move these patrons to the trash</label>
|
<div class="hint">
|
||||||
|
Delete patrons directly from the database. Patron data will not be recoverable.
|
||||||
<br /><input id="testrun" type="radio" name="radio" value="testrun" checked="checked" />
|
</div>
|
||||||
<label for="testrun">Do not remove any patrons (test run)</label>
|
</p>
|
||||||
<input type="hidden" name="do_delete" value="[% patrons_to_delete.size | html %]" /></fieldset>
|
<p>
|
||||||
|
<input id="trash" type="radio" name="radio" value="trash" />
|
||||||
|
<label for="trash">Move these patrons to the trash</label>
|
||||||
|
<div class="hint">
|
||||||
|
Move patrons to the deleted patrons table. They can be deleted permanently by the <code>cleanup_database</code> script.
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<input id="testrun" type="radio" name="radio" value="testrun" checked="checked" />
|
||||||
|
<label for="testrun">Test run: Do not remove any patrons.</label>
|
||||||
|
<input type="hidden" name="do_delete" value="[% patrons_to_delete.size | html %]" /></fieldset>
|
||||||
|
</p>
|
||||||
|
</fieldset>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% IF patrons_to_anonymize.count %]
|
[% IF patrons_to_anonymize.count %]
|
||||||
|
<fieldset>
|
||||||
Checkout history for [% patrons_to_anonymize.count | html %] patrons will be anonymized
|
Checkout history for [% patrons_to_anonymize.count | html %] patrons will be anonymized
|
||||||
<input type="hidden" name="do_anonym" value="[% patrons_to_anonymize.count | html %]" />
|
<input type="hidden" name="do_anonym" value="[% patrons_to_anonymize.count | html %]" />
|
||||||
|
</fieldset>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
<input type="hidden" name="step" value="3" />
|
<input type="hidden" name="step" value="3" />
|
||||||
|
@ -174,7 +191,6 @@
|
||||||
<input type="hidden" name="borrower_categorycode" value="[% borrower_categorycode | html %]" />
|
<input type="hidden" name="borrower_categorycode" value="[% borrower_categorycode | html %]" />
|
||||||
<input type="hidden" name="patron_list_id" value="[% patron_list_id | html %]" />
|
<input type="hidden" name="patron_list_id" value="[% patron_list_id | html %]" />
|
||||||
<input type="hidden" name="branch" value="[% current_branch | html %]" />
|
<input type="hidden" name="branch" value="[% current_branch | html %]" />
|
||||||
</fieldset>
|
|
||||||
<fieldset class="action"><input type="submit" value="Finish" /> <a class="cancel" href="/cgi-bin/koha/tools/cleanborrowers.pl">Cancel</a></fieldset>
|
<fieldset class="action"><input type="submit" value="Finish" /> <a class="cancel" href="/cgi-bin/koha/tools/cleanborrowers.pl">Cancel</a></fieldset>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -232,7 +248,7 @@
|
||||||
$('#selectlibrary').submit();
|
$('#selectlibrary').submit();
|
||||||
});
|
});
|
||||||
$("form[name='f2']").on('submit',function(){
|
$("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")) ){
|
if( !confirm(_("These patrons will be permanently removed from the database and cannot be recovered")) ){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue