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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-1 / +4 lines)
Lines 143-149 legend.collapsed i.fa.fa-caret-down::before { Link Here
143
                        [% IF ( check_member ) %]
143
                        [% IF ( check_member ) %]
144
                            <div class="dialog alert">
144
                            <div class="dialog alert">
145
                                <h3>Duplicate patron record?</h3>
145
                                <h3>Duplicate patron record?</h3>
146
                                <p><a class="popup_patronview" href="/cgi-bin/koha/members/moremember.pl?print=brief&amp;borrowernumber=[% check_member | uri %]"><i class="fa-solid fa-window-restore"></i> View existing record</a></p>
146
                                <p>[%- INCLUDE 'patron-title.inc' patron => check_patron hide_patron_infos_if_needed => 1 -%]</p>
147
                                [% IF logged_in_user.can_see_patron_infos( check_patron ) %]
148
                                    <p><a class="popup_patronview" href="/cgi-bin/koha/members/moremember.pl?print=brief&amp;borrowernumber=[% check_member | uri %]"><i class="fa-solid fa-window-restore"></i> View existing record</a></p>
149
                                [% END %]
147
                                <a href="/cgi-bin/koha/members/memberentry.pl?op=edit_form&borrowernumber=[% check_member | uri %]" class="btn btn-default" id="duplicate"> <i class="fa-solid fa-pencil" aria-hidden="true"></i> It is a duplicate. Edit existing record </a>
150
                                <a href="/cgi-bin/koha/members/memberentry.pl?op=edit_form&borrowernumber=[% check_member | uri %]" class="btn btn-default" id="duplicate"> <i class="fa-solid fa-pencil" aria-hidden="true"></i> It is a duplicate. Edit existing record </a>
148
                                <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
151
                                <button type="submit" id="not-duplicate" class="new"> <i class="fa fa-plus"></i> Not a duplicate. Save as new record </button>
149
                            </div>
152
                            </div>
(-)a/members/memberentry.pl (-3 / +5 lines)
Lines 82-87 my $check_member = $input->param('check_member'); Link Here
82
my $nodouble     = $input->param('nodouble');
82
my $nodouble     = $input->param('nodouble');
83
my $duplicate    = $input->param('duplicate');
83
my $duplicate    = $input->param('duplicate');
84
my $quickadd     = $input->param('quickadd');
84
my $quickadd     = $input->param('quickadd');
85
my $check_patron;
85
86
86
$nodouble = 1 if ($op eq 'edit_form' or $op eq 'duplicate');    # FIXME hack to represent fact that if we're
87
$nodouble = 1 if ($op eq 'edit_form' or $op eq 'duplicate');    # FIXME hack to represent fact that if we're
87
                                     # modifying an existing patron, it ipso facto
88
                                     # modifying an existing patron, it ipso facto
Lines 249-256 if ( ( $op eq 'cud-insert' ) and !$nodouble ) { Link Here
249
    $nodouble = 1;
250
    $nodouble = 1;
250
    my $patrons = Koha::Patrons->search($conditions); # FIXME Should be search_limited?
251
    my $patrons = Koha::Patrons->search($conditions); # FIXME Should be search_limited?
251
    if ( $patrons->count > 0) {
252
    if ( $patrons->count > 0) {
252
        $nodouble = 0;
253
        $nodouble     = 0;
253
        $check_member = $patrons->next->borrowernumber;
254
        $check_patron = $patrons->next;
255
        $check_member = $check_patron->borrowernumber;
254
    }
256
    }
255
}
257
}
256
258
Lines 789-794 $template->param( Link Here
789
  BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript
791
  BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript
790
  destination   => $destination,#to know where u come from and where u must go in redirect
792
  destination   => $destination,#to know where u come from and where u must go in redirect
791
  check_member    => $check_member,#to know if the borrower already exist(=>1) or not (=>0) 
793
  check_member    => $check_member,#to know if the borrower already exist(=>1) or not (=>0) 
794
  check_patron    => $check_patron
792
);
795
);
793
796
794
$template->param(
797
$template->param(
795
- 

Return to bug 37562