1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Administration › Patron attribute types
3 [% IF ( attribute_type_form ) %]
4 [% IF ( edit_attribute_type ) %]
5 › Modify patron attribute type
7 › Add patron attribute type
10 [% IF ( delete_attribute_type_form ) %]
11 › Confirm deletion of patron attribute type "[% code |html %]"
14 [% INCLUDE 'doc-head-close.inc' %]
16 <script type="text/javascript">
18 $(document).ready(function() {
19 if ( $("#branches option:selected").length < 1 ) {
20 $("#branches option:first").attr("selected", "selected");
24 function DoCancel(f) {
26 document.Aform.submit();
29 function CheckAttributeTypeForm(f) {
33 if (f.code.value.length==0) {
34 _alertString += "\n- " + _("Patron attribute type code missing");
36 if (f.description.value.length==0) {
37 _alertString += "\n- " + _("Description missing");
39 if (_alertString.length==0) {
40 document.Aform.submit();
42 alertString2 = _("Form not submitted because of the following problem(s)");
43 alertString2 += "\n------------------------------------------------------------------------------------\n";
44 alertString2 += _alertString;
52 <body id="admin_patron-attr-types" class="admin">
53 [% INCLUDE 'header.inc' %]
54 [% INCLUDE 'cat-search.inc' %]
56 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF ( display_list ) %]Patron attribute types[% ELSE %]<a href="/cgi-bin/koha/admin/patron-attr-types.pl">Patron attribute types</a>[% END %]
57 [% IF ( attribute_type_form ) %]
58 [% IF ( edit_attribute_type ) %]
59 › Modify patron attribute type
61 › Add patron attribute type
64 [% IF ( delete_attribute_type_form ) %]
65 › Confirm deletion of patron attribute type "[% code |html %]"
69 <div id="doc3" class="yui-t2">
75 [% IF ( WARNING_extended_attributes_off ) %]
76 <div class="dialog message">Because the 'ExtendedPatronAttributes` system preference is currently not enabled, extended patron attributes cannot be given to patron records. Go <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ExtendedPatronAttributes">here</a> if you wish to enable this feature.</div>
79 [% IF ( attribute_type_form ) %]
80 [% IF ( edit_attribute_type ) %]
81 <h2>Modify patron attribute type</h2>
83 <h2>Add patron attribute type</h2>
85 [% IF ( duplicate_code_error ) %]
86 <div class="dialog message">Could not add patron attribute type "[% duplicate_code_error %]"
87 — one with that code already exists.
90 <form action="[% script_name %]" name="Aform" method="post">
91 <input type="hidden" name="op" value="[% confirm_op %]" />
92 <fieldset class="rows">
95 [% IF ( edit_attribute_type ) %]
96 <span class="label">Patron attribute type code: </span>
97 <input type="hidden" name="code" value="[% code |html %]" />
100 <label for="code">Patron attribute type code: </label>
101 <input type="text" id="code" name="code" size="10" maxlength="10" />
104 <li><label for="description">Description: </label>
105 <input type="text" id="description" name="description" size="50" maxlength="250"
106 value="[% description |html %]" />
108 <li><label for="repeatable">Repeatable: </label>
109 [% IF ( repeatable_checked ) %]
110 [% IF ( repeatable_disabled ) %]
111 <input type="checkbox" id="repeatable" name="repeatable" checked="checked" disabled="disabled" />
113 <input type="checkbox" id="repeatable" name="repeatable" checked="checked" />
116 [% IF ( repeatable_disabled ) %]
117 <input type="checkbox" id="repeatable" name="repeatable" disabled="disabled" />
119 <input type="checkbox" id="repeatable" name="repeatable" />
122 <span>Check to let a patron record have multiple values of this attribute.
123 This setting cannot be changed after an attribute is defined.</span>
125 <li><label for="unique_id">Unique identifier: </label>
126 [% IF ( unique_id_checked ) %]
127 [% IF ( unique_id_disabled ) %]
128 <input type="checkbox" id="unique_id" name="unique_id" checked="checked" disabled="disabled" />
130 <input type="checkbox" id="unique_id" name="unique_id" checked="checked" />
133 [% IF ( unique_id_disabled ) %]
134 <input type="checkbox" id="unique_id" name="unique_id" disabled="disabled" />
136 <input type="checkbox" id="unique_id" name="unique_id" />
139 <span>If checked, attribute will be a unique identifier — if a value is given to a patron record, the same value
140 cannot be given to a different record. This setting cannot be changed after an attribute is defined.</span>
142 <li><label for="password_allowed">Allow password: </label>
143 [% IF ( password_allowed_checked ) %]
144 <input type="checkbox" id="password_allowed" name="password_allowed" checked="checked" />
146 <input type="checkbox" id="password_allowed" name="password_allowed" />
148 <span>Check to make it possible to associate a password with this attribute.</span>
150 <li><label for="opac_display">Display in OPAC: </label>
151 [% IF ( opac_display_checked ) %]
152 <input type="checkbox" id="opac_display" name="opac_display" checked="checked" />
154 <input type="checkbox" id="opac_display" name="opac_display" />
156 <span>Check to display this attribute on a patron's details page in the OPAC.</span>
158 <li><label for="staff_searchable">Searchable: </label>
159 [% IF ( staff_searchable_checked ) %]
160 <input type="checkbox" id="staff_searchable" name="staff_searchable" checked="checked" />
162 <input type="checkbox" id="staff_searchable" name="staff_searchable" />
164 <span>Check to make this attribute staff_searchable in the staff patron search.</span>
166 <li><label for="display_checkout">Display in check-out: </label>
167 [% IF display_checkout_checked %]
168 <input type="checkbox" id="display_checkout" name="display_checkout" checked="checked" />
170 <input type="checkbox" id="display_checkout" name="display_checkout" />
172 <span>Check to show this attribute in patron check-out.</span>
175 <li><label for="authorised_value_category">Authorized value category: </label>
176 <select name="authorised_value_category" id="authorised_value_category">
177 <option value=""></option>
178 [% FOREACH authorised_value_categorie IN authorised_value_categories %]
179 [% IF ( authorised_value_categorie.selected ) %]
180 <option value="[% authorised_value_categorie.category %]" selected="selected">
181 [% authorised_value_categorie.category %]
184 <option value="[% authorised_value_categorie.category %]">
185 [% authorised_value_categorie.category %]
190 <span>Authorized value category; if one is selected, the patron record input page will only allow values
191 to be chosen from the authorized value list. However, an authorized value list is not
192 enforced during batch patron import.</span>
194 <li><label for="branches">Branches limitation: </label>
195 <select id="branches" name="branches" multiple size="10">
196 <option value="">All branches</option>
197 [% FOREACH branch IN branches_loop %]
198 [% IF ( branch.selected ) %]
199 <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
201 <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
205 <span>Select All if this attribute type must to be displayed all the time. Otherwise select librairies you want to associate with this value.
209 <label for="category">Category: </label>
210 <select name="category_code" id="category">
211 <option value=""></option>
212 [% FOREACH cat IN categories %]
213 [% IF ( cat.categorycode == category_code ) %]<option value="[% cat.categorycode %]" selected="selected">[% cat.description %]</option>[% ELSE %]<option value="[% cat.categorycode %]">[% cat.description %]</option>[% END %]
216 <span>Choose one to limit this attribute to one patron type. Please leave blank if you want these attributes to be available for all types of patrons.</span>
219 <label for="class">Class: </label>
220 <select name="class">
222 [% FOREACH class IN classes_val_loop %]
223 [% IF ( class.selected ) %]
224 <option value="[% class.authorised_value %]" selected="selected">
228 <option value="[% class.authorised_value %]" >
234 <span>Group attributes types with a block title (based on Authorised values category 'PA_CLASS')</span>
238 <fieldset class="action">
239 [% IF ( edit_attribute_type ) %]
240 <input type="button" value="Save"
241 onclick="CheckAttributeTypeForm(this.form)" />
243 <input type="button" value="Save"
244 onclick="CheckAttributeTypeForm(this.form)" />
246 <a class="cancel" href="/cgi-bin/koha/admin/patron-attr-types.pl">Cancel</a>
251 [% IF ( delete_attribute_type_form ) %]
252 <div class="dialog alert"><h3>Confirm deletion of patron attribute type <span class="ex">'[% code |html %]' ([% description %])</span>?</h3>
253 <form action="[% script_name %]" name="Aform" method="post">
254 <input type="hidden" name="op" value="[% confirm_op %]" />
255 <input type="hidden" name="code" value="[% code |html %]" />
256 <input type="submit" value="Delete patron attribute type" class="approve" /></form>
257 <form action="[% script_name %]" method="get">
258 <input type="submit" value="No, Do Not Delete" class="deny" />
262 [% IF ( display_list ) %]
265 <script type="text/javascript">
267 // prepare DOM for YUI Toolbar
268 $(document).ready(function() {
271 // YUI Toolbar Functions
272 function yuiToolbar() {
273 new YAHOO.widget.Button("newrule");
277 <li><a id="newrule" href="[% script_name %]?op=add_attribute_type">New patron attribute type</a></li>
280 <h2>Patron attribute types</h2>
281 [% IF ( added_attribute_type ) %]
282 <div class="dialog message">Added patron attribute type "[% added_attribute_type %]"</div>
284 [% IF ( edited_attribute_type ) %]
285 <div class="dialog message">Modified patron attribute type "[% edited_attribute_type %]"</div>
287 [% IF ( deleted_attribute_type ) %]
288 <div class="dialog message">Deleted patron attribute type "[% deleted_attribute_type %]"</div>
290 [% IF ( ERROR_delete_in_use ) %]
291 <div class="dialog message">Could not delete patron attribute type "[% ERROR_delete_in_use %]"
292 — it is in use by [% ERROR_num_patrons %] patron records</div>
294 [% IF ( ERROR_delete_not_found ) %]
295 <div class="dialog message">Could not delete patron attribute type "[% ERROR_delete_not_found %]"
296 — it was already absent from the database.</div>
298 [% IF ( available_attribute_types ) %]
299 [% FOREACH attribute IN available_attribute_types %]
300 [% IF attribute.class %]
301 <h4>[% attribute.lib %]</h4>
303 <table class="patron_attributes_types">
308 <th>Branches limitation</th>
313 [% FOREACH item IN attribute.items %]
315 <td>[% item.code |html %]</td>
316 <td>[% item.description %]</td>
318 [% IF item.branches.size > 0 %]
319 [% branches_str = "" %]
320 [% FOREACH branch IN item.branches %]
321 [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
323 <span title="[% branches_str %]">
324 [% IF item.branches.size > 1 %]
325 [% item.branches.size %] branches limitations
327 [% item.branches.size %] branch limitation
335 <a href="[% item.script_name %]?op=edit_attribute_type&code=[% item.code |html %]">Edit</a>
336 <a href="[% item.script_name %]?op=delete_attribute_type&code=[% item.code |html %]">Delete</a>
344 <p>There are no saved patron attribute types.</p>
347 <div class="pages">[% pagination_bar %]</div>
354 [% INCLUDE 'admin-menu.inc' %]
357 [% INCLUDE 'intranet-bottom.inc' %]