Browse Source

Bug 16285 - write_age() function throws error for patron categories that don't include dateofbirth in form

To test:
1 Add a patron in category Library or School
2 Note the js error in the console
3 Apply patch
4 Repeat and note the error is gone

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>

Made it an explicit if, and fixed the author of the commit

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
new_12478_elasticsearch
Nick Clemens 8 years ago
committed by Brendan Gallagher
parent
commit
41549bf3f4
  1. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

4
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

@ -18,7 +18,9 @@ $(document).ready(function() {
[% END %]
$("#dateofbirth").datepicker({ maxDate: "-1D", yearRange: "c-120:" });
dateformat = $("#dateofbirth").siblings(".hint").first().html();
write_age();
if( $('#dateofbirth').length ) {
write_age();
}
$("#entryform").validate({
rules: {
email: {

Loading…
Cancel
Save