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

(-)a/installer/data/mysql/atomicupdate/bug_23420_add_OPACSuggestionUnwantedFields_syspref.perl (-3 / +19 lines)
Lines 1-7 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
2
if( CheckVersion( $DBversion ) ) {
3
   $dbh->do(q{
3
   #Get value from AllowPurchaseSuggestionBranchChoice system preference
4
    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');
4
   my ( $allowpurchasesuggestionbranchchoice ) = C4::Context->preference('AllowPurchaseSuggestionBranchChoice');
5
    });
5
   if ( $allowpurchasesuggestionbranchchoice ) {
6
       $dbh->do(q{
7
            INSERT IGNORE INTO systempreferences
8
            (`variable`, `value`, `options`, `explanation`, `type`)
9
            VALUES
10
            ('OPACSuggestionUnwantedFields','branch', NULL,'Define the hidden fields for a patron purchase suggestions made via OPAC.','multiple');
11
        });
12
   } else {
13
       $dbh->do(q{
14
            INSERT IGNORE INTO systempreferences
15
            (`variable`, `value`, `options`, `explanation`, `type`)
16
            VALUES
17
            ('OPACSuggestionUnwantedFields','', NULL,'Define the hidden fields for a patron purchase suggestions made via OPAC.','multiple');
18
        });
19
   }
20
    #Remove the  AllowPurchaseSuggestionBranchChoice system preference
21
    $dbh->do("DELETE FROM systempreferences WHERE variable='AllowPurchaseSuggestionBranchChoice'");
6
    NewVersion($DBversion, 23420, "Allow configuration of hidden fields on the suggestion form in OPAC");
22
    NewVersion($DBversion, 23420, "Allow configuration of hidden fields on the suggestion form in OPAC");
7
}
23
}
(-)a/installer/data/mysql/sysprefs.sql (-1 lines)
Lines 39-45 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
39
('AllowPatronToSetCheckoutsVisibilityForGuarantor',  '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor',  'YesNo'),
39
('AllowPatronToSetCheckoutsVisibilityForGuarantor',  '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor',  'YesNo'),
40
('AllowPatronToSetFinesVisibilityForGuarantor',  '0', NULL, 'If enabled, the patron can set fines to be visible to his or her guarantor',  'YesNo'),
40
('AllowPatronToSetFinesVisibilityForGuarantor',  '0', NULL, 'If enabled, the patron can set fines to be visible to his or her guarantor',  'YesNo'),
41
('AllowPKIAuth','None','None|Common Name|emailAddress','Use the field from a client-side SSL certificate to look a user in the Koha database','Choice'),
41
('AllowPKIAuth','None','None|Common Name|emailAddress','Use the field from a client-side SSL certificate to look a user in the Koha database','Choice'),
42
('AllowPurchaseSuggestionBranchChoice','0','1','Allow user to choose branch when making a purchase suggestion','YesNo'),
43
('AllowRenewalIfOtherItemsAvailable','0',NULL,'If enabled, allow a patron to renew an item with unfilled holds if other available items can fill that hold.','YesNo'),
42
('AllowRenewalIfOtherItemsAvailable','0',NULL,'If enabled, allow a patron to renew an item with unfilled holds if other available items can fill that hold.','YesNo'),
44
('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'),
43
('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'),
45
('AllowRenewalOnHoldOverride','0',NULL,'If ON, allow items on hold to be renewed with a specified due date','YesNo'),
44
('AllowRenewalOnHoldOverride','0',NULL,'If ON, allow items on hold to be renewed with a specified due date','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-7 lines)
Lines 607-619 OPAC: Link Here
607
                  no: "Don't show"
607
                  no: "Don't show"
608
            - purchase suggestions from other patrons on the OPAC.
608
            - purchase suggestions from other patrons on the OPAC.
609
        -
609
        -
610
            - pref: AllowPurchaseSuggestionBranchChoice
611
              default: 0
612
              choices:
613
                  no: "Don't allow"
614
                  yes: Allow
615
            - "patrons to select library when making a purchase suggestion."
616
        -
617
            - "Fields that should be mandatory for patron purchase suggestions:"
610
            - "Fields that should be mandatory for patron purchase suggestions:"
618
            - pref: OPACSuggestionMandatoryFields
611
            - pref: OPACSuggestionMandatoryFields
619
              multiple:
612
              multiple:
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-3 lines)
Lines 174-180 Link Here
174
                                            [% END %]
174
                                            [% END %]
175
                                            </li>
175
                                            </li>
176
                                        [% END %]
176
                                        [% END %]
177
                                        [% IF branchcode %]
178
                                        [% UNLESS ( branch_hidden )%]
177
                                        [% UNLESS ( branch_hidden )%]
179
                                            <li>
178
                                            <li>
180
                                                [% IF ( branchcode_required ) %]
179
                                                [% IF ( branchcode_required ) %]
Lines 191-197 Link Here
191
                                                [% END %]
190
                                                [% END %]
192
                                            </li>
191
                                            </li>
193
                                        [% END %]
192
                                        [% END %]
194
                                        [% END %]
195
                                        [% IF ( patron_reason_loop ) %]
193
                                        [% IF ( patron_reason_loop ) %]
196
                                        [% UNLESS ( patronreason_hidden )%]
194
                                        [% UNLESS ( patronreason_hidden )%]
197
                                            <li>
195
                                            <li>
198
- 

Return to bug 23420