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

(-)a/installer/data/mysql/atomicupdate/bug_3137-add_CollapseFieldsPatronAddForm_syspref.perl (+7 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('CollapseFieldsPatronAddForm','',NULL,'Collapse these fields by default when adding a new patron. These fields can still be expanded.','Multiple') });
4
5
    SetVersion( $DBversion );
6
    print "Upgrade to $DBversion done (Bug 4461 - Add CollapseFieldsPatronAddForm system preference)\n";
7
}
(-)a/installer/data/mysql/atomicupdate/bug_3137-add_HideFieldsPatronAddForm_syspref.perl (-7 lines)
Lines 1-7 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('HideFieldsPatronAddForm','',NULL,'Hide these fields by default when adding a new patron. These fields can still be expanded.','Multiple') });
4
5
    SetVersion( $DBversion );
6
    print "Upgrade to $DBversion done (Bug XXXXX - description)\n";
7
}
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 128-133 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
128
('CoceHost', '', NULL, 'Coce server URL', 'Free'),
128
('CoceHost', '', NULL, 'Coce server URL', 'Free'),
129
('CoceProviders', '', 'aws,gb,ol', 'Coce providers', 'multiple'),
129
('CoceProviders', '', 'aws,gb,ol', 'Coce providers', 'multiple'),
130
('COinSinOPACResults','1','','If ON, use COinS in OPAC search results page.  NOTE: this can slow down search response time significantly','YesNo'),
130
('COinSinOPACResults','1','','If ON, use COinS in OPAC search results page.  NOTE: this can slow down search response time significantly','YesNo'),
131
('CollapseFieldsPatronAddForm','',NULL,'Collapse these fields by default when adding a new patron. These fields can still be expanded.','Multiple'),
131
('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'),
132
('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'),
132
('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'),
133
('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'),
133
('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'),
134
('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'),
Lines 211-217 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
211
('GoogleOpenIDConnectDefaultBranch',  '','','This branch code will be used to create Google OpenID Connect patrons.','Textarea'),
212
('GoogleOpenIDConnectDefaultBranch',  '','','This branch code will be used to create Google OpenID Connect patrons.','Textarea'),
212
('GoogleOpenIDConnectDefaultCategory','','','This category code will be used to create Google OpenID Connect patrons.','Textarea'),
213
('GoogleOpenIDConnectDefaultCategory','','','This category code will be used to create Google OpenID Connect patrons.','Textarea'),
213
('GoogleOpenIDConnectDomain', '', NULL, 'Restrict Google OpenID Connect to this domain (or subdomains of this domain). Leave blank for all Google domains', 'Free'),
214
('GoogleOpenIDConnectDomain', '', NULL, 'Restrict Google OpenID Connect to this domain (or subdomains of this domain). Leave blank for all Google domains', 'Free'),
214
('HideFieldsPatronAddForm','',NULL,'Hide these fields by default when adding a new patron. These fields can still be expanded.','Multiple'),
215
('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'),
215
('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'),
216
('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'),
216
('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'),
217
('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'),
217
('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 (-16 / +16 lines)
Lines 1-23 Link Here
1
Patrons:
1
Patrons:
2
    General:
2
    General:
3
     -
3
     -
4
         - When adding new patrons or editing existing patrons, hide the following fields from the full form (can still be expanded later)
4
         - When adding new patrons or editing existing patrons, collapse the following fields from the full form (can still be expanded later)
5
         - pref: HideFieldsPatronAddForm
5
         - pref: CollapseFieldsPatronAddForm
6
           multiple:
6
           multiple:
7
               identity: "a. Organization/Patron identity"
7
               identity: "Organization/Patron identity"
8
               guarantor: "b. Guarantor information"
8
               guarantor: "Guarantor information"
9
               primary_address: "c. Main address"
9
               primary_address: "Main address"
10
               primary_contact: "d. Contact information"
10
               primary_contact: "Contact information"
11
               alt_address: "e. Alternate address"
11
               alt_address: "Alternate address"
12
               alt_contact: "f. Alternate contact"
12
               alt_contact: "Alternate contact"
13
               lib_mgmt: "g. Library management"
13
               lib_mgmt: "Library management"
14
               lib_setup: "h. Library setup"
14
               lib_setup: "Library setup"
15
               login: "i. OPAC/Staff login"
15
               login: "OPAC/Staff login"
16
               flags: "j. Patron account flags (existing patrons)"
16
               flags: "Patron account flags (existing patrons)"
17
               debarments: "k. Patron restrictions (existing patrons)"
17
               debarments: "Patron restrictions (existing patrons)"
18
               housebound: "l. Housebound roles"
18
               housebound: "Housebound roles"
19
               additional: "m. Additional attributes and identifiers"
19
               additional: "Additional attributes and identifiers"
20
               messaging: "n. Patron messaging preferences"
20
               messaging: "Patron messaging preferences"
21
     -
21
     -
22
         - pref: AutoEmailOpacUser
22
         - pref: AutoEmailOpacUser
23
           choices:
23
           choices:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-4 / +4 lines)
Lines 166-175 legend:hover { Link Here
166
                            </div>
166
                            </div>
167
                        [% END %]
167
                        [% END %]
168
168
169
                        [% SET fieldstohide = Koha.Preference('HideFieldsPatronAddForm') %]
169
                        [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %]
170
                        [% IF Koha.Preference('HideFieldsPatronAddForm') %][% UNLESS step %]
170
                        [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %]
171
                            <p id="selections">
171
                            <p id="selections">
172
                                <input type="checkbox" id="toggle_hidden_fields" title="These fields are hidden by default by the HideFieldsPatronAddForm system preference"><strong>Show hidden fields:</strong>
172
                                <input type="checkbox" id="toggle_hidden_fields" title="These fields are hidden by default by the CollapseFieldsPatronAddForm system preference"><strong>Show hidden fields:</strong>
173
                                [% FOREACH field IN fieldstohide.split(',') %]
173
                                [% FOREACH field IN fieldstohide.split(',') %]
174
                                    [% SWITCH field %]
174
                                    [% SWITCH field %]
175
                                        [% CASE 'identity' %] Organization/Patron identity |
175
                                        [% CASE 'identity' %] Organization/Patron identity |
Lines 1414-1419 legend:hover { Link Here
1414
                [% IF show_guarantor || guarantor %]
1414
                [% IF show_guarantor || guarantor %]
1415
                    [% IF fieldstohide.match('guarantor') %]
1415
                    [% IF fieldstohide.match('guarantor') %]
1416
                        $("#memberentry_guarantor").find('legend').nextAll().toggle();
1416
                        $("#memberentry_guarantor").find('legend').nextAll().toggle();
1417
                        $("#guarantor_template").toggle();
1417
                    [% END %]
1418
                    [% END %]
1418
                [% END %]
1419
                [% END %]
1419
                [% IF fieldstohide.match('primary_address') %]
1420
                [% IF fieldstohide.match('primary_address') %]
1420
- 

Return to bug 3137