Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tmpl
2007-09-14 17:47:24 -05:00

164 lines
6 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Tools &rsaquo; Clean Patron Records</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
<script type="text/javascript" language="JavaScript">
// <![CDATA[
/**
* checkForm(form)
* This function check the form is correctly filled.
*/
function checkForm(form) {
if((form.checkbox[0].checked)){
if(!(form.date1.value)){
alert("please enter a date !");
document.form.date1.focus();
return false;
}
}
if((form.checkbox[1].checked)){
if(!(form.date2.value)){
alert("please enter a date !");
document.form.date2.focus();
return false;
}
}
return true;
}
/**
* checkForm2(form)
* This function check the form2 is correctly filled.
*/
function checkForm2(form) {
return true;
}
// ]]>
</script>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
<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>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<h1>Delete some old patrons/Anonymize some issue history</h1>
<!-- TMPL_IF NAME="step1" -->
<!-- step 1 START -->
<div id="step1">
<form name="f1" onsubmit="return checkForm(this);" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
<fieldset>
<legend>What do you want to do ?</legend>
<p><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" checked="checked" />
Delete borrower who has not borrowed since:
<input size="10" id="date1" name="filterdate1" value="<!-- TMPL_VAR NAME="filterdate1"-->" type="text" /></p>
<script type="text/javascript">
Calendar.setup(
{
inputField : "date1",
ifFormat : "%Y-%m-%d",
}
);
</script>
<br />
<p><input id="checkissue" type="checkbox" name="checkbox" value="issue" checked="checked" />
Anonymize issue history older than
<input size="10" id="date2" name="filterdate2" value="<!-- TMPL_VAR NAME="filterdate2"-->" type="text" /></p>
<script type="text/javascript">
Calendar.setup(
{
inputField : "date2",
ifFormat : "%Y-%m-%d",
}
);
</script>
<br />
<input type="submit" value="OK" />
<!-- hidden here -->
<input type="hidden" name="step2" value="1" />
</fieldset>
</form>
</div>
<!-- step 1 END -->
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="step2" -->
<!-- STEP 2 START -->
<div id="step2">
<fieldset>
<legend>Warnings</legend>
<b>
<!-- TMPL_IF NAME="totalToDelete" --><!-- TMPL_VAR NAME="totalToDelete" --> <!-- TMPL_ELSE -->0 <!-- /TMPL_IF --> patrons will be deleted.
<br />
<!-- TMPL_IF NAME="totalToAnonymize" --><!-- TMPL_VAR NAME="totalToAnonymize" --> <!-- TMPL_ELSE -->0 <!-- /TMPL_IF --> issue history will be anonymized.
</b>
<br />
<form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post" onsubmit="return checkForm2(this);">
<!-- TMPL_IF NAME="totalToDelete" -->
What do you want to do for deleted patrons ?<br />
<label for="delete">Delete completly theses patrons</label>
<input id="delete" type="radio" name="radio" value="delete" checked="checked" />
<label for="trash">Move to trash theses patrons</label>
<input id="trash" type="radio" name="radio" value="trash" />
<input type="hidden" name="do_delete" value="<!-- TMPL_VAR NAME="totalToDelete" -->" />
<br />
<!-- /TMPL_IF -->
<!--TMPL_IF NAME="totalToAnonymize"-->
<br />
Are you sure you want to anonymize issue history for <!-- TMPL_VAR NAME="totalToAnonymize"--> patrons ?
<input type="hidden" name="do_anonym" value="<!-- TMPL_VAR NAME="totalToAnonymize" -->" />
<!-- /TMPL_IF -->
<br /><br />
<a href="JavaScript:back();" title="go back">Cancel</a>
<input type="submit" value=" OK " />
<input type="hidden" name="step3" value="1" />
<input type="hidden" name="filterdate1" value="<!-- TMPL_VAR NAME="filterdate1" -->" />
<input type="hidden" name="filterdate2" value="<!-- TMPL_VAR NAME="filterdate2" -->" />
</form>
</fieldset>
</div>
<!-- STEP 2 END -->
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="step3" -->
<!-- Step 3 START -->
<div id="step3">
<b>
<!-- TMPL_IF NAME="do_delete" -->
<!-- TMPL_IF NAME="trash" -->
<!-- TMPL_VAR NAME="TotalDel" --> patrons have been successfuly moved to trash.
<!-- TMPL_ELSE -->
<!-- TMPL_VAR NAME="TotalDel" --> patrons have been successfuly deleted.
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="do_anonym" -->
All patrons whose issue history older than <!-- TMPL_VAR NAME="filterdate1" --> has been anonimized.
<!-- /TMPL_IF -->
</b>
</div>
<a href="/cgi-bin/koha/tools/tools-home.pl">Go back to tools home.</a>
<!-- Step 3 END -->
<!-- /TMPL_IF -->
</div>
</div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->