|
Line 0
Link Here
|
| 0 |
- |
1 |
<!--Pragmas for using and including packages for create patron category--> |
|
|
2 |
[% USE Koha %] |
| 3 |
[% USE KohaDates %] |
| 4 |
[% USE Price %] |
| 5 |
[% INCLUDE 'doc-head-open.inc' %] |
| 6 |
[% INCLUDE 'doc-head-close.inc' %] |
| 7 |
[% INCLUDE 'calendar.inc' %] |
| 8 |
[% INCLUDE 'datatables.inc' %] |
| 9 |
|
| 10 |
|
| 11 |
<head> |
| 12 |
<title> Add a patron category</title> |
| 13 |
|
| 14 |
<!--JQuery scripts for create patron category--> |
| 15 |
<script type="text/javascript"> |
| 16 |
var MSG_CATEGORYCODE_CHARS = _("Category code can only contain the following characters: letters, numbers, - and _."); |
| 17 |
var MSG_BOTH_ENROLLMENTPERIODS = _("Please choose only one enrollment period setting."); |
| 18 |
var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date."); |
| 19 |
</script> |
| 20 |
<script type="text/javascript" src="[% themelang %]/js/categories.js"></script> |
| 21 |
<style type="text/css">#enrolmentmessage.hint { display : none; }</style> |
| 22 |
|
| 23 |
</head> |
| 24 |
|
| 25 |
[% IF (addpatroncategory) %] |
| 26 |
<!--Onboarding tool step 2-Create a patron category screen 1-->........ |
| 27 |
<div id="doc3" class="yui-t2"> |
| 28 |
<div id="bd"> |
| 29 |
<div id="yui-main"> |
| 30 |
<div class="yui-b"> |
| 31 |
[% FOR m IN messages %] |
| 32 |
<div class="dialog [% m.type %]"> |
| 33 |
[% SWITCH m.code %] |
| 34 |
[% CASE 'error_on_insert' %] |
| 35 |
An error occurred when inserting this patron category. The patron category might already exist. |
| 36 |
[% CASE 'success_on_insert' %] |
| 37 |
Patron category inserted successfully. |
| 38 |
[% CASE 'already_exists' %] |
| 39 |
This patron category already exists. |
| 40 |
[% CASE %] |
| 41 |
[% m.code %] |
| 42 |
[% END %] |
| 43 |
</div> |
| 44 |
[% END %] |
| 45 |
|
| 46 |
<form id="category_form" action="/cgi-bin/koha/admin/categories.pl" method="post"> |
| 47 |
<input type="hidden" name="step" value="2"/> |
| 48 |
<input type="hidden" name="op" value="add_validate" /> |
| 49 |
<input type="hidden" name="op" value="addpatroncategory"/> |
| 50 |
|
| 51 |
<h1 align="left"> New Patron Category</h2> |
| 52 |
<div style="border-width:5px;"> |
| 53 |
<fieldset class="rows"> |
| 54 |
<ol> |
| 55 |
<li> |
| 56 |
<label for="categorycode" class="required">Category code: </label> |
| 57 |
<input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required" re quir ed="required" /> |
| 58 |
<span class="required">Required</span> |
| 59 |
</li> |
| 60 |
|
| 61 |
<li> |
| 62 |
<label for="description" class="required">Description: </label> |
| 63 |
<input type="text" name="description" id="description" size="40" maxlength="80" class="required" requ ired="re quired" value="[% category.description |html %]" /> |
| 64 |
<span class="required">Required</span> |
| 65 |
</li> |
| 66 |
|
| 67 |
<li> |
| 68 |
<label for="overduenoticerequired">Overdue notice required: </label> |
| 69 |
<select name="overduenoticerequired" id="overduenoticerequired"> |
| 70 |
[% IF category.overduenoticerequired %] |
| 71 |
<option value="0">No</option> |
| 72 |
<option value="1" selected="selected">Yes</option> |
| 73 |
[% ELSE %] |
| 74 |
<option value="0" selected="selected">No</option> |
| 75 |
<option value="1">Yes</option> |
| 76 |
[% END %] |
| 77 |
</select> |
| 78 |
</li> |
| 79 |
|
| 80 |
<li> |
| 81 |
<label for="category_type" class="required">Category type: </label> |
| 82 |
<select name="category_type" id="category_type"> |
| 83 |
[% UNLESS category %] |
| 84 |
<option value="" selected="selected">Select a category type</option> |
| 85 |
[% ELSE %] |
| 86 |
<option value="">Select a category type</option> |
| 87 |
[% END %] |
| 88 |
|
| 89 |
[% IF category and category.category_type == 'A' %] |
| 90 |
<option value="A" selected="selected">Adult</ option> |
| 91 |
[% ELSE %] |
| 92 |
<option value="A">Adult</option> |
| 93 |
[% END %] |
| 94 |
|
| 95 |
[% IF category and category.category_type == 'C' %] |
| 96 |
<option value="C" selected="selected">Child</ option> |
| 97 |
[% ELSE %] |
| 98 |
<option value="C">Child</option>[% END %] |
| 99 |
|
| 100 |
[% IF category and category.category_type == 'S' %] |
| 101 |
<option value="S" selected="selected">Staff</option> |
| 102 |
[% ELSE %] |
| 103 |
<option value="S">Staff</option> |
| 104 |
[% END %] |
| 105 |
|
| 106 |
[% IF category and category.category_type == 'I' %] |
| 107 |
<option value="I" selected="selected">Organization</option> |
| 108 |
[% ELSE %] |
| 109 |
<option value="I">Organization</option> |
| 110 |
[% END %] |
| 111 |
|
| 112 |
[% IF category and category.category_type == 'P' %] |
| 113 |
<option value="P" selected="selected">Professional</option> |
| 114 |
[% ELSE %] |
| 115 |
<option value="P">Professional</option> |
| 116 |
[% END %] |
| 117 |
|
| 118 |
[% IF category and category.category_type == 'X' %] |
| 119 |
<option value="X" selected="selected">Statistical</option> |
| 120 |
[% ELSE %] |
| 121 |
<option value="X">Statistical</option> |
| 122 |
[% END %] |
| 123 |
</select> |
| 124 |
<span class="required">Required</span> |
| 125 |
</li> |
| 126 |
|
| 127 |
<li> |
| 128 |
<label for="default_privacy">Default privacy: </label> |
| 129 |
<select id="default_privacy" name="default_privacy"> |
| 130 |
[% SET default_privacy = 'default' %] |
| 131 |
|
| 132 |
[% IF category %] |
| 133 |
[% SET default_privacy = category.default_privacy %] |
| 134 |
[% END %] |
| 135 |
|
| 136 |
[% SWITCH default_privacy %] |
| 137 |
[% CASE 'forever' %] |
| 138 |
<option value="default">Default</option> |
| 139 |
<option value="never">Never</option> |
| 140 |
<option value="forever" selected="selected">Forever</option> |
| 141 |
[% CASE 'never' %] |
| 142 |
<option value="default">Default</option> |
| 143 |
<option value="never" selected="selected">Never</option> |
| 144 |
<option value="forever">Forever</option> |
| 145 |
[% CASE %] |
| 146 |
<option value="default" selected="selected">Default</option> |
| 147 |
<option value="never">Never</option> |
| 148 |
<option value="forever">Forever</option> |
| 149 |
[% END %] |
| 150 |
</select> |
| 151 |
<span>Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the amount of history kept is controlled by the cronjob <i>batch_anonymise.pl</i> which should be set up by your system administrator.</span> |
| 152 |
</li> |
| 153 |
|
| 154 |
<li> |
| 155 |
<span class="label">Enrollment period: </span> |
| 156 |
<fieldset> |
| 157 |
<legend>Choose one</legend> |
| 158 |
<ol> |
| 159 |
<li> |
| 160 |
<label for="enrolmentperiod" style="width:6em;">In months: </label> |
| 161 |
<input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperio d" size="3" maxlength="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months |
| 162 |
</li> |
| 163 |
<li> |
| 164 |
<label for="enrolmentperioddate" style="width:6em;">Until date: </label> |
| 165 |
<input type="text" class="enrollmentperiod" name="enrolmentperioddate" id="enrolmentp erioddate" value="[% category.enrolmentperioddate | $KohaDates %]" /> |
| 166 |
</li> |
| 167 |
</ol> |
| 168 |
</fieldset> |
| 169 |
</li> |
| 170 |
|
| 171 |
<fieldset class="action"> |
| 172 |
<input type="submit" value="Create Patron Category" /> |
| 173 |
</fieldset> |
| 174 |
</form> |
| 175 |
[% END %] |
| 176 |
|
| 177 |
[% IF (addpatroncategory) %] |
| 178 |
[% IF (categorycode) %] |
| 179 |
<form name="createpatroncategory" method="post" action="onboarding.pl">... |
| 180 |
<input type="hidden" name="op" value="addpatron"/> |
| 181 |
<h1 align="left"> New patron category</h1> |
| 182 |
<div style="border-width:5px;">. |
| 183 |
<p> Success: Patron category created!</p> |
| 184 |
<p> To add another patron category and for more settings<br> |
| 185 |
go to More->Administration->Patrons & Circulation->Patron Categories</p> |
| 186 |
</div> |
| 187 |
Next up: |
| 188 |
<input type="submit" value="Add a patron"> |
| 189 |
|
| 190 |
[% ELSE %] |
| 191 |
<p> Patron category was not successfully created</p> |
| 192 |
[% END %] |
| 193 |
[% END %] |
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|