5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Administration › Patron categories › [% IF op == 'add_form' %][% IF ( categorycode ) %]Modify category '[% categorycode |html %]'[% ELSE %]New category[% END %][% END %]
7 [% IF op == 'delete_confirm' %][% IF ( patrons_in_category > 0 ) %]Cannot delete: category [% categorycode |html %] in use[% ELSE %]Confirm deletion of category '[% categorycode |html %]'[% END %][% END %]
9 [% INCLUDE 'doc-head-close.inc' %]
10 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
11 <style type="text/css">#enrolmentmessage.hint { display : none; }</style>
14 <body id="admin_categorie" class="admin">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'patrons-admin-search.inc' %]
18 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF op == 'add_form' %] <a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a> › [% IF ( categorycode ) %]Modify category '[% categorycode |html %]'[% ELSE %]New category[% END %][% END %]
19 [% IF op == 'delete_confirm' %] <a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a> › [% IF ( patrons_in_category > 0 ) %]Cannot delete: Category [% categorycode |html %] in use[% ELSE %]Confirm deletion of category '[% categorycode |html %]'[% END %][% END %]
20 [% IF op == 'delete_confirmed' %] <a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a> › Category deleted[% END %]
21 [% IF op == 'list' %]Patron categories[% END %]</div>
23 <div id="doc3" class="yui-t2">
28 [% FOR m IN messages %]
29 <div class="dialog [% m.type %]">
31 [% CASE 'error_on_update' %]
32 An error occurred when updating this patron category. Perhaps it already exists.
33 [% CASE 'error_on_insert' %]
34 An error occurred when inserting this patron category. The patron category might already exist.
35 [% CASE 'error_on_delete' %]
36 An error occurred when deleting this patron category. Check the logs.
37 [% CASE 'success_on_update' %]
38 Patron category updated successfully.
39 [% CASE 'success_on_insert' %]
40 Patron category inserted successfully.
41 [% CASE 'success_on_delete' %]
42 Patron category deleted successfully.
43 [% CASE 'already_exists' %]
44 This patron category already exists.
51 [% IF op == 'add_form' %]
52 <form id="category_form" action="/cgi-bin/koha/admin/categories.pl" method="post">
53 <input type="hidden" name="op" value="add_validate" />
54 <input type="hidden" name="checked" value="0" />
56 <h1>Modify category [% categorycode |html %]</h1>
60 <fieldset class="rows">
64 <span class="label">Category code: </span>[% categorycode |html %]
65 <input type="hidden" name="categorycode" value="[% category.categorycode |html %]" /><input type="hidden" name="is_a_modif" value="1" />
69 <label for="categorycode" class="required">Category code: </label>
70 <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required" required="required" />
71 <span class="required">Required</span>
75 <label for="description" class="required">Description: </label>
76 <input type="text" name="description" id="description" size="40" maxlength="80" class="required" required="required" value="[% category.description |html %]" />
77 <span class="required">Required</span>
80 <span class="label">Enrollment period: </span>
82 <legend>Choose one</legend>
85 <label for="enrolmentperiod" style="width:6em;">In months: </label>
86 [% IF category.enrolmentperiod %]
87 <input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% category.enrolmentperiod %]" /> months
89 <input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="" /> months
93 <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
94 <input type="text" class="enrollmentperiod datepicker" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
100 <label for="dateofbirthrequired">Age required: </label>
101 <input type="text" name="dateofbirthrequired" id="dateofbirthrequired" value="[% category.dateofbirthrequired %]" size="3" maxlength="3" /> years
104 <label for="upperagelimit">Upperage limit: </label>
105 <input type="text" name="upperagelimit" id="upperagelimit" size="3" maxlength="3" value="[% category.upperagelimit %]" /> years
108 <label for="enrolmentfee">Enrollment fee: </label>
109 <input type="text" name="enrolmentfee" id="enrolmentfee" size="6" value="[% category.enrolmentfee | $Price on_editing => 1 %]" />
112 <label for="overduenoticerequired">Overdue notice required: </label>
113 <select name="overduenoticerequired" id="overduenoticerequired">
114 [% IF category.overduenoticerequired %]
115 <option value="0">No</option>
116 <option value="1" selected="selected">Yes</option>
118 <option value="0" selected="selected">No</option>
119 <option value="1">Yes</option>
124 <label for="hidelostitems">Lost items in staff client: </label>
125 <select name="hidelostitems" id="hidelostitems">
126 [% IF category.hidelostitems %]
127 <option value="0">Shown</option>
128 <option value="1" selected="selected">Hidden by default</option>
130 <option value="0" selected="selected">Shown</option>
131 <option value="1">Hidden by default</option>
136 <label for="reservefee">Hold fee: </label>
137 <input type="text" name="reservefee" id="reservefee" size="6" value="[% category.reservefee | $Price on_editing => 1 %]" />
140 <label for="category_type" class="required">Category type: </label>
141 <select name="category_type" id="category_type">
142 [% UNLESS category %]<option value="" selected="selected">Select a category type</option>[% ELSE %]<option value="">Select a category type</option>[% END %]
143 [% IF category and category.category_type == 'A' %]<option value="A" selected="selected">Adult</option>[% ELSE %]<option value="A">Adult</option>[% END %]
144 [% IF category and category.category_type == 'C' %]<option value="C" selected="selected">Child</option>[% ELSE %]<option value="C">Child</option>[% END %]
145 [% IF category and category.category_type == 'S' %]<option value="S" selected="selected">Staff</option>[% ELSE %]<option value="S">Staff</option>[% END %]
146 [% IF category and category.category_type == 'I' %]<option value="I" selected="selected">Organization</option>[% ELSE %]<option value="I">Organization</option>[% END %]
147 [% IF category and category.category_type == 'P' %]<option value="P" selected="selected">Professional</option>[% ELSE %]<option value="P">Professional</option>[% END %]
148 [% IF category and category.category_type == 'X' %]<option value="X" selected="selected">Statistical</option>[% ELSE %]<option value="X">Statistical</option>[% END %]
150 <span class="required">Required</span>
152 <li><label for="branches">Branches limitation: </label>
153 <select id="branches" name="branches" multiple size="10">
154 <option value="">All branches</option>
155 [% FOREACH branch IN branches_loop %]
156 [% IF branch.selected %]
157 <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname |html %]</option>
159 <option value="[% branch.branchcode %]">[% branch.branchname |html %]</option>
163 <span>Select <i>All branches</i> if this category type must to be displayed all the time. Otherwise select libraries you want to associate with this value.
166 <li><label for="block_expired">Block expired patrons:</label>
167 <select name="BlockExpiredPatronOpacActions" id="block_expired">
168 [% IF not category or category.BlockExpiredPatronOpacActions == -1%]
169 <option value="-1" selected="selected"> Follow system preference BlockExpiredPatronOpacActions </option>
171 <option value="-1"> Follow system preference BlockExpiredPatronOpacActions </option>
174 [% IF category and category.BlockExpiredPatronOpacActions == 1 %]
175 <option value="1" selected="selected"> Block </option>
177 <option value="1"> Block </option>
180 [% IF category and category.BlockExpiredPatronOpacActions == 0 %]
181 <option value="0" selected="selected"> Don't block </option>
183 <option value="0"> Don't block </option>
187 Choose whether patrons of this category be blocked from public catalog actions such as renewing and placing holds when their cards have expired.
190 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
191 <li><label for="checkprevcheckout">Check for previous checkouts: </label>
192 <select name="checkprevcheckout" id="checkprevcheckout">
193 [% IF category.checkprevcheckout == 'yes' %]
194 <option value="yes" selected="selected">Yes and try to override system preferences</option>
195 <option value="no">No and try to override system preferences</option>
196 <option value="inherit">Inherit from system preferences</option>
197 [% ELSIF category.checkprevcheckout == 'no' %]
198 <option value="yes">Yes and try to override system preferences</option>
199 <option value="no" selected="selected">No and try to override system preferences</option>
200 <option value="inherit">Inherit from system preferences</option>
202 <option value="yes">Yes and try to override system preferences</option>
203 <option value="no">No and try to override system preferences</option>
204 <option value="inherit" selected="selected">Inherit from system preferences</option>
208 Choose whether patrons of this category by default are reminded if they try to borrow an item they borrowed before.
213 <label for="default_privacy">Default privacy: </label>
214 <select id="default_privacy" name="default_privacy">
215 [% SET default_privacy = 'default' %]
216 [% IF category %][% SET default_privacy = category.default_privacy %][% END %]
217 [% SWITCH default_privacy %]
219 <option value="default">Default</option>
220 <option value="never">Never</option>
221 <option value="forever" selected="selected">Forever</option>
223 <option value="default">Default</option>
224 <option value="never" selected="selected">Never</option>
225 <option value="forever">Forever</option>
227 <option value="default" selected="selected">Default</option>
228 <option value="never">Never</option>
229 <option value="forever">Forever</option>
232 <span>Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the amount of history kept is controlled by the cronjob <i>batch_anonymise.pl</i> which should be set up by your system administrator.</span>
237 [% IF ( EnhancedMessagingPreferences ) %]
238 <fieldset class="rows">
239 <h4>Default messaging preferences for this patron category</h4>
240 [% INCLUDE 'messaging-preference-form.inc' %]
243 <fieldset class="action">
244 <input type="submit" value="Save" />
245 <a href="/cgi-bin/koha/admin/categories.pl" class="cancel">Cancel</a>
250 [% IF op == 'delete_confirm' %]
251 <form action="/cgi-bin/koha/admin/categories.pl" method="post">
254 [% IF patrons_in_category > 0 %]
255 Category [% categorycode |html %] is in use. Deletion not possible!
257 Confirm deletion of category [% categorycode |html %]
261 [% IF patrons_in_category > 0 %]
262 <div class="dialog alert">
263 <strong>This category is used [% patrons_in_category %] times</strong>. Deletion not possible
267 <tr><th scope="row">Category code: </th><td>[% category.categorycode |html %]</td></tr>
268 <tr><th scope="row">Description: </th><td>[% category.description |html %]</td></tr>
269 <tr><th scope="row">Enrollment period: </th>
271 [% IF category.enrolmentperiod %]
272 [% category.enrolmentperiod %] months
274 until [% category.enrolmentperioddate | $KohaDates %]
278 <tr><th scope="row">Age required: </th><td>[% category.dateofbirthrequired %] years</td></tr>
279 <tr><th scope="row">Upperage limit: </th><td>[% category.upperagelimit %] years</td></tr>
280 <tr><th scope="row">Enrollment fee: </th><td>[% category.enrolmentfee | $Price %]</td></tr>
281 <tr><th scope="row">Receives overdue notices: </th><td>[% IF category. overduenoticerequired %]Yes[% ELSE %]No[% END %]</td></tr>
282 <tr><th scope="row">Lost items in staff client</th><td>[% IF category.hidelostitems %]Hidden by default[% ELSE %]Shown[% END %]</td></tr>
283 <tr><th scope="row">Hold fee: </th><td>[% category.reservefee | $Price %]</td></tr>
285 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
287 <th scope="row">Check previous checkouts: </th>
289 [% SWITCH category.checkprevcheckout %]
301 <th scope="row">Default privacy: </th>
303 [% SWITCH category.default_privacy %]
314 <fieldset class="action">
315 [% IF patrons_in_category > 0 %]
316 <input type="submit" value="OK" />
318 <input type="hidden" name="op" value="delete_confirmed" />
319 <input type="hidden" name="categorycode" value="[% categorycode |html %]" />
320 <input type="submit" value="Delete this category" />
321 <a class="cancel" href="/cgi-bin/koha/admin/categories.pl">Cancel</a>
328 [% IF op == 'list' %]
330 <div id="toolbar" class="btn-toolbar">
331 <a class="btn btn-default btn-sm" id="newcategory" href="/cgi-bin/koha/admin/categories.pl?op=add_form"><i class="fa fa-plus"></i> New category</a>
334 <h2>Patron categories</h2>
336 You Searched for [% searchfield |html %]</span>
339 <table id="table_categorie">
342 <th scope="col">Code</th>
343 <th scope="col">Category name</th>
344 <th scope="col">Type</th>
345 <th scope="col">Enrollment period</th>
346 <th scope="col">Age required</th>
347 <th scope="col">Upper age limit</th>
348 <th scope="col">Enrollment fee</th>
349 <th scope="col">Overdue</th>
350 <th scope="col">Lost items</th>
351 <th scope="col">Hold fee</th>
352 [% IF ( EnhancedMessagingPreferences ) %]
353 <th scope="col">Messaging</th>
355 <th scope="col">Branches limitations</th>
356 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
357 <th scope="col">Check previous checkout?</th>
359 <th scope="col">Default privacy</th>
360 <th scope="col">Actions</th>
364 [% FOREACH category IN categories %]
366 <td>[% category.categorycode |html %]</td>
368 <a href="/cgi-bin/koha/admin/categories.pl?op=add_form&categorycode=[% category.categorycode |uri %]">[% category.description |html %]</a>
371 [% SWITCH category.category_type %]
377 [% CASE 'X' %]Statistical
381 [% IF ( category.enrolmentperiod ) %]
382 [% category.enrolmentperiod %] months
384 until [% category.enrolmentperioddate | $KohaDates %]
387 [% IF (category.dateofbirthrequired) %]
388 <td>[% category.dateofbirthrequired %] years</td>
392 [% IF (category.upperagelimit) %]
393 <td>[% category.upperagelimit %] years</td>
397 [% IF (category.enrolmentfee > 0) %]
398 <td>[% category.enrolmentfee | $Price %]</td>
402 <td>[% IF ( category.overduenoticerequired ) %]Yes[% ELSE %]No[% END %]</td>
403 <td>[% IF ( category.hidelostitems ) %]Hidden[% ELSE %]Shown[% END %]</td>
404 [% IF (category.reservefee > 0) %]
405 <td>[% category.reservefee | $Price %]</td>
409 [% IF Koha.Preference('EnhancedMessagingPreferences') %]
410 <td style="white-space: nowrap; font-size:80%;">
411 [% SET default_messaging = category.default_messaging %]
412 [% IF default_messaging.size %]
413 [% FOREACH prefs IN default_messaging %]
414 [% FOREACH transport IN prefs.transports %]
415 [% IF ( transport.transport ) %]
416 [% IF ( prefs.Item_Due ) %]Item due
417 [% ELSIF ( prefs.Advance_Notice ) %]Advance notice
418 [% ELSIF ( prefs.Upcoming_Events ) %]Upcoming events
419 [% ELSIF ( prefs.Hold_Filled ) %]Hold filled
420 [% ELSIF ( prefs.Item_Check_in ) %]Item check-in
421 [% ELSIF ( prefs.Item_Checkout ) %]Item checkout
424 <strong>[% transport.transport %]</strong><br />
425 [% ELSE %]None<br />[% END %]
434 [% SET branch_limitations = category.branch_limitations %]
435 [% IF branch_limitations.size > 0 %]
436 [% branches_str = "" %]
437 [% FOREACH branch IN branch_limitations %]
438 [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
440 <span title="[% branches_str %]">
441 [% IF branch_limitations.size > 1 %]
442 [% branch_limitations.size %] branches limitations
444 [% branch_limitations.size %] branch limitation
451 [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
453 [% SWITCH category.checkprevcheckout %]
464 [% SWITCH category.default_privacy %]
474 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=add_form&categorycode=[% category.categorycode |uri %]"><i class="fa fa-pencil"></i> Edit</a>
475 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=delete_confirm&categorycode=[% category.categorycode |uri %]"><i class="fa fa-trash"></i> Delete</a>
482 <div class="dialog alert">No categories have been defined. <a href="/cgi-bin/koha/admin/categories.pl?op=add_form">Create a new category</a>.</div>
489 [% INCLUDE 'admin-menu.inc' %]
493 [% MACRO jsinclude BLOCK %]
494 <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu.js"></script>
495 [% INCLUDE 'calendar.inc' %]
496 [% INCLUDE 'datatables.inc' %]
497 <script type="text/javascript">
498 var MSG_CATEGORYCODE_CHARS = _("Category code can only contain the following characters: letters, numbers, - and _.");
499 var MSG_BOTH_ENROLLMENTPERIODS = _("Please choose only one enrollment period setting.");
500 var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date.");
502 <script type="text/javascript" src="[% themelang %]/js/categories.js"></script>
504 [% INCLUDE 'intranet-bottom.inc' %]