Bugzilla – Attachment 114755 Details for
Bug 27318
make shibboleth instructions customizable in the loginModal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27318: Add ShibbolethLoginInstructions to News
Bug-27318-Add-ShibbolethLoginInstructions-to-News.patch (text/plain), 4.28 KB, created by
Lucas Gass (lukeg)
on 2020-12-30 23:04:04 UTC
(
hide
)
Description:
Bug 27318: Add ShibbolethLoginInstructions to News
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2020-12-30 23:04:04 UTC
Size:
4.28 KB
patch
obsolete
>From 44b2f3fc8b02220b01c77689242aee9dde15f810 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >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 <useshibboleth> to 1. >2. I also add the following to my koha-conf: > <shibboleth> > <matchpoint>email</matchpoint> > <mapping> > <email is="SHIB_ATTR_email"></email> > </mapping> > </shibboleth> >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: '<h1>Sign in using:</h1> ><a href="localhost:8080/Shibboleth.sso/Login?target=localhost:8080/cgi-bin/koha/opac-main.pl"><div class="shibGoogle">Google</div></a>' >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 %]</div> > [% END %] > [% FOREACH lang_lis IN lang_list %] > <optgroup label="[% lang_lis.language | html %]"> >- [% 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 )%] > > <div id="wrapper"> > <div id="header-region" class="noprint"> >@@ -402,8 +403,12 @@ > <p>Sorry, your Shibboleth identity does not match a valid library identity. If you have a local login, you may use that below.</p> > </div> > [% ELSE %] >- <h3>Sign in using:</h3> >- <p>If you have a Shibboleth account, please <a href="[% shibbolethLoginUrl | $raw %]">click here to login</a>.</p> >+ [% IF ( ShibbolethLoginInstructions ) %] >+ [% PROCESS koha_news_block news => ShibbolethLoginInstructions %] >+ [% ELSE %] >+ <h3>Sign in using:</h3> >+ <p>If you have a Shibboleth account, please <a href="[% shibbolethLoginUrl | $raw %]">click here to login</a>.</p> >+ [% END %] > [% END %] > </div> > [% END %] >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27318
: 114755