Bugzilla – Attachment 100503 Details for
Bug 3137
Allow to collapse areas of the patron add form by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 3137: (follow-up) Rename using 'collapse', remove syspref lettering and fix guarantor section collapsing
Bug-3137-follow-up-Rename-using-collapse-remove-sy.patch (text/plain), 8.67 KB, created by
Aleisha Amohia
on 2020-03-11 04:05:10 UTC
(
hide
)
Description:
Bug 3137: (follow-up) Rename using 'collapse', remove syspref lettering and fix guarantor section collapsing
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2020-03-11 04:05:10 UTC
Size:
8.67 KB
patch
obsolete
>From 6fd643a5259d4dd5ea422c5d0f7346963b113f78 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 11 Mar 2020 04:02:53 +0000 >Subject: [PATCH] Bug 3137: (follow-up) Rename using 'collapse', remove syspref > lettering and fix guarantor section collapsing > >--- > ...37-add_CollapseFieldsPatronAddForm_syspref.perl | 7 +++++ > ...g_3137-add_HideFieldsPatronAddForm_syspref.perl | 7 ----- > installer/data/mysql/sysprefs.sql | 2 +- > .../prog/en/modules/admin/preferences/patrons.pref | 32 +++++++++++----------- > .../prog/en/modules/members/memberentrygen.tt | 7 +++-- > 5 files changed, 28 insertions(+), 27 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_3137-add_CollapseFieldsPatronAddForm_syspref.perl > delete mode 100644 installer/data/mysql/atomicupdate/bug_3137-add_HideFieldsPatronAddForm_syspref.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_3137-add_CollapseFieldsPatronAddForm_syspref.perl b/installer/data/mysql/atomicupdate/bug_3137-add_CollapseFieldsPatronAddForm_syspref.perl >new file mode 100644 >index 0000000..c382892 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_3137-add_CollapseFieldsPatronAddForm_syspref.perl >@@ -0,0 +1,7 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $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') }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 4461 - Add CollapseFieldsPatronAddForm system preference)\n"; >+} >diff --git a/installer/data/mysql/atomicupdate/bug_3137-add_HideFieldsPatronAddForm_syspref.perl b/installer/data/mysql/atomicupdate/bug_3137-add_HideFieldsPatronAddForm_syspref.perl >deleted file mode 100644 >index 92cbe40..0000000 >--- a/installer/data/mysql/atomicupdate/bug_3137-add_HideFieldsPatronAddForm_syspref.perl >+++ /dev/null >@@ -1,7 +0,0 @@ >-$DBversion = 'XXX'; # will be replaced by the RM >-if( CheckVersion( $DBversion ) ) { >- $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') }); >- >- SetVersion( $DBversion ); >- print "Upgrade to $DBversion done (Bug XXXXX - description)\n"; >-} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index b213986..612dcc2 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -128,6 +128,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('CoceHost', '', NULL, 'Coce server URL', 'Free'), > ('CoceProviders', '', 'aws,gb,ol', 'Coce providers', 'multiple'), > ('COinSinOPACResults','1','','If ON, use COinS in OPAC search results page. NOTE: this can slow down search response time significantly','YesNo'), >+('CollapseFieldsPatronAddForm','',NULL,'Collapse these fields by default when adding a new patron. These fields can still be expanded.','Multiple'), > ('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'), > ('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'), > ('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'), >@@ -211,7 +212,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('GoogleOpenIDConnectDefaultBranch', '','','This branch code will be used to create Google OpenID Connect patrons.','Textarea'), > ('GoogleOpenIDConnectDefaultCategory','','','This category code will be used to create Google OpenID Connect patrons.','Textarea'), > ('GoogleOpenIDConnectDomain', '', NULL, 'Restrict Google OpenID Connect to this domain (or subdomains of this domain). Leave blank for all Google domains', 'Free'), >-('HideFieldsPatronAddForm','',NULL,'Hide these fields by default when adding a new patron. These fields can still be expanded.','Multiple'), > ('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'), > ('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'), > ('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 8509b6e..48bc763 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -1,23 +1,23 @@ > Patrons: > General: > - >- - When adding new patrons or editing existing patrons, hide the following fields from the full form (can still be expanded later) >- - pref: HideFieldsPatronAddForm >+ - When adding new patrons or editing existing patrons, collapse the following fields from the full form (can still be expanded later) >+ - pref: CollapseFieldsPatronAddForm > multiple: >- identity: "a. Organization/Patron identity" >- guarantor: "b. Guarantor information" >- primary_address: "c. Main address" >- primary_contact: "d. Contact information" >- alt_address: "e. Alternate address" >- alt_contact: "f. Alternate contact" >- lib_mgmt: "g. Library management" >- lib_setup: "h. Library setup" >- login: "i. OPAC/Staff login" >- flags: "j. Patron account flags (existing patrons)" >- debarments: "k. Patron restrictions (existing patrons)" >- housebound: "l. Housebound roles" >- additional: "m. Additional attributes and identifiers" >- messaging: "n. Patron messaging preferences" >+ identity: "Organization/Patron identity" >+ guarantor: "Guarantor information" >+ primary_address: "Main address" >+ primary_contact: "Contact information" >+ alt_address: "Alternate address" >+ alt_contact: "Alternate contact" >+ lib_mgmt: "Library management" >+ lib_setup: "Library setup" >+ login: "OPAC/Staff login" >+ flags: "Patron account flags (existing patrons)" >+ debarments: "Patron restrictions (existing patrons)" >+ housebound: "Housebound roles" >+ additional: "Additional attributes and identifiers" >+ messaging: "Patron messaging preferences" > - > - pref: AutoEmailOpacUser > choices: >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index d64eeaa..0f14efc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -166,10 +166,10 @@ legend:hover { > </div> > [% END %] > >- [% SET fieldstohide = Koha.Preference('HideFieldsPatronAddForm') %] >- [% IF Koha.Preference('HideFieldsPatronAddForm') %][% UNLESS step %] >+ [% SET fieldstohide = Koha.Preference('CollapseFieldsPatronAddForm') %] >+ [% IF Koha.Preference('CollapseFieldsPatronAddForm') %][% UNLESS step %] > <p id="selections"> >- <input type="checkbox" id="toggle_hidden_fields" title="These fields are hidden by default by the HideFieldsPatronAddForm system preference"><strong>Show hidden fields:</strong> >+ <input type="checkbox" id="toggle_hidden_fields" title="These fields are hidden by default by the CollapseFieldsPatronAddForm system preference"><strong>Show hidden fields:</strong> > [% FOREACH field IN fieldstohide.split(',') %] > [% SWITCH field %] > [% CASE 'identity' %] Organization/Patron identity | >@@ -1414,6 +1414,7 @@ legend:hover { > [% IF show_guarantor || guarantor %] > [% IF fieldstohide.match('guarantor') %] > $("#memberentry_guarantor").find('legend').nextAll().toggle(); >+ $("#guarantor_template").toggle(); > [% END %] > [% END %] > [% IF fieldstohide.match('primary_address') %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 3137
:
61861
|
61863
|
62920
|
64094
|
66590
|
66591
|
66592
|
98623
|
98626
|
98682
|
98683
|
99606
|
100503
|
100598
|
100599
|
100706
|
100707
|
100708