Bug 9756 - Patron self registration missing preference PatronSelfRegistrationAddition...
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 6 Mar 2013 16:31:56 +0000 (11:31 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Fri, 15 Mar 2013 23:10:58 +0000 (19:10 -0400)
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 <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref

index cad409c..9c66df0 100644 (file)
@@ -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');
index 317680a..a9106df 100755 (executable)
@@ -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)
index 57df512..c7b0414 100644 (file)
@@ -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