Bugzilla – Attachment 110689 Details for
Bug 23420
Add "SuggestionsUnwantedFields" to hide fields from the suggestions form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23420: (QA follow-up) Remove AllowPurchaseSuggestionBranchChoice syspref
Bug-23420-QA-follow-up-Remove-AllowPurchaseSuggest.patch (text/plain), 5.83 KB, created by
Katrin Fischer
on 2020-09-24 18:35:51 UTC
(
hide
)
Description:
Bug 23420: (QA follow-up) Remove AllowPurchaseSuggestionBranchChoice syspref
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-09-24 18:35:51 UTC
Size:
5.83 KB
patch
obsolete
>From 7775e5979ccb685a526a59bc3a171e6310c8e2ae Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 23 Sep 2020 23:00:07 +0000 >Subject: [PATCH] Bug 23420: (QA follow-up) Remove > AllowPurchaseSuggestionBranchChoice syspref > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > ...0_add_OPACSuggestionUnwantedFields_syspref.perl | 22 +++++++++++++++++++--- > installer/data/mysql/sysprefs.sql | 1 - > .../prog/en/modules/admin/preferences/opac.pref | 7 ------- > .../bootstrap/en/modules/opac-suggestions.tt | 2 -- > 4 files changed, 19 insertions(+), 13 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_23420_add_OPACSuggestionUnwantedFields_syspref.perl b/installer/data/mysql/atomicupdate/bug_23420_add_OPACSuggestionUnwantedFields_syspref.perl >index 26b9157335..d715980774 100644 >--- a/installer/data/mysql/atomicupdate/bug_23420_add_OPACSuggestionUnwantedFields_syspref.perl >+++ b/installer/data/mysql/atomicupdate/bug_23420_add_OPACSuggestionUnwantedFields_syspref.perl >@@ -1,7 +1,23 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { >- $dbh->do(q{ >- INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('OPACSuggestionUnwantedFields','', NULL,'Define the hidden fields for a patron purchase suggestions made via OPAC.','multiple'); >- }); >+ #Get value from AllowPurchaseSuggestionBranchChoice system preference >+ my ( $allowpurchasesuggestionbranchchoice ) = C4::Context->preference('AllowPurchaseSuggestionBranchChoice'); >+ if ( $allowpurchasesuggestionbranchchoice ) { >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences >+ (`variable`, `value`, `options`, `explanation`, `type`) >+ VALUES >+ ('OPACSuggestionUnwantedFields','branch', NULL,'Define the hidden fields for a patron purchase suggestions made via OPAC.','multiple'); >+ }); >+ } else { >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences >+ (`variable`, `value`, `options`, `explanation`, `type`) >+ VALUES >+ ('OPACSuggestionUnwantedFields','', NULL,'Define the hidden fields for a patron purchase suggestions made via OPAC.','multiple'); >+ }); >+ } >+ #Remove the AllowPurchaseSuggestionBranchChoice system preference >+ $dbh->do("DELETE FROM systempreferences WHERE variable='AllowPurchaseSuggestionBranchChoice'"); > NewVersion($DBversion, 23420, "Allow configuration of hidden fields on the suggestion form in OPAC"); > } >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index d16c262f4a..9ad622afdf 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -39,7 +39,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AllowPatronToSetCheckoutsVisibilityForGuarantor', '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor', 'YesNo'), > ('AllowPatronToSetFinesVisibilityForGuarantor', '0', NULL, 'If enabled, the patron can set fines to be visible to his or her guarantor', 'YesNo'), > ('AllowPKIAuth','None','None|Common Name|emailAddress','Use the field from a client-side SSL certificate to look a user in the Koha database','Choice'), >-('AllowPurchaseSuggestionBranchChoice','0','1','Allow user to choose branch when making a purchase suggestion','YesNo'), > ('AllowRenewalIfOtherItemsAvailable','0',NULL,'If enabled, allow a patron to renew an item with unfilled holds if other available items can fill that hold.','YesNo'), > ('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'), > ('AllowRenewalOnHoldOverride','0',NULL,'If ON, allow items on hold to be renewed with a specified due date','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 3cb298c423..ecde3e34bf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -607,13 +607,6 @@ OPAC: > no: "Don't show" > - purchase suggestions from other patrons on the OPAC. > - >- - pref: AllowPurchaseSuggestionBranchChoice >- default: 0 >- choices: >- no: "Don't allow" >- yes: Allow >- - "patrons to select library when making a purchase suggestion." >- - > - "Fields that should be mandatory for patron purchase suggestions:" > - pref: OPACSuggestionMandatoryFields > multiple: >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >index 6a9630fcd4..956a254805 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -174,7 +174,6 @@ > [% END %] > </li> > [% END %] >- [% IF branchcode %] > [% UNLESS ( branch_hidden )%] > <li> > [% IF ( branchcode_required ) %] >@@ -191,7 +190,6 @@ > [% END %] > </li> > [% END %] >- [% END %] > [% IF ( patron_reason_loop ) %] > [% UNLESS ( patronreason_hidden )%] > <li> >-- >2.11.0
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 23420
:
107662
|
107787
|
108426
|
108429
|
108430
|
109299
|
110414
|
110418
|
110419
|
110671
|
110688
| 110689 |
111254