Owen Leonard
cd921163c0
- Added include, date-format.inc, which shows format, e.g. "(DD/MM/YYYY)" - Hint shows expected date format based on system preference - Removing calendar.inc include from templates which don't use it Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
163 lines
6.7 KiB
Cheetah
163 lines
6.7 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha › Tools › Clean Patron Records <!-- TMPL_IF NAME="step2" -->› Confirm<!-- /TMPL_IF --><!-- TMPL_IF NAME="step3" -->› Finished<!-- /TMPL_IF --></title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
|
|
<script type="text/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> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <!-- TMPL_IF NAME="step1" -->Clean Patron Records<!-- TMPL_ELSE --><a href="/cgi-bin/koha/tools/cleanborrowers.pl">Clean Patron Records</a> › <!-- /TMPL_IF --><!-- TMPL_IF NAME="step2" -->Confirm<!-- /TMPL_IF --><!-- TMPL_IF NAME="step3" -->Finished<!-- /TMPL_IF --></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 check-out 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" />
|
|
<label for="checkborrower">Delete borrower who has not borrowed since:</label>
|
|
<input size="10" id="date1" name="filterdate1" value="<!-- TMPL_VAR NAME="filterdate1"-->" type="text" />
|
|
<script type="text/javascript">
|
|
Calendar.setup(
|
|
{
|
|
inputField : "date1",
|
|
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
|
|
}
|
|
);
|
|
</script> <span class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></span></p>
|
|
|
|
<p><input id="checkissue" type="checkbox" name="checkbox" value="issue" checked="checked" />
|
|
<label for="checkissue">Anonymize check-out history older than</label>
|
|
<input size="10" id="date2" name="filterdate2" value="<!-- TMPL_VAR NAME="filterdate2"-->" type="text" />
|
|
<script type="text/javascript">
|
|
Calendar.setup(
|
|
{
|
|
inputField : "date2",
|
|
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
|
|
}
|
|
);
|
|
</script> <span class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></span></p>
|
|
|
|
|
|
<!-- hidden here -->
|
|
<input type="hidden" name="step2" value="1" />
|
|
</fieldset>
|
|
<fieldset class="action"><input type="submit" value="Next >>" /></fieldset>
|
|
</form>
|
|
</div>
|
|
<!-- step 1 END -->
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="step2" -->
|
|
<!-- STEP 2 START -->
|
|
<div id="step2">
|
|
<form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post" onsubmit="return checkForm2(this);">
|
|
<fieldset>
|
|
<legend>Warnings</legend>
|
|
|
|
<ul>
|
|
<li><!-- TMPL_IF NAME="totalToDelete" --><!-- TMPL_VAR NAME="totalToDelete" --> <!-- TMPL_ELSE -->0 <!-- /TMPL_IF --> patrons will be deleted</li>
|
|
<li><!-- TMPL_IF NAME="totalToAnonymize" --><!-- TMPL_VAR NAME="totalToAnonymize" --> <!-- TMPL_ELSE -->0 <!-- /TMPL_IF --> check-out history will be anonymized</li>
|
|
</ul>
|
|
|
|
<br />
|
|
<!-- TMPL_IF NAME="totalToDelete" -->
|
|
<fieldset><legend>What do you want to do for deleted patrons?</legend>
|
|
<label for="delete">Permanently delete these patrons</label>
|
|
<input id="delete" type="radio" name="radio" value="delete" checked="checked" />
|
|
|
|
<label for="trash">Move these patrons to the trash</label>
|
|
<input id="trash" type="radio" name="radio" value="trash" />
|
|
<input type="hidden" name="do_delete" value="<!-- TMPL_VAR NAME="totalToDelete" -->" /></fieldset>
|
|
|
|
<!-- /TMPL_IF -->
|
|
<!--TMPL_IF NAME="totalToAnonymize"-->
|
|
|
|
Check-out history for <!-- TMPL_VAR NAME="totalToAnonymize"--> patrons will be anonymized
|
|
<input type="hidden" name="do_anonym" value="<!-- TMPL_VAR NAME="totalToAnonymize" -->" />
|
|
<!-- /TMPL_IF -->
|
|
|
|
<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" -->" />
|
|
</fieldset>
|
|
<fieldset class="action"><input type="submit" value="Finish" /> <a class="cancel" href="/cgi-bin/koha/tools/cleanborrowers.pl">Cancel</a></fieldset>
|
|
</form>
|
|
</div>
|
|
<!-- STEP 2 END -->
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="step3" -->
|
|
<!-- Step 3 START -->
|
|
|
|
<div id="step3">
|
|
|
|
<!-- TMPL_IF NAME="do_delete" -->
|
|
<!-- TMPL_IF NAME="trash" -->
|
|
<h4><!-- TMPL_VAR NAME="TotalDel" --> patrons have been successfully moved to trash</h4>
|
|
<!-- TMPL_ELSE -->
|
|
<h4><!-- TMPL_VAR NAME="TotalDel" --> patrons have been successfully deleted</h4>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_ELSE -->
|
|
<h4>No patron records have been removed</h4>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="do_anonym" -->
|
|
<h4>All patrons with checkouts older than <!-- TMPL_VAR NAME="filterdate1" --> have been anonymized</h4>
|
|
<!-- TMPL_ELSE -->
|
|
<h4>No patron records have been anonymized</h4>
|
|
<!-- /TMPL_IF -->
|
|
|
|
</div>
|
|
<!-- Step 3 END -->
|
|
<!-- /TMPL_IF -->
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b noprint">
|
|
<!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|