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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (+6 lines)
Lines 124-129 Link Here
124
                        </div>
124
                        </div>
125
                    [% END %]
125
                    [% END %]
126
126
127
                    [% IF duplicate_found %]
128
                        <div class="alert alert-error">
129
                            <span>An existing account matching these details has been found, please contact a member of staff</span>
130
                        </div>
131
                    [% END %]
132
127
                    [% IF cardnumber_wrong_length || cardnumber_already_exists %]
133
                    [% IF cardnumber_wrong_length || cardnumber_already_exists %]
128
                        <div class="alert alert-error">
134
                        <div class="alert alert-error">
129
                            [% IF cardnumber_wrong_length %]
135
                            [% IF cardnumber_wrong_length %]
(-)a/opac/opac-memberentry.pl (-3 / +10 lines)
Lines 138-143 if ( $op eq 'cud-create' ) { Link Here
138
    my @empty_mandatory_fields =
138
    my @empty_mandatory_fields =
139
        ( CheckMandatoryFields( \%borrower, $op ), CheckMandatoryAttributes( \%borrower, $attributes ) );
139
        ( CheckMandatoryFields( \%borrower, $op ), CheckMandatoryAttributes( \%borrower, $attributes ) );
140
    my $invalidformfields = CheckForInvalidFields( { borrower => \%borrower, context => 'create' } );
140
    my $invalidformfields = CheckForInvalidFields( { borrower => \%borrower, context => 'create' } );
141
    my $match_result      = Koha::Patrons->check_for_existing_matches( \%borrower );
142
141
    delete $borrower{'password2'};
143
    delete $borrower{'password2'};
142
    my $is_cardnumber_valid;
144
    my $is_cardnumber_valid;
143
    if ( !grep { $_ eq 'cardnumber' } @empty_mandatory_fields ) {
145
    if ( !grep { $_ eq 'cardnumber' } @empty_mandatory_fields ) {
Lines 158-169 if ( $op eq 'cud-create' ) { Link Here
158
        }
160
        }
159
    }
161
    }
160
162
161
    if ( @empty_mandatory_fields || @$invalidformfields || !$is_cardnumber_valid || $conflicting_attribute ) {
163
    if (   @empty_mandatory_fields
164
        || @$invalidformfields
165
        || !$is_cardnumber_valid
166
        || $conflicting_attribute
167
        || $match_result->{duplicate_found} )
168
    {
162
169
163
        $template->param(
170
        $template->param(
164
            empty_mandatory_fields => \@empty_mandatory_fields,
171
            empty_mandatory_fields => \@empty_mandatory_fields,
165
            invalid_form_fields    => $invalidformfields,
172
            invalid_form_fields    => $invalidformfields,
166
            borrower               => \%borrower
173
            borrower               => \%borrower,
174
            duplicate_found        => $match_result->{duplicate_found}
167
        );
175
        );
168
        $template->param( patron_attribute_classes => GeneratePatronAttributesForm( undef, $attributes ) );
176
        $template->param( patron_attribute_classes => GeneratePatronAttributesForm( undef, $attributes ) );
169
    } elsif ( md5_base64( uc( $cgi->param('captcha') ) ) ne $cgi->param('captcha_digest') ) {
177
    } elsif ( md5_base64( uc( $cgi->param('captcha') ) ) ne $cgi->param('captcha_digest') ) {
170
- 

Return to bug 40082