Bug 12056: fix untranslatable strings in calendar
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / cleanborrowers.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Tools &rsaquo; Batch patron deletion/anonymization [% IF ( step2 ) %]&rsaquo; Confirm[% END %][% IF ( step3 ) %]&rsaquo; Finished[% END %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <script type="text/javascript">
6 // <![CDATA[
7         /**
8          *  checkForm(form)
9          *  This function check the form is correctly filled.
10          */
11           function checkForm(form) {
12               if((form.checkbox[0].checked)){
13                   if ( (!form.date1.value) && (!form.borrower_dateexpiry.value) && (!form.borrower_categorycode.value) ){
14                     alert(_("Please enter at least one criterion for deletion!"));
15                     return false;
16                   }
17               }
18               if((form.checkbox[1].checked)){
19                   if(!(form.date2.value)){
20                       alert(_("please enter a date !"));
21                       return false;
22                   }
23               }
24               return true;
25           }
26           
27         /**
28          *  checkForm2(form)
29          *  This function check the form2 is correctly filled.
30          */
31           function checkForm2(form) {
32               return true;
33           }
34      // ]]>
35 </script>
36
37 </head>
38 <body id="tools_cleanborrowers" class="tools">
39 [% INCLUDE 'header.inc' %]
40 [% INCLUDE 'cat-search.inc' %]
41
42 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>  &rsaquo; [% IF ( step1 ) %]Clean Patron Records[% ELSE %]<a href="/cgi-bin/koha/tools/cleanborrowers.pl">Clean patron records</a> &rsaquo; [% END %][% IF ( step2 ) %]Confirm[% END %][% IF ( step3 ) %]Finished[% END %]</div>
43
44 <div id="doc3" class="yui-t2">
45
46    <div id="bd">
47     <div id="yui-main">
48     <div class="yui-b">
49
50 <h1>Batch patron deletion/anonymization</h1>
51 <div class="help">
52     <p>This tool allows you to delete patrons and anonymize checkout history. For deleting patrons, any combination of limits can be used.</p>
53 </div>
54 [% IF ( step1 ) %]
55 <!-- step 1 START -->
56 <div id="step1">
57     <form name="f1" onsubmit="return checkForm(this);" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
58     <fieldset>
59     <legend>Delete patrons</legend>
60         <h3><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" /><label for="checkborrower"> Verify you want to delete patrons</label></h3>
61         <br />
62         <h5>Delete patrons who meet the following criteria:</h5>
63         <ul>
64                 <li>
65                     <label for="date1">who have not borrowed since:</label>
66                     <input size="10" id="date1" name="filterdate1" type="text" class="datepicker" />
67                     <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
68                 </li>
69                 <li>
70                     <label for="borrower_dateexpiry">whose expiration date is before:</label>
71                     <input size="10" id="borrower_dateexpiry" name="borrower_dateexpiry" type="text" class="datepicker" />
72                     <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
73                 </li>
74                 <li>
75                     <label for="borrower_categorycode">whose patron category is:</label>
76                     <select id="borrower_categorycode" name="borrower_categorycode">
77                         <option value="" selected="selected">Any</option>
78                         [% FOREACH bc IN borrower_categorycodes %]
79                             [% UNLESS ( bc.categorycode == 'S' || bc.category_type == 'S' ) %]
80                                 <option value="[% bc.categorycode %]">[% bc.description %]</option>
81                             [% END %]
82                         [% END %]
83                     </select>
84                 </li>
85             </ul>
86         </fieldset>
87         <fieldset>
88         <legend>Anonymize checkout history</legend>
89         <h3><input id="checkissue" type="checkbox" name="checkbox" value="issue" /><label for="checkissue"> Verify you want to anonymize patron checkout history</label></h3>
90         <br />
91         <ul>
92             <li>
93                 <label for="date2">Permanently delete checkout history older than</label>
94                 <input size="10" id="date2" name="filterdate2" type="text" class="datepicker" />
95                 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
96             </li>
97         </ul>
98
99             <!-- hidden here -->
100             <input type="hidden" name="step2" value="1" />
101             </fieldset>
102             <fieldset class="action"><input type="submit" value="Next &gt;&gt;" /></fieldset>
103     </form>
104 </div>
105 <!-- step 1 END -->
106 [% END %]
107
108 [% IF ( step2 ) %]
109 <!-- STEP 2 START -->
110 <div id="step2">
111         <form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post" onsubmit="return checkForm2(this);">
112     <fieldset>
113         <legend>Warnings</legend>
114         <ul>
115             <li>[% IF ( totalToDelete ) %][% totalToDelete %] [% ELSE %]0 [% END %] patrons will be deleted</li>
116             <li>[% IF ( totalToAnonymize ) %][% totalToAnonymize %] [% ELSE %]0 [% END %] checkout history will be anonymized</li>
117         </ul>
118
119         <br />
120             [% IF ( totalToDelete ) %]
121                 <fieldset><legend>What do you want to do for deleted patrons?</legend>
122                 <input id="delete" type="radio" name="radio" value="delete" />
123                 <label for="delete">Permanently delete these patrons</label>
124
125                 <br /><input id="trash" type="radio" name="radio" value="trash" />
126                 <label for="trash">Move these patrons to the trash</label>
127
128                 <br /><input id="testrun" type="radio" name="radio" value="testrun" checked="checked" />
129                 <label for="testrun">Do not remove any patrons (test run)</label>
130                 <input type="hidden" name="do_delete" value="[% totalToDelete %]" /></fieldset>
131
132             [% END %]
133             [% IF ( totalToAnonymize ) %]
134                 Checkout history for [% totalToAnonymize %] patrons will be anonymized
135                 <input type="hidden" name="do_anonym" value="[% totalToAnonymize %]" />
136             [% END %]
137
138             <input type="hidden" name="step3" value="1" />
139             <input type="hidden" name="filterdate1" value="[% filterdate1 %]" />
140             <input type="hidden" name="filterdate2" value="[% filterdate2 %]" />
141             <input type="hidden" name="borrower_dateexpiry" value="[% borrower_dateexpiry %]" />
142             <input type="hidden" name="borrower_categorycode" value="[% borrower_categorycode %]" />
143     </fieldset>
144     <fieldset class="action"><input type="submit" value="Finish" /> <a class="cancel" href="/cgi-bin/koha/tools/cleanborrowers.pl">Cancel</a></fieldset>
145         </form>
146 </div>
147 <!-- STEP 2 END -->
148 [% END %]
149
150 [% IF ( step3 ) %]
151 <!-- Step 3 START -->
152
153     <div id="step3">
154         [% IF ( testrun ) %]
155             <h4>[% TotalDel %] patrons would have been removed (if it wasn't a test run)</h4>
156             <h4>No patron records have been actually removed</h4>
157         [% ELSE %]
158             [% IF ( do_delete ) %]
159                 [% IF ( trash ) %]
160                     <h4>[% TotalDel %] patrons have been successfully moved to trash</h4>
161                 [% ELSE %]
162                     <h4>[% TotalDel %] patrons have been successfully deleted</h4>
163                 [% END %]
164             [% ELSE %]
165                 <h4>No patron records have been removed</h4>
166             [% END %]
167         [% END %]
168         [% IF ( do_anonym ) %]
169             <h4>All patrons with checkouts older than [% filterdate1 %] have been anonymized</h4>
170         [% ELSE %]
171             <h4>No patron records have been anonymized</h4>
172         [% END %]
173
174     </div>
175 <!-- Step 3 END -->
176 [% END %]
177
178 </div>
179 </div>
180 <div class="yui-b noprint">
181 [% INCLUDE 'tools-menu.inc' %]
182 </div>
183 </div>
184 [% INCLUDE 'intranet-bottom.inc' %]