Owen Leonard
2b74492d7d
All instances of the old DynArch calendar have been replaced with jQueryUI versions and the old library files have been removed. calendar.inc has been modified to include jQueryUI localization strings and global configuration options. Just add a "datepicker" class to an input field to trigger a datepicker prompt. If you would like two fields in one from to limit each other (one is date from, one is date to), add these classes to each: "datepickerfrom" and "datepickerto." This will prevent an invalid entry, e.g. a date in the latter which falls before the former. jQueryUI is now upgraded to the latest verision, 1.8.21. Edit: Now with proper translatability, date formatting, first day of the week handling, and RTL support. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Ian Walls <koha.sekjal@gmail.com> QA Comment: rebased on current master; minor merge conflicts with other patches pushed Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
148 lines
5.6 KiB
Text
148 lines
5.6 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Tools › Clean patron records [% IF ( step2 ) %]› Confirm[% END %][% IF ( step3 ) %]› Finished[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% INCLUDE '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 id="tools_cleanborrowers" class="tools">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE '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> › [% IF ( step1 ) %]Clean Patron Records[% ELSE %]<a href="/cgi-bin/koha/tools/cleanborrowers.pl">Clean patron records</a> › [% END %][% IF ( step2 ) %]Confirm[% END %][% IF ( step3 ) %]Finished[% END %]</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>
|
|
|
|
[% IF ( 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="[% filterdate1 %]" type="text" class="datepicker" />
|
|
<span class="hint">[% INCLUDE '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="[% filterdate2 %]" type="text" class="datepicker" />
|
|
<span class="hint">[% INCLUDE '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 -->
|
|
[% END %]
|
|
|
|
[% IF ( 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>[% IF ( totalToDelete ) %][% totalToDelete %] [% ELSE %]0 [% END %] patrons will be deleted</li>
|
|
<li>[% IF ( totalToAnonymize ) %][% totalToAnonymize %] [% ELSE %]0 [% END %] check-out history will be anonymized</li>
|
|
</ul>
|
|
|
|
<br />
|
|
[% IF ( 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="[% totalToDelete %]" /></fieldset>
|
|
|
|
[% END %]
|
|
[% IF ( totalToAnonymize ) %]
|
|
|
|
Check-out history for [% totalToAnonymize %] patrons will be anonymized
|
|
<input type="hidden" name="do_anonym" value="[% totalToAnonymize %]" />
|
|
[% END %]
|
|
|
|
<input type="hidden" name="step3" value="1" />
|
|
<input type="hidden" name="filterdate1" value="[% filterdate1 %]" />
|
|
<input type="hidden" name="filterdate2" value="[% 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 -->
|
|
[% END %]
|
|
|
|
[% IF ( step3 ) %]
|
|
<!-- Step 3 START -->
|
|
|
|
<div id="step3">
|
|
|
|
[% IF ( do_delete ) %]
|
|
[% IF ( trash ) %]
|
|
<h4>[% TotalDel %] patrons have been successfully moved to trash</h4>
|
|
[% ELSE %]
|
|
<h4>[% TotalDel %] patrons have been successfully deleted</h4>
|
|
[% END %]
|
|
[% ELSE %]
|
|
<h4>No patron records have been removed</h4>
|
|
[% END %]
|
|
[% IF ( do_anonym ) %]
|
|
<h4>All patrons with checkouts older than [% filterdate1 %] have been anonymized</h4>
|
|
[% ELSE %]
|
|
<h4>No patron records have been anonymized</h4>
|
|
[% END %]
|
|
|
|
</div>
|
|
<!-- Step 3 END -->
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b noprint">
|
|
[% INCLUDE 'tools-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|