From 44b2f3fc8b02220b01c77689242aee9dde15f810 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Wed, 30 Dec 2020 22:43:50 +0000 Subject: [PATCH] Bug 27318: Add ShibbolethLoginInstructions to News This patch adds ShibbolethLoginInstructions as an option in the News Tool so librarians customize the wording within the loginModal To test: 1. Enable shibboleth in your koha-conf.xml by changng the value of to 1. 2. I also add the following to my koha-conf: email 3. Look at the OPAC loginModal and make sure something like "If you have a Shibboleth account, please click here to login." is visiible. 4. Apply patch 5. Go to /cgi-bin/koha/tools/koha-news.pl and make a New entry 6. Choose ShibbolethLoginInstructions and enter something like: '

Sign in using:

Google
' 7. Reload the OPAC and look at the loginModal again, it should show your new login instructions instead of the default. --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) 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 2ad87f82a6..f7fd935298 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 @@ -403,7 +403,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %] [% END %] [% FOREACH lang_lis IN lang_list %] - [% FOREACH location IN [ '', 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions'] %] + [% FOREACH location IN [ '', 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions' , 'ShibbolethLoginInstructions'] %] [% IF ( location == '' ) %] [% SET location_lang = lang_lis.language %] [% location = BLOCK %]OPAC news[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 82d3581624..beed42d92a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -8,6 +8,7 @@ [% SET OpacHeader = KohaNews.get( location => "opacheader", lang => lang, library => branchcode, blocktitle => 0 ) %] [% SET OpacCustomSearch = KohaNews.get( location => "OpacCustomSearch", lang => lang, library => branchcode, blocktitle => 0 ) %] [% SET OpacLoginInstructions = KohaNews.get( location => "OpacLoginInstructions", lang => lang, library => branchcode ) %] +[% SET ShibbolethLoginInstructions = KohaNews.get( location => "ShibbolethLoginInstructions", lang => lang, library => branchcode )%]
@@ -402,8 +403,12 @@

Sorry, your Shibboleth identity does not match a valid library identity. If you have a local login, you may use that below.

[% ELSE %] -

Sign in using:

-

If you have a Shibboleth account, please click here to login.

+ [% IF ( ShibbolethLoginInstructions ) %] + [% PROCESS koha_news_block news => ShibbolethLoginInstructions %] + [% ELSE %] +

Sign in using:

+

If you have a Shibboleth account, please click here to login.

+ [% END %] [% END %]
[% END %] -- 2.11.0