From 100b400b94b9f20fc18869e3ec463368f75b5bd5 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 29 Mar 2018 10:14:59 +0000 Subject: [PATCH] Bug 20291: (follow-up) Rename NoLoginInstructions to OpacLoginInstructions --- .../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 +- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt | 6 +++--- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 4 ++-- 6 files changed, 10 insertions(+), 9 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
','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 - diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 184ea27..5fb1c5b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -323,9 +323,9 @@
- [% IF Koha.Preference( 'NoLoginInstructions' ) %] + [% IF Koha.Preference( 'OpacLoginInstructions' ) %]
- [% Koha.Preference( 'NoLoginInstructions' ) %] + [% Koha.Preference( 'OpacLoginInstructions' ) %]
[% END %] [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt index 404f49b..960d16f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt @@ -182,14 +182,14 @@ [% END %]
- [% IF Koha.Preference('NoLoginInstructions') %] - [% Koha.Preference('NoLoginInstructions') %] + [% IF Koha.Preference('OpacLoginInstructions') %] + [% Koha.Preference('OpacLoginInstructions') %] [% ELSE %]
Don't have a password yet?

If you don't have a password yet, stop by the circulation desk the next time you're in the library. We'll happily set one up for you.

Don't have a library card?

If you don't have a library card, stop by your local library to sign up.

- [% END # / IF Koha.Preference('NoLoginInstructions') %] + [% END # / IF Koha.Preference('OpacLoginInstructions') %] [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]You may register here. [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt index 81a7580..9aa7d2f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -119,9 +119,9 @@
- [% IF Koha.Preference( 'NoLoginInstructions' ) %] + [% IF Koha.Preference( 'OpacLoginInstructions' ) %]
- [% Koha.Preference( 'NoLoginInstructions' ) %] + [% Koha.Preference( 'OpacLoginInstructions' ) %]
[% END %] [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %] -- 2.1.4