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 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
8 <script type="text/javascript">
11 function isNotNull(f,noalert) {
12 if (f.value.length ==0) {
19 var x=f.value.toUpperCase();
24 function isNum(v,maybenull) {
25 var n = new Number(v.value);
29 if (maybenull==0 && v.value=='') {
36 var t = Date.parse(f.value);
41 // to check if the data are correctly entered.
44 var _alertString="Form not submitted because of the following problem(s)\n";
45 _alertString +="-------------------------------------------------------------------\n\n";
46 if (ff.categorycode.value.length==0) {
48 _alertString += "- categorycode missing\n";
50 if (!(ff.category_type.value)){
52 _alertString += "- category type missing\n";
54 if (!(isNotNull(ff.description,1))) {
56 _alertString += "- description missing\n";
58 if (!isNum(ff.upperagelimit,0) && ff.category_type.value=='C') {
60 _alertString += "- upperagelimit is not a number\n";
63 if(ff.enrolmentperioddate.value && ff.enrolmentperiod.value){
64 document.getElementById('enrolmentmessage').className = "error";
68 if (ok) { // if there is a problem
79 <!-- TMPL_INCLUDE NAME="header.inc" -->
80 <!-- TMPL_INCLUDE NAME="patrons-admin-search.inc" -->
82 <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 -->
83 <!-- TMPL_IF NAME="add_validate" --> <a href="/cgi-bin/koha/admin/categorie.pl">Patron Categories</a> › Data recorded<!-- /TMPL_IF -->
84 <!-- 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 -->
85 <!-- TMPL_IF NAME="delete_confirmed" --> <a href="/cgi-bin/koha/admin/categorie.pl">Patron Categories</a> › Category Deleted<!-- /TMPL_IF -->
86 <!-- TMPL_IF NAME="else" -->Patron Categories<!-- /TMPL_IF --></div>
88 <div id="doc3" class="yui-t2">
94 <!-- TMPL_IF NAME="add_form" -->
99 <form name="Aform" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
100 <input type="hidden" name="op" value="add_validate" />
101 <input type="hidden" name="checked" value="0" />
102 <!-- TMPL_IF NAME="categorycode" -->
103 <h1>Modify category <!-- TMPL_VAR NAME="categorycode" escape="html" --></h1>
105 <h1>New category</h1>
107 <fieldset class="rows">
108 <ol><!-- TMPL_IF NAME="categorycode" -->
109 <li><span class="label">Category code</span><!-- TMPL_VAR NAME="categorycode" escape="html" -->
110 <input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" escape="html" -->" /><input type="hidden" name="is_a_modif" value="1" /></li>
112 <li><label for="categorycode">Category code: </label> <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" onblur="toUC(this)" /></li>
114 <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>
115 <li><label for="enrolmentperiod">Enrollment period: </label>
116 <input type="text" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="<!-- TMPL_IF NAME="enrolmentperiod" --><!-- TMPL_VAR NAME="enrolmentperiod" --><!-- /TMPL_IF -->" /> months <br />
117 <label for="enrolmentperioddate">Until date: </label>
118 <input type="text" name="enrolmentperioddate" id="enrolmentperioddate" value="<!-- TMPL_VAR NAME="enrolmentperioddate" -->" /> <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="enrolmentperioddate_button" alt="Show Calendar" />
119 <script type="text/javascript">
122 inputField : "enrolmentperioddate",
123 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
124 button : "enrolmentperioddate_button"
128 <div id="enrolmentmessage" class="hint">Cannot have "months" and "until date" at the same time</div>
130 <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>
131 <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>
132 <li><label for="enrolmentfee">Enrollment fee: </label><input type="text" name="enrolmentfee" id="enrolmentfee" size="6" value="<!-- TMPL_VAR NAME="enrolmentfee" -->" /></li>
133 <li><label for="overduenoticerequired">Overdue notice required: </label> <select name="overduenoticerequired" id="overduenoticerequired">
134 <!-- TMPL_IF NAME="overduenoticerequired" -->
135 <option value="0">No</option>
136 <option value="1" selected="selected">Yes</option>
138 <option value="0" selected="selected">No</option>
139 <option value="1">Yes</option>
142 <li><label for="reservefee">Hold fee: </label><input type="text" name="reservefee" id="reservefee" size="6" value="<!-- TMPL_VAR NAME="reservefee" -->" /></li>
143 <li><label for="category_type">Category type: </label> <select name="category_type" id="category_type">
144 <!-- 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 -->
145 <!-- TMPL_IF NAME="type_A" --><option value="A" selected="selected">Adult</option><!-- TMPL_ELSE --><option value="A">Adult</option><!-- /TMPL_IF -->
146 <!-- TMPL_IF NAME="type_C" --><option value="C" selected="selected">Child</option><!-- TMPL_ELSE --><option value="C">Child</option><!-- /TMPL_IF -->
147 <!-- TMPL_IF NAME="type_S" --><option value="S" selected="selected">Staff</option><!-- TMPL_ELSE --><option value="S">Staff</option><!-- /TMPL_IF -->
148 <!-- TMPL_IF NAME="type_I" --><option value="I" selected="selected">Organisztion</option><!-- TMPL_ELSE --><option value="I">Organization</option><!-- /TMPL_IF -->
149 <!-- TMPL_IF NAME="type_P" --><option value="P" selected="selected">Professional</option><!-- TMPL_ELSE --><option value="P">Professional</option><!-- /TMPL_IF -->
150 <!-- TMPL_IF NXME="type_X" --><option value="X" selected="selected">Statistical</option><!-- TMPL_ELSE --><option value="X">Statistical</option><!-- /TMPL_IF -->
155 <!-- TMPL_IF NAME="EnhancedMessagingPreferences" -->
156 <fieldset class="rows">
157 <h4>Default messaging preferences for this patron category</h4>
158 <!-- TMPL_INCLUDE NAME="messaging-preference-form.inc" -->
161 <fieldset class="action"><input type="button" value="Save" onclick="Check(this.form);" /> </fieldset>
166 <!-- TMPL_IF NAME="add_validate" -->
167 <h3>Data recorded</h3>
168 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
169 <input type="submit" value="OK" />
174 <!-- TMPL_IF NAME="delete_confirm" -->
176 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
178 <!-- TMPL_IF NAME="totalgtzero" -->
179 Category <!-- TMPL_VAR NAME="categorycode" escape="html" --> is in use. Deletion not possible!<!-- TMPL_ELSE -->
180 Confirm Deletion of Category <!-- TMPL_VAR NAME="categorycode" escape="html" --><!-- /TMPL_IF --></legend>
182 <!-- 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 -->
184 <tr><th scope="row">Category code: </th><td><!-- TMPL_VAR NAME="categorycode" escape="html" --></td></tr>
185 <tr><th scope="row">Description: </th><td><!-- TMPL_VAR NAME="description" escape="html" --></td></tr>
186 <tr><th scope="row">Enrollment period: </th>
188 <!-- TMPL_IF NAME="enrolmentperiod" -->
189 <!-- TMPL_VAR NAME="enrolmentperiod" --> months
191 until <!-- TMPL_VAR NAME="enrolmentperioddate" -->
195 <tr><th scope="row">Age required: </th><td><!-- TMPL_VAR NAME="dateofbirthrequired" --> years</td></tr>
196 <tr><th scope="row">Upperage limit: </th><td><!-- TMPL_VAR NAME="upperagelimit" --> years</td></tr>
197 <tr><th scope="row">Enrollment fee: </th><td><!-- TMPL_VAR NAME="enrolmentfee" --></td></tr>
198 <tr><th scope="row">Receives overdue notices: </th><td><!-- TMPL_IF NAME="overduenoticerequired" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td></tr>
199 <tr><th scope="row">Hold fee: </th><td><!-- TMPL_VAR NAME="reservefee" --></td></tr>
201 <fieldset class="action"><!-- TMPL_IF NAME="totalgtzero" -->
202 <input type="submit" value="OK" /></form>
204 <input type="hidden" name="op" value="delete_confirmed" />
205 <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>
206 <!-- /TMPL_IF --></fieldset></fieldset></form>
209 <!-- TMPL_IF NAME="delete_confirmed" -->
210 <h3>Category Deleted</h3>
212 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
213 <input type="submit" value="OK" />
217 <!-- TMPL_IF NAME="else" -->
220 <script type="text/javascript">
223 // prepare DOM for YUI Toolbar
225 $(document).ready(function() {
229 // YUI Toolbar Functions
231 function yuiToolbar() {
232 new YAHOO.widget.Button("newcategory");
238 <li><a id="newcategory" href="/cgi-bin/koha/admin/categorie.pl?op=add_form">New Category</a></li>
241 <h2>Patron Category Administration</h2>
242 <!-- TMPL_IF NAME="searchfield" -->
243 You Searched for <!-- TMPL_VAR NAME="searchfield" --></span>
248 <th scope="col">Code</th>
249 <th scope="col">Category name</th>
250 <th scope="col">Type</th>
251 <th scope="col">Enrollment period</th>
252 <th scope="col">Age required</th>
253 <th scope="col">Upper age limit</th>
254 <th scope="col">Enrollment fee</th>
255 <th scope="col">Overdue</th>
256 <th scope="col">Hold fee</th>
257 <!-- TMPL_IF NAME="EnhancedMessagingPreferences" -->
258 <th scope="col">Messaging</th>
260 <th scope="col" colspan="2"> </th>
262 <!-- TMPL_LOOP NAME="loop" -->
263 <!-- TMPL_UNLESS NAME="__odd__" -->
264 <tr class="highlight">
267 <!-- /TMPL_UNLESS -->
268 <td><!-- TMPL_VAR NAME="categorycode" escape="html" --></td>
270 <a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&categorycode=<!-- TMPL_VAR NAME="categorycode" escape="url" -->"><!-- TMPL_VAR NAME="description" escape="html" --></a>
273 <!-- TMPL_IF NAME="type_A" -->Adult<!-- /TMPL_IF -->
274 <!-- TMPL_IF NAME="type_C" -->Child<!-- /TMPL_IF -->
275 <!-- TMPL_IF NAME="type_P" -->Prof.<!-- /TMPL_IF -->
276 <!-- TMPL_IF NAME="type_I" -->Org.<!-- /TMPL_IF -->
277 <!-- TMPL_IF NAME="type_S" -->Staff<!-- /TMPL_IF -->
278 <!-- TMPL_IF NAME="type_X" -->Statistical<!-- /TMPL_IF -->
281 <!-- TMPL_IF NAME="enrolmentperiod" -->
282 <!-- TMPL_VAR NAME="enrolmentperiod" --> months
284 until <!-- TMPL_VAR NAME="enrolmentperioddate" -->
288 <td><!-- TMPL_VAR NAME="dateofbirthrequired" --> years</td>
289 <td><!-- TMPL_VAR NAME="upperagelimit" --> years</td>
290 <td><!-- TMPL_VAR NAME="enrolmentfee" --></td>
291 <td><!-- TMPL_IF NAME="overduenoticerequired" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
292 <td><!-- TMPL_VAR NAME="reservefee" --></td>
293 <!-- TMPL_IF NAME="EnhancedMessagingPreferences" -->
295 <!-- TMPL_IF NAME="messaging_prefs" -->
296 <!-- TMPL_LOOP NAME="messaging_prefs" -->
297 <!-- TMPL_VAR NAME="message_name" --> :
298 <!-- TMPL_LOOP NAME="transports" -->
299 <!-- TMPL_VAR NAME="transport" -->
308 <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&categorycode=<!-- TMPL_VAR NAME="categorycode" escape="url" -->">Edit</a></td>
309 <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&categorycode=<!-- TMPL_VAR NAME="categorycode" escape="url" -->">Delete</a></td>
318 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
321 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->