Bugzilla – Attachment 158018 Details for
Bug 35147
Add classes to Shibboleth text on OPAC login page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35147: Add classes to Shibboleth text on OPAC login page
Bug-35147-Add-classes-to-Shibboleth-text-on-OPAC-l.patch (text/plain), 5.86 KB, created by
Katrin Fischer
on 2023-10-28 22:46:09 UTC
(
hide
)
Description:
Bug 35147: Add classes to Shibboleth text on OPAC login page
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-10-28 22:46:09 UTC
Size:
5.86 KB
patch
obsolete
>From 28942d0575595e9f7d803a32e3cc013d9341c269 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 25 Oct 2023 00:40:26 +0000 >Subject: [PATCH] Bug 35147: Add classes to Shibboleth text on OPAC login page > >This enhancement makes it easier for libraries to change the Shibboleth-related messages on the OPAC login page. > >Libraries can employ OPACUserJS to change the text. For e.g., I can replace the message "If you do not have a Shibboleth account, but you do have a local login, then you may login below." by putting the following in OPACUserJS: > >$(".shib_local_text").text("If you do not have a staff member account, but are a member of the library, then you may log in below."); > >To test: > >1. Go to <your-opac-url>/cgi-bin/koha/opac-user.pl , or disable the OpacPublic system preference. Ensure you are logged out of the OPAC. >2. In the staff interface, search for the OPACUserJS system preference under Koha Administration. Add the following JS and Save: > >$(".shib_invalid").text("Test changing the invalid Shibboleth login message."); >$(".shib_title").text("Test changing the Shibboleth login heading."); >$(".shib_url").text("Test changing the Shibboleth account link text."); >$(".shib_local_title").text("Test changing the local login heading."); >$(".shib_local_text").text("Test changing the message that shows if you do not have a Shibboleth account."); > >3. Refresh the OPAC and confirm the text changes to reflect your JS. Note: The invalid Shibboleth login will be a bit harder to test, so if you can't test, confirm the HTML in the patch looks correct. > >Sponsored-by: New Zealand Council for Educational Research >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 6 +++--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt | 10 +++++----- > 2 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index dbe22e3beb..b7f3dd892d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -398,10 +398,10 @@ > <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>Shibboleth login</h3> >- <p><a id="shib_url" href="[% shibbolethLoginUrl | $raw %]">Log in using a Shibboleth account</a>.</p> >+ <h3 class="shib_title">Shibboleth login</h3> >+ <p><a id="shib_url" class="shib_url" href="[% shibbolethLoginUrl | $raw %]">Log in using a Shibboleth account</a>.</p> > [% UNLESS Koha.Preference('opacShibOnly') %] >- <h3>Local login</h3> >+ <h3 class="shib_local_title">Local login</h3> > [% END %] > [% END %] > [% END %] >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 025eec15fb..790e710da5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >@@ -83,7 +83,7 @@ > [% IF ( invalidShibLogin ) %] > <!-- This is what is displayed if shibboleth login has failed to match a koha user --> > <div class="alert alert-info"> >- <p>Sorry, your Shibboleth identity does not match a valid library identity.</p> >+ <p class="shib_invalid">Sorry, your Shibboleth identity does not match a valid library identity.</p> > [% UNLESS ( Koha.Preference('OPACShibOnly') ) %] > [% IF ( casAuthentication ) %] > [% IF ( invalidCasLogin ) %] >@@ -98,16 +98,16 @@ > [% END %] > </div> > [% ELSE %] >- <h2>Shibboleth Login</h2> >- <p><a href="[% shibbolethLoginUrl | $raw %]">Log in using a Shibboleth account.</a></p> >+ <h2 class="shib_title">Shibboleth Login</h2> >+ <p><a class="shib_url" href="[% shibbolethLoginUrl | $raw %]">Log in using a Shibboleth account.</a></p> > [% END # /IF invalidShibLogin %] > [% UNLESS ( Koha.Preference('OPACShibOnly') ) %] > [% IF ( casAuthentication ) %] > <h2>CAS login</h2> > <p>If you do not have a Shibboleth account, but you do have a CAS account, you can use CAS.</p> > [% ELSE %] >- <h2>Local login</h2> >- <p>If you do not have a Shibboleth account, but you do have a local login, then you may login below.</p> >+ <h2 class="shib_local_title">Local login</h2> >+ <p class="shib_local_text">If you do not have a Shibboleth account, but you do have a local login, then you may login below.</p> > [% END %] > [% END %] > [% END # /IF shibbolethAuthentication %] >-- >2.30.2
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 35147
:
157769
|
157770
|
157859
| 158018 |
158019