More template cleanup, resident search forms, breadcrumbs menus
[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</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
5 <script type="text/javascript" language="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; Clean Patron Records</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 issue 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         Delete borrower who has not borrowed since:
62         <input size="10" id="date1" name="filterdate1" value="<!-- TMPL_VAR NAME="filterdate1"-->" type="text" /></p>
63             <script type="text/javascript">
64                 Calendar.setup(
65                  {
66                      inputField : "date1",
67                      ifFormat : "%Y-%m-%d",
68                  }
69                 );
70             </script>
71         
72         <br />
73         <p><input id="checkissue" type="checkbox" name="checkbox" value="issue" checked="checked" />
74         Anonymize issue history older than
75         <input size="10" id="date2" name="filterdate2" value="<!-- TMPL_VAR NAME="filterdate2"-->" type="text" /></p>
76             <script type="text/javascript">
77                 Calendar.setup(
78                  {
79                      inputField : "date2",
80                      ifFormat : "%Y-%m-%d",
81                  }
82                 );
83             </script>
84             
85             <br />
86             <input type="submit" value="OK" />
87             
88             <!-- hidden here -->
89             <input type="hidden" name="step2" value="1" />
90                         </fieldset>
91     </form>
92 </div>
93 <!-- step 1 END -->
94 <!-- /TMPL_IF -->
95
96 <!-- TMPL_IF NAME="step2" -->
97 <!-- STEP 2 START -->
98 <div id="step2">
99     <fieldset>
100         <legend>Warnings</legend>
101         <b>
102         <!-- TMPL_IF NAME="totalToDelete" --><!-- TMPL_VAR NAME="totalToDelete" --> <!-- TMPL_ELSE -->0 <!-- /TMPL_IF --> patrons will be deleted.
103         <br />
104         <!-- TMPL_IF NAME="totalToAnonymize" --><!-- TMPL_VAR NAME="totalToAnonymize" --> <!-- TMPL_ELSE -->0 <!-- /TMPL_IF --> issue history will be anonymized.
105
106         </b>
107         <br />
108         <form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post" onsubmit="return checkForm2(this);">
109             <!-- TMPL_IF NAME="totalToDelete" -->
110                 What do you want to do for deleted patrons ?<br />
111                 <label for="delete">Delete completly theses patrons</label>
112                 <input id="delete" type="radio" name="radio" value="delete" checked="checked" />
113                 
114                 <label for="trash">Move to trash theses patrons</label>
115                 <input id="trash" type="radio" name="radio" value="trash" />
116                 <input type="hidden" name="do_delete" value="<!-- TMPL_VAR NAME="totalToDelete" -->" />
117                 <br />
118             <!-- /TMPL_IF -->
119             <!--TMPL_IF NAME="totalToAnonymize"-->
120                 <br />
121                 Are you sure you want to anonymize issue history for <!-- TMPL_VAR NAME="totalToAnonymize"--> patrons ?
122                 <input type="hidden" name="do_anonym" value="<!-- TMPL_VAR NAME="totalToAnonymize" -->" />
123             <!-- /TMPL_IF -->
124             <br /><br />
125             <a href="JavaScript:back();" title="go back">Cancel</a>
126             <input type="submit" value=" OK " />
127             
128             <input type="hidden" name="step3" value="1" />
129             <input type="hidden" name="filterdate1" value="<!-- TMPL_VAR NAME="filterdate1" -->" />
130             <input type="hidden" name="filterdate2" value="<!-- TMPL_VAR NAME="filterdate2" -->" />
131         </form>
132     </fieldset>
133 </div>
134 <!-- STEP 2 END -->
135 <!-- /TMPL_IF -->
136
137 <!-- TMPL_IF NAME="step3" -->
138 <!-- Step 3 START -->
139
140     <div id="step3">
141           <b>
142           <!-- TMPL_IF NAME="do_delete" -->
143                 <!-- TMPL_IF NAME="trash" -->
144                     <!-- TMPL_VAR NAME="TotalDel" --> patrons have been successfuly moved to trash.
145                 <!-- TMPL_ELSE -->
146                     <!-- TMPL_VAR NAME="TotalDel" --> patrons have been successfuly deleted.
147                 <!-- /TMPL_IF -->
148             <!-- /TMPL_IF -->
149             <!-- TMPL_IF NAME="do_anonym" -->
150                 All patrons whose issue history older than <!-- TMPL_VAR NAME="filterdate1" --> has been anonimized.
151             <!-- /TMPL_IF -->
152           </b>
153     </div>
154     <a href="/cgi-bin/koha/tools/tools-home.pl">Go back to tools home.</a>
155 <!-- Step 3 END -->
156 <!-- /TMPL_IF -->
157
158 </div>
159 </div>
160 <div class="yui-b">
161 <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
162 </div>
163 </div>
164 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->