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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (+3 lines)
Lines 1929-1934 legend:hover { Link Here
1929
            });
1929
            });
1930
        [% END %]
1930
        [% END %]
1931
        $("#guarantor_template").hide();
1931
        $("#guarantor_template").hide();
1932
        [% IF guarantor_attributes %]
1933
            guarantor_attributes = [% To.json(guarantor_attributes) %];
1934
        [% END %]
1932
1935
1933
        var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
1936
        var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
1934
        var PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %];
1937
        var PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %];
(-)a/koha-tmpl/intranet-tmpl/prog/js/members.js (+16 lines)
Lines 121-126 function select_user(borrowernumber, borrower, relationship) { Link Here
121
        if ( relationship ) {
121
        if ( relationship ) {
122
            fieldset.find('.new_guarantor_relationship').val(relationship);
122
            fieldset.find('.new_guarantor_relationship').val(relationship);
123
        }
123
        }
124
125
        if(typeof guarantor_attributes !== 'undefined') {
126
            $.ajax({
127
                url: '/api/v1/patrons/'+borrowernumber,
128
                method: "GET",
129
                dataType: 'json',
130
                success: function(data){
131
                    for (var i = 0; i < parseInt(guarantor_attributes.length, 10); i++) {
132
                        var attribute = guarantor_attributes[i];
133
                        if ( data[attribute] != null && document.forms.entryform[attribute].value == "" ) {
134
                            document.forms.entryform[attribute].value = data[attribute];
135
                        }
136
                    }
137
                }
138
            });
139
        }
124
    }
140
    }
125
141
126
    return 0;
142
    return 0;
(-)a/members/memberentry.pl (-1 / +1 lines)
Lines 597-602 if (C4::Context->preference("IndependentBranches")) { Link Here
597
# Define the fields to be pre-filled in guarantee records
597
# Define the fields to be pre-filled in guarantee records
598
my $prefillguarantorfields=C4::Context->preference("PrefillGuaranteeField");
598
my $prefillguarantorfields=C4::Context->preference("PrefillGuaranteeField");
599
my @prefill_fields=split(/\,/,$prefillguarantorfields);
599
my @prefill_fields=split(/\,/,$prefillguarantorfields);
600
$template->param( guarantor_attributes => \@prefill_fields );
600
601
601
if ($op eq 'add'){
602
if ($op eq 'add'){
602
    if ($guarantor_id) {
603
    if ($guarantor_id) {
603
- 

Return to bug 26597