1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Administration › Patron Categories › [% IF ( add_form ) %][% IF ( categorycode ) %]Modify category '[% categorycode |html %]'[% ELSE %]New category[% END %][% END %]
3 [% IF ( add_validate ) %]Data recorded[% END %]
4 [% IF ( delete_confirm ) %][% IF ( totalgtzero ) %]Cannot Delete: Category [% categorycode |html %] in Use[% ELSE %]Confirm Deletion of Category '[% categorycode |html %]'[% END %][% END %]
5 [% IF ( delete_confirmed ) %]Category Deleted[% END %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
8 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
9 <script type="text/javascript" id="js">$(document).ready(function() {
10 $("#table_categorie").tablesorter({
12 headers: { 10: { sorter: false}}
13 }).tablesorterPager({container: $("#pagertable_categorie"),positionFixed: false,size: 20});
15 [% INCLUDE 'calendar.inc' %]
16 <script type="text/javascript">
19 function isNotNull(f,noalert) {
20 if (f.value.length ==0) {
27 var x=f.value.toUpperCase();
32 function isNum(v,maybenull) {
33 var n = new Number(v.value);
37 if (maybenull==0 && v.value=='') {
44 var t = Date.parse(f.value);
49 // to check if the data are correctly entered.
52 var _alertString=_("Form not submitted because of the following problem(s)");
53 _alertString +="\n-------------------------------------------------------------------\n\n";
54 if (ff.categorycode.value.length==0) {
56 _alertString += _("- categorycode missing") + "\n";
58 if (!(ff.category_type.value)){
60 _alertString += _("- category type missing") + "\n";
62 if (!(isNotNull(ff.description,1))) {
64 _alertString += _("- description missing") + "\n";
66 if (!isNum(ff.upperagelimit,0) && ff.category_type.value=='C') {
68 _alertString += _("- upperagelimit is not a number") + "\n";
71 if(!(ff.enrolmentperioddate.value || ff.enrolmentperiod.value)) {
73 _alertString += _("- either Enrollment period or Until date must be provided") + "\n";
75 if(ff.enrolmentperioddate.value && ff.enrolmentperiod.value){
76 document.getElementById('enrolmentmessage').className = "error";
80 if (ok) { // if there is a problem
91 [% INCLUDE 'header.inc' %]
92 [% INCLUDE 'patrons-admin-search.inc' %]
94 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/categorie.pl">Patron Categories</a> › [% IF ( categorycode ) %]Modify category '[% categorycode |html %]'[% ELSE %]New category[% END %][% END %]
95 [% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/categorie.pl">Patron Categories</a> › Data recorded[% END %]
96 [% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/categorie.pl">Patron Categories</a> › [% IF ( totalgtzero ) %]Cannot Delete: Category [% categorycode |html %] in Use[% ELSE %]Confirm Deletion of Category '[% categorycode |html %]'[% END %][% END %]
97 [% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/categorie.pl">Patron Categories</a> › Category Deleted[% END %]
98 [% IF ( else ) %]Patron Categories[% END %]</div>
100 <div id="doc3" class="yui-t2">
106 [% IF ( add_form ) %]
111 <form name="Aform" action="[% script_name %]" method="post">
112 <input type="hidden" name="op" value="add_validate" />
113 <input type="hidden" name="checked" value="0" />
114 [% IF ( categorycode ) %]
115 <h1>Modify category [% categorycode |html %]</h1>
117 <h1>New category</h1>
119 <fieldset class="rows">
120 <ol>[% IF ( categorycode ) %]
121 <li><span class="label">Category code</span>[% categorycode |html %]
122 <input type="hidden" name="categorycode" value="[% categorycode |html %]" /><input type="hidden" name="is_a_modif" value="1" /></li>
124 <li><label for="categorycode">Category code: </label> <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" onblur="toUC(this)" /></li>
126 <li><label for="description">Description: </label> <input type="text" name="description" id="description" size="40" maxlength="80" value="[% description |html %]" /></li>
127 <li><label for="enrolmentperiod">Enrollment period: </label>
128 <input type="text" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% IF ( enrolmentperiod ) %][% enrolmentperiod %][% END %]" /> months <br />
129 <label for="enrolmentperioddate">Until date: </label>
130 <input type="text" name="enrolmentperioddate" id="enrolmentperioddate" value="[% enrolmentperioddate %]" /> <img src="[% themelang %]/lib/calendar/cal.gif" id="enrolmentperioddate_button" alt="Show Calendar" />
131 <script type="text/javascript">
134 inputField : "enrolmentperioddate",
135 ifFormat : "[% DHTMLcalendar_dateformat %]",
136 button : "enrolmentperioddate_button"
140 <div id="enrolmentmessage" class="hint">Cannot have "months" and "until date" at the same time</div>
142 <li><label for="dateofbirthrequired">Age required: </label> <input type="text" name="dateofbirthrequired" id="dateofbirthrequired" value="[% dateofbirthrequired %]" size="3" maxlength="3" /> years</li>
143 <li><label for="upperagelimit">Upperage limit: </label> <input type="text" name="upperagelimit" id="upperagelimit" size="3" maxlength="3" value="[% upperagelimit %]" /> years</li>
144 <li><label for="enrolmentfee">Enrollment fee: </label><input type="text" name="enrolmentfee" id="enrolmentfee" size="6" value="[% enrolmentfee %]" /></li>
145 <li><label for="overduenoticerequired">Overdue notice required: </label> <select name="overduenoticerequired" id="overduenoticerequired">
146 [% IF ( overduenoticerequired ) %]
147 <option value="0">No</option>
148 <option value="1" selected="selected">Yes</option>
150 <option value="0" selected="selected">No</option>
151 <option value="1">Yes</option>
154 <li><label for="hidelostitems">Lost items in staff client</label> <select name="hidelostitems" id="hidelostitems">
155 [% IF ( hidelostitems ) %]
156 <option value="0">Shown</option>
157 <option value="1" selected="selected">Hidden by default</option>
159 <option value="0" selected="selected">Shown</option>
160 <option value="1">Hidden by default</option>
163 <li><label for="reservefee">Hold fee: </label><input type="text" name="reservefee" id="reservefee" size="6" value="[% reservefee %]" /></li>
164 <li><label for="category_type">Category type: </label> <select name="category_type" id="category_type">
165 [% IF ( type_n ) %]<option value="" selected="selected">Select a Category type</option>[% ELSE %]<option value="">Select a Category type</option>[% END %]
166 [% IF ( type_A ) %]<option value="A" selected="selected">Adult</option>[% ELSE %]<option value="A">Adult</option>[% END %]
167 [% IF ( type_C ) %]<option value="C" selected="selected">Child</option>[% ELSE %]<option value="C">Child</option>[% END %]
168 [% IF ( type_S ) %]<option value="S" selected="selected">Staff</option>[% ELSE %]<option value="S">Staff</option>[% END %]
169 [% IF ( type_I ) %]<option value="I" selected="selected">Organization</option>[% ELSE %]<option value="I">Organization</option>[% END %]
170 [% IF ( type_P ) %]<option value="P" selected="selected">Professional</option>[% ELSE %]<option value="P">Professional</option>[% END %]
171 [% IF ( type_X ) %]<option value="X" selected="selected">Statistical</option>[% ELSE %]<option value="X">Statistical</option>[% END %]
176 [% IF ( EnhancedMessagingPreferences ) %]
177 <fieldset class="rows">
178 <h4>Default messaging preferences for this patron category</h4>
179 [% INCLUDE 'messaging-preference-form.inc' %]
182 <fieldset class="action"><input type="button" value="Save" onclick="Check(this.form);" /> </fieldset>
187 [% IF ( add_validate ) %]
188 <h3>Data recorded</h3>
189 <form action="[% script_name %]" method="post">
190 <input type="submit" value="OK" />
195 [% IF ( delete_confirm ) %]
197 <form action="[% script_name %]" method="post">
199 [% IF ( totalgtzero ) %]
200 Category [% categorycode |html %] is in use. Deletion not possible![% ELSE %]
201 Confirm Deletion of Category [% categorycode |html %][% END %]</legend>
203 [% IF ( totalgtzero ) %]<div class="dialog alert"><strong>This category is used [% total %] times</strong>. Deletion not possible</div>[% END %]
205 <tr><th scope="row">Category code: </th><td>[% categorycode |html %]</td></tr>
206 <tr><th scope="row">Description: </th><td>[% description |html %]</td></tr>
207 <tr><th scope="row">Enrollment period: </th>
209 [% IF ( enrolmentperiod ) %]
210 [% enrolmentperiod %] months
212 until [% enrolmentperioddate %]
216 <tr><th scope="row">Age required: </th><td>[% dateofbirthrequired %] years</td></tr>
217 <tr><th scope="row">Upperage limit: </th><td>[% upperagelimit %] years</td></tr>
218 <tr><th scope="row">Enrollment fee: </th><td>[% enrolmentfee %]</td></tr>
219 <tr><th scope="row">Receives overdue notices: </th><td>[% IF ( overduenoticerequired ) %]Yes[% ELSE %]No[% END %]</td></tr>
220 <tr><th scope="row">Lost items in staff client</th><td>[% IF ( hidelostitems ) %]Hidden by default[% ELSE %]Shown[% END %]</td></tr>
221 <tr><th scope="row">Hold fee: </th><td>[% reservefee %]</td></tr>
223 <fieldset class="action">[% IF ( totalgtzero ) %]
224 <input type="submit" value="OK" /></form>
226 <input type="hidden" name="op" value="delete_confirmed" />
227 <input type="hidden" name="categorycode" value="[% categorycode |html %]" /> <input type="submit" value="Delete this Category" /> <a class="cancel" href="/cgi-bin/koha/admin/categorie.pl">Cancel</a>
228 [% END %]</fieldset></fieldset></form>
231 [% IF ( delete_confirmed ) %]
232 <h3>Category Deleted</h3>
234 <form action="[% script_name %]" method="post">
235 <input type="submit" value="OK" />
242 <script type="text/javascript">
245 // prepare DOM for YUI Toolbar
247 $(document).ready(function() {
251 // YUI Toolbar Functions
253 function yuiToolbar() {
254 new YAHOO.widget.Button("newcategory");
260 <li><a id="newcategory" href="/cgi-bin/koha/admin/categorie.pl?op=add_form">New Category</a></li>
263 <h2>Patron Category Administration</h2>
264 [% IF ( searchfield ) %]
265 You Searched for [% searchfield %]</span>
267 <span id="pagertable_categorie" class="pager">
268 <form class="formpager"> <strong>page(s)</strong> :
269 <img src="[% interface %]/prog/img/first.png" class="first"/>
270 <img src="[% interface %]/prog/img/prev.png" class="prev"/>
271 <input type="text" size="5" class="pagedisplay"/>
272 <img src="[% interface %]/prog/img/next.png" class="next"/>
273 <img src="[% interface %]/prog/img/last.png" class="last"/>
275 <select class="pagesize">
276 <option value="10">10</option>
277 <option selected="selected" value="20">20</option>
278 <option value="30">30</option>
279 <option value="40">40</option>
280 <option value="50">50</option>
281 <option value="100">100</option>
285 <table id="table_categorie">
287 <th scope="col">Code</th>
288 <th scope="col">Category name</th>
289 <th scope="col">Type</th>
290 <th scope="col">Enrollment period</th>
291 <th scope="col">Age required</th>
292 <th scope="col">Upper age limit</th>
293 <th scope="col">Enrollment fee</th>
294 <th scope="col">Overdue</th>
295 <th scope="col">Lost Items</th>
296 <th scope="col">Hold fee</th>
297 [% IF ( EnhancedMessagingPreferences ) %]
298 <th scope="col">Messaging</th>
300 <th scope="col" colspan="2"> </th>
302 [% FOREACH loo IN loop %]
303 [% UNLESS ( loop.odd ) %]
304 <tr class="highlight">
308 <td>[% loo.categorycode |html %]</td>
310 <a href="[% loo.script_name %]?op=add_form&categorycode=[% loo.categorycode |url %]">[% loo.description |html %]</a>
313 [% IF ( loo.type_A ) %]Adult[% END %]
314 [% IF ( loo.type_C ) %]Child[% END %]
315 [% IF ( loo.type_P ) %]Prof.[% END %]
316 [% IF ( loo.type_I ) %]Org.[% END %]
317 [% IF ( loo.type_S ) %]Staff[% END %]
318 [% IF ( loo.type_X ) %]Statistical[% END %]
321 [% IF ( loo.enrolmentperiod ) %]
322 [% loo.enrolmentperiod %] months
324 until [% loo.enrolmentperioddate %]
328 <td>[% loo.dateofbirthrequired %] years</td>
329 <td>[% loo.upperagelimit %] years</td>
330 <td>[% loo.enrolmentfee %]</td>
331 <td>[% IF ( loo.overduenoticerequired ) %]Yes[% ELSE %]No[% END %]</td>
332 <td>[% IF ( loo.hidelostitems ) %]Hidden[% ELSE %]Shown[% END %]</td>
333 <td>[% loo.reservefee %]</td>
334 [% IF ( loo.EnhancedMessagingPreferences ) %]
336 [% IF ( loo.messaging_prefs ) %]
337 [% IF ( messaging_preference.Item_Due ) %]Item Due
338 [% ELSIF ( messaging_preference.Advance_Notice ) %]Advance Notice
339 [% ELSIF ( messaging_preference.Upcoming_Events ) %]Upcoming Events
340 [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold Filled
341 [% ELSIF ( messaging_preference.Item_Check_in ) %]Item Check-in
342 [% ELSIF ( messaging_preference.Item_Checkout ) %]Item Checkout
345 [% FOREACH transport IN messaging_pref.transports %]
346 [% transport.transport %]
354 <td><a href="[% loo.script_name %]?op=add_form&categorycode=[% loo.categorycode |url %]">Edit</a></td>
355 <td><a href="[% loo.script_name %]?op=delete_confirm&categorycode=[% loo.categorycode |url %]">Delete</a></td>
364 [% INCLUDE 'admin-menu.inc' %]
367 [% INCLUDE 'intranet-bottom.inc' %]