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({
13 headers: { 11: { sorter: false}}
14 }).tablesorterPager({container: $("#pagertable_categorie"),positionFixed: false,size: 20});
16 [% INCLUDE 'calendar.inc' %]
17 <script type="text/javascript">
20 function isNotNull(f,noalert) {
21 if (f.value.length ==0) {
28 var x=f.value.toUpperCase();
33 function isNum(v,maybenull) {
34 var n = new Number(v.value);
38 if (maybenull==0 && v.value=='') {
45 var t = Date.parse(f.value);
50 // to check if the data are correctly entered.
53 var _alertString=_("Form not submitted because of the following problem(s)");
54 _alertString +="\n-------------------------------------------------------------------\n\n";
55 if (ff.categorycode.value.length==0) {
57 _alertString += _("- categorycode missing") + "\n";
59 if (!(ff.category_type.value)){
61 _alertString += _("- category type missing") + "\n";
63 if (!(isNotNull(ff.description,1))) {
65 _alertString += _("- description missing") + "\n";
67 if (!isNum(ff.upperagelimit,0) && ff.category_type.value=='C') {
69 _alertString += _("- upperagelimit is not a number") + "\n";
72 if(!(ff.enrolmentperioddate.value || ff.enrolmentperiod.value)) {
74 _alertString += _("- either Enrollment period or Until date must be provided") + "\n";
76 if(ff.enrolmentperioddate.value && ff.enrolmentperiod.value){
77 document.getElementById('enrolmentmessage').className = "error";
81 if (ok) { // if there is a problem
90 <style type="text/css">#enrolmentmessage.hint { display : none; }</style>
93 [% INCLUDE 'header.inc' %]
94 [% INCLUDE 'patrons-admin-search.inc' %]
96 <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 %]
97 [% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/categorie.pl">Patron Categories</a> › Data recorded[% END %]
98 [% 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 %]
99 [% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/categorie.pl">Patron Categories</a> › Category Deleted[% END %]
100 [% IF ( else ) %]Patron Categories[% END %]</div>
102 <div id="doc3" class="yui-t2">
108 [% IF ( add_form ) %]
113 <form name="Aform" action="[% script_name %]" method="post">
114 <input type="hidden" name="op" value="add_validate" />
115 <input type="hidden" name="checked" value="0" />
116 [% IF ( categorycode ) %]
117 <h1>Modify category [% categorycode |html %]</h1>
119 <h1>New category</h1>
121 <fieldset class="rows">
122 <ol>[% IF ( categorycode ) %]
123 <li><span class="label">Category code</span>[% categorycode |html %]
124 <input type="hidden" name="categorycode" value="[% categorycode |html %]" /><input type="hidden" name="is_a_modif" value="1" /></li>
126 <li><label for="categorycode">Category code: </label> <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" onblur="toUC(this)" /></li>
128 <li><label for="description">Description: </label> <input type="text" name="description" id="description" size="40" maxlength="80" value="[% description |html %]" /></li>
129 <li><label for="enrolmentperiod">Enrollment period: </label>
131 <legend>Choose one</legend>
133 <li><label for="enrolmentperiod" style="width:6em;">In months: </label>
134 <input type="text" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% IF ( enrolmentperiod ) %][% enrolmentperiod %][% END %]" /> months</li>
135 <li><label for="enrolmentperioddate" style="width:6em;">Until date: </label>
136 <input type="text" name="enrolmentperioddate" id="enrolmentperioddate" value="[% enrolmentperioddate %]" /> <img src="[% themelang %]/lib/calendar/cal.gif" id="enrolmentperioddate_button" alt="Show Calendar" />
137 <script type="text/javascript">
140 inputField : "enrolmentperioddate",
141 ifFormat : "[% DHTMLcalendar_dateformat %]",
142 button : "enrolmentperioddate_button"
146 <div id="enrolmentmessage" class="hint" style="margin-left:0;">Cannot have "months" and "until date" at the same time</div>
151 <li><label for="dateofbirthrequired">Age required: </label> <input type="text" name="dateofbirthrequired" id="dateofbirthrequired" value="[% dateofbirthrequired %]" size="3" maxlength="3" /> years</li>
152 <li><label for="upperagelimit">Upperage limit: </label> <input type="text" name="upperagelimit" id="upperagelimit" size="3" maxlength="3" value="[% upperagelimit %]" /> years</li>
153 <li><label for="enrolmentfee">Enrollment fee: </label><input type="text" name="enrolmentfee" id="enrolmentfee" size="6" value="[% enrolmentfee %]" /></li>
154 <li><label for="overduenoticerequired">Overdue notice required: </label> <select name="overduenoticerequired" id="overduenoticerequired">
155 [% IF ( overduenoticerequired ) %]
156 <option value="0">No</option>
157 <option value="1" selected="selected">Yes</option>
159 <option value="0" selected="selected">No</option>
160 <option value="1">Yes</option>
163 <li><label for="hidelostitems">Lost items in staff client</label> <select name="hidelostitems" id="hidelostitems">
164 [% IF ( hidelostitems ) %]
165 <option value="0">Shown</option>
166 <option value="1" selected="selected">Hidden by default</option>
168 <option value="0" selected="selected">Shown</option>
169 <option value="1">Hidden by default</option>
172 <li><label for="reservefee">Hold fee: </label><input type="text" name="reservefee" id="reservefee" size="6" value="[% reservefee %]" /></li>
173 <li><label for="category_type">Category type: </label> <select name="category_type" id="category_type">
174 [% IF ( type_n ) %]<option value="" selected="selected">Select a Category type</option>[% ELSE %]<option value="">Select a Category type</option>[% END %]
175 [% IF ( type_A ) %]<option value="A" selected="selected">Adult</option>[% ELSE %]<option value="A">Adult</option>[% END %]
176 [% IF ( type_C ) %]<option value="C" selected="selected">Child</option>[% ELSE %]<option value="C">Child</option>[% END %]
177 [% IF ( type_S ) %]<option value="S" selected="selected">Staff</option>[% ELSE %]<option value="S">Staff</option>[% END %]
178 [% IF ( type_I ) %]<option value="I" selected="selected">Organization</option>[% ELSE %]<option value="I">Organization</option>[% END %]
179 [% IF ( type_P ) %]<option value="P" selected="selected">Professional</option>[% ELSE %]<option value="P">Professional</option>[% END %]
180 [% IF ( type_X ) %]<option value="X" selected="selected">Statistical</option>[% ELSE %]<option value="X">Statistical</option>[% END %]
185 [% IF ( EnhancedMessagingPreferences ) %]
186 <fieldset class="rows">
187 <h4>Default messaging preferences for this patron category</h4>
188 [% INCLUDE 'messaging-preference-form.inc' %]
191 <fieldset class="action"><input type="button" value="Save" onclick="Check(this.form);" /> </fieldset>
196 [% IF ( add_validate ) %]
197 <h3>Data recorded</h3>
198 <form action="[% script_name %]" method="post">
199 <input type="submit" value="OK" />
204 [% IF ( delete_confirm ) %]
206 <form action="[% script_name %]" method="post">
208 [% IF ( totalgtzero ) %]
209 Category [% categorycode |html %] is in use. Deletion not possible![% ELSE %]
210 Confirm Deletion of Category [% categorycode |html %][% END %]</legend>
212 [% IF ( totalgtzero ) %]<div class="dialog alert"><strong>This category is used [% total %] times</strong>. Deletion not possible</div>[% END %]
214 <tr><th scope="row">Category code: </th><td>[% categorycode |html %]</td></tr>
215 <tr><th scope="row">Description: </th><td>[% description |html %]</td></tr>
216 <tr><th scope="row">Enrollment period: </th>
218 [% IF ( enrolmentperiod ) %]
219 [% enrolmentperiod %] months
221 until [% enrolmentperioddate %]
225 <tr><th scope="row">Age required: </th><td>[% dateofbirthrequired %] years</td></tr>
226 <tr><th scope="row">Upperage limit: </th><td>[% upperagelimit %] years</td></tr>
227 <tr><th scope="row">Enrollment fee: </th><td>[% enrolmentfee %]</td></tr>
228 <tr><th scope="row">Receives overdue notices: </th><td>[% IF ( overduenoticerequired ) %]Yes[% ELSE %]No[% END %]</td></tr>
229 <tr><th scope="row">Lost items in staff client</th><td>[% IF ( hidelostitems ) %]Hidden by default[% ELSE %]Shown[% END %]</td></tr>
230 <tr><th scope="row">Hold fee: </th><td>[% reservefee %]</td></tr>
232 <fieldset class="action">[% IF ( totalgtzero ) %]
233 <input type="submit" value="OK" /></form>
235 <input type="hidden" name="op" value="delete_confirmed" />
236 <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>
237 [% END %]</fieldset></fieldset></form>
240 [% IF ( delete_confirmed ) %]
241 <h3>Category Deleted</h3>
243 <form action="[% script_name %]" method="post">
244 <input type="submit" value="OK" />
251 <script type="text/javascript">
254 // prepare DOM for YUI Toolbar
256 $(document).ready(function() {
260 // YUI Toolbar Functions
262 function yuiToolbar() {
263 new YAHOO.widget.Button("newcategory");
269 <li><a id="newcategory" href="/cgi-bin/koha/admin/categorie.pl?op=add_form">New Category</a></li>
272 <h2>Patron Category Administration</h2>
273 [% IF ( searchfield ) %]
274 You Searched for [% searchfield %]</span>
277 <div id="pagertable_categorie">
278 [% INCLUDE 'table-pager.inc' perpage='20' %]
280 <table id="table_categorie">
282 <th scope="col">Code</th>
283 <th scope="col">Category name</th>
284 <th scope="col">Type</th>
285 <th scope="col">Enrollment period</th>
286 <th scope="col">Age required</th>
287 <th scope="col">Upper age limit</th>
288 <th scope="col">Enrollment fee</th>
289 <th scope="col">Overdue</th>
290 <th scope="col">Lost Items</th>
291 <th scope="col">Hold fee</th>
292 [% IF ( EnhancedMessagingPreferences ) %]
293 <th scope="col">Messaging</th>
295 <th scope="col" colspan="2"> </th>
297 [% FOREACH loo IN loop %]
299 <td>[% loo.categorycode |html %]</td>
301 <a href="[% loo.script_name %]?op=add_form&categorycode=[% loo.categorycode |url %]">[% loo.description |html %]</a>
304 [% IF ( loo.type_A ) %]Adult[% END %]
305 [% IF ( loo.type_C ) %]Child[% END %]
306 [% IF ( loo.type_P ) %]Prof.[% END %]
307 [% IF ( loo.type_I ) %]Org.[% END %]
308 [% IF ( loo.type_S ) %]Staff[% END %]
309 [% IF ( loo.type_X ) %]Statistical[% END %]
312 [% IF ( loo.enrolmentperiod ) %]
313 [% loo.enrolmentperiod %] months
315 until [% loo.enrolmentperioddate %]
319 <td>[% loo.dateofbirthrequired %] years</td>
320 <td>[% loo.upperagelimit %] years</td>
321 <td>[% loo.enrolmentfee %]</td>
322 <td>[% IF ( loo.overduenoticerequired ) %]Yes[% ELSE %]No[% END %]</td>
323 <td>[% IF ( loo.hidelostitems ) %]Hidden[% ELSE %]Shown[% END %]</td>
324 <td>[% loo.reservefee %]</td>
325 [% IF ( EnhancedMessagingPreferences ) %]
326 <td style="white-space: nowrap; font-size:80%;">
327 [% IF ( loo.messaging_prefs ) %]
328 [% FOREACH prefs IN loo.messaging_prefs %]
329 [% FOREACH transport IN prefs.transports %]
330 [% IF ( transport.transport ) %]
331 [% IF ( prefs.Item_Due ) %]Item Due
332 [% ELSIF ( prefs.Advance_Notice ) %]Advance Notice
333 [% ELSIF ( prefs.Upcoming_Events ) %]Upcoming Events
334 [% ELSIF ( prefs.Hold_Filled ) %]Hold Filled
335 [% ELSIF ( prefs.Item_Check_in ) %]Item Check-in
336 [% ELSIF ( prefs.Item_Checkout ) %]Item Checkout
339 <strong>[% transport.transport %]</strong><br />
340 [% ELSE %]None<br />[% END %]
348 <td><a href="[% loo.script_name %]?op=add_form&categorycode=[% loo.categorycode |url %]">Edit</a></td>
349 <td><a href="[% loo.script_name %]?op=delete_confirm&categorycode=[% loo.categorycode |url %]">Delete</a></td>
354 <div class="dialog alert">No categories have been defined. <a href="/cgi-bin/koha/admin/categorie.pl?op=add_form">Create a new category</a>.</div>
361 [% INCLUDE 'admin-menu.inc' %]
364 [% INCLUDE 'intranet-bottom.inc' %]