From 51f5429ea333b5e833fb063d337d1c8fd2c8ba7a Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 21 Feb 2024 10:09:30 +0100 Subject: [PATCH] Bug 36141 - Add classes to CAS text on OPAC login page This enhancement makes it easier for libraries to change the CAS-related messages on the OPAC login page. It moved the invalid CAS login message above the CAS loging heading, like for Shibboleth login. Test plan : 1) Enable system preference 'casAuthentication' 2) Restart all caches (restart_all in koha-testing-docker) 3) Go to OPAC, logged out 4) Click on 'Log in to your account' 5) In the staff interface, edit the OPACUserJS system preference. Add the following JS and Save: $(".cas_invalid").text("Test changing the invalid CAS login message."); $(".cas_title").text("Test changing the CAS login heading."); $(".cas_url").text("Test changing the CAS account link text."); $(".cas_url").after(' '); 6) Refresh the OPAC and confirm the text changes to reflect your JS. --- .../bootstrap/en/modules/opac-auth.tt | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) 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 f76ded9c5f..bb15dc1849 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 ( casAuthentication ) %] [% IF ( invalidCasLogin ) %] -

Sorry, the CAS login also failed. If you have a local login you may use that below.

+

Sorry, the CAS login also failed. If you have a local login you may use that below.

[% ELSE %]

If you have a CAS account, you may use that below.

[% END %] @@ -103,7 +103,7 @@ [% END # /IF invalidShibLogin %] [% UNLESS ( Koha.Preference('OPACShibOnly') ) %] [% IF ( casAuthentication ) %] -

CAS login

+

CAS login

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

[% ELSE %]

Local login

@@ -116,34 +116,36 @@ [% IF ( casAuthentication ) %] [% IF ( shibbolethAuthentication ) %] [% IF ( casServerUrl ) %] -

Log in.

+

Log in.

[% END %] [% IF ( casServersLoop ) %]

Please choose against which one you would like to authenticate:

[% END %] [% ELSE %] -

CAS login

- [% IF ( invalidCasLogin ) %] - -

Sorry, the CAS login failed.

+
+ +

Sorry, the CAS login failed.

+
[% END %] +

CAS login

+ [% IF ( casServerUrl ) %] -

Log in using a CAS account.

+

Log in using a CAS account.

[% END %] [% IF ( casServersLoop ) %]

If you have a CAS account, please choose against which one you would like to authenticate:

[% END %] -- 2.43.1