From bf82c7a3f7c57c11c497327c15536664e7bcea52 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 5 Aug 2019 09:04:25 -0500 Subject: [PATCH] Bug 23253: Fix OpacNavRight for self reg by email The code expects to display OpacNavRight content at the bottom of the login form when a user just registered. Test plan: - Turn PatronSelfRegistrationVerifyByEmail on - Register a patron - Confirm by clicking on the link you received by email (or see the message_queue table) => The OpacNavRight content should be displayed QA Note: This code smells, the code in the pl should not be needed. --- C4/Auth.pm | 2 -- .../opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt | 4 +++- opac/opac-registration-verify.pl | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index e658c8947c..a7ef5fe253 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -570,7 +570,6 @@ sub get_template_and_user { OpacKohaUrl => C4::Context->preference("OpacKohaUrl"), OpacMainUserBlock => "" . C4::Context->preference("OpacMainUserBlock"), OpacNav => "" . C4::Context->preference("OpacNav"), - OpacNavRight => "" . C4::Context->preference("OpacNavRight"), OpacNavBottom => "" . C4::Context->preference("OpacNavBottom"), OpacPasswordChange => C4::Context->preference("OpacPasswordChange"), OPACPatronDetails => C4::Context->preference("OPACPatronDetails"), @@ -1249,7 +1248,6 @@ sub checkauth { LibraryNameTitle => "" . $LibraryNameTitle, opacuserlogin => C4::Context->preference("opacuserlogin"), OpacNav => C4::Context->preference("OpacNav"), - OpacNavRight => C4::Context->preference("OpacNavRight"), OpacNavBottom => C4::Context->preference("OpacNavBottom"), opaccredits => C4::Context->preference("opaccredits"), OpacFavicon => C4::Context->preference("OpacFavicon"), diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt index 5a62324d2d..d8ea3c4295 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt @@ -1,5 +1,6 @@ [% USE raw %] [% USE Koha %] +[% USE KohaNews %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] @@ -67,6 +68,7 @@ + [% SET OpacNavRight = KohaNews.get( location => "OpacNavRight", lang => news_lang, library => branchcode ) %] [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) || OpacNavRight ) %]
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %] @@ -101,7 +103,7 @@ [% END # /opacuserlogin %] [% IF ( OpacNavRight ) %]
- [% OpacNavRight | $raw %] + [% PROCESS koha_news_block news => OpacNavRight %]
[% END # /OpacNavRight %]
diff --git a/opac/opac-registration-verify.pl b/opac/opac-registration-verify.pl index d40631f74b..d408d5c5ae 100755 --- a/opac/opac-registration-verify.pl +++ b/opac/opac-registration-verify.pl @@ -80,6 +80,9 @@ if ( C4::Context->preference( 'PatronSelfRegistrationAdditionalInstructions') ); + + my ($theme, $news_lang, $availablethemes) = C4::Templates::themelanguage(C4::Context->config('opachtdocs'),'opac-registration-confirmation.tt','opac',$cgi); + $template->param( news_lang => $news_lang ); } } -- 2.11.0