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