+[% USE raw %]
+[% USE Asset %]
[% USE Koha %]
[% USE KohaDates %]
[% USE Price %]
+[% USE TablesSettings %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Administration › Patron categories › [% IF op == 'add_form' %][% IF ( categorycode ) %]Modify category '[% categorycode |html %]'[% ELSE %]New category[% END %][% END %]
-[% 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 %]
+<title>Koha › Administration › Patron categories › [% IF op == 'add_form' %][% IF ( categorycode ) %]Modify category '[% categorycode | html %]'[% ELSE %]New category[% END %][% END %]
+[% 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 %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
-<style type="text/css">#enrolmentmessage.hint { display : none; }</style>
+<style>#enrolmentmessage.hint { display : none; }</style>
</head>
<body id="admin_categorie" class="admin">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patrons-admin-search.inc' %]
-<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 %]
-[% 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 %]
+<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 %]
+[% 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 %]
[% IF op == 'delete_confirmed' %] <a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a> › Category deleted[% END %]
[% IF op == 'list' %]Patron categories[% END %]</div>
-<div id="doc3" class="yui-t2">
- <div id="bd">
- <div id="yui-main">
- <div class="yui-b">
+<div class="main container-fluid">
+ <div class="row">
+ <div class="col-sm-10 col-sm-push-2">
+ <main>
[% FOR m IN messages %]
- <div class="dialog [% m.type %]">
+ <div class="dialog [% m.type | html %]">
[% SWITCH m.code %]
[% CASE 'error_on_update' %]
An error occurred when updating this patron category. Perhaps it already exists.
[% CASE 'already_exists' %]
This patron category already exists.
[% CASE %]
- [% m.code %]
+ [% m.code | html %]
[% END %]
</div>
[% END %]
<input type="hidden" name="op" value="add_validate" />
<input type="hidden" name="checked" value="0" />
[% IF category %]
- <h1>Modify category [% categorycode |html %]</h1>
+ <h1>Modify category [% categorycode | html %]</h1>
[% ELSE %]
<h1>New category</h1>
[% END %]
<ol>
[% IF category %]
<li>
- <span class="label">Category code: </span>[% categorycode |html %]
- <input type="hidden" name="categorycode" value="[% category.categorycode |html %]" /><input type="hidden" name="is_a_modif" value="1" />
+ <span class="label">Category code: </span>[% categorycode | html %]
+ <input type="hidden" name="categorycode" value="[% category.categorycode | html %]" /><input type="hidden" name="is_a_modif" value="1" />
</li>
[% ELSE %]
<li>
[% END %]
<li>
<label for="description" class="required">Description: </label>
- <input type="text" name="description" id="description" size="40" maxlength="80" class="required" required="required" value="[% category.description |html %]" />
+ <input type="text" name="description" id="description" size="40" maxlength="80" class="required" required="required" value="[% category.description | html %]" />
<span class="required">Required</span>
</li>
<li>
<li>
<label for="enrolmentperiod" style="width:6em;">In months: </label>
[% IF category.enrolmentperiod %]
- <input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% category.enrolmentperiod %]" /> months
+ <input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% category.enrolmentperiod | html %]" /> months
[% ELSE %]
<input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="" /> months
[% END %]
</li>
<li>
<label for="enrolmentperioddate" style="width:6em;">Until date: </label>
- <input type="text" class="enrollmentperiod datepicker" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
+ <input type="text" class="enrollmentperiod" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
</li>
</ol>
</fieldset>
</li>
<li>
<label for="dateofbirthrequired">Age required: </label>
- <input type="text" name="dateofbirthrequired" id="dateofbirthrequired" value="[% category.dateofbirthrequired %]" size="3" maxlength="3" /> years
+ <input type="text" name="dateofbirthrequired" id="dateofbirthrequired" value="[% category.dateofbirthrequired | html %]" size="3" maxlength="3" /> years
</li>
<li>
<label for="upperagelimit">Upperage limit: </label>
- <input type="text" name="upperagelimit" id="upperagelimit" size="3" maxlength="3" value="[% category.upperagelimit %]" /> years
+ <input type="text" name="upperagelimit" id="upperagelimit" size="3" maxlength="3" value="[% category.upperagelimit | html %]" /> years
</li>
<li>
<label for="enrolmentfee">Enrollment fee: </label>
</select>
</li>
<li>
- <label for="hidelostitems">Lost items in staff client: </label>
+ <label for="hidelostitems">Lost items in staff interface: </label>
<select name="hidelostitems" id="hidelostitems">
[% IF category.hidelostitems %]
<option value="0">Shown</option>
</select>
<span class="required">Required</span>
</li>
- <li><label for="branches">Branches limitation: </label>
+ <li><label for="branches">Library limitations: </label>
<select id="branches" name="branches" multiple size="10">
- <option value="">All branches</option>
+ <option value="">All libraries</option>
[% FOREACH branch IN branches_loop %]
[% IF branch.selected %]
- <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname |html %]</option>
+ <option selected="selected" value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option>
[% ELSE %]
- <option value="[% branch.branchcode %]">[% branch.branchname |html %]</option>
+ <option value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option>
[% END %]
[% END %]
</select>
- <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.
+ <span>Select <em>All libraries</em> if this category type must to be displayed all the time. Otherwise select libraries you want to associate with this value.
</span>
</li>
+ <li>
+ <label for="reset_password">Password reset in OPAC: </label>
+ <select name="reset_password" id="reset_password">
+ [% IF category.reset_password.defined %]
+ [% IF category.reset_password %]
+ [% IF Koha.Preference('OpacResetPassword') %]
+ <option value="-1">Follow system preference OpacResetPassword (enabled)</option>
+ [% ELSE %]
+ <option value="-1">Follow system preference OpacResetPassword (disabled)</option>
+ [% END %]
+ <option value="1" selected="selected">Allowed</option>
+ <option value="0">Not allowed</option>
+ [% ELSE %]
+ [% IF Koha.Preference('OpacResetPassword') %]
+ <option value="-1">Follow system preference OpacResetPassword (enabled)</option>
+ [% ELSE %]
+ <option value="-1">Follow system preference OpacResetPassword (disabled)</option>
+ [% END %]
+ <option value="1">Allowed</option>
+ <option value="0" selected="selected">Not allowed</option>
+ [% END %]
+ [% ELSE %]
+ [% IF Koha.Preference('OpacResetPassword') %]
+ <option value="-1" selected="selected">Follow system preference OpacResetPassword (enabled)</option>
+ [% ELSE %]
+ <option value="-1" selected="selected">Follow system preference OpacResetPassword (disabled)</option>
+ [% END %]
+ <option value="1">Allowed</option>
+ <option value="0">Not allowed</option>
+ [% END %]
+ </select>
+ </li>
+ <li>
+ <label for="change_password">Password change in OPAC: </label>
+ <select name="change_password" id="change_password">
+ [% IF category.change_password.defined %]
+ [% IF category.change_password %]
+ [% IF Koha.Preference('OpacPasswordChange') %]
+ <option value="-1">Follow system preference OpacPasswordChange (enabled)</option>
+ [% ELSE %]
+ <option value="-1">Follow system preference OpacPasswordChange (disabled)</option>
+ [% END %]
+ <option value="1" selected="selected">Allowed</option>
+ <option value="0">Not allowed</option>
+ [% ELSE %]
+ [% IF Koha.Preference('OpacPasswordChange') %]
+ <option value="-1">Follow system preference OpacPasswordChange (enabled)</option>
+ [% ELSE %]
+ <option value="-1">Follow system preference OpacPasswordChange (disabled)</option>
+ [% END %]
+ <option value="1">Allowed</option>
+ <option value="0" selected="selected">Not allowed</option>
+ [% END %]
+ [% ELSE %]
+ [% IF Koha.Preference('OpacPasswordChange') %]
+ <option value="-1" selected="selected">Follow system preference OpacPasswordChange (enabled)</option>
+ [% ELSE %]
+ <option value="-1" selected="selected">Follow system preference OpacPasswordChange (disabled)</option>
+ [% END %]
+ <option value="1">Allowed</option>
+ <option value="0">Not allowed</option>
+ [% END %]
+ </select>
+ </li>
+ <li>
+ <label for="min_password_length">Minimum password length:</label>
+ <input id="min_password_length" type="text" inputmode="numeric" name="min_password_length" value="[% category.min_password_length | html %]"/>
+ <span>Leave blank to use system default ([% Koha.Preference('minPasswordLength') | html %])</span>
+ </li>
+ <li class="pwd_setting_wrapper">
+ <label for="require_strong_password">Require strong password:</label>
+ <select id="require_strong_password" name="require_strong_password">
+ [% IF category.require_strong_password.defined %]
+ [% IF category.require_strong_password %]
+ [% IF Koha.Preference('RequireStrongPassword') %]
+ <option value="-1">Follow system preference RequireStrongPassword (yes)</option>
+ [% ELSE %]
+ <option value="-1">Follow system preference RequireStrongPassword (no)</option>
+ [% END %]
+ <option value="1" selected="selected">Yes</option>
+ <option value="0">No</option>
+ [% ELSE %]
+ [% IF Koha.Preference('RequireStrongPassword') %]
+ <option value="-1">Follow system preference RequireStrongPassword (yes)</option>
+ [% ELSE %]
+ <option value="-1">Follow system preference RequireStrongPassword (no)</option>
+ [% END %]
+ <option value="1">Yes</option>
+ <option value="0" selected="selected">No</option>
+ [% END %]
+ [% ELSE %]
+ [% IF Koha.Preference('RequireStrongPassword') %]
+ <option value="-1">Follow system preference RequireStrongPassword (yes)</option>
+ [% ELSE %]
+ <option value="-1">Follow system preference RequireStrongPassword (no)</option>
+ [% END %]
+ <option value="1">Yes</option>
+ <option value="0">No</option>
+ [% END %]
+ </select>
+ </li>
<li><label for="block_expired">Block expired patrons:</label>
<select name="BlockExpiredPatronOpacActions" id="block_expired">
[% IF not category or category.BlockExpiredPatronOpacActions == -1%]
<option value="forever">Forever</option>
[% END %]
</select>
- <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>
+ <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 <em>batch_anonymise.pl</em> which should be set up by your system administrator.</span>
+ </li>
+ <li>
+ <label for="exclude_from_local_holds_priority">Exclude from local holds priority:</label>
+ <select id="exclude_from_local_holds_priority" name="exclude_from_local_holds_priority">
+ [% IF category.exclude_from_local_holds_priority %]
+ <option value="1" selected>Yes</option>
+ <option value="0">No</option>
+ [% ELSE %]
+ <option value="1">Yes</option>
+ <option value="0" selected>No</option>
+ [% END %]
+ </select>
+ <span>If <i>Yes</i>, holds placed by patrons of this category will not be given priority</span>
</li>
</ol>
</fieldset>
<fieldset>
<legend>
[% IF patrons_in_category > 0 %]
- Category [% categorycode |html %] is in use. Deletion not possible!
+ Category [% categorycode | html %] is in use. Deletion not possible!
[% ELSE %]
- Confirm deletion of category [% categorycode |html %]
+ Confirm deletion of category [% categorycode | html %]
[% END %]
</legend>
[% IF patrons_in_category > 0 %]
<div class="dialog alert">
- <strong>This category is used [% patrons_in_category %] times</strong>. Deletion not possible
+ <strong>This category is used [% patrons_in_category | html %] times</strong>. Deletion not possible
</div>
[% END %]
<table>
- <tr><th scope="row">Category code: </th><td>[% category.categorycode |html %]</td></tr>
- <tr><th scope="row">Description: </th><td>[% category.description |html %]</td></tr>
+ <tr><th scope="row">Category code: </th><td>[% category.categorycode | html %]</td></tr>
+ <tr><th scope="row">Description: </th><td>[% category.description | html %]</td></tr>
<tr><th scope="row">Enrollment period: </th>
<td>
[% IF category.enrolmentperiod %]
- [% category.enrolmentperiod %] months
+ [% category.enrolmentperiod | html %] months
[% ELSE %]
until [% category.enrolmentperioddate | $KohaDates %]
[% END %]
</td>
</tr>
- <tr><th scope="row">Age required: </th><td>[% category.dateofbirthrequired %] years</td></tr>
- <tr><th scope="row">Upperage limit: </th><td>[% category.upperagelimit %] years</td></tr>
+ <tr><th scope="row">Age required: </th><td>[% category.dateofbirthrequired | html %] years</td></tr>
+ <tr><th scope="row">Upperage limit: </th><td>[% category.upperagelimit | html %] years</td></tr>
<tr><th scope="row">Enrollment fee: </th><td>[% category.enrolmentfee | $Price %]</td></tr>
<tr><th scope="row">Receives overdue notices: </th><td>[% IF category. overduenoticerequired %]Yes[% ELSE %]No[% END %]</td></tr>
- <tr><th scope="row">Lost items in staff client</th><td>[% IF category.hidelostitems %]Hidden by default[% ELSE %]Shown[% END %]</td></tr>
+ <tr><th scope="row">Lost items in staff interface</th><td>[% IF category.hidelostitems %]Hidden by default[% ELSE %]Shown[% END %]</td></tr>
<tr><th scope="row">Hold fee: </th><td>[% category.reservefee | $Price %]</td></tr>
[% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
<input type="submit" value="OK" />
[% ELSE %]
<input type="hidden" name="op" value="delete_confirmed" />
- <input type="hidden" name="categorycode" value="[% categorycode |html %]" />
+ <input type="hidden" name="categorycode" value="[% categorycode | html %]" />
<input type="submit" value="Delete this category" />
<a class="cancel" href="/cgi-bin/koha/admin/categories.pl">Cancel</a>
[% END %]
[% IF op == 'list' %]
<div id="toolbar" class="btn-toolbar">
- <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>
+ <a class="btn btn-default" id="newcategory" href="/cgi-bin/koha/admin/categories.pl?op=add_form"><i class="fa fa-plus"></i> New category</a>
</div>
<h2>Patron categories</h2>
[% IF searchfield %]
- You Searched for [% searchfield |html %]</span>
+ You Searched for [% searchfield | html %]</span>
[% END %]
[% IF categories%]
- <table id="table_categorie">
+ <table id="patron_categories">
<thead>
<tr>
<th scope="col">Code</th>
[% IF ( EnhancedMessagingPreferences ) %]
<th scope="col">Messaging</th>
[% END %]
- <th scope="col">Branches limitations</th>
+ <th scope="col">Library limitations</th>
[% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
<th scope="col">Check previous checkout?</th>
[% END %]
<th scope="col">Default privacy</th>
+ <th scope="col">Exclude from local holds priority</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
[% FOREACH category IN categories %]
<tr>
- <td>[% category.categorycode |html %]</td>
+ <td>[% category.categorycode | html %]</td>
<td>
- <a href="/cgi-bin/koha/admin/categories.pl?op=add_form&categorycode=[% category.categorycode |uri %]">[% category.description |html %]</a>
+ <a href="/cgi-bin/koha/admin/categories.pl?op=add_form&categorycode=[% category.categorycode |uri %]">[% category.description | html %]</a>
</td>
<td>
[% SWITCH category.category_type %]
</td>
<td>
[% IF ( category.enrolmentperiod ) %]
- [% category.enrolmentperiod %] months
+ [% category.enrolmentperiod | html %] months
[% ELSE %]
until [% category.enrolmentperioddate | $KohaDates %]
[% END %]
</td>
[% IF (category.dateofbirthrequired) %]
- <td>[% category.dateofbirthrequired %] years</td>
+ <td>[% category.dateofbirthrequired | html %] years</td>
[% ELSE %]
<td>-</td>
[% END %]
[% IF (category.upperagelimit) %]
- <td>[% category.upperagelimit %] years</td>
+ <td>[% category.upperagelimit | html %] years</td>
[% ELSE %]
<td>-</td>
[% END %]
[% SET default_messaging = category.default_messaging %]
[% IF default_messaging.size %]
[% FOREACH prefs IN default_messaging %]
+ [% NEXT IF !Koha.Preference( 'ILLModule' ) && prefs.message_name.match('^Ill_') %]
[% FOREACH transport IN prefs.transports %]
[% IF ( transport.transport ) %]
[% IF ( prefs.Item_Due ) %]Item due
[% ELSIF ( prefs.Hold_Filled ) %]Hold filled
[% ELSIF ( prefs.Item_Check_in ) %]Item check-in
[% ELSIF ( prefs.Item_Checkout ) %]Item checkout
+ [% ELSIF ( prefs.Ill_ready ) %]Interlibrary loan ready
+ [% ELSIF ( prefs.Ill_unavailable ) %]Interlibrary loan unavailable
[% ELSE %]Unknown
[% END %]:
- <strong>[% transport.transport %]</strong><br />
+ <strong>[% transport.transport | html %]</strong><br />
[% ELSE %]None<br />[% END %]
[% END %]
[% END %]
[% FOREACH branch IN branch_limitations %]
[% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
[% END %]
- <span title="[% branches_str %]">
+ <span title="[% branches_str | html %]">
[% IF branch_limitations.size > 1 %]
- [% branch_limitations.size %] branches limitations
+ [% branch_limitations.size | html %] library limitations
[% ELSE %]
- [% branch_limitations.size %] branch limitation
+ [% branch_limitations.size | html %] library limitation
[% END %]
</span>
[% ELSE %]
Forever
[% END %]
</td>
+ <td>
+ [% IF category.exclude_from_local_holds_priority %]
+ Yes
+ [% ELSE %]
+ No
+ [% END %]
+ </td>
<td class="actions">
<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>
<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>
[% END %]
[% END %]
-</div>
-</div>
-<div class="yui-b">
-[% INCLUDE 'admin-menu.inc' %]
-</div>
-</div>
+ </main>
+ </div> <!-- /.col-sm-10.col-sm-push-2 -->
+
+ <div class="col-sm-2 col-sm-pull-10">
+ <aside>
+ [% INCLUDE 'admin-menu.inc' %]
+ </aside>
+ </div> <!-- /.col-sm-2.col-sm-pull-10 -->
+ </div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
- <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
- <script type="text/javascript" src="[% interface %]/[% theme %]/js/messaging-preference-form_[% KOHA_VERSION %].js"></script>
+ [% Asset.js("js/admin-menu.js") | $raw %]
+ [% Asset.js("js/messaging-preference-form.js") | $raw %]
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'datatables.inc' %]
- <script type="text/javascript">
- var MSG_CATEGORYCODE_CHARS = _("Category code can only contain the following characters: letters, numbers, - and _.");
- var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date.");
+ [% INCLUDE 'columns_settings.inc' %]
+ <script>
+ var columns_settings = [% TablesSettings.GetColumns( 'admin', 'categories', 'patron_categories', 'json' ) | $raw %];
</script>
- <script type="text/javascript" src="[% themelang %]/js/categories_[% KOHA_VERSION %].js"></script>
+ [% Asset.js("js/categories.js") | $raw %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]