From 0654465a723e5ae2411199595262ca2fc28c9763 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 6 Mar 2013 11:31:56 -0500 Subject: [PATCH 1/2] Bug 9756 - Patron self registration missing preference PatronSelfRegistrationAdditionalInstructions The patron self registration system references a system preference PatronSelfRegistrationAdditionalInstructions as a free text field to add additional instructions for newly self registered patrons, but the system preference in neither created in the database, nor exposed via the staff interface. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Add some text to the new system preference PatronSelfRegistrationAdditionalInstructions 4) Enable opac self registrations and complete a self registration 5) Note the additional instructions you entered appear on the "registration complete" page Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Jared Camins-Esakov --- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++++++ .../prog/en/modules/admin/preferences/opac.pref | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index cad409c53d..9c66df07cd 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -418,3 +418,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('Persona',0,'Use Mozilla Persona for login','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacItemLocation','callnum','Show the shelving location of items in the opac','callnum|ccode|location','Choice'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('TrackClicks','0','Track links clicked',NULL,'Integer'); +INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('PatronSelfRegistrationAdditionalInstructions','','A free text field to display additional instructions to newly self registered patrons.','','free'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 317680af23..a9106dff83 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6505,6 +6505,13 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.11.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('PatronSelfRegistrationAdditionalInstructions', '', NULL , 'A free text field to display additional instructions to newly self registered patrons.', 'free' );"); + print "Upgrade to $DBversion done (Bug 9756 - Patron self registration missing the system preference PatronSelfRegistrationAdditionalInstructions)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) 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 57df5127a6..c7b041417f 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 @@ -596,3 +596,8 @@ OPAC: - pref: PatronSelfRegistrationBorrowerUnwantedField class: multi - (separate columns with |) + - + - "Display the following additional instructions for patrons who self register via the OPAC ( HTML is allowed ):" + - pref: PatronSelfRegistrationAdditionalInstructions + type: textarea + class: html From db031da3596276cbfe2d0324a654ea9073b8a978 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Fri, 15 Mar 2013 19:11:44 -0400 Subject: [PATCH 2/2] Bug 9756: Increment version number Database update for bug 9756 has been given version 3.11.00.028 --- installer/data/mysql/updatedatabase.pl | 2 +- kohaversion.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a9106dff83..9b4aa8eeda 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6505,7 +6505,7 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } -$DBversion = "3.11.00.XXX"; +$DBversion = "3.11.00.028"; if ( CheckVersion($DBversion) ) { $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('PatronSelfRegistrationAdditionalInstructions', '', NULL , 'A free text field to display additional instructions to newly self registered patrons.', 'free' );"); print "Upgrade to $DBversion done (Bug 9756 - Patron self registration missing the system preference PatronSelfRegistrationAdditionalInstructions)\n"; diff --git a/kohaversion.pl b/kohaversion.pl index 51d52d1e4f..1c52711ceb 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.11.00.027'; + our $VERSION = '3.11.00.028'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install