Cleanup - admin scripts
[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 OFF, extended patron attributes 
72 cannot be given to patron records.  Go 
73 <a href="/cgi-bin/koha/admin/systempreferences.pl?op=add_form&amp;searchfield=ExtendedPatronAttributes">here</a> if you wish to turn 
74 this feature on.</div>
75 <!-- /TMPL_IF -->
76
77 <!-- TMPL_IF name="attribute_type_form" -->
78   <!-- TMPL_IF name="edit_attribute_type" -->
79 <h2>Modify patron attribute type</h2>
80   <!-- TMPL_ELSE -->
81 <h2>Add patron attribute type</h2>
82   <!-- /TMPL_IF -->
83 <!-- TMPL_IF name="duplicate_code_error" -->
84 <div class="dialog message">Could not add patron attribute type &quot;<!-- TMPL_VAR name="duplicate_code_error" -->&quot; 
85     &mdash; one with that code already exists.
86 </div>
87 <!-- /TMPL_IF -->
88 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
89   <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
90   <fieldset class="rows">
91     <ol>
92       <li>
93           <!-- TMPL_IF name="edit_attribute_type" -->
94                   <span class="label">Patron attribute type code: </span>
95             <input type="hidden" name="code" value="<!-- TMPL_VAR name="code" ESCAPE="HTML" -->" />
96             <!-- TMPL_VAR name="code" ESCAPE="HTML" -->
97           <!-- TMPL_ELSE -->
98                   <label for="code">Patron attribute type code: </label>
99             <input type="text" id="code" name="code"  size="10" maxlength="10" />
100           <!-- /TMPL_IF -->
101        </li>
102        <li><label for="description">Description: </label>
103            <input type="text" id="description" name="description" size="50" maxlength="250" 
104                   value="<!-- TMPL_VAR name="description" escape="HTML" -->" />
105        </li>
106        <li><label for="repeatable">Repeatable: </label>
107             <input type="checkbox" id="repeatable" name="repeatable" <!-- TMPL_VAR name="repeatable_checked" --> <!-- TMPL_VAR name="repeatable_disabled" --> />
108             <span>Check to let a patron record have multiple values of this attribute.  
109                   This setting cannot be changed after an attribute is defined.</span>
110        </li>
111        <li><label for="unique_id">Unique identifier: </label>
112             <input type="checkbox" id="unique_id" name="unique_id" <!-- TMPL_VAR name="unique_id_checked" --> <!-- TMPL_VAR name="unique_id_disabled" --> />
113             <span>If checked, attribute will be a unique identifier &mdash; if a value is given to a patron record, the same value
114                   cannot be given to a different record.  This setting cannot be changed after an attribute is defined.</span>
115        </li>
116        <li><label for="password_allowed">Allow password: </label>
117             <input type="checkbox" id="password_allowed" name="password_allowed" <!-- TMPL_VAR name="password_allowed_checked" --> />
118             <span>Check to make it possible to associate a password with this attribute.</span>
119        </li>
120        <li><label for="opac_display">Display in OPAC: </label>
121             <input type="checkbox" id="opac_display" name="opac_display" <!-- TMPL_VAR name="opac_display_checked" --> />
122             <span>Check to display this attribute on a patron's details page in the OPAC.</span>
123        </li>
124        <li><label for="staff_searchable">Searchable: </label>
125             <input type="checkbox" id="staff_searchable" name="staff_searchable" <!-- TMPL_VAR name="staff_searchable_checked" --> />
126             <span>Check to make this attribute staff_searchable in the staff patron search.</span>
127        </li>
128         <li><label for="authorised_value_category">Authorized value category: </label>
129             <select name="authorised_value_category" id="authorised_value_category">
130                 <option value=""></option>
131                 <!-- TMPL_LOOP name="authorised_value_categories" -->
132                     <!-- TMPL_IF name="selected" -->
133                         <option value="<!-- TMPL_VAR name="category" -->" selected="selected">
134                             <!-- TMPL_VAR name="category" -->
135                         </option>
136                     <!-- TMPL_ELSE -->
137                         <option value="<!-- TMPL_VAR name="category" -->">
138                             <!-- TMPL_VAR name="category" -->
139                         </option>
140                     <!-- /TMPL_IF -->
141                 <!-- /TMPL_LOOP -->
142             </select>
143             <span>Authorized value category; if one is selected, the patron record input page will only allow values 
144                   to be chosen from the authorized value list.  However, an authorized value list is not 
145                   enforced during batch patron import.</span>
146         </li>
147     </ol>
148   </fieldset>
149   <fieldset class="action">
150     <!-- TMPL_IF name="edit_attribute_type" -->
151     <input type="button" value="Save"
152            onclick="CheckAttributeTypeForm(this.form)" />
153     <!-- TMPL_ELSE -->
154     <input type="button" value="Save"
155            onclick="CheckAttributeTypeForm(this.form)" />
156     <!-- /TMPL_IF-->
157     <a class="cancel" href="/cgi-bin/koha/admin/patron-attr-types.pl">Cancel</a>
158   </fieldset>
159 </form>
160 <!-- /TMPL_IF -->
161
162 <!-- TMPL_IF name="delete_attribute_type_form" -->
163 <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>
164 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
165   <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
166   <input type="hidden" name="code" value="<!-- TMPL_VAR name="code" ESCAPE="HTML" -->" />
167     <input type="submit" value="Delete patron attribute type" class="approve" /></form>
168         <form action="<!-- TMPL_VAR name="script_name" -->" method="get">
169     <input type="submit" value="No, Do Not Delete" class="deny" />
170 </form></div>
171 <!-- /TMPL_IF -->
172
173 <!-- TMPL_IF name="display_list" -->
174
175 <div id="toolbar">
176         <script type="text/javascript">
177         //<![CDATA[
178         // prepare DOM for YUI Toolbar
179          $(document).ready(function() {
180             yuiToolbar();
181          });
182         // YUI Toolbar Functions
183         function yuiToolbar() {
184             new YAHOO.widget.Button("newrule");
185         }       //]]>
186         </script>
187         <ul class="toolbar">
188         <li><a id="newrule" href="<!-- TMPL_VAR name="script_name" -->?op=add_attribute_type">New Patron Attribute Type</a></li>
189 </ul></div>
190
191 <h2>Patron Attribute Types</h2>
192 <!-- TMPL_IF name="added_attribute_type" -->
193 <div class="dialog message">Added patron attribute type &quot;<!-- TMPL_VAR name="added_attribute_type" -->&quot;</div>
194 <!-- /TMPL_IF -->
195 <!-- TMPL_IF name="edited_attribute_type" -->
196 <div class="dialog message">Modified patron attribute type &quot;<!-- TMPL_VAR name="edited_attribute_type" -->&quot;</div>
197 <!-- /TMPL_IF -->
198 <!-- TMPL_IF name="deleted_attribute_type" -->
199 <div class="dialog message">Deleted patron attribute type &quot;<!-- TMPL_VAR name="deleted_attribute_type" -->&quot;</div>
200 <!-- /TMPL_IF -->
201 <!-- TMPL_IF name="ERROR_delete_in_use" -->
202 <div class="dialog message">Could not delete patron attribute type &quot;<!-- TMPL_VAR name="ERROR_delete_in_use" -->&quot; 
203     &mdash; it is in use by <!-- TMPL_VAR name="ERROR_num_patrons" --> patron records</div>
204 <!-- /TMPL_IF -->
205 <!-- TMPL_IF name="ERROR_delete_not_found" -->
206 <div class="dialog message">Could not delete patron attribute type &quot;<!-- TMPL_VAR name="ERROR_delete_not_found" -->&quot; 
207     &mdash; it was already absent from the database.</div>
208 <!-- /TMPL_IF -->
209 <!-- TMPL_IF NAME="available_attribute_types" --><table>
210   <tr>
211     <th>Code</th>
212     <th>Description</th>
213     <th>Actions</th>
214   </tr>
215   <!-- TMPL_LOOP name="available_attribute_types" -->
216   <tr>
217     <td><!-- TMPL_VAR name="code" ESCAPE="HTML" --></td>
218     <td><!-- TMPL_VAR name="description" --></td>
219     <td>
220       <a href="<!-- TMPL_VAR name="script_name" -->?op=edit_attribute_type&amp;code=<!-- TMPL_VAR name="code" escape="HTML" -->">Edit</a>
221       <a href="<!-- TMPL_VAR name="script_name" -->?op=delete_attribute_type&amp;code=<!-- TMPL_VAR name="code" escape="HTML" -->">Delete</a>
222     </td>
223   </tr>
224   <!-- /TMPL_LOOP -->
225 </table><!-- TMPL_ELSE --><p>There are no saved patron attribute types.</p><!-- /TMPL_IF -->
226
227 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
228
229 <!-- /TMPL_IF -->
230  
231 </div>
232 </div>
233 <div class="yui-b">
234 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
235 </div>
236 </div>
237 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->