Ergonomy improvement in smart rule management
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / patron-attr-types.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; Patron Attribute Types
3 <!-- TMPL_IF name="attribute_type_form" -->
4   <!-- TMPL_IF name="edit_attribute_type" -->
5     &rsaquo; Modify patron attribute type
6   <!-- TMPL_ELSE -->
7     &rsaquo; Add patron attribute type
8   <!-- /TMPL_IF -->
9 <!-- /TMPL_IF -->
10 <!-- TMPL_IF name="delete_attribute_type_form" -->
11   &rsaquo; Confirm deletion of patron attribute type &quot;<!-- TMPL_VAR name="code" ESCAPE="HTML" -->&quot;
12 <!-- /TMPL_IF -->
13 </title>
14 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
15
16 <script type="text/javascript">
17 //<![CDATA[
18
19 function DoCancel(f) {
20   f.op.value='';
21   document.Aform.submit();
22 }
23
24 function CheckAttributeTypeForm(f) {
25     var ok=1;
26     var _alertString="";
27     var alertString2;
28     if (f.code.value.length==0) {
29         _alertString += "\n- " + _("Patron attribute type code missing");
30     }
31     if (f.description.value.length==0) {
32         _alertString += "\n- " + _("Description missing");
33     }
34     if (_alertString.length==0) {
35         document.Aform.submit();
36     } else {
37         alertString2  = _("Form not submitted because of the following problem(s)");
38         alertString2 += "\n------------------------------------------------------------------------------------\n";
39         alertString2 += _alertString;
40         alert(alertString2);
41     }
42 }
43
44 //]]>
45 </script>
46 </head>
47 <body>
48 <!-- TMPL_INCLUDE NAME="header.inc" -->
49 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
50
51 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <!-- TMPL_IF name="display_list" -->Patron Attribute Types<!-- TMPL_ELSE --><a href="/cgi-bin/koha/admin/patron-attr-types.pl">Patron Attribute Types</a><!-- /TMPL_IF -->
52 <!-- TMPL_IF name="attribute_type_form" -->
53   <!-- TMPL_IF name="edit_attribute_type" -->
54     &rsaquo; Modify patron attribute type
55   <!-- TMPL_ELSE -->
56     &rsaquo; Add patron attribute type
57   <!-- /TMPL_IF -->
58 <!-- /TMPL_IF -->
59 <!-- TMPL_IF name="delete_attribute_type_form" -->
60   &rsaquo; Confirm deletion of patron attribute type &quot;<!-- TMPL_VAR name="code" ESCAPE="HTML" -->&quot;
61 <!-- /TMPL_IF -->
62 </div>
63
64 <div id="doc3" class="yui-t2">
65
66    <div id="bd">
67     <div id="yui-main">
68     <div class="yui-b">
69
70 <!-- TMPL_IF name="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>
72 <!-- /TMPL_IF -->
73
74 <!-- TMPL_IF name="attribute_type_form" -->
75   <!-- TMPL_IF name="edit_attribute_type" -->
76 <h2>Modify patron attribute type</h2>
77   <!-- TMPL_ELSE -->
78 <h2>Add patron attribute type</h2>
79   <!-- /TMPL_IF -->
80 <!-- TMPL_IF name="duplicate_code_error" -->
81 <div class="dialog message">Could not add patron attribute type &quot;<!-- TMPL_VAR name="duplicate_code_error" -->&quot; 
82     &mdash; one with that code already exists.
83 </div>
84 <!-- /TMPL_IF -->
85 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
86   <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
87   <fieldset class="rows">
88     <ol>
89       <li>
90           <!-- TMPL_IF name="edit_attribute_type" -->
91                   <span class="label">Patron attribute type code: </span>
92             <input type="hidden" name="code" value="<!-- TMPL_VAR name="code" ESCAPE="HTML" -->" />
93             <!-- TMPL_VAR name="code" ESCAPE="HTML" -->
94           <!-- TMPL_ELSE -->
95                   <label for="code">Patron attribute type code: </label>
96             <input type="text" id="code" name="code"  size="10" maxlength="10" />
97           <!-- /TMPL_IF -->
98        </li>
99        <li><label for="description">Description: </label>
100            <input type="text" id="description" name="description" size="50" maxlength="250" 
101                   value="<!-- TMPL_VAR name="description" escape="HTML" -->" />
102        </li>
103        <li><label for="repeatable">Repeatable: </label>
104             <input type="checkbox" id="repeatable" name="repeatable" <!-- TMPL_VAR name="repeatable_checked" --> <!-- TMPL_VAR name="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>
107        </li>
108        <li><label for="unique_id">Unique identifier: </label>
109             <input type="checkbox" id="unique_id" name="unique_id" <!-- TMPL_VAR name="unique_id_checked" --> <!-- TMPL_VAR name="unique_id_disabled" --> />
110             <span>If checked, attribute will be a unique identifier &mdash; 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>
112        </li>
113        <li><label for="password_allowed">Allow password: </label>
114             <input type="checkbox" id="password_allowed" name="password_allowed" <!-- TMPL_VAR name="password_allowed_checked" --> />
115             <span>Check to make it possible to associate a password with this attribute.</span>
116        </li>
117        <li><label for="opac_display">Display in OPAC: </label>
118             <input type="checkbox" id="opac_display" name="opac_display" <!-- TMPL_VAR name="opac_display_checked" --> />
119             <span>Check to display this attribute on a patron's details page in the OPAC.</span>
120        </li>
121        <li><label for="staff_searchable">Searchable: </label>
122             <input type="checkbox" id="staff_searchable" name="staff_searchable" <!-- TMPL_VAR name="staff_searchable_checked" --> />
123             <span>Check to make this attribute staff_searchable in the staff patron search.</span>
124        </li>
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                 <!-- TMPL_LOOP name="authorised_value_categories" -->
129                     <!-- TMPL_IF name="selected" -->
130                         <option value="<!-- TMPL_VAR name="category" -->" selected="selected">
131                             <!-- TMPL_VAR name="category" -->
132                         </option>
133                     <!-- TMPL_ELSE -->
134                         <option value="<!-- TMPL_VAR name="category" -->">
135                             <!-- TMPL_VAR name="category" -->
136                         </option>
137                     <!-- /TMPL_IF -->
138                 <!-- /TMPL_LOOP -->
139             </select>
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>
143         </li>
144     </ol>
145   </fieldset>
146   <fieldset class="action">
147     <!-- TMPL_IF name="edit_attribute_type" -->
148     <input type="button" value="Save"
149            onclick="CheckAttributeTypeForm(this.form)" />
150     <!-- TMPL_ELSE -->
151     <input type="button" value="Save"
152            onclick="CheckAttributeTypeForm(this.form)" />
153     <!-- /TMPL_IF-->
154     <a class="cancel" href="/cgi-bin/koha/admin/patron-attr-types.pl">Cancel</a>
155   </fieldset>
156 </form>
157 <!-- /TMPL_IF -->
158
159 <!-- TMPL_IF name="delete_attribute_type_form" -->
160 <div class="dialog alert"><h3>Confirm deletion of patron attribute type <span class="ex">'<!-- TMPL_VAR name="code" ESCAPE="HTML" -->' (<!-- TMPL_VAR name="description" -->)</span>?</h3>
161 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
162   <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
163   <input type="hidden" name="code" value="<!-- TMPL_VAR name="code" ESCAPE="HTML" -->" />
164     <input type="submit" value="Delete patron attribute type" class="approve" /></form>
165         <form action="<!-- TMPL_VAR name="script_name" -->" method="get">
166     <input type="submit" value="No, Do Not Delete" class="deny" />
167 </form></div>
168 <!-- /TMPL_IF -->
169
170 <!-- TMPL_IF name="display_list" -->
171
172 <div id="toolbar">
173         <script type="text/javascript">
174         //<![CDATA[
175         // prepare DOM for YUI Toolbar
176          $(document).ready(function() {
177             yuiToolbar();
178          });
179         // YUI Toolbar Functions
180         function yuiToolbar() {
181             new YAHOO.widget.Button("newrule");
182         }       //]]>
183         </script>
184         <ul class="toolbar">
185         <li><a id="newrule" href="<!-- TMPL_VAR name="script_name" -->?op=add_attribute_type">New Patron Attribute Type</a></li>
186 </ul></div>
187
188 <h2>Patron Attribute Types</h2>
189 <!-- TMPL_IF name="added_attribute_type" -->
190 <div class="dialog message">Added patron attribute type &quot;<!-- TMPL_VAR name="added_attribute_type" -->&quot;</div>
191 <!-- /TMPL_IF -->
192 <!-- TMPL_IF name="edited_attribute_type" -->
193 <div class="dialog message">Modified patron attribute type &quot;<!-- TMPL_VAR name="edited_attribute_type" -->&quot;</div>
194 <!-- /TMPL_IF -->
195 <!-- TMPL_IF name="deleted_attribute_type" -->
196 <div class="dialog message">Deleted patron attribute type &quot;<!-- TMPL_VAR name="deleted_attribute_type" -->&quot;</div>
197 <!-- /TMPL_IF -->
198 <!-- TMPL_IF name="ERROR_delete_in_use" -->
199 <div class="dialog message">Could not delete patron attribute type &quot;<!-- TMPL_VAR name="ERROR_delete_in_use" -->&quot; 
200     &mdash; it is in use by <!-- TMPL_VAR name="ERROR_num_patrons" --> patron records</div>
201 <!-- /TMPL_IF -->
202 <!-- TMPL_IF name="ERROR_delete_not_found" -->
203 <div class="dialog message">Could not delete patron attribute type &quot;<!-- TMPL_VAR name="ERROR_delete_not_found" -->&quot; 
204     &mdash; it was already absent from the database.</div>
205 <!-- /TMPL_IF -->
206 <!-- TMPL_IF NAME="available_attribute_types" --><table>
207   <tr>
208     <th>Code</th>
209     <th>Description</th>
210     <th>Actions</th>
211   </tr>
212   <!-- TMPL_LOOP name="available_attribute_types" -->
213   <tr>
214     <td><!-- TMPL_VAR name="code" ESCAPE="HTML" --></td>
215     <td><!-- TMPL_VAR name="description" --></td>
216     <td>
217       <a href="<!-- TMPL_VAR name="script_name" -->?op=edit_attribute_type&amp;code=<!-- TMPL_VAR name="code" escape="HTML" -->">Edit</a>
218       <a href="<!-- TMPL_VAR name="script_name" -->?op=delete_attribute_type&amp;code=<!-- TMPL_VAR name="code" escape="HTML" -->">Delete</a>
219     </td>
220   </tr>
221   <!-- /TMPL_LOOP -->
222 </table><!-- TMPL_ELSE --><p>There are no saved patron attribute types.</p><!-- /TMPL_IF -->
223
224 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
225
226 <!-- /TMPL_IF -->
227  
228 </div>
229 </div>
230 <div class="yui-b">
231 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
232 </div>
233 </div>
234 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->