From da83ff4b85b22ed668cbf8bc087122738ccb9baa Mon Sep 17 00:00:00 2001
From: Nick Clemens <nick@bywatersolutions.com>
Date: Thu, 29 Mar 2018 10:14:59 +0000
Subject: [PATCH] Bug 20291: (follow-up) Rename NoLoginInstructions to
 OpacLoginInstructions

---
 .../atomicupdate/bug_20291_add_StaffLoginInstructions_preference.perl   | 1 +
 installer/data/mysql/sysprefs.sql                                       | 2 +-
 koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref     | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/installer/data/mysql/atomicupdate/bug_20291_add_StaffLoginInstructions_preference.perl b/installer/data/mysql/atomicupdate/bug_20291_add_StaffLoginInstructions_preference.perl
index 1c7bea5..4844bdb 100644
--- a/installer/data/mysql/atomicupdate/bug_20291_add_StaffLoginInstructions_preference.perl
+++ b/installer/data/mysql/atomicupdate/bug_20291_add_StaffLoginInstructions_preference.perl
@@ -1,6 +1,7 @@
 $DBversion = 'XXX';  # will be replaced by the RM
 if( CheckVersion( $DBversion ) ) {
     $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('StaffLoginInstructions','','HTML to go into the login box for the staff client',NULL,'Free')");
+    $dbh->do("UPDATE systempreferences SET variable = 'OpacLoginInstructions' WHERE variable = 'NoLoginInstructions'");
 
     # Always end with this (adjust the bug info)
     SetVersion( $DBversion );
diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql
index 2429a14..d443b3f 100644
--- a/installer/data/mysql/sysprefs.sql
+++ b/installer/data/mysql/sysprefs.sql
@@ -279,7 +279,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('noissuescharge','5','','Define maximum amount withstanding before check outs are blocked','Integer'),
 ('NoIssuesChargeGuarantees','','','Define maximum amount withstanding before check outs are blocked','Integer'),
 ('noItemTypeImages','0',NULL,'If ON, disables item-type images','YesNo'),
-('NoLoginInstructions', '', '60|10', 'Instructions to display on the OPAC login form when a patron is not logged in', 'Textarea'),
 ('NorwegianPatronDBEnable','0',NULL,'Enable communication with the Norwegian national patron database.', 'YesNo'),
 ('NorwegianPatronDBEndpoint','',NULL,'Which NL endpoint to use.', 'Free'),
 ('NorwegianPatronDBUsername','',NULL,'Username for communication with the Norwegian national patron database.','Free'),
@@ -353,6 +352,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('OPACLocalCoverImages','0','1','Display local cover images on OPAC search and details pages.','YesNo'),
 ('OpacLocationBranchToDisplay','holding','holding|home|both','In the OPAC, under location show which branch for Location in the record details.','Choice'),
 ('OpacLocationOnDetail','holding','holding|home|both|column','In the OPAC detail, display the shelving location on its own column or under a library columns.',  'Choice'),
+('OpacLoginInstructions', '', '60|10', 'Instructions to display on the OPAC login form when a patron is not logged in', 'Textarea'),
 ('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'),
 ('OpacMaintenanceNotice','','','A user-defined block of HTML to appear on screen when OpacMaintenace is enabled','Textarea'),
 ('OpacMainUserBlock','Welcome to Koha...\r\n<hr>','70|10','A user-defined block of HTML  in the main content area of the opac main page','Textarea'),
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 c44b109..f46dda3 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
@@ -329,7 +329,7 @@ OPAC:
             - items on the biblio detail page (if the biblio has more items than this, a link is displayed instead that allows the user to choose to display all items).
         -
             - "Show the following HTML on the OPAC login form when a patron is not logged in:"
-            - pref: NoLoginInstructions
+            - pref: OpacLoginInstructions
               type: htmlarea
               class: code
         -
-- 
2.1.4