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

(-)a/C4/Members/Attributes.pm (-4 / +3 lines)
Lines 374-383 sub _sort_by_code { Link Here
374
=cut
374
=cut
375
375
376
sub get_guarantor_shared_attributes{
376
sub get_guarantor_shared_attributes{
377
    my @attributes    = qw( streetnumber address address2 city state zipcode country branchcode phone phonepro mobile email emailpro fax );
377
    my @attributes;
378
    if( my @additional = split(/\|/, C4::Context->preference("AdditionalGuarantorField")) ){
378
    if( @attributes = split(/\|/, C4::Context->preference("GuarantorFields")) ){
379
        $_ =~ s/(?:^\s+)|(?:\s+$)//g for (@additional); # Trim whitespaces
379
        $_ =~ s/(?:^\s+)|(?:\s+$)//g for (@attributes); # Trim whitespaces
380
        @attributes = ( @attributes, @additional);
381
    }
380
    }
382
    return \@attributes;
381
    return \@attributes;
383
}
382
}
(-)a/installer/data/mysql/atomicupdate/bug_12446-EnableAdultGarantee.sql (-1 / +1 lines)
Lines 2-8 Link Here
2
-- SYSPREFS --
2
-- SYSPREFS --
3
-- ******** --
3
-- ******** --
4
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
4
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
5
VALUES ('AdditionalGuarantorField','',NULL,'Additional fields name to be transfer from guarantor to guarantee.','free');
5
VALUES ('GuarantorFields', 'streetnumber|address|address2|city|state|zipcode|country|branchcode|phonepro|mobile|email|emailpro|fax', NULL, 'Fields to be transfered from guarantor to guarantee.', 'free')
6
6
7
-- ********* --
7
-- ********* --
8
-- STRUCTURE --
8
-- STRUCTURE --
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 8-14 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
8
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'),
8
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'),
9
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
9
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
10
('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'),
10
('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'),
11
('AdditionalGuarantorField','',NULL,'Additional fields name to be transfer from guarantor to guarantee.','free'),
12
('AddressFormat','us','us|de|fr','Choose format to display postal addresses', 'Choice'),
11
('AddressFormat','us','us|de|fr','Choose format to display postal addresses', 'Choice'),
13
('AdlibrisCoversEnabled','0',NULL,'Display cover images in OPAC results and detail listing from Swedish retailer Adlibris.','YesNo'),
12
('AdlibrisCoversEnabled','0',NULL,'Display cover images in OPAC results and detail listing from Swedish retailer Adlibris.','YesNo'),
14
('AdlibrisCoversURL','http://www.adlibris.com/se/organisationer/showimagesafe.aspx',NULL,'Base URL for Adlibris cover image web service.','Free'),
13
('AdlibrisCoversURL','http://www.adlibris.com/se/organisationer/showimagesafe.aspx',NULL,'Base URL for Adlibris cover image web service.','Free'),
Lines 208-213 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
208
('GoogleOpenIDConnectDefaultBranch',  '','','This branch code will be used to create Google OpenID Connect patrons.','Textarea'),
207
('GoogleOpenIDConnectDefaultBranch',  '','','This branch code will be used to create Google OpenID Connect patrons.','Textarea'),
209
('GoogleOpenIDConnectDefaultCategory','','','This category code will be used to create Google OpenID Connect patrons.','Textarea'),
208
('GoogleOpenIDConnectDefaultCategory','','','This category code will be used to create Google OpenID Connect patrons.','Textarea'),
210
('GoogleOpenIDConnectDomain', '', NULL, 'Restrict Google OpenID Connect to this domain (or subdomains of this domain). Leave blank for all Google domains', 'Free'),
209
('GoogleOpenIDConnectDomain', '', NULL, 'Restrict Google OpenID Connect to this domain (or subdomains of this domain). Leave blank for all Google domains', 'Free'),
210
('GuarantorFields', 'streetnumber|address|address2|city|state|zipcode|country|branchcode|phonepro|mobile|email|emailpro|fax', NULL, 'Fields to be transfered from guarantor to guarantee.', 'free'),
211
('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'),
211
('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'),
212
('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'),
212
('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'),
213
('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'),
213
('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-2 / +2 lines)
Lines 234-241 Patrons: Link Here
234
         - "to access/change superlibrarian privileges."
234
         - "to access/change superlibrarian privileges."
235
         - "<br><strong>NOTE:</strong> A permitted user needs to have the 'permissions' flag (if no superlibrarian)."
235
         - "<br><strong>NOTE:</strong> A permitted user needs to have the 'permissions' flag (if no superlibrarian)."
236
     -
236
     -
237
         - "These additional following <a href='http://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> will be transferred from guarantor to guarantee:"
237
         - "These following <a href='http://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> will be transferred from guarantor to guarantee:"
238
         - pref: AdditionalGuarantorField
238
         - pref: GuarantorFields
239
           class: multi
239
           class: multi
240
         - (separate columns with |)
240
         - (separate columns with |)
241
241
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt (+2 lines)
Lines 221-226 Link Here
221
                var borrowernumber = $(this).data("borrowernumber");
221
                var borrowernumber = $(this).data("borrowernumber");
222
                var borrower_data = $("#borrower_data"+borrowernumber).val();
222
                var borrower_data = $("#borrower_data"+borrowernumber).val();
223
                var guarantor_attributes = $("#guarantor_attributes").val();
223
                var guarantor_attributes = $("#guarantor_attributes").val();
224
                if ( !guarantor_attributes )
225
                    guarantor_attributes = "{}";
224
                select_user( borrowernumber, JSON.parse(borrower_data), JSON.parse(guarantor_attributes) );
226
                select_user( borrowernumber, JSON.parse(borrower_data), JSON.parse(guarantor_attributes) );
225
            });
227
            });
226
228
(-)a/koha-tmpl/intranet-tmpl/prog/js/members.js (-5 / +6 lines)
Lines 210-219 function select_user(borrowernumber, borrower, relationship, attributes) { Link Here
210
            fieldset.find('.new_guarantor_relationship').val(relationship);
210
            fieldset.find('.new_guarantor_relationship').val(relationship);
211
        }
211
        }
212
212
213
        for (var i = 0; i < parseInt(attributes.length, 10); i++) {
213
        if ( attributes ) {
214
            var attribute = attributes[i];
214
            for (var i = 0; i < parseInt(attributes.length, 10); i++) {
215
            if (borrower[attribute] != null){
215
                var attribute = attributes[i];
216
                document.forms.entryform[attribute].value = borrower[attribute];
216
                if (borrower[attribute] != null){
217
                    document.forms.entryform[attribute].value = borrower[attribute];
218
                }
217
            }
219
            }
218
        }
220
        }
219
    }
221
    }
220
- 

Return to bug 12446