View | Details | Raw Unified | Return to bug 9360
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc (-1 / +1 lines)
Lines 33-39 Link Here
33
    <li><a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a></li>
33
    <li><a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a></li>
34
    [% END %]
34
    [% END %]
35
    [% IF ( CAN_user_tools_delete_anonymize_patrons ) %]
35
    [% IF ( CAN_user_tools_delete_anonymize_patrons ) %]
36
    <li><a href="/cgi-bin/koha/tools/cleanborrowers.pl">Patrons (anonymize, bulk-delete)</a></li>
36
    <li><a href="/cgi-bin/koha/tools/cleanborrowers.pl">Batch patron deletion/anonymization</a></li>
37
    [% END %]
37
    [% END %]
38
    [% IF ( CAN_user_tools_edit_patrons ) %]
38
    [% IF ( CAN_user_tools_edit_patrons ) %]
39
    <li><a href="/cgi-bin/koha/tools/modborrowers.pl">Batch patron modification</a></li>
39
    <li><a href="/cgi-bin/koha/tools/modborrowers.pl">Batch patron modification</a></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt (-55 / +69 lines)
Lines 1-5 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; Clean patron records [% IF ( step2 ) %]&rsaquo; Confirm[% END %][% IF ( step3 ) %]&rsaquo; Finished[% END %]</title>
2
<title>Koha &rsaquo; Tools &rsaquo; Batch patron deletion/anonymization [% IF ( step2 ) %]&rsaquo; Confirm[% END %][% IF ( step3 ) %]&rsaquo; Finished[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
<script type="text/javascript">
5
<script type="text/javascript">
Lines 42-88 Link Here
42
<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; [% IF ( step1 ) %]Clean Patron Records[% ELSE %]<a href="/cgi-bin/koha/tools/cleanborrowers.pl">Clean patron records</a> &rsaquo; [% END %][% IF ( step2 ) %]Confirm[% END %][% IF ( step3 ) %]Finished[% END %]</div>
42
<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; [% IF ( step1 ) %]Clean Patron Records[% ELSE %]<a href="/cgi-bin/koha/tools/cleanborrowers.pl">Clean patron records</a> &rsaquo; [% END %][% IF ( step2 ) %]Confirm[% END %][% IF ( step3 ) %]Finished[% END %]</div>
43
43
44
<div id="doc3" class="yui-t2">
44
<div id="doc3" class="yui-t2">
45
   
46
   <div id="bd">
47
	<div id="yui-main">
48
	<div class="yui-b">
49
45
50
<h1>Delete some old patrons/Anonymize some check-out history</h1>
46
   <div id="bd">
47
    <div id="yui-main">
48
    <div class="yui-b">
51
49
50
<h1>Batch patron deletion/anonymization</h1>
51
<div class="help">
52
    <p>This tool allows you to delete patrons and anonymize checkout history. For deleting patrons, any combination of limits can be used.</p>
53
</div>
52
[% IF ( step1 ) %]
54
[% IF ( step1 ) %]
53
<!-- step 1 START -->
55
<!-- step 1 START -->
54
<div id="step1">
56
<div id="step1">
55
    <form name="f1" onsubmit="return checkForm(this);" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
57
    <form name="f1" onsubmit="return checkForm(this);" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
56
    <fieldset>
58
    <fieldset>
57
    <legend>What do you want to do ?</legend>
59
    <legend>Delete patrons</legend>
58
        <h3><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" /><label for="checkborrower"> Delete borrowers</label></h3>
60
        <h3><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" /><label for="checkborrower"> Verify you want to delete patrons</label></h3>
59
61
        <br />
60
        <label for="date1">Who have not borrowed since:</label>
62
        <h5>Delete patrons who meet the following criteria:</h5>
61
        <input size="10" id="date1" name="filterdate1" type="text" class="datepicker" />
63
        <ul>
62
        <span class="hint">[% INCLUDE 'date-format.inc' %]</span></p>
64
                <li>
63
65
                    <label for="date1">who have not borrowed since:</label>
64
        <label for="borrower_dateexpiry">Whose expiration date is before:</label>
66
                    <input size="10" id="date1" name="filterdate1" type="text" class="datepicker" />
65
        <input size="10" id=borrower_dateexpiry" name="borrower_dateexpiry" type="text" class="datepicker" />
67
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
66
        <span class="hint">[% INCLUDE 'date-format.inc' %]</span></p>
68
                </li>
67
69
                <li>
68
        <label for="borrower_categorycode">Whose patron category is:</label>
70
                    <label for="borrower_dateexpiry">whose expiration date is before:</label>
69
        <select id="borrower_categorycode" name="borrower_categorycode">
71
                    <input size="10" id="borrower_dateexpiry" name="borrower_dateexpiry" type="text" class="datepicker" />
70
            <option value="" selected="selected">Any</option>
72
                    <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
71
            [% FOREACH bc IN borrower_categorycodes %]
73
                </li>
72
                [% UNLESS bc.categorycode == 'S' %]
74
                <li>
73
                    <option value="[% bc.categorycode %]">[% bc.description %]</option>
75
                    <label for="borrower_categorycode">whose patron category is:</label>
74
                [% END %]
76
                    <select id="borrower_categorycode" name="borrower_categorycode">
75
            [% END %]
77
                        <option value="" selected="selected">Any</option>
76
        </select>
78
                        [% FOREACH bc IN borrower_categorycodes %]
77
79
                            [% UNLESS bc.categorycode == 'S' %]
78
        <h3><input id="checkissue" type="checkbox" name="checkbox" value="issue" /><label for="checkissue"> Anonymize history</label></h3>
80
                                <option value="[% bc.categorycode %]">[% bc.description %]</option>
79
        <label for="date2">Anonymize check-out history older than</label>
81
                            [% END %]
80
        <input size="10" id="date2" name="filterdate2" type="text" class="datepicker" />
82
                        [% END %]
81
        <span class="hint">[% INCLUDE 'date-format.inc' %]</span></p>
83
                    </select>
84
                </li>
85
            </ul>
86
        </fieldset>
87
        <fieldset>
88
        <legend>Anonymize checkout history</legend>
89
        <h3><input id="checkissue" type="checkbox" name="checkbox" value="issue" /><label for="checkissue"> Verify you want to anonymize patron checkout history</label></h3>
90
        <br />
91
        <ul>
92
            <li>
93
                <label for="date2">Permanently delete checkout history older than</label>
94
                <input size="10" id="date2" name="filterdate2" type="text" class="datepicker" />
95
                <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
96
            </li>
97
        </ul>
82
98
83
            <!-- hidden here -->
99
            <!-- hidden here -->
84
            <input type="hidden" name="step2" value="1" />
100
            <input type="hidden" name="step2" value="1" />
85
			</fieldset>
101
            </fieldset>
86
            <fieldset class="action"><input type="submit" value="Next &gt;&gt;" /></fieldset>
102
            <fieldset class="action"><input type="submit" value="Next &gt;&gt;" /></fieldset>
87
    </form>
103
    </form>
88
</div>
104
</div>
Lines 95-130 Link Here
95
        <form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post" onsubmit="return checkForm2(this);">
111
        <form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post" onsubmit="return checkForm2(this);">
96
    <fieldset>
112
    <fieldset>
97
        <legend>Warnings</legend>
113
        <legend>Warnings</legend>
98
114
        <ul>
99
        	<ul>
115
            <li>[% IF ( totalToDelete ) %][% totalToDelete %] [% ELSE %]0 [% END %] patrons will be deleted</li>
100
        		<li>[% IF ( totalToDelete ) %][% totalToDelete %] [% ELSE %]0 [% END %] patrons will be deleted</li>
116
            <li>[% IF ( totalToAnonymize ) %][% totalToAnonymize %] [% ELSE %]0 [% END %] checkout history will be anonymized</li>
101
        		<li>[% IF ( totalToAnonymize ) %][% totalToAnonymize %] [% ELSE %]0 [% END %] check-out history will be anonymized</li>
117
        </ul>
102
        	</ul>
103
118
104
        <br />
119
        <br />
105
            [% IF ( totalToDelete ) %]
120
            [% IF ( totalToDelete ) %]
106
                <fieldset><legend>What do you want to do for deleted patrons?</legend>
121
                <fieldset><legend>What do you want to do for deleted patrons?</legend>
107
                <label for="delete">Permanently delete these patrons</label>
122
                <label for="delete">Permanently delete these patrons</label>
108
                <input id="delete" type="radio" name="radio" value="delete" checked="checked" />
123
                <input id="delete" type="radio" name="radio" value="delete" checked="checked" />
109
                
124
110
                <label for="trash">Move these patrons to the trash</label>
125
                <label for="trash">Move these patrons to the trash</label>
111
                <input id="trash" type="radio" name="radio" value="trash" />
126
                <input id="trash" type="radio" name="radio" value="trash" />
112
                <input type="hidden" name="do_delete" value="[% totalToDelete %]" /></fieldset>
127
                <input type="hidden" name="do_delete" value="[% totalToDelete %]" /></fieldset>
113
128
114
            [% END %]
129
            [% END %]
115
            [% IF ( totalToAnonymize ) %]
130
            [% IF ( totalToAnonymize ) %]
116
131
                Checkout history for [% totalToAnonymize %] patrons will be anonymized
117
                Check-out history for [% totalToAnonymize %] patrons will be anonymized
118
                <input type="hidden" name="do_anonym" value="[% totalToAnonymize %]" />
132
                <input type="hidden" name="do_anonym" value="[% totalToAnonymize %]" />
119
            [% END %]
133
            [% END %]
120
               
134
121
            <input type="hidden" name="step3" value="1" />
135
            <input type="hidden" name="step3" value="1" />
122
            <input type="hidden" name="filterdate1" value="[% filterdate1 %]" />
136
            <input type="hidden" name="filterdate1" value="[% filterdate1 %]" />
123
            <input type="hidden" name="filterdate2" value="[% filterdate2 %]" />
137
            <input type="hidden" name="filterdate2" value="[% filterdate2 %]" />
124
            <input type="hidden" name="borrower_dateexpiry" value="[% borrower_dateexpiry %]" />
138
            <input type="hidden" name="borrower_dateexpiry" value="[% borrower_dateexpiry %]" />
125
            <input type="hidden" name="borrower_categorycode" value="[% borrower_categorycode %]" />
139
            <input type="hidden" name="borrower_categorycode" value="[% borrower_categorycode %]" />
126
    </fieldset>
140
    </fieldset>
127
	<fieldset class="action"><input type="submit" value="Finish" /> <a class="cancel" href="/cgi-bin/koha/tools/cleanborrowers.pl">Cancel</a></fieldset>
141
    <fieldset class="action"><input type="submit" value="Finish" /> <a class="cancel" href="/cgi-bin/koha/tools/cleanborrowers.pl">Cancel</a></fieldset>
128
        </form>
142
        </form>
129
</div>
143
</div>
130
<!-- STEP 2 END -->
144
<!-- STEP 2 END -->
Lines 135-154 Link Here
135
149
136
    <div id="step3">
150
    <div id="step3">
137
151
138
          [% IF ( do_delete ) %]
152
        [% IF ( do_delete ) %]
139
                [% IF ( trash ) %]
153
            [% IF ( trash ) %]
140
                    <h4>[% TotalDel %] patrons have been successfully moved to trash</h4>
154
                <h4>[% TotalDel %] patrons have been successfully moved to trash</h4>
141
                [% ELSE %]
155
            [% ELSE %]
142
                    <h4>[% TotalDel %] patrons have been successfully deleted</h4>
156
                <h4>[% TotalDel %] patrons have been successfully deleted</h4>
143
                [% END %]
144
			[% ELSE %]
145
				<h4>No patron records have been removed</h4>
146
            [% END %]
147
            [% IF ( do_anonym ) %]
148
                <h4>All patrons with checkouts older than [% filterdate1 %] have been anonymized</h4>
149
			[% ELSE %]
150
				<h4>No patron records have been anonymized</h4>
151
            [% END %]
157
            [% END %]
158
        [% ELSE %]
159
            <h4>No patron records have been removed</h4>
160
        [% END %]
161
        [% IF ( do_anonym ) %]
162
            <h4>All patrons with checkouts older than [% filterdate1 %] have been anonymized</h4>
163
        [% ELSE %]
164
            <h4>No patron records have been anonymized</h4>
165
        [% END %]
152
166
153
    </div>
167
    </div>
154
<!-- Step 3 END -->
168
<!-- Step 3 END -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt (-3 / +2 lines)
Lines 41-48 Link Here
41
    [% END %]
41
    [% END %]
42
42
43
    [% IF ( CAN_user_tools_delete_anonymize_patrons ) %]
43
    [% IF ( CAN_user_tools_delete_anonymize_patrons ) %]
44
    <dt><a href="/cgi-bin/koha/tools/cleanborrowers.pl">Patrons (anonymize, bulk-delete)</a></dt>
44
    <dt><a href="/cgi-bin/koha/tools/cleanborrowers.pl">Batch patron deletion/anonymization</a></dt>
45
    <dd>Delete old borrowers and anonymize circulation history (deletes borrower reading history)</dd>
45
    <dd>Batch delete patrons and delete patron circulation history</dd>
46
    [% END %]
46
    [% END %]
47
47
48
    [% IF ( CAN_user_tools_edit_patrons ) %]
48
    [% IF ( CAN_user_tools_edit_patrons ) %]
49
- 

Return to bug 9360