1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Tools › Clean Patron Records [% IF ( step2 ) %]› Confirm[% END %][% IF ( step3 ) %]› Finished[% END %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <script type="text/javascript">
9 * This function check the form is correctly filled.
11 function checkForm(form) {
12 if((form.checkbox[0].checked)){
13 if(!(form.date1.value)){
14 alert(_("please enter a date !"));
15 document.form.date1.focus();
19 if((form.checkbox[1].checked)){
20 if(!(form.date2.value)){
21 alert(_("please enter a date !"));
22 document.form.date2.focus();
31 * This function check the form2 is correctly filled.
33 function checkForm2(form) {
41 [% INCLUDE 'header.inc' %]
42 [% INCLUDE 'cat-search.inc' %]
44 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% IF ( step1 ) %]Clean Patron Records[% ELSE %]<a href="/cgi-bin/koha/tools/cleanborrowers.pl">Clean Patron Records</a> › [% END %][% IF ( step2 ) %]Confirm[% END %][% IF ( step3 ) %]Finished[% END %]</div>
46 <div id="doc3" class="yui-t2">
52 <h1>Delete some old patrons/Anonymize some check-out history</h1>
57 <form name="f1" onsubmit="return checkForm(this);" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
59 <legend>What do you want to do ?</legend>
60 <p><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" checked="checked" />
61 <label for="checkborrower">Delete borrower who has not borrowed since:</label>
62 <input size="10" id="date1" name="filterdate1" value="[% filterdate1 %]" type="text" />
63 <script type="text/javascript">
67 ifFormat : "[% DHTMLcalendar_dateformat %]"
70 </script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span></p>
72 <p><input id="checkissue" type="checkbox" name="checkbox" value="issue" checked="checked" />
73 <label for="checkissue">Anonymize check-out history older than</label>
74 <input size="10" id="date2" name="filterdate2" value="[% filterdate2 %]" type="text" />
75 <script type="text/javascript">
79 ifFormat : "[% DHTMLcalendar_dateformat %]"
82 </script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span></p>
86 <input type="hidden" name="step2" value="1" />
88 <fieldset class="action"><input type="submit" value="Next >>" /></fieldset>
97 <form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post" onsubmit="return checkForm2(this);">
99 <legend>Warnings</legend>
102 <li>[% IF ( totalToDelete ) %][% totalToDelete %] [% ELSE %]0 [% END %] patrons will be deleted</li>
103 <li>[% IF ( totalToAnonymize ) %][% totalToAnonymize %] [% ELSE %]0 [% END %] check-out history will be anonymized</li>
107 [% IF ( totalToDelete ) %]
108 <fieldset><legend>What do you want to do for deleted patrons?</legend>
109 <label for="delete">Permanently delete these patrons</label>
110 <input id="delete" type="radio" name="radio" value="delete" checked="checked" />
112 <label for="trash">Move these patrons to the trash</label>
113 <input id="trash" type="radio" name="radio" value="trash" />
114 <input type="hidden" name="do_delete" value="[% totalToDelete %]" /></fieldset>
117 [% IF ( totalToAnonymize ) %]
119 Check-out history for [% totalToAnonymize %] patrons will be anonymized
120 <input type="hidden" name="do_anonym" value="[% totalToAnonymize %]" />
123 <input type="hidden" name="step3" value="1" />
124 <input type="hidden" name="filterdate1" value="[% filterdate1 %]" />
125 <input type="hidden" name="filterdate2" value="[% filterdate2 %]" />
127 <fieldset class="action"><input type="submit" value="Finish" /> <a class="cancel" href="/cgi-bin/koha/tools/cleanborrowers.pl">Cancel</a></fieldset>
134 <!-- Step 3 START -->
138 [% IF ( do_delete ) %]
140 <h4>[% TotalDel %] patrons have been successfully moved to trash</h4>
142 <h4>[% TotalDel %] patrons have been successfully deleted</h4>
145 <h4>No patron records have been removed</h4>
147 [% IF ( do_anonym ) %]
148 <h4>All patrons with checkouts older than [% filterdate1 %] have been anonymized</h4>
150 <h4>No patron records have been anonymized</h4>
159 <div class="yui-b noprint">
160 [% INCLUDE 'tools-menu.inc' %]
163 [% INCLUDE 'intranet-bottom.inc' %]