overdue rules - added JavaScript for branch selector
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / cleanborrowers.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Tools &rsaquo; Clean Patron Records <!-- TMPL_IF NAME="step2" -->&rsaquo; Confirm<!-- /TMPL_IF --><!-- TMPL_IF NAME="step3" -->&rsaquo; Finished<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="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)){
14                     alert("please enter a date !");
15                     document.form.date1.focus();
16                     return false;
17                   }
18               }
19               if((form.checkbox[1].checked)){
20                   if(!(form.date2.value)){
21                       alert("please enter a date !");
22                       document.form.date2.focus();
23                       return false;
24                   }
25               }
26               return true;
27           }
28           
29         /**
30          *  checkForm2(form)
31          *  This function check the form2 is correctly filled.
32          */
33           function checkForm2(form) {
34               return true;
35           }
36      // ]]>
37 </script>
38
39 </head>
40 <body>
41 <!-- TMPL_INCLUDE NAME="header.inc" -->
42 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
43
44 <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; <!-- TMPL_IF NAME="step1" -->Clean Patron Records<!-- TMPL_ELSE --><a href="/cgi-bin/koha/tools/cleanborrowers.pl">Clean Patron Records</a> &rsaquo; <!-- /TMPL_IF --><!-- TMPL_IF NAME="step2" -->Confirm<!-- /TMPL_IF --><!-- TMPL_IF NAME="step3" -->Finished<!-- /TMPL_IF --></div>
45
46 <div id="doc3" class="yui-t2">
47    
48    <div id="bd">
49         <div id="yui-main">
50         <div class="yui-b">
51
52 <h1>Delete some old patrons/Anonymize some check-out history</h1>
53
54 <!-- TMPL_IF NAME="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>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="<!-- TMPL_VAR NAME="filterdate1"-->" type="text" />
63             <script type="text/javascript">
64                 Calendar.setup(
65                  {
66                      inputField : "date1",
67                      ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
68                  }
69                 );
70             </script></p>
71         
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="<!-- TMPL_VAR NAME="filterdate2"-->" type="text" />
75             <script type="text/javascript">
76                 Calendar.setup(
77                  {
78                      inputField : "date2",
79                      ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
80                  }
81                 );
82             </script></p>
83
84             
85             <!-- hidden here -->
86             <input type="hidden" name="step2" value="1" />
87                         </fieldset>
88             <fieldset class="action"><input type="submit" value="Next &gt;&gt;" /></fieldset>
89     </form>
90 </div>
91 <!-- step 1 END -->
92 <!-- /TMPL_IF -->
93
94 <!-- TMPL_IF NAME="step2" -->
95 <!-- STEP 2 START -->
96 <div id="step2">
97         <form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post" onsubmit="return checkForm2(this);">
98     <fieldset>
99         <legend>Warnings</legend>
100
101                 <ul>
102                         <li><!-- TMPL_IF NAME="totalToDelete" --><!-- TMPL_VAR NAME="totalToDelete" --> <!-- TMPL_ELSE -->0 <!-- /TMPL_IF --> patrons will be deleted</li>
103                         <li><!-- TMPL_IF NAME="totalToAnonymize" --><!-- TMPL_VAR NAME="totalToAnonymize" --> <!-- TMPL_ELSE -->0 <!-- /TMPL_IF --> check-out history will be anonymized</li>
104                 </ul>
105
106         <br />
107             <!-- TMPL_IF NAME="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" />
111                 
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="<!-- TMPL_VAR NAME="totalToDelete" -->" /></fieldset>
115
116             <!-- /TMPL_IF -->
117             <!--TMPL_IF NAME="totalToAnonymize"-->
118
119                 Check-out history for <!-- TMPL_VAR NAME="totalToAnonymize"--> patrons will be anonymized
120                 <input type="hidden" name="do_anonym" value="<!-- TMPL_VAR NAME="totalToAnonymize" -->" />
121             <!-- /TMPL_IF -->
122                
123             <input type="hidden" name="step3" value="1" />
124             <input type="hidden" name="filterdate1" value="<!-- TMPL_VAR NAME="filterdate1" -->" />
125             <input type="hidden" name="filterdate2" value="<!-- TMPL_VAR NAME="filterdate2" -->" />
126     </fieldset>
127         <fieldset class="action"><input type="submit" value="Finish" /> <a class="cancel" href="/cgi-bin/koha/tools/cleanborrowers.pl">Cancel</a></fieldset>
128         </form>
129 </div>
130 <!-- STEP 2 END -->
131 <!-- /TMPL_IF -->
132
133 <!-- TMPL_IF NAME="step3" -->
134 <!-- Step 3 START -->
135
136     <div id="step3">
137
138           <!-- TMPL_IF NAME="do_delete" -->
139                 <!-- TMPL_IF NAME="trash" -->
140                     <h4><!-- TMPL_VAR NAME="TotalDel" --> patrons have been successfuly moved to trash</h4>
141                 <!-- TMPL_ELSE -->
142                     <h4><!-- TMPL_VAR NAME="TotalDel" --> patrons have been successfully deleted</h4>
143                 <!-- /TMPL_IF -->
144                         <!-- TMPL_ELSE -->
145                                 <h4>No patron records have been removed</h4>
146             <!-- /TMPL_IF -->
147             <!-- TMPL_IF NAME="do_anonym" -->
148                 <h4>All patrons with checkouts older than <!-- TMPL_VAR NAME="filterdate1" --> have been anonymized</h4>
149                         <!-- TMPL_ELSE -->
150                                 <h4>No patron records have been anonymized</h4>
151             <!-- /TMPL_IF -->
152
153     </div>
154 <!-- Step 3 END -->
155 <!-- /TMPL_IF -->
156
157 </div>
158 </div>
159 <div class="yui-b noprint">
160 <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
161 </div>
162 </div>
163 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->