Corrections for XHTML compliance, again.
[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 Borrowers</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4
5 <!-- Additions to enable Calendar system -->
6 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-system.css" />
7 <!-- End of additions --><!-- Additions to enable Calendar system -->
8 <script type="text/javascript" src="<!-- TMPL_VAR name='themelang' -->/lib/calendar/calendar.js"></script>
9 <script type="text/javascript" src="<!-- TMPL_VAR name='themelang' -->/lib/calendar/calendar-en.js"></script>
10 <script type="text/javascript" src="<!-- TMPL_VAR name='themelang' -->/lib/calendar/calendar-setup.js"></script>
11 <!-- End of additions -->
12
13 <!-- TMPL_INCLUDE NAME="menus.inc" -->
14 <!-- TMPL_INCLUDE NAME="menu-tools.inc" -->
15
16 <h1>Delete some old borrowers/Anonymize some issue history</h1>
17
18 <!-- TMPL_IF NAME="step1" -->
19 <!-- step 1 START -->
20 <div id="step1">
21     <form name="f1" onsubmit="return checkForm(this);" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
22     <fieldset>
23     <legend>What do you want to do ?</legend>
24         <p><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" checked="checked" />
25         Delete borrower who has not borrowed since:
26         <input size="10" id="date1" name="filterdate1" value="<!-- TMPL_VAR NAME="filterdate1"-->" type="text" /></p>
27             <script type="text/javascript">
28                 Calendar.setup(
29                  {
30                      inputField : "date1",
31                      ifFormat : "%Y-%m-%d",
32                  }
33                 );
34             </script>
35         
36         <br />
37         <p><input id="checkissue" type="checkbox" name="checkbox" value="issue" checked="checked" />
38         Anonymize issue history older than
39         <input size="10" id="date2" name="filterdate2" value="<!-- TMPL_VAR NAME="filterdate2"-->" type="text" /></p>
40             <script type="text/javascript">
41                 Calendar.setup(
42                  {
43                      inputField : "date2",
44                      ifFormat : "%Y-%m-%d",
45                  }
46                 );
47             </script>
48             
49             <br />
50             <input type="submit" value=" OK " style="float:right;" />
51             
52             <!-- hidden here -->
53             <input type="hidden" name="step2" value="1" />
54     </form>
55 </div>
56 <!-- step 1 END -->
57 <!-- /TMPL_IF -->
58
59 <!-- TMPL_IF NAME="step2" -->
60 <!-- STEP 2 START -->
61 <div id="step2">
62     <fieldset>
63         <legend>Warnings</legend>
64         <b>
65         <!-- TMPL_IF NAME="totalToDelete" --><!-- TMPL_VAR NAME="totalToDelete" --> <!-- TMPL_ELSE -->0 <!-- /TMPL_IF --> borrowers will be deleted.
66         <br />
67         <!-- TMPL_IF NAME="totalToAnonymize" --><!-- TMPL_VAR NAME="totalToAnonymize" --> <!-- TMPL_ELSE -->0 <!-- /TMPL_IF --> issue history will be anonymized.
68
69         </b>
70         <br />
71         <form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post" onsubmit="return checkForm2(this);">
72             <!-- TMPL_IF NAME="totalToDelete" -->
73                 What do you want to do for deleted members ?<br />
74                 <label for="delete">Delete completly theses members</label>
75                 <input id="delete" type="radio" name="radio" value="delete" checked="checked" />
76                 
77                 <label for="trash">Move to trash theses members</label>
78                 <input id="trash" type="radio" name="radio" value="trash" />
79                 <input type="hidden" name="do_delete" value="<!-- TMPL_VAR NAME="totalToDelete" -->" />
80                 <br />
81             <!-- /TMPL_IF -->
82             <!--TMPL_IF NAME="totalToAnonymize"-->
83                 <br />
84                 Are you sure you want to anonymize issue history for <!-- TMPL_VAR NAME="totalToAnonymize"--> borrowers ?
85                 <input type="hidden" name="do_anonym" value="<!-- TMPL_VAR NAME="totalToAnonymize" -->" />
86             <!-- /TMPL_IF -->
87             <br /><br />
88             <a href="JavaScript:back();" title="go back">Cancel</a>
89             <input type="submit" value=" OK " style="float:right;" />
90             
91             <input type="hidden" name="step3" value="1" />
92             <input type="hidden" name="filterdate1" value="<!-- TMPL_VAR NAME="filterdate1" -->" />
93             <input type="hidden" name="filterdate2" value="<!-- TMPL_VAR NAME="filterdate2" -->" />
94         </form>
95     </fieldset>
96 </div>
97 <!-- STEP 2 END -->
98 <!-- /TMPL_IF -->
99
100 <!-- TMPL_IF NAME="step3" -->
101 <!-- Step 3 START -->
102
103     <div id="step3">
104           <b>
105           <!-- TMPL_IF NAME="do_delete" -->
106                 <!-- TMPL_IF NAME="trash" -->
107                     <!-- TMPL_VAR NAME="TotalDel" --> borrowers have been successfuly moved to trash.
108                 <!-- TMPL_ELSE -->
109                     <!-- TMPL_VAR NAME="TotalDel" --> borrowers have been successfuly deleted.
110                 <!-- /TMPL_IF -->
111             <!-- /TMPL_IF -->
112             <!-- TMPL_IF NAME="do_anonym" -->
113                 All user which issue's history older than <!-- TMPL_VAR NAME="filterdate1" --> has been anonimized.
114             <!-- /TMPL_IF -->
115           </b>
116     </div>
117     <a href="/cgi-bin/koha/tools/tools-home.pl">Go back to tools home.</a>
118 <!-- Step 3 END -->
119 <!-- /TMPL_IF -->
120
121 <script type="text/javascript" language="JavaScript">
122 // <![CDATA[
123         /**
124          *  checkForm(form)
125          *  This function check the form is correctly filled.
126          */
127           function checkForm(form) {
128               if((form.checkbox[0].checked)){
129                   if(!(form.date1.value)){
130                     alert("please enter a date !");
131                     document.form.date1.focus();
132                     return false;
133                   }
134               }
135               if((form.checkbox[1].checked)){
136                   if(!(form.date2.value)){
137                       alert("please enter a date !");
138                       document.form.date2.focus();
139                       return false;
140                   }
141               }
142               return true;
143           }
144           
145         /**
146          *  checkForm2(form)
147          *  This function check the form2 is correctly filled.
148          */
149           function checkForm2(form) {
150               return true;
151           }
152      // ]]>
153 </script>
154 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->