Browse Source

Bug 23420: (QA follow-up) Remove AllowPurchaseSuggestionBranchChoice syspref

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Lucas Gass 1 year ago
committed by Jonathan Druart
parent
commit
12253d5382
  1. 22
      installer/data/mysql/atomicupdate/bug_23420_add_OPACSuggestionUnwantedFields_syspref.perl
  2. 1
      installer/data/mysql/sysprefs.sql
  3. 7
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
  4. 2
      koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt

22
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");
}

1
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'),

7
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref

@ -610,13 +610,6 @@ OPAC:
yes: Show
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

2
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>

Loading…
Cancel
Save