From 6ebfea2b6b4b9583b3bcf8fd68be0b2620537e7c Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 18 Oct 2012 13:30:51 -0400 Subject: [PATCH] Bug 7825: Followup - Change choices to avoid conflicts with system preference implicit typeing. Content-Type: text/plain; charset="utf-8" --- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 2 +- .../prog/en/modules/admin/preferences/opac.pref | 4 ++-- .../opac-tmpl/prog/en/modules/opac-reserve.tt | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 5b442de..d3c99ec 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -187,7 +187,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OAI-PMH:archiveID','KOHA-OAI-TEST','OAI-PMH archive identification',NULL,'Free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OAI-PMH:MaxCount','50','OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OAI-PMH:ConfFile','','If empty, Koha OAI Server operates in normal mode, otherwise it operates in extended mode.',NULL,'File'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACItemHolds','yes','Allow OPAC users to place hold on specific items. If No, users can only request next available copy. If Yes, users can choose between next available and specific copy. If Force, users *must* choose a specific copy.','no|yes|force','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACItemHolds','allow','Allow OPAC users to place hold on specific items. If noallow, users can only request next available copy. If allow, users can choose between next available and specific copy. If force, users *must* choose a specific copy.','noallow|allow|force','Choice'); INSERT INTO `systempreferences` (variable, value,options,type, explanation) VALUES ('AddPatronLists','categorycode','categorycode|category_type','Choice','Allow user to choose what list to pick up from when adding patrons'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ExtendedPatronAttributes','0','Use extended patron IDs and attributes',NULL,'YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 79c76da..5d5736e 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6013,7 +6013,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = "3.09.00.XXX"; if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { - $dbh->do("UPDATE systempreferences SET type = 'Choice', options = 'no|yes|force', value = CASE value WHEN '1' THEN 'yes' ELSE 'no' END, explanation = 'Allow OPAC users to place hold on specific items. If No, users can only request next available copy. If Yes, users can choose between next available and specific copy. If Force, users *must* choose a specific copy.' WHERE variable = 'OPACItemHolds'"); + $dbh->do("UPDATE systempreferences SET type = 'Choice', options = 'noallow|allow|force', value = CASE value WHEN '1' THEN 'allow' ELSE 'noallow' END, explanation = 'Allow OPAC users to place hold on specific items. If noallow, users can only request next available copy. If allow, users can choose between next available and specific copy. If force, users *must* choose a specific copy.' WHERE variable = 'OPACItemHolds'"); print "Upgrade to $DBversion done (Changed OPACItemHolds syspref to Choice)\n"; SetVersion($DBversion); } 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 6646ea6..3018433 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 @@ -403,8 +403,8 @@ OPAC: - - pref: OPACItemHolds choices: - no: "Don't allow" - yes: Allow + noallow: "Don't allow" + allow: Allow force: Force - patrons to place holds on specific items in the OPAC. If this is disabled, users can only put a hold on the next available item. If this is forced, users must put a hold on a specific item. - diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt index 598a282..f0a7bdb 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt @@ -30,7 +30,7 @@ $(".copiesrow").hide(); $("#place_on_hdr").show(); - [% IF OPACItemHolds == 'yes' %] + [% IF OPACItemHolds == 'allow' %] $(".place_on_type").show(); [% END %] @@ -253,7 +253,7 @@ Hold starts on date [% END %] Hold not needed after - [% IF OPACItemHolds == 'yes' %] + [% IF OPACItemHolds == 'allow' %] Place On [% END %] [% UNLESS ( singleBranchMode ) %] @@ -337,7 +337,7 @@ [% IF ( bibitemloo.holdable ) %] - [% IF OPACItemHolds == 'yes' or OPACItemHolds == 'force' %] + [% IF OPACItemHolds == 'allow' or OPACItemHolds == 'force' %]