Lines 6-34
Link Here
|
6 |
<title> Add a patron category</title> |
6 |
<title> Add a patron category</title> |
7 |
[% INCLUDE 'installer-doc-head-close.inc' %] |
7 |
[% INCLUDE 'installer-doc-head-close.inc' %] |
8 |
[% INCLUDE 'calendar.inc' %] |
8 |
[% INCLUDE 'calendar.inc' %] |
9 |
<script type="text/javascript"> |
|
|
10 |
var MSG_CATEGORYCODE_CHARS = (_("Category code can only contain the following characters: letters, numbers, - and _.")); |
11 |
var MSG_ONE_ENROLLMENTPERIOD =(_("Please choose an enrollment period in months OR by date.")); |
12 |
</script> |
13 |
<script type="text/javascript"> |
14 |
jQuery.validator.addMethod( "letters_numbers", function(value,element){ |
15 |
var patt = /^[a-zA-Z0-9\-_]+$/g; |
16 |
if (patt.test(element.value)) { |
17 |
return true; |
18 |
} else { |
19 |
return false; |
20 |
} |
21 |
}, MSG_CATEGORYCODE_CHARS); |
22 |
|
9 |
|
23 |
jQuery.validator.addMethod( "enrollment_period", function(){ |
10 |
<script type="text/javascript"> |
24 |
enrolmentperiod = $("#enrolmentperiod").val(); |
11 |
//<![CDATA[ |
25 |
enrolmentperioddate = $("#enrolmentperioddate").val(); |
|
|
26 |
if ( $("#enrolmentperiod").val() !== "" && $("#enrolmentperioddate").val() !== "" ) { |
27 |
return false; |
28 |
} else { |
29 |
return true; |
30 |
} |
31 |
}, MSG_ONE_ENROLLMENTPERIOD); |
32 |
|
12 |
|
33 |
var debug = ""; |
13 |
var debug = ""; |
34 |
var dformat = "us"; |
14 |
var dformat = "us"; |
Lines 37-243
if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug
Link Here
|
37 |
var MSG_PLEASE_ENTER_A_VALID_DATE = (_("Please enter a valid date (should match %s).")); |
17 |
var MSG_PLEASE_ENTER_A_VALID_DATE = (_("Please enter a valid date (should match %s).")); |
38 |
|
18 |
|
39 |
function is_valid_date(date) { |
19 |
function is_valid_date(date) { |
40 |
// An empty string is considered as a valid date for convenient reasons. |
20 |
// An empty string is considered as a valid date for convenient reasons. |
41 |
if ( date === '' ) return 1; |
21 |
if ( date === '' ) return 1; |
42 |
var dateformat = dateformat_str = 'us'; |
22 |
var dateformat = dateformat_str = 'us'; |
43 |
if ( dateformat == 'us' ) { |
23 |
if ( dateformat == 'us' ) { |
44 |
if ( date.search(/^\d{2}\/\d{2}\/\d{4}($|\s)/) == -1 ) return 0; |
24 |
if ( date.search(/^\d{2}\/\d{2}\/\d{4}($|\s)/) == -1 ) return 0; |
45 |
dateformat = 'mm/dd/yy'; |
25 |
dateformat = 'mm/dd/yy'; |
46 |
} else if ( dateformat == 'metric' ) { |
26 |
} else if ( dateformat == 'metric' ) { |
47 |
if ( date.search(/^\d{2}\/\d{2}\/\d{4}($|\s)/) == -1 ) return 0; |
27 |
if ( date.search(/^\d{2}\/\d{2}\/\d{4}($|\s)/) == -1 ) return 0; |
48 |
dateformat = 'dd/mm/yy'; |
28 |
dateformat = 'dd/mm/yy'; |
49 |
} else if (dateformat == 'iso' ) { |
29 |
} else if (dateformat == 'iso' ) { |
50 |
if ( date.search(/^\d{4}-\d{2}-\d{2}($|\s)/) == -1 ) return 0; |
30 |
if ( date.search(/^\d{4}-\d{2}-\d{2}($|\s)/) == -1 ) return 0; |
51 |
dateformat = 'yy-mm-dd'; |
31 |
dateformat = 'yy-mm-dd'; |
52 |
} else if ( dateformat == 'dmydot' ) { |
32 |
} else if ( dateformat == 'dmydot' ) { |
53 |
if ( date.search(/^\d{2}\.\d{2}\.\d{4}($|\s)/) == -1 ) return 0; |
33 |
if ( date.search(/^\d{2}\.\d{2}\.\d{4}($|\s)/) == -1 ) return 0; |
54 |
dateformat = 'dd.mm.yy'; |
34 |
dateformat = 'dd.mm.yy'; |
55 |
} |
35 |
} |
56 |
try { |
36 |
try { |
57 |
$.datepicker.parseDate(dateformat, date); |
37 |
$.datepicker.parseDate(dateformat, date); |
58 |
} catch (e) { |
38 |
} catch (e) { |
59 |
return 0; |
39 |
return 0; |
60 |
}; |
40 |
}; |
61 |
return 1; |
41 |
return 1; |
62 |
} |
42 |
}function get_dateformat_str(dateformat) { |
63 |
|
43 |
var dateformat_str; |
64 |
function get_dateformat_str(dateformat) { |
44 |
if ( dateformat == 'us' ) { |
65 |
var dateformat_str; |
45 |
dateformat_str = 'mm/dd/yyyy'; |
66 |
if ( dateformat == 'us' ) { |
46 |
} else if ( dateformat == 'metric' ) { |
67 |
dateformat_str = 'mm/dd/yyyy'; |
47 |
dateformat_str = 'dd/mm/yyyy'; |
68 |
} else if ( dateformat == 'metric' ) { |
48 |
} else if (dateformat == 'iso' ) { |
69 |
dateformat_str = 'dd/mm/yyyy'; |
49 |
dateformat_str = 'yyyy-mm-dd'; |
70 |
} else if (dateformat == 'iso' ) { |
50 |
} else if ( dateformat == 'dmydot' ) { |
71 |
dateformat_str = 'yyyy-mm-dd'; |
51 |
dateformat_str = 'dd.mm.yyyy'; |
72 |
} else if ( dateformat == 'dmydot' ) { |
52 |
} |
73 |
dateformat_str = 'dd.mm.yyyy'; |
53 |
return dateformat_str; |
74 |
} |
|
|
75 |
return dateformat_str; |
76 |
} |
54 |
} |
77 |
|
55 |
|
78 |
function validate_date (dateText, inst) { |
56 |
function validate_date (dateText, inst) { |
79 |
if ( !is_valid_date(dateText) ) { |
57 |
if ( !is_valid_date(dateText) ) { |
80 |
var dateformat_str = get_dateformat_str( 'us' ); |
58 |
var dateformat_str = get_dateformat_str( 'us' ); |
81 |
alert(MSG_PLEASE_ENTER_A_VALID_DATE.format(dateformat_str)); |
59 |
alert(MSG_PLEASE_ENTER_A_VALID_DATE.format(dateformat_str)); |
82 |
$('#'+inst.id).val(''); |
60 |
$('#'+inst.id).val(''); |
83 |
} |
61 |
} |
84 |
} |
62 |
} |
85 |
|
|
|
86 |
function Date_from_syspref(dstring) { |
63 |
function Date_from_syspref(dstring) { |
87 |
var dateX = dstring.split(/[-/.]/); |
64 |
var dateX = dstring.split(/[-/.]/); |
88 |
if (debug > 1 && sentmsg < 1) {sentmsg++; alert("Date_from_syspref(" + dstring + ") splits to:\n" + dateX.join("\n"));} |
65 |
if (debug > 1 && sentmsg < 1) {sentmsg++; alert("Date_from_syspref(" + dstring + ") splits to:\n" + dateX.join("\n"));} |
89 |
if (dformat === "iso") { |
66 |
if (dformat === "iso") { |
90 |
return new Date(dateX[0], (dateX[1] - 1), dateX[2]); // YYYY-MM-DD to (YYYY,m(0-11),d) |
67 |
return new Date(dateX[0], (dateX[1] - 1), dateX[2]); // YYYY-MM-DD to (YYYY,m(0-11),d) |
91 |
} else if (dformat === "us") { |
68 |
} else if (dformat === "us") { |
92 |
return new Date(dateX[2], (dateX[0] - 1), dateX[1]); // MM/DD/YYYY to (YYYY,m(0-11),d) |
69 |
return new Date(dateX[2], (dateX[0] - 1), dateX[1]); // MM/DD/YYYY to (YYYY,m(0-11),d) |
93 |
} else if (dformat === "metric") { |
70 |
} else if (dformat === "metric") { |
94 |
return new Date(dateX[2], (dateX[1] - 1), dateX[0]); // DD/MM/YYYY to (YYYY,m(0-11),d) |
71 |
return new Date(dateX[2], (dateX[1] - 1), dateX[0]); // DD/MM/YYYY to (YYYY,m(0-11),d) |
95 |
} else if (dformat === "dmydot") { |
72 |
} else if (dformat === "dmydot") { |
96 |
return new Date(dateX[2], (dateX[1] - 1), dateX[0]); // DD.MM.YYYY to (YYYY,m(0-11),d) |
73 |
return new Date(dateX[2], (dateX[1] - 1), dateX[0]); // DD.MM.YYYY to (YYYY,m(0-11),d) |
97 |
} else { |
74 |
} else { |
98 |
if (debug > 0) {alert("KOHA ERROR - Unrecognized date format: " +dformat);} |
75 |
if (debug > 0) {alert("KOHA ERROR - Unrecognized date format: " +dformat);} |
99 |
return 0; |
76 |
return 0; |
100 |
} |
77 |
} |
101 |
} |
78 |
} |
102 |
|
79 |
|
103 |
function DateTime_from_syspref(date_time) { |
80 |
function DateTime_from_syspref(date_time) { |
104 |
var parts = date_time.split(" "); |
81 |
var parts = date_time.split(" "); |
105 |
var date = parts[0]; |
82 |
var date = parts[0]; |
106 |
var time = parts[1]; |
83 |
var time = parts[1]; |
107 |
parts = time.split(":"); |
84 |
parts = time.split(":"); |
108 |
var hour = parts[0]; |
85 |
var hour = parts[0]; |
109 |
var minute = parts[1]; |
86 |
var minute = parts[1]; |
110 |
if ( hour < 0 || hour > 23 ) { |
87 |
if ( hour < 0 || hour > 23 ) { |
111 |
return 0; |
88 |
return 0; |
112 |
} |
89 |
} |
113 |
if ( minute < 0 || minute > 59 ) { |
90 |
if ( minute < 0 || minute > 59 ) { |
114 |
return 0; |
91 |
return 0; |
115 |
} |
92 |
} |
116 |
var datetime = Date_from_syspref( date ); |
93 |
var datetime = Date_from_syspref( date ); |
117 |
if ( isNaN( datetime.getTime() ) ) { |
94 |
if ( isNaN( datetime.getTime() ) ) { |
118 |
return 0; |
95 |
return 0; |
119 |
} |
96 |
} |
120 |
datetime.setHours( hour ); |
97 |
datetime.setHours( hour ); |
121 |
datetime.setMinutes( minute ); |
98 |
datetime.setMinutes( minute ); |
122 |
return datetime; |
99 |
return datetime; |
123 |
} |
100 |
} |
124 |
|
101 |
|
125 |
|
|
|
126 |
/* Instead of including multiple localization files as you would normally see with |
102 |
/* Instead of including multiple localization files as you would normally see with |
127 |
jQueryUI we expose the localization strings in the default configuration */ |
103 |
jQueryUI we expose the localization strings in the default configuration */ |
128 |
jQuery(function($){ |
104 |
jQuery(function($){ |
129 |
$.datepicker.regional[''] = { |
105 |
$.datepicker.regional[''] = { |
130 |
closeText: _("Done"), |
106 |
closeText: _("Done"), |
131 |
prevText: _("Prev"), |
107 |
prevText: _("Prev"), |
132 |
nextText: _("Next"), |
108 |
nextText: _("Next"), |
133 |
currentText: _("Today"), |
109 |
currentText: _("Today"), |
134 |
monthNames: [_("January"),_("February"),_("March"),_("April"),_("May"),_("June"), |
110 |
monthNames: [_("January"),_("February"),_("March"),_("April"),_("May"),_("June"), |
135 |
_("July"),_("August"),_("September"),_("October"),_("November"),_("December")], |
111 |
_("July"),_("August"),_("September"),_("October"),_("November"),_("December")], |
136 |
monthNamesShort: [_("Jan"), _("Feb"), _("Mar"), _("Apr"), _("May"), _("Jun"), |
112 |
monthNamesShort: [_("Jan"), _("Feb"), _("Mar"), _("Apr"), _("May"), _("Jun"), |
137 |
_("Jul"), _("Aug"), _("Sep"), _("Oct"), _("Nov"), _("Dec")], |
113 |
_("Jul"), _("Aug"), _("Sep"), _("Oct"), _("Nov"), _("Dec")], |
138 |
dayNames: [_("Sunday"), _("Monday"), _("Tuesday"), _("Wednesday"), _("Thursday"), _("Friday"), _("Saturday")], |
114 |
dayNames: [_("Sunday"), _("Monday"), _("Tuesday"), _("Wednesday"), _("Thursday"), _("Friday"), _("Saturday")], |
139 |
dayNamesShort: [_("Sun"), _("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat")], |
115 |
dayNamesShort: [_("Sun"), _("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat")], |
140 |
dayNamesMin: [_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa")], |
116 |
dayNamesMin: [_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa")], |
141 |
weekHeader: _("Wk"), |
117 |
weekHeader: _("Wk"), |
142 |
dateFormat: "mm/dd/yy", |
118 |
dateFormat: "mm/dd/yy", |
143 |
firstDay: 0, |
119 |
firstDay: 0, |
144 |
isRTL: false, |
120 |
isRTL: false, |
145 |
showMonthAfterYear: false, |
121 |
showMonthAfterYear: false, |
146 |
yearSuffix: ''}; |
122 |
yearSuffix: ''}; |
147 |
$.datepicker.setDefaults($.datepicker.regional['']); |
123 |
$.datepicker.setDefaults($.datepicker.regional['']); |
148 |
}); |
124 |
}); |
149 |
|
125 |
|
150 |
$(document).ready(function(){ |
126 |
$(document).ready(function(){ |
151 |
|
127 |
$.datepicker.setDefaults({ |
152 |
$.datepicker.setDefaults({ |
128 |
showOn: "both", |
153 |
showOn: "both", |
129 |
changeMonth: true, |
154 |
changeMonth: true, |
130 |
changeYear: true, |
155 |
changeYear: true, |
131 |
buttonImage: '/intranet-tmpl/prog/img/famfamfam/silk/calendar.png', |
156 |
buttonImage: '/intranet-tmpl/prog/img/famfamfam/silk/calendar.png', |
132 |
buttonImageOnly: true, |
157 |
buttonImageOnly: true, |
133 |
showButtonPanel: true, |
158 |
showButtonPanel: true, |
134 |
showOtherMonths: true, |
159 |
showOtherMonths: true, |
135 |
selectOtherMonths: true |
160 |
selectOtherMonths: true |
136 |
}); |
161 |
}); |
137 |
$( ".datepicker" ).datepicker({ |
162 |
$( ".datepicker" ).datepicker({ |
|
|
163 |
onClose: function(dateText, inst) { |
164 |
validate_date(dateText, inst); |
165 |
}, |
166 |
}).on("change", function(e, value) { |
167 |
if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");} |
168 |
}); |
169 |
// http://jqueryui.com/demos/datepicker/#date-range |
170 |
var dates = $( ".datepickerfrom, .datepickerto" ).datepicker({ |
171 |
changeMonth: true, |
172 |
numberOfMonths: 1, |
173 |
onSelect: function( selectedDate ) { |
174 |
var option = this.id == "from" ? "minDate" : "maxDate", |
175 |
instance = $( this ).data( "datepicker" ); |
176 |
date = $.datepicker.parseDate( |
177 |
instance.settings.dateFormat || |
178 |
$.datepicker._defaults.dateFormat, |
179 |
selectedDate, instance.settings ); |
180 |
dates.not( this ).datepicker( "option", option, date ); |
181 |
}, |
182 |
onClose: function(dateText, inst) { |
138 |
onClose: function(dateText, inst) { |
183 |
validate_date(dateText, inst); |
139 |
validate_date(dateText, inst); |
184 |
}, |
140 |
}, |
185 |
}).on("change", function(e, value) { |
141 |
}).on("change", function(e, value) { |
186 |
if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");} |
142 |
if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");} |
187 |
}); |
143 |
}); |
|
|
144 |
// http://jqueryui.com/demos/datepicker/#date-range |
145 |
var dates = $( ".datepickerfrom, .datepickerto" ).datepicker({ |
146 |
changeMonth: true, |
147 |
numberOfMonths: 1, |
148 |
onSelect: function( selectedDate ) { |
149 |
var option = this.id == "from" ? "minDate" : "maxDate", |
150 |
instance = $( this ).data( "datepicker" ); |
151 |
date = $.datepicker.parseDate( |
152 |
instance.settings.dateFormat || |
153 |
$.datepicker._defaults.dateFormat, |
154 |
selectedDate, instance.settings ); |
155 |
dates.not( this ).datepicker( "option", option, date ); |
156 |
}, |
157 |
onClose: function(dateText, inst) { |
158 |
validate_date(dateText, inst); |
159 |
}, |
160 |
}).on("change", function(e, value) { |
161 |
if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");} |
162 |
}); |
188 |
}); |
163 |
}); |
|
|
164 |
//]]> |
165 |
</script> |
189 |
|
166 |
|
190 |
$(document).ready(function(){ |
167 |
|
191 |
$("#category_form").validate({ |
168 |
<script type="text/javascript"> |
192 |
rules: { |
169 |
var MSG_CATEGORYCODE_CHARS=(_("Please only enter letters into this field.")); |
193 |
categorycode: { |
170 |
var MSG_ONE_ENROLLMENTPERIOD =(_("Please choose an enrollment period in months OR by date.")); |
194 |
required: true, |
171 |
var MSG_ONLY_ONE_ENROLLMENTPERIOD=(_("Please only choose one enrolment period.")); |
195 |
letters_numbers: true |
172 |
var MSG_DESCRIPTION_LETTERS_ONLY=(_("Please only enter letters.")); |
196 |
}, |
|
|
197 |
description: "required", |
198 |
enrolmentperiod: { |
199 |
required: function(element){ |
200 |
return $("#enrolmentperioddate").val() === ""; |
201 |
}, |
202 |
digits: true, |
203 |
enrollment_period: true |
204 |
}, |
205 |
enrolmentperioddate: { |
206 |
required: function(element){ |
207 |
return $("#enrolmentperiod").val() === ""; |
208 |
}, |
209 |
enrollment_period: true |
210 |
}, |
211 |
dateofbirthrequired: { |
212 |
digits: true |
213 |
}, |
214 |
upperagelimit: { |
215 |
digits: true |
216 |
}, |
217 |
enrolmentfee: { |
218 |
number: true |
219 |
}, |
220 |
reservefee: { |
221 |
number: true |
222 |
}, |
223 |
category_type: { |
224 |
required: true |
225 |
} |
226 |
}, |
227 |
messages: { |
228 |
enrolmentperiod: { |
229 |
required: MSG_ONE_ENROLLMENTPERIOD |
230 |
}, |
231 |
enrolmentperioddate: { |
232 |
required: MSG_ONE_ENROLLMENTPERIOD |
233 |
} |
234 |
} |
235 |
|
236 |
}); |
237 |
|
238 |
}) |
239 |
</script> |
173 |
</script> |
240 |
|
174 |
|
|
|
175 |
<script type="text/javascript"> |
176 |
jQuery.validator.addMethod( "category_code_check", function(value,element){ |
177 |
var patt = /^[A-Za-z]{0,10}$/g; |
178 |
if (patt.test(element.value)) { |
179 |
return true; |
180 |
} else { |
181 |
return false; |
182 |
} |
183 |
}, MSG_CATEGORYCODE_CHARS |
184 |
); |
185 |
jQuery.validator.addMethod( "letters_only", function(value,element){ |
186 |
var patt =/^[A-Za-z ]{0,30}$/g; |
187 |
if (patt.test(element.value)){ |
188 |
return true; |
189 |
} else { |
190 |
return false; |
191 |
} |
192 |
}, MSG_DESCRIPTION_LETTERS_ONLY |
193 |
); |
194 |
|
195 |
jQuery.validator.addMethod( "enrollment_period", function(){ |
196 |
enrolmentperiod = $("#enrolmentperiod").val(); |
197 |
enrolmentperioddate = $("#enrolmentperioddate").val(); |
198 |
if (( $("#enrolmentperiod").val() == "" && $("#enrolmentperioddate").val() == "") || ($("#enrolmentperiod").val() !== "" && $("#enrolmentperioddate").val() !== "")) { |
199 |
return false; |
200 |
} else { |
201 |
return true; |
202 |
} |
203 |
}, MSG_ONLY_ONE_ENROLLMENTPERIOD |
204 |
); |
205 |
|
206 |
$(document).ready(function() { |
207 |
$("#enrolmentperioddate").datepicker({ |
208 |
minDate: 1 |
209 |
}); // Require that "until date" be in the future |
210 |
if ($("#branches option:selected").length < 1) { |
211 |
$("#branches option:first").attr("selected", "selected"); |
212 |
} |
213 |
$("#categorycode").on("blur",function(){ |
214 |
toUC(this); |
215 |
}); |
216 |
$("#category_form").validate({ |
217 |
rules: { |
218 |
categorycode: { |
219 |
required: true, |
220 |
category_code_check: true |
221 |
}, |
222 |
description: { |
223 |
required:true, |
224 |
letters_only: true |
225 |
}, |
226 |
enrolmentperiod: { |
227 |
required: function(element){ |
228 |
return $("#enrolmentperioddate").val() === ""; |
229 |
}, |
230 |
digits: true, |
231 |
enrollment_period: true, |
232 |
}, |
233 |
enrolmentperioddate: { |
234 |
required: function(element){ |
235 |
return $("#enrolmentperiod").val() === ""; |
236 |
}, |
237 |
enrollment_period: true, |
238 |
// is_valid_date ($(#"enrolementperioddate").val()); |
239 |
}, |
240 |
dateofbirthrequired: { |
241 |
digits: true |
242 |
}, |
243 |
upperagelimit: { |
244 |
digits: true |
245 |
}, |
246 |
enrolmentfee: { |
247 |
number: true |
248 |
}, |
249 |
reservefee: { |
250 |
number: true |
251 |
}, |
252 |
category_type: { |
253 |
required: true |
254 |
} |
255 |
}, |
256 |
messages: { |
257 |
enrolmentperiod: { |
258 |
required: MSG_ONE_ENROLLMENTPERIOD |
259 |
}, |
260 |
enrolmentperioddate: { |
261 |
required: MSG_ONE_ENROLLMENTPERIOD |
262 |
} |
263 |
} |
264 |
}); |
265 |
}); |
266 |
|
267 |
</script> |
241 |
</head> |
268 |
</head> |
242 |
|
269 |
|
243 |
<div> <!-- Header that appears at the top of every screen in the koha onboarding tool--> |
270 |
<div> <!-- Header that appears at the top of every screen in the koha onboarding tool--> |
Lines 265-271
$(document).ready(function(){
Link Here
|
265 |
<div> |
292 |
<div> |
266 |
<p> Success: Patron category created! </p> |
293 |
<p> Success: Patron category created! </p> |
267 |
<p> To add another patron category and for more settings<br> |
294 |
<p> To add another patron category and for more settings<br> |
268 |
go to More->Administration->Patrons & Circulation->Patron Categories</p> |
295 |
go to:<br> |
|
|
296 |
More->Administration->Patron categories<br> |
297 |
OR<br> |
298 |
Administration->Patron categories</p> |
269 |
</div> |
299 |
</div> |
270 |
Next up:<br> |
300 |
Next up:<br> |
271 |
<input type="submit" name="start" value="Add a patron"><!-- When the user clicks on this button then redirect them to step 3 of the onboarding tool--> |
301 |
<input type="submit" name="start" value="Add a patron"><!-- When the user clicks on this button then redirect them to step 3 of the onboarding tool--> |
Lines 280-298
$(document).ready(function(){
Link Here
|
280 |
</div> |
310 |
</div> |
281 |
<input type="submit" value="Try again"/> |
311 |
<input type="submit" value="Try again"/> |
282 |
</form> |
312 |
</form> |
283 |
[% END %] |
313 |
[% END %] |
284 |
|
314 |
|
285 |
|
315 |
|
286 |
[% ELSE %] <!--Else display create patron category screen 1 where the user can input values to create their first patron category--> |
316 |
[% ELSE %] <!--Else display create patron category screen 1 where the user can input values to create their first patron category--> |
287 |
<h1 align="left"> Create a new Patron Category testing rwq</h1> |
317 |
<h1 align="left"> Create a new Patron Category</h1> |
288 |
<form id="category_form" method="post" action="onboarding.pl"> |
318 |
<form id="category_form" method="post" action="onboarding.pl"> |
289 |
<fieldset class="rows"> |
319 |
<fieldset class="rows"> |
290 |
<input type="hidden" name="step" value="2"/> |
320 |
<input type="hidden" name="step" value="2"/> |
291 |
<input type="hidden" name="createcat" value="createcat" /> |
321 |
<input type="hidden" name="createcat" value="createcat" /> |
292 |
<ol> |
322 |
<ol> |
293 |
<li> |
323 |
<li> |
294 |
<label for="categorycode" class="required">Category code: </label> |
324 |
<label for="categorycode" class="required">Category code: </label> |
295 |
<input type="text" pattern="^[A-Z]{1,2}" title="Please enter 1 or 2 capital letters" name="categorycode" value="[% category.categorycode |html %]" size="10" maxlength="10" class="required" required="required" /> |
325 |
<input type="text" pattern="^[A-Za-z]{0,10}$" title="Please enter 1 or 2 capital letters" id="categorycode" name="categorycode" value="[% category.categorycode |html %]" size="10" maxlength="10" class="required" required="required" /> |
296 |
<span class="required">Required</span> |
326 |
<span class="required">Required</span> |
297 |
</li> |
327 |
</li> |
298 |
|
328 |
|
Lines 361-375
$(document).ready(function(){
Link Here
|
361 |
<ol> |
391 |
<ol> |
362 |
<li> |
392 |
<li> |
363 |
<label for="enrolmentperiod" style="width:6em;">In months: </label> |
393 |
<label for="enrolmentperiod" style="width:6em;">In months: </label> |
364 |
<input type="number" min="0" class="enrollmentperiod" name="enrolmentperiod" size="3" maxlength="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months |
394 |
<input type="number" min="0" class="enrolmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months |
365 |
</li> |
395 |
</li> |
366 |
<li> |
396 |
<li> |
367 |
<label for="enrolmentperioddate" style="width:6em;">Until date: </label> |
397 |
<label for="enrolmentperioddate" style="width:6em;">Until date: </label> |
368 |
<input type="text" class="enrollmentperiod" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" /> |
398 |
<input type="text" class="enrolmentperioddate datepicker" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" /> |
369 |
<img class="ui-datepicker-trigger" src="/intranet-tmpl/prog/img/famfamfam/silk/calendar.png" alt="..." title="..."> |
|
|
370 |
|
371 |
|
372 |
|
373 |
</li> |
399 |
</li> |
374 |
</ol> |
400 |
</ol> |
375 |
</fieldset> |
401 |
</fieldset> |