From 40511108a7635b47b2bf6e7159cc9eaa2d8e829c Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 21 May 2020 22:57:27 +0000 Subject: [PATCH] Bug 25100: Add SelfRegistrationHEad content area to news This patch adds a new news feature which allows librarians to add content above the self registration form 1. Apply patch 2. Make sure self registration is turned on. 3. Go to the Tools > News and create a New entry. 4. You should see a new location on of SelfRegistrationHead, select that option and create a new news item with some content. 5. Go to the self registration page and confirm you can see your content. 6. This should not effect the OPAC patron modification page, go there and make sure this is the case. 7. Test by only displaying this for certain branches and make sure it only shows up on those branches. --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt index 062f0e1642..62986d9773 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt @@ -331,7 +331,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %] [% END %] [% FOREACH lang_lis IN lang_list %] - [% FOREACH location IN [ '', 'OpacNavRight', 'opacheader', 'OpacMainUserBlock' ] %] + [% FOREACH location IN [ '', 'OpacNavRight', 'opacheader', 'OpacMainUserBlock', 'SelfRegistrationHead' ] %] [% IF ( location == '' ) %] [% SET location_lang = lang_lis.language %] [% location = BLOCK %]OPAC news[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index 35af40224f..8027612007 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -6,6 +6,8 @@ [% USE Branches %] [% USE KohaDates %] [% USE Math %] +[% USE KohaNews %] +[% SET SelfRegistrationHead = KohaNews.get( location => "SelfRegistrationHead", lang => lang, library => branchcode ) %] [% SET userupdateview = 1 %] [% BLOCK streetnumber %] [% UNLESS hidden.defined('streetnumber') %] @@ -60,6 +62,12 @@
[% END %] + [% IF ( SelfRegistrationHead ) && action != 'edit' %] +
+ [% PROCESS koha_news_block news => SelfRegistrationHead %] +
+ [% END %] + [% IF action == 'edit' %] [% UNLESS OPACPatronDetails %]
To make changes to your record please contact the library.
-- 2.11.0