|
Lines 5-11
Link Here
|
| 5 |
[% USE Branches %] |
5 |
[% USE Branches %] |
| 6 |
[% SET footerjs = 1 %] |
6 |
[% SET footerjs = 1 %] |
| 7 |
[% INCLUDE 'doc-head-open.inc' %] |
7 |
[% INCLUDE 'doc-head-open.inc' %] |
| 8 |
<title>Koha › Tools › Batch patron deletion/anonymization [% IF step == 2 %]› Confirm[% END %][% IF step == 3 %]› Finished[% END %]</title> |
8 |
<title>Koha › Tools › Batch patron deletion and anonymization [% IF step == 2 %]› Confirm[% END %][% IF step == 3 %]› Finished[% END %]</title> |
| 9 |
[% INCLUDE 'doc-head-close.inc' %] |
9 |
[% INCLUDE 'doc-head-close.inc' %] |
| 10 |
</head> |
10 |
</head> |
| 11 |
|
11 |
|
|
Lines 17-25
Link Here
|
| 17 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › |
17 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › |
| 18 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › |
18 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › |
| 19 |
[% IF step == 1 %] |
19 |
[% IF step == 1 %] |
| 20 |
Batch patron deletion/anonymization |
20 |
Batch patron deletion and anonymization |
| 21 |
[% ELSE %] |
21 |
[% ELSE %] |
| 22 |
<a href="/cgi-bin/koha/tools/cleanborrowers.pl">Batch patron deletion/anonymization</a> › |
22 |
<a href="/cgi-bin/koha/tools/cleanborrowers.pl">Batch patron deletion and anonymization</a> › |
| 23 |
[% END %] |
23 |
[% END %] |
| 24 |
[% IF step == 2 %] Confirm [% END %] |
24 |
[% IF step == 2 %] Confirm [% END %] |
| 25 |
[% IF step == 3 %] Finished [% END %] |
25 |
[% IF step == 3 %] Finished [% END %] |
|
Lines 31-36
Link Here
|
| 31 |
<main> |
31 |
<main> |
| 32 |
|
32 |
|
| 33 |
[% IF !OnlyMine %] |
33 |
[% IF !OnlyMine %] |
|
|
34 |
[% IF current_branch == '*' %] |
| 35 |
<h1>Batch patron deletion and anonymization</h1> |
| 36 |
[% ELSE %] |
| 37 |
<h1>Batch patron deletion and anonymization for [% Branches.GetName( current_branch ) | html %]</h1> |
| 38 |
[% END %] |
| 39 |
[% IF step == 1 %] |
| 34 |
<form method="get" action="/cgi-bin/koha/tools/cleanborrowers.pl" id="selectlibrary"> |
40 |
<form method="get" action="/cgi-bin/koha/tools/cleanborrowers.pl" id="selectlibrary"> |
| 35 |
Select a library : |
41 |
Select a library : |
| 36 |
<select name="branch" id="branch" style="width:20em;"> |
42 |
<select name="branch" id="branch" style="width:20em;"> |
|
Lines 44-56
Link Here
|
| 44 |
[% END %] |
50 |
[% END %] |
| 45 |
</select> |
51 |
</select> |
| 46 |
</form> |
52 |
</form> |
| 47 |
[% IF current_branch == '*' %] |
53 |
[% END %] |
| 48 |
<h1>Batch patron deletion/anonymization</h1> |
|
|
| 49 |
[% ELSE %] |
| 50 |
<h1>Batch patron deletion/anonymization for [% Branches.GetName( current_branch ) | html %]</h1> |
| 51 |
[% END %] |
| 52 |
[% ELSE %] |
54 |
[% ELSE %] |
| 53 |
<h1>Batch patron deletion/anonymization for [% Branches.GetName( Branches.GetLoggedInBranchcode ) | html %]</h1> |
55 |
<h1>Batch patron deletion and anonymization for [% Branches.GetName( Branches.GetLoggedInBranchcode ) | html %]</h1> |
| 54 |
[% END %] |
56 |
[% END %] |
| 55 |
|
57 |
|
| 56 |
[% IF step == 1 %] |
58 |
[% IF step == 1 %] |
|
Lines 138-167
Link Here
|
| 138 |
<!-- STEP 2 START --> |
140 |
<!-- STEP 2 START --> |
| 139 |
<div id="step2"> |
141 |
<div id="step2"> |
| 140 |
<form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post"> |
142 |
<form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post"> |
| 141 |
<fieldset> |
|
|
| 142 |
<legend>Warnings</legend> |
| 143 |
<ul> |
| 144 |
<li>[% patrons_to_delete.size || 0 | html %] patrons will be deleted</li> |
| 145 |
<li>[% patrons_to_anonymize.count || 0 | html %] patron's checkout histories will be anonymized</li> |
| 146 |
</ul> |
| 147 |
|
| 148 |
<br /> |
| 149 |
[% IF patrons_to_delete.size %] |
| 150 |
<fieldset><legend>What do you want to do for deleted patrons?</legend> |
| 151 |
<input id="delete" type="radio" name="radio" value="delete" title="Delete patrons directly from the database, not recoverable"/> |
| 152 |
<label for="delete">Permanently delete these patrons</label> |
| 153 |
|
143 |
|
| 154 |
<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"/> |
144 |
<div class="dialog alert"> |
| 155 |
<label for="trash">Move these patrons to the trash</label> |
145 |
<h3>Warning</h3> |
| 156 |
|
146 |
<ul> |
| 157 |
<br /><input id="testrun" type="radio" name="radio" value="testrun" checked="checked" /> |
147 |
<li>[% patrons_to_delete.size || 0 | html %] patrons will be deleted</li> |
| 158 |
<label for="testrun">Do not remove any patrons (test run)</label> |
148 |
<li>[% patrons_to_anonymize.count || 0 | html %] patrons' checkout histories will be anonymized</li> |
| 159 |
<input type="hidden" name="do_delete" value="[% patrons_to_delete.size | html %]" /></fieldset> |
149 |
</ul> |
|
|
150 |
</div> |
| 160 |
|
151 |
|
|
|
152 |
[% IF patrons_to_delete.size %] |
| 153 |
<fieldset> |
| 154 |
<legend>How should patrons be deleted?</legend> |
| 155 |
<p> |
| 156 |
<input id="delete" type="radio" name="radio" value="delete" /> |
| 157 |
<label for="delete">Permanently delete these patrons</label> |
| 158 |
<div class="hint"> |
| 159 |
Delete patrons directly from the database. Patron data will not be recoverable. |
| 160 |
</div> |
| 161 |
</p> |
| 162 |
<p> |
| 163 |
<input id="trash" type="radio" name="radio" value="trash" /> |
| 164 |
<label for="trash">Move these patrons to the trash</label> |
| 165 |
<div class="hint"> |
| 166 |
Move patrons to the deleted patrons table. They can be deleted permanently by the <code>cleanup_database</code> script. |
| 167 |
</div> |
| 168 |
</p> |
| 169 |
<p> |
| 170 |
<input id="testrun" type="radio" name="radio" value="testrun" checked="checked" /> |
| 171 |
<label for="testrun">Test run: Do not remove any patrons.</label> |
| 172 |
<input type="hidden" name="do_delete" value="[% patrons_to_delete.size | html %]" /></fieldset> |
| 173 |
</p> |
| 174 |
</fieldset> |
| 161 |
[% END %] |
175 |
[% END %] |
|
|
176 |
|
| 162 |
[% IF patrons_to_anonymize.count %] |
177 |
[% IF patrons_to_anonymize.count %] |
|
|
178 |
<fieldset> |
| 163 |
Checkout history for [% patrons_to_anonymize.count | html %] patrons will be anonymized |
179 |
Checkout history for [% patrons_to_anonymize.count | html %] patrons will be anonymized |
| 164 |
<input type="hidden" name="do_anonym" value="[% patrons_to_anonymize.count | html %]" /> |
180 |
<input type="hidden" name="do_anonym" value="[% patrons_to_anonymize.count | html %]" /> |
|
|
181 |
</fieldset> |
| 165 |
[% END %] |
182 |
[% END %] |
| 166 |
|
183 |
|
| 167 |
<input type="hidden" name="step" value="3" /> |
184 |
<input type="hidden" name="step" value="3" /> |
|
Lines 174-180
Link Here
|
| 174 |
<input type="hidden" name="borrower_categorycode" value="[% borrower_categorycode | html %]" /> |
191 |
<input type="hidden" name="borrower_categorycode" value="[% borrower_categorycode | html %]" /> |
| 175 |
<input type="hidden" name="patron_list_id" value="[% patron_list_id | html %]" /> |
192 |
<input type="hidden" name="patron_list_id" value="[% patron_list_id | html %]" /> |
| 176 |
<input type="hidden" name="branch" value="[% current_branch | html %]" /> |
193 |
<input type="hidden" name="branch" value="[% current_branch | html %]" /> |
| 177 |
</fieldset> |
|
|
| 178 |
<fieldset class="action"><input type="submit" value="Finish" /> <a class="cancel" href="/cgi-bin/koha/tools/cleanborrowers.pl">Cancel</a></fieldset> |
194 |
<fieldset class="action"><input type="submit" value="Finish" /> <a class="cancel" href="/cgi-bin/koha/tools/cleanborrowers.pl">Cancel</a></fieldset> |
| 179 |
</form> |
195 |
</form> |
| 180 |
</div> |
196 |
</div> |
|
Lines 232-238
Link Here
|
| 232 |
$('#selectlibrary').submit(); |
248 |
$('#selectlibrary').submit(); |
| 233 |
}); |
249 |
}); |
| 234 |
$("form[name='f2']").on('submit',function(){ |
250 |
$("form[name='f2']").on('submit',function(){ |
| 235 |
if( $("#delete").attr("checked") ){ |
251 |
if( $("#delete").prop("checked") ){ |
| 236 |
if( !confirm(_("These patrons will be permanently removed from the database and cannot be recovered")) ){ |
252 |
if( !confirm(_("These patrons will be permanently removed from the database and cannot be recovered")) ){ |
| 237 |
return false; |
253 |
return false; |
| 238 |
} |
254 |
} |
| 239 |
- |
|
|