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">
19 function DoCancel(f) {
21 document.Aform.submit();
24 function CheckAttributeTypeForm(f) {
28 if (f.code.value.length==0) {
29 _alertString += "\n- " + _("Patron attribute type code missing");
31 if (f.description.value.length==0) {
32 _alertString += "\n- " + _("Description missing");
34 if (_alertString.length==0) {
35 document.Aform.submit();
37 alertString2 = _("Form not submitted because of the following problem(s)");
38 alertString2 += "\n------------------------------------------------------------------------------------\n";
39 alertString2 += _alertString;
48 [% INCLUDE 'header.inc' %]
49 [% INCLUDE 'cat-search.inc' %]
51 <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 %]
52 [% IF ( attribute_type_form ) %]
53 [% IF ( edit_attribute_type ) %]
54 › Modify patron attribute type
56 › Add patron attribute type
59 [% IF ( delete_attribute_type_form ) %]
60 › Confirm deletion of patron attribute type "[% code |html %]"
64 <div id="doc3" class="yui-t2">
70 [% IF ( WARNING_extended_attributes_off ) %]
71 <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>
74 [% IF ( attribute_type_form ) %]
75 [% IF ( edit_attribute_type ) %]
76 <h2>Modify patron attribute type</h2>
78 <h2>Add patron attribute type</h2>
80 [% IF ( duplicate_code_error ) %]
81 <div class="dialog message">Could not add patron attribute type "[% duplicate_code_error %]"
82 — one with that code already exists.
85 <form action="[% script_name %]" name="Aform" method="post">
86 <input type="hidden" name="op" value="[% confirm_op %]" />
87 <fieldset class="rows">
90 [% IF ( edit_attribute_type ) %]
91 <span class="label">Patron attribute type code: </span>
92 <input type="hidden" name="code" value="[% code |html %]" />
95 <label for="code">Patron attribute type code: </label>
96 <input type="text" id="code" name="code" size="10" maxlength="10" />
99 <li><label for="description">Description: </label>
100 <input type="text" id="description" name="description" size="50" maxlength="250"
101 value="[% description |html %]" />
103 <li><label for="repeatable">Repeatable: </label>
104 <input type="checkbox" id="repeatable" name="repeatable" [% repeatable_checked %] [% repeatable_disabled %] />
105 <span>Check to let a patron record have multiple values of this attribute.
106 This setting cannot be changed after an attribute is defined.</span>
108 <li><label for="unique_id">Unique identifier: </label>
109 <input type="checkbox" id="unique_id" name="unique_id" [% unique_id_checked %] [% unique_id_disabled %] />
110 <span>If checked, attribute will be a unique identifier — if a value is given to a patron record, the same value
111 cannot be given to a different record. This setting cannot be changed after an attribute is defined.</span>
113 <li><label for="password_allowed">Allow password: </label>
114 <input type="checkbox" id="password_allowed" name="password_allowed" [% password_allowed_checked %] />
115 <span>Check to make it possible to associate a password with this attribute.</span>
117 <li><label for="opac_display">Display in OPAC: </label>
118 <input type="checkbox" id="opac_display" name="opac_display" [% opac_display_checked %] />
119 <span>Check to display this attribute on a patron's details page in the OPAC.</span>
121 <li><label for="staff_searchable">Searchable: </label>
122 <input type="checkbox" id="staff_searchable" name="staff_searchable" [% staff_searchable_checked %] />
123 <span>Check to make this attribute staff_searchable in the staff patron search.</span>
125 <li><label for="authorised_value_category">Authorized value category: </label>
126 <select name="authorised_value_category" id="authorised_value_category">
127 <option value=""></option>
128 [% FOREACH authorised_value_categorie IN authorised_value_categories %]
129 [% IF ( authorised_value_categorie.selected ) %]
130 <option value="[% authorised_value_categorie.category %]" selected="selected">
131 [% authorised_value_categorie.category %]
134 <option value="[% authorised_value_categorie.category %]">
135 [% authorised_value_categorie.category %]
140 <span>Authorized value category; if one is selected, the patron record input page will only allow values
141 to be chosen from the authorized value list. However, an authorized value list is not
142 enforced during batch patron import.</span>
146 <fieldset class="action">
147 [% IF ( edit_attribute_type ) %]
148 <input type="button" value="Save"
149 onclick="CheckAttributeTypeForm(this.form)" />
151 <input type="button" value="Save"
152 onclick="CheckAttributeTypeForm(this.form)" />
154 <a class="cancel" href="/cgi-bin/koha/admin/patron-attr-types.pl">Cancel</a>
159 [% IF ( delete_attribute_type_form ) %]
160 <div class="dialog alert"><h3>Confirm deletion of patron attribute type <span class="ex">'[% code |html %]' ([% description %])</span>?</h3>
161 <form action="[% script_name %]" name="Aform" method="post">
162 <input type="hidden" name="op" value="[% confirm_op %]" />
163 <input type="hidden" name="code" value="[% code |html %]" />
164 <input type="submit" value="Delete patron attribute type" class="approve" /></form>
165 <form action="[% script_name %]" method="get">
166 <input type="submit" value="No, Do Not Delete" class="deny" />
170 [% IF ( display_list ) %]
173 <script type="text/javascript">
175 // prepare DOM for YUI Toolbar
176 $(document).ready(function() {
179 // YUI Toolbar Functions
180 function yuiToolbar() {
181 new YAHOO.widget.Button("newrule");
185 <li><a id="newrule" href="[% script_name %]?op=add_attribute_type">New Patron Attribute Type</a></li>
188 <h2>Patron Attribute Types</h2>
189 [% IF ( added_attribute_type ) %]
190 <div class="dialog message">Added patron attribute type "[% added_attribute_type %]"</div>
192 [% IF ( edited_attribute_type ) %]
193 <div class="dialog message">Modified patron attribute type "[% edited_attribute_type %]"</div>
195 [% IF ( deleted_attribute_type ) %]
196 <div class="dialog message">Deleted patron attribute type "[% deleted_attribute_type %]"</div>
198 [% IF ( ERROR_delete_in_use ) %]
199 <div class="dialog message">Could not delete patron attribute type "[% ERROR_delete_in_use %]"
200 — it is in use by [% ERROR_num_patrons %] patron records</div>
202 [% IF ( ERROR_delete_not_found ) %]
203 <div class="dialog message">Could not delete patron attribute type "[% ERROR_delete_not_found %]"
204 — it was already absent from the database.</div>
206 [% IF ( available_attribute_types ) %]<table>
212 [% FOREACH available_attribute_type IN available_attribute_types %]
214 <td>[% available_attribute_type.code |html %]</td>
215 <td>[% available_attribute_type.description %]</td>
217 <a href="[% available_attribute_type.script_name %]?op=edit_attribute_type&code=[% available_attribute_type.code |html %]">Edit</a>
218 <a href="[% available_attribute_type.script_name %]?op=delete_attribute_type&code=[% available_attribute_type.code |html %]">Delete</a>
222 </table>[% ELSE %]<p>There are no saved patron attribute types.</p>[% END %]
224 <div class="pages">[% pagination_bar %]</div>
231 [% INCLUDE 'admin-menu.inc' %]
234 [% INCLUDE 'intranet-bottom.inc' %]