From 7eebf895b9f0f033134be303d5cb71e2028af5c7 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia 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 /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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 184299c9c84ee35cdd31149214710778648729ad) Signed-off-by: Fridolin Somers --- 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 71fe13580a..e698ce8721 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -377,10 +377,10 @@

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

[% ELSE %] -

Shibboleth login

-

Log in using a Shibboleth account.

+

Shibboleth login

+

Log in using a Shibboleth account.

[% UNLESS Koha.Preference('opacShibOnly') %] -

Local login

+

Local login

[% 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 3e95981a36..42c92014e5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt @@ -88,7 +88,7 @@ [% IF ( invalidShibLogin ) %]
-

Sorry, your Shibboleth identity does not match a valid library identity.

+

Sorry, your Shibboleth identity does not match a valid library identity.

[% UNLESS ( Koha.Preference('OPACShibOnly') ) %] [% IF ( casAuthentication ) %] [% IF ( invalidCasLogin ) %] @@ -103,16 +103,16 @@ [% END %]
[% ELSE %] -

Shibboleth Login

-

Log in using a Shibboleth account.

+

Shibboleth Login

+

Log in using a Shibboleth account.

[% END # /IF invalidShibLogin %] [% UNLESS ( Koha.Preference('OPACShibOnly') ) %] [% IF ( casAuthentication ) %]

CAS login

If you do not have a Shibboleth account, but you do have a CAS account, you can use CAS.

[% ELSE %] -

Local login

-

If you do not have a Shibboleth account, but you do have a local login, then you may login below.

+

Local login

+

If you do not have a Shibboleth account, but you do have a local login, then you may login below.

[% END %] [% END %] [% END # /IF shibbolethAuthentication %] -- 2.39.5