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

(-)a/installer/onboarding.pl (-1 / +2 lines)
Lines 143-149 if ( $step == 3 ) { Link Here
143
143
144
        my $is_cardnumber_valid = Koha::Policy::Patrons::Cardnumber->is_valid($cardnumber);
144
        my $is_cardnumber_valid = Koha::Policy::Patrons::Cardnumber->is_valid($cardnumber);
145
        unless ( $is_cardnumber_valid ) {
145
        unless ( $is_cardnumber_valid ) {
146
            for my $message ( @{ $is_cardnumber_valid->messages } ) {
146
            for my $m ( @{ $is_cardnumber_valid->messages } ) {
147
                my $message = $m->message;
147
                if ( $message eq 'already_exists' ) {
148
                if ( $message eq 'already_exists' ) {
148
                    push @messages, { code => 'ERROR_cardnumber_already_exists' };
149
                    push @messages, { code => 'ERROR_cardnumber_already_exists' };
149
                }
150
                }
(-)a/members/memberentry.pl (-1 / +2 lines)
Lines 295-301 if ($op eq 'save' || $op eq 'insert'){ Link Here
295
295
296
    my $is_valid = Koha::Policy::Patrons::Cardnumber->is_valid($newdata{cardnumber}, $patron );
296
    my $is_valid = Koha::Policy::Patrons::Cardnumber->is_valid($newdata{cardnumber}, $patron );
297
    unless ($is_valid) {
297
    unless ($is_valid) {
298
        for my $message ( @{ $is_valid->messages } ) {
298
        for my $m ( @{ $is_valid->messages } ) {
299
            my $message = $m->message;
299
            if ( $message eq 'already_exists' ) {
300
            if ( $message eq 'already_exists' ) {
300
                push @messages, { code => 'ERROR_cardnumber_already_exists' };
301
                push @messages, { code => 'ERROR_cardnumber_already_exists' };
301
            } elsif ( $message eq 'invalid_length' ) {
302
            } elsif ( $message eq 'invalid_length' ) {
(-)a/opac/opac-memberentry.pl (-2 / +2 lines)
Lines 140-146 if ( $action eq 'create' ) { Link Here
140
        my $patron = Koha::Patrons->find($borrower{borrowernumber});
140
        my $patron = Koha::Patrons->find($borrower{borrowernumber});
141
        $is_cardnumber_valid = Koha::Policy::Patrons::Cardnumber->is_valid($borrower{cardnumber}, $patron);
141
        $is_cardnumber_valid = Koha::Policy::Patrons::Cardnumber->is_valid($borrower{cardnumber}, $patron);
142
        unless ($is_cardnumber_valid) {
142
        unless ($is_cardnumber_valid) {
143
            for my $message ( @{ $is_cardnumber_valid->messages } ) {
143
            for my $m ( @{ $is_cardnumber_valid->messages } ) {
144
                my $message = $m->message;
144
                if ( $message eq 'already_exists' ) {
145
                if ( $message eq 'already_exists' ) {
145
                    $template->param( cardnumber_already_exists => 1 );
146
                    $template->param( cardnumber_already_exists => 1 );
146
                } elsif ( $message eq 'invalid_length' ) {
147
                } elsif ( $message eq 'invalid_length' ) {
147
- 

Return to bug 33940