1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Administration › Patron Categories › <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="categorycode" -->Modify category '<!-- TMPL_VAR NAME="categorycode" escape="html" -->'<!-- TMPL_ELSE -->New category<!-- /TMPL_IF --><!-- /TMPL_IF -->
3 <!-- TMPL_IF NAME="add_validate" -->Data recorded<!-- /TMPL_IF -->
4 <!-- TMPL_IF NAME="delete_confirm" --><!-- TMPL_IF NAME="totalgtzero" -->Cannot Delete: Category <!-- TMPL_VAR NAME="categorycode" escape="html" --> in Use<!-- TMPL_ELSE -->Confirm Deletion of Category '<!-- TMPL_VAR NAME="categorycode" escape="html" -->'<!-- /TMPL_IF --><!-- /TMPL_IF -->
5 <!-- TMPL_IF NAME="delete_confirmed" -->Category Deleted<!-- /TMPL_IF --></title>
6 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
7 <script type="text/javascript">
10 function isNotNull(f,noalert) {
11 if (f.value.length ==0) {
18 var x=f.value.toUpperCase();
23 function isNum(v,maybenull) {
24 var n = new Number(v.value);
28 if (maybenull==0 && v.value=='') {
35 var t = Date.parse(f.value);
40 // to check if the data are correctly entered.
43 var _alertString="Form not submitted because of the following problem(s)\n";
44 _alertString +="-------------------------------------------------------------------\n\n";
45 if (ff.categorycode.value.length==0) {
47 _alertString += "- categorycode missing\n";
49 if (!(ff.category_type.value)){
51 _alertString += "- category type missing\n";
53 if (!(isNotNull(ff.description,1))) {
55 _alertString += "- description missing\n";
57 if (!isNum(ff.upperagelimit,0) && ff.category_type.value=='C') {
59 _alertString += "- upperagelimit is not a number\n";
63 if (ok) { // if there is a problem
74 <!-- TMPL_INCLUDE NAME="header.inc" -->
75 <!-- TMPL_INCLUDE NAME="patrons-admin-search.inc" -->
77 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <!-- TMPL_IF NAME="add_form" --> <a href="/cgi-bin/koha/admin/categorie.pl">Patron Categories</a> › <!-- TMPL_IF NAME="categorycode" -->Modify category '<!-- TMPL_VAR NAME="categorycode" escape="html" -->'<!-- TMPL_ELSE -->New category<!-- /TMPL_IF --><!-- /TMPL_IF -->
78 <!-- TMPL_IF NAME="add_validate" --> <a href="/cgi-bin/koha/admin/categorie.pl">Patron Categories</a> › Data recorded<!-- /TMPL_IF -->
79 <!-- TMPL_IF NAME="delete_confirm" --> <a href="/cgi-bin/koha/admin/categorie.pl">Patron Categories</a> › <!-- TMPL_IF NAME="totalgtzero" -->Cannot Delete: Category <!-- TMPL_VAR NAME="categorycode" escape="html" --> in Use<!-- TMPL_ELSE -->Confirm Deletion of Category '<!-- TMPL_VAR NAME="categorycode" escape="html" -->'<!-- /TMPL_IF --><!-- /TMPL_IF -->
80 <!-- TMPL_IF NAME="delete_confirmed" --> <a href="/cgi-bin/koha/admin/categorie.pl">Patron Categories</a> › Category Deleted<!-- /TMPL_IF -->
81 <!-- TMPL_IF NAME="else" -->Patron Categories<!-- /TMPL_IF --></div>
83 <div id="doc3" class="yui-t2">
89 <!-- TMPL_IF NAME="add_form" -->
94 <form name="Aform" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
95 <input type="hidden" name="op" value="add_validate" />
96 <input type="hidden" name="checked" value="0" />
97 <!-- TMPL_IF NAME="categorycode" -->
98 <h1>Modify category <!-- TMPL_VAR NAME="categorycode" escape="html" --></h1>
100 <h1>New category</h1>
102 <fieldset class="rows">
103 <ol><!-- TMPL_IF NAME="categorycode" -->
104 <li><span class="label">Category code</span><!-- TMPL_VAR NAME="categorycode" escape="html" -->
105 <input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" escape="html" -->" /><input type="hidden" name="is_a_modif" value="1" /></li>
107 <li><label for="categorycode">Category code: </label> <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" onblur="toUC(this)" /></li>
109 <li><label for="description">Description: </label> <input type="text" name="description" id="description" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="description" escape="html" -->" /></li>
110 <li><label for="enrolmentperiod">Enrollment period: </label> <input type="text" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="<!-- TMPL_VAR NAME="enrolmentperiod" -->" /> months</li>
111 <li><label for="dateofbirthrequired">Age required: </label> <input type="text" name="dateofbirthrequired" id="dateofbirthrequired" value="<!-- TMPL_VAR NAME="dateofbirthrequired" -->" size="3" maxlength="3" /> years</li>
112 <li><label for="upperagelimit">Upperage limit: </label> <input type="text" name="upperagelimit" id="upperagelimit" size="3" maxlength="3" value="<!-- TMPL_VAR NAME="upperagelimit" -->" /> years</li>
113 <li><label for="enrolmentfee">Enrollment fee: </label><input type="text" name="enrolmentfee" id="enrolmentfee" size="6" value="<!-- TMPL_VAR NAME="enrolmentfee" -->" /></li>
114 <li><label for="overduenoticerequired">Overdue notice required: </label> <select name="overduenoticerequired" id="overduenoticerequired">
115 <!-- TMPL_IF NAME="overduenoticerequired" -->
116 <option value="0">No</option>
117 <option value="1" selected="selected">Yes</option>
119 <option value="0" selected="selected">No</option>
120 <option value="1">Yes</option>
123 <li><label for="reservefee">Hold fee: </label><input type="text" name="reservefee" id="reservefee" size="6" value="<!-- TMPL_VAR NAME="reservefee" -->" /></li>
124 <li><label for="category_type">Category type: </label> <select name="category_type" id="category_type">
125 <!-- TMPL_IF NAME="type_n" --><option value="" selected="selected">Select a Category type</option><!-- TMPL_ELSE --><option value="">Select a Category type</option><!-- /TMPL_IF -->
126 <!-- TMPL_IF NAME="type_A" --><option value="A" selected="selected">Adult</option><!-- TMPL_ELSE --><option value="A">Adult</option><!-- /TMPL_IF -->
127 <!-- TMPL_IF NAME="type_C" --><option value="C" selected="selected">Child</option><!-- TMPL_ELSE --><option value="C">Child</option><!-- /TMPL_IF -->
128 <!-- TMPL_IF NAME="type_S" --><option value="S" selected="selected">Staff</option><!-- TMPL_ELSE --><option value="S">Staff</option><!-- /TMPL_IF -->
129 <!-- TMPL_IF NAME="type_I" --><option value="I" selected="selected">Organisztion</option><!-- TMPL_ELSE --><option value="I">Organization</option><!-- /TMPL_IF -->
130 <!-- TMPL_IF NAME="type_P" --><option value="P" selected="selected">Professional</option><!-- TMPL_ELSE --><option value="P">Professional</option><!-- /TMPL_IF -->
131 <!-- TMPL_IF NXME="type_X" --><option value="X" selected="selected">Statistical</option><!-- TMPL_ELSE --><option value="X">Statistical</option><!-- /TMPL_IF -->
136 <!-- TMPL_IF NAME="EnhancedMessagingPreferences" -->
137 <fieldset class="rows">
138 <h4>Default messaging preferences for this patron category</h4>
139 <!-- TMPL_INCLUDE NAME="messaging-preference-form.inc" -->
142 <fieldset class="action"><input type="button" value="Save" onclick="Check(this.form);" /> </fieldset>
147 <!-- TMPL_IF NAME="add_validate" -->
148 <h3>Data recorded</h3>
149 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
150 <input type="submit" value="OK" />
155 <!-- TMPL_IF NAME="delete_confirm" -->
157 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
159 <!-- TMPL_IF NAME="totalgtzero" -->
160 Category <!-- TMPL_VAR NAME="categorycode" escape="html" --> is in use. Deletion not possible!<!-- TMPL_ELSE -->
161 Confirm Deletion of Category <!-- TMPL_VAR NAME="categorycode" escape="html" --><!-- /TMPL_IF --></legend>
163 <!-- TMPL_IF NAME="totalgtzero" --><div class="dialog alert"><strong>This category is used <!-- TMPL_VAR NAME="total" --> times</strong>. Deletion not possible</div><!-- /TMPL_IF -->
165 <tr><th scope="row">Category code: </th><td><!-- TMPL_VAR NAME="categorycode" escape="html" --></td></tr>
166 <tr><th scope="row">Description: </th><td><!-- TMPL_VAR NAME="description" escape="html" --></td></tr>
167 <tr><th scope="row">Enrollment period: </th><td><!-- TMPL_VAR NAME="enrolmentperiod" --> months</td></tr>
168 <tr><th scope="row">Age required: </th><td><!-- TMPL_VAR NAME="dateofbirthrequired" --> years</td></tr>
169 <tr><th scope="row">Upperage limit: </th><td><!-- TMPL_VAR NAME="upperagelimit" --> years</td></tr>
170 <tr><th scope="row">Enrollment fee: </th><td><!-- TMPL_VAR NAME="enrolmentfee" --></td></tr>
171 <tr><th scope="row">Receives overdue notices: </th><td><!-- TMPL_IF NAME="overduenoticerequired" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td></tr>
172 <tr><th scope="row">Hold fee: </th><td><!-- TMPL_VAR NAME="reservefee" --></td></tr>
174 <fieldset class="action"><!-- TMPL_IF NAME="totalgtzero" -->
175 <input type="submit" value="OK" /></form>
177 <input type="hidden" name="op" value="delete_confirmed" />
178 <input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" escape="html" -->" /> <input type="submit" value="Delete this Category" /> <a class="cancel" href="/cgi-bin/koha/admin/categorie.pl">Cancel</a>
179 <!-- /TMPL_IF --></fieldset></fieldset></form>
182 <!-- TMPL_IF NAME="delete_confirmed" -->
183 <h3>Category Deleted</h3>
185 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
186 <input type="submit" value="OK" />
190 <!-- TMPL_IF NAME="else" -->
193 <script type="text/javascript">
196 // prepare DOM for YUI Toolbar
198 $(document).ready(function() {
202 // YUI Toolbar Functions
204 function yuiToolbar() {
205 new YAHOO.widget.Button("newcategory");
211 <li><a id="newcategory" href="/cgi-bin/koha/admin/categorie.pl?op=add_form">New Category</a></li>
214 <h2>Patron Category Administration</h2>
215 <!-- TMPL_IF NAME="searchfield" -->
216 You Searched for <!-- TMPL_VAR NAME="searchfield" --></span>
221 <th scope="col">Code</th>
222 <th scope="col">Category name</th>
223 <th scope="col">Type</th>
224 <th scope="col">Enrollment period</th>
225 <th scope="col">Age required</th>
226 <th scope="col">Upper age limit</th>
227 <th scope="col">Enrollment fee</th>
228 <th scope="col">Overdue</th>
229 <th scope="col">Hold fee</th>
230 <!-- TMPL_IF NAME="EnhancedMessagingPreferences" -->
231 <th scope="col">Messaging</th>
233 <th scope="col" colspan="2"> </th>
235 <!-- TMPL_LOOP NAME="loop" -->
236 <!-- TMPL_UNLESS NAME="__odd__" -->
237 <tr class="highlight">
240 <!-- /TMPL_UNLESS -->
241 <td><!-- TMPL_VAR NAME="categorycode" escape="html" --></td>
243 <a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&categorycode=<!-- TMPL_VAR NAME="categorycode" escape="url" -->"><!-- TMPL_VAR NAME="description" escape="html" --></a>
246 <!-- TMPL_IF NAME="type_A" -->Adult<!-- /TMPL_IF -->
247 <!-- TMPL_IF NAME="type_C" -->Child<!-- /TMPL_IF -->
248 <!-- TMPL_IF NAME="type_P" -->Prof.<!-- /TMPL_IF -->
249 <!-- TMPL_IF NAME="type_I" -->Org.<!-- /TMPL_IF -->
250 <!-- TMPL_IF NAME="type_S" -->Staff<!-- /TMPL_IF -->
251 <!-- TMPL_IF NAME="type_X" -->Statistical<!-- /TMPL_IF -->
253 <td><!-- TMPL_VAR NAME="enrolmentperiod" --> months</td>
254 <td><!-- TMPL_VAR NAME="dateofbirthrequired" --> years</td>
255 <td><!-- TMPL_VAR NAME="upperagelimit" --> years</td>
256 <td><!-- TMPL_VAR NAME="enrolmentfee" --></td>
257 <td><!-- TMPL_IF NAME="overduenoticerequired" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
258 <td><!-- TMPL_VAR NAME="reservefee" --></td>
259 <!-- TMPL_IF NAME="EnhancedMessagingPreferences" -->
261 <!-- TMPL_IF NAME="messaging_prefs" -->
262 <!-- TMPL_LOOP NAME="messaging_prefs" -->
263 <!-- TMPL_VAR NAME="message_name" --> :
264 <!-- TMPL_LOOP NAME="transports" -->
265 <!-- TMPL_VAR NAME="transport" -->
274 <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&categorycode=<!-- TMPL_VAR NAME="categorycode" escape="url" -->">Edit</a></td>
275 <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&categorycode=<!-- TMPL_VAR NAME="categorycode" escape="url" -->">Delete</a></td>
284 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
287 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->