3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Tools › Batch patron deletion/anonymization [% IF step == 2 %]› Confirm[% END %][% IF step == 3 %]› Finished[% END %]</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'calendar.inc' %]
7 <script type="text/javascript">
11 * This function check the form is correctly filled.
13 function checkForm(form) {
14 if((form.checkbox[0].checked)){
15 if ( (!form.date1.value) && (!form.borrower_dateexpiry.value) && (!form.borrower_categorycode.value) ){
16 alert(_("Please enter at least one criterion for deletion!"));
20 if((form.checkbox[1].checked)){
21 if(!(form.date2.value)){
22 alert(_("please enter a date !"));
26 if(!form.checkbox[0].checked && !form.checkbox[1].checked) {
27 alert( _("Please check at least one action") );
35 * This function check the form2 is correctly filled.
37 function checkForm2(form) {
44 <body id="tools_cleanborrowers" class="tools">
45 [% INCLUDE 'header.inc' %]
46 [% INCLUDE 'cat-search.inc' %]
48 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% IF step == 1 %]Clean Patron Records[% ELSE %]<a href="/cgi-bin/koha/tools/cleanborrowers.pl">Clean patron records</a> › [% END %][% IF step == 2 %]Confirm[% END %][% IF step == 3 %]Finished[% END %]</div>
50 <div id="doc3" class="yui-t2">
56 <h1>Batch patron deletion/anonymization</h1>
58 <p>This tool allows you to delete patrons and anonymize checkout history. For deleting patrons, any combination of limits can be used.</p>
63 <form name="f1" onsubmit="return checkForm(this);" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
65 <legend>Delete patrons</legend>
66 <h3><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" /><label for="checkborrower"> Verify you want to delete patrons</label></h3>
68 <h5>Delete patrons who meet the following criteria:</h5>
71 <label for="date1">who have not borrowed since:</label>
72 <input size="10" id="date1" name="not_borrowed_since" type="text" class="datepicker" />
73 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
76 <label for="borrower_dateexpiry">whose expiration date is before:</label>
77 <input size="10" id="borrower_dateexpiry" name="borrower_dateexpiry" type="text" class="datepicker" />
78 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
81 <label for="borrower_categorycode">whose patron category is:</label>
82 <select id="borrower_categorycode" name="borrower_categorycode">
83 <option value="" selected="selected">Any</option>
84 [% FOREACH bc IN borrower_categorycodes %]
85 [% UNLESS bc.category_type == 'S' %]
86 <option value="[% bc.categorycode %]">[% bc.description %]</option>
94 <legend>Anonymize checkout history</legend>
95 [% UNLESS Koha.Preference('AnonymousPatron') %]
96 <div class="dialog message">The AnonymousPatron system preference is not defined. You can use this feature anyway but NULL will be used to update the checkout history.</div>
98 <h3><input id="checkissue" type="checkbox" name="checkbox" value="issue" /><label for="checkissue"> Verify you want to anonymize patron checkout history</label></h3>
102 <label for="date2">Permanently delete checkout history older than</label>
103 <input size="10" id="date2" name="last_issue_date" type="text" class="datepicker" />
104 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
109 <input type="hidden" name="step" value="2" />
111 <fieldset class="action"><input type="submit" value="Next >>" /></fieldset>
118 <!-- STEP 2 START -->
120 <form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post" onsubmit="return checkForm2(this);">
122 <legend>Warnings</legend>
124 <li>[% IF ( totalToDelete ) %][% totalToDelete %] [% ELSE %]0 [% END %] patrons will be deleted</li>
125 <li>[% IF ( totalToAnonymize ) %][% totalToAnonymize %] [% ELSE %]0 [% END %] checkout history will be anonymized</li>
129 [% IF ( totalToDelete ) %]
130 <fieldset><legend>What do you want to do for deleted patrons?</legend>
131 <input id="delete" type="radio" name="radio" value="delete" />
132 <label for="delete">Permanently delete these patrons</label>
134 <br /><input id="trash" type="radio" name="radio" value="trash" />
135 <label for="trash">Move these patrons to the trash</label>
137 <br /><input id="testrun" type="radio" name="radio" value="testrun" checked="checked" />
138 <label for="testrun">Do not remove any patrons (test run)</label>
139 <input type="hidden" name="do_delete" value="[% totalToDelete %]" /></fieldset>
142 [% IF ( totalToAnonymize ) %]
143 Checkout history for [% totalToAnonymize %] patrons will be anonymized
144 <input type="hidden" name="do_anonym" value="[% totalToAnonymize %]" />
147 <input type="hidden" name="step" value="3" />
148 <input type="hidden" name="not_borrowed_since" value="[% not_borrowed_since | $KohaDates %]" />
149 <input type="hidden" name="last_issue_date" value="[% last_issue_date | $KohaDates %]" />
150 <input type="hidden" name="borrower_dateexpiry" value="[% borrower_dateexpiry | $KohaDates %]" />
151 <input type="hidden" name="borrower_categorycode" value="[% borrower_categorycode %]" />
153 <fieldset class="action"><input type="submit" value="Finish" /> <a class="cancel" href="/cgi-bin/koha/tools/cleanborrowers.pl">Cancel</a></fieldset>
160 <!-- Step 3 START -->
164 <h4>[% TotalDel %] patrons would have been removed (if it wasn't a test run)</h4>
165 <h4>No patron records have been actually removed</h4>
167 [% IF ( do_delete ) %]
169 <h4>[% TotalDel %] patrons have been successfully moved to trash</h4>
171 <h4>[% TotalDel %] patrons have been successfully deleted</h4>
174 <h4>No patron records have been removed</h4>
177 [% IF ( do_anonym ) %]
178 <h4>All checkouts older than [% last_issue_date | $KohaDates %] have been anonymized</h4>
180 <h4>No patron records have been anonymized</h4>
189 <div class="yui-b noprint">
190 [% INCLUDE 'tools-menu.inc' %]
193 [% INCLUDE 'intranet-bottom.inc' %]