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

(-)a/C4/Members/Attributes.pm (+2 lines)
Lines 388-394 sub _sort_by_code { Link Here
388
    $guarantor_attributes = get_guarantor_attributes();
388
    $guarantor_attributes = get_guarantor_attributes();
389
389
390
    returns an array reference containing attributes to be shared between guarantor and guarantee.
390
    returns an array reference containing attributes to be shared between guarantor and guarantee.
391
391
=cut
392
=cut
393
392
sub get_guarantor_shared_attributes{
394
sub get_guarantor_shared_attributes{
393
    my @attributes    = qw( streetnumber address address2 city state zipcode country branchcode phone phonepro mobile email emailpro fax );
395
    my @attributes    = qw( streetnumber address address2 city state zipcode country branchcode phone phonepro mobile email emailpro fax );
394
    if( my @additional = split(/\|/, C4::Context->preference("AdditionalGuarantorField")) ){
396
    if( my @additional = split(/\|/, C4::Context->preference("AdditionalGuarantorField")) ){
(-)a/C4/Utils/DataTables/Members.pm (-4 / +4 lines)
Lines 2-8 package C4::Utils::DataTables::Members; Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use C4::Context;
4
use C4::Context;
5
use C4::Members qw/GetMemberIssuesAndFines/;
5
use C4::Members;
6
use C4::Members::Attributes qw/get_guarantor_shared_attributes/;
6
use C4::Members::Attributes qw/get_guarantor_shared_attributes/;
7
use C4::Utils::DataTables;
7
use C4::Utils::DataTables;
8
use Koha::DateUtils;
8
use Koha::DateUtils;
Lines 49-62 sub search { Link Here
49
49
50
    }
50
    }
51
51
52
    my $dbh = C4::Context->dbh;
52
    $dbh = C4::Context->dbh;
53
    my @columns = qw( borrowernumber surname firstname streetnumber streettype address address2 city state zipcode country cardnumber dateexpiry borrowernotes branchcode email userid dateofbirth categorycode );
53
    my @columns = qw( borrowernumber surname firstname streetnumber streettype address address2 city state zipcode country cardnumber dateexpiry borrowernotes branchcode email userid dateofbirth categorycode );
54
    if( my @guarantor_attributes = @{ get_guarantor_shared_attributes() }){
54
    if( my @guarantor_attributes = @{ get_guarantor_shared_attributes() }){
55
        foreach my $item (@guarantor_attributes) {
55
        foreach my $item (@guarantor_attributes) {
56
             if (! grep {$_ eq $item} @columns) {
56
             if (! grep {$_ eq $item} @columns) {
57
                 push @columns, $item;
57
                 push @columns, $item;
58
	     }
58
            }
59
	}
59
        }
60
    };
60
    };
61
    my $borrowers_columns = "";
61
    my $borrowers_columns = "";
62
    foreach my $item (@columns) {
62
    foreach my $item (@columns) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt (-2 / +2 lines)
Lines 112-120 $(document).ready(function(){ Link Here
112
    $("body").on("click",".select_user",function(e){
112
    $("body").on("click",".select_user",function(e){
113
        e.preventDefault();
113
        e.preventDefault();
114
        var borrowernumber = $(this).data("borrowernumber");
114
        var borrowernumber = $(this).data("borrowernumber");
115
        var borrower_data = $("#borrower_data"+borrowernumber).val();
115
        var borrower_data = $("#guarantor_data"+borrowernumber).val();
116
        var guarantor_attributes = $("#guarantor_attributes").val();
116
        var guarantor_attributes = $("#guarantor_attributes").val();
117
        select_user( borrowernumber, JSON.parse(borrower_data), JSON.parse(guarantor_attributes) );
117
       select_user( borrowernumber, JSON.parse(borrower_data), JSON.parse(guarantor_attributes) );
118
    });
118
    });
119
119
120
});
120
});
(-)a/members/moremember.pl (-2 / +1 lines)
Lines 218-224 if ( $count ) { Link Here
218
( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' || $category_type eq 'I' );
218
( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' || $category_type eq 'I' );
219
219
220
if (my $guarantor = $patron->guarantor){
220
if (my $guarantor = $patron->guarantor){
221
	$template->param(isguarantor => 1);
221
    $template->param(isguarantor => 1);
222
    $template->param(guarantor => $guarantor);
222
    $template->param(guarantor => $guarantor);
223
}
223
}
224
224
225
- 

Return to bug 12446