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 1968-1973 legend:hover { Link Here
1968
            });
1968
            });
1969
        [% END %]
1969
        [% END %]
1970
        $("#guarantor_template").hide();
1970
        $("#guarantor_template").hide();
1971
        [% IF guarantor_attributes %]
1972
            guarantor_attributes = [% To.json(guarantor_attributes) %];
1973
        [% END %]
1971
1974
1972
        var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
1975
        var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
1973
        var PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %];
1976
        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 625-630 if (C4::Context->preference("IndependentBranches")) { Link Here
625
# Define the fields to be pre-filled in guarantee records
625
# Define the fields to be pre-filled in guarantee records
626
my $prefillguarantorfields=C4::Context->preference("PrefillGuaranteeField");
626
my $prefillguarantorfields=C4::Context->preference("PrefillGuaranteeField");
627
my @prefill_fields=split(/\,/,$prefillguarantorfields);
627
my @prefill_fields=split(/\,/,$prefillguarantorfields);
628
$template->param( guarantor_attributes => \@prefill_fields );
628
629
629
if ($op eq 'add'){
630
if ($op eq 'add'){
630
    if ($guarantor_id) {
631
    if ($guarantor_id) {
631
- 

Return to bug 26597