View | Details | Raw Unified | Return to bug 26211
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (+3 lines)
Lines 96-101 Link Here
96
                                [% IF field == "email_match" %]
96
                                [% IF field == "email_match" %]
97
                                    <li>Emails do not match! <a href="#borrower_repeat_email">confirm email address</a></li>
97
                                    <li>Emails do not match! <a href="#borrower_repeat_email">confirm email address</a></li>
98
                                [% END %]
98
                                [% END %]
99
                                [% IF field == "ERROR_age_limitations" %]
100
                                    <li>Patron's age is incorrect for their category. Ages allowed are [% age_low | html %]-[% age_high | html %].</li>
101
                                [% END %]
99
                            [% END %]
102
                            [% END %]
100
                        </ul>
103
                        </ul>
101
                        <span>Please correct and resubmit.</span>
104
                        <span>Please correct and resubmit.</span>
(-)a/opac/opac-memberentry.pl (-1 / +12 lines)
Lines 474-479 sub CheckForInvalidFields { Link Here
474
              push @invalidFields, 'password_has_whitespaces' if $error eq 'has_whitespaces';
474
              push @invalidFields, 'password_has_whitespaces' if $error eq 'has_whitespaces';
475
          }
475
          }
476
    }
476
    }
477
    
478
    if ($borrower->{'dateofbirth'}) {
479
        my $patron = Koha::Patron->new({ dateofbirth => $borrower->{'dateofbirth'} });
480
        my $age = $patron->get_age;
481
        my $borrowercategory = Koha::Patron::Categories->find( $borrower->{'categorycode'} );
482
        my ($low, $high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit);
483
        if (($high && ($age > $high)) or ($age < $low)) {
484
            push @invalidFields, 'ERROR_age_limitations';
485
            $template->param( age_low => $low);
486
            $template->param( age_high => $high);
487
        }
488
    }
477
489
478
    return \@invalidFields;
490
    return \@invalidFields;
479
}
491
}
480
- 

Return to bug 26211