Bugzilla – Attachment 166676 Details for
Bug 36141
Add classes to CAS text on OPAC login page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36141 - Add classes to CAS text on OPAC login page
Bug-36141---Add-classes-to-CAS-text-on-OPAC-login-.patch (text/plain), 6.00 KB, created by
Matt Blenkinsop
on 2024-05-14 08:36:27 UTC
(
hide
)
Description:
Bug 36141 - Add classes to CAS text on OPAC login page
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-05-14 08:36:27 UTC
Size:
6.00 KB
patch
obsolete
>From 1c6e18c2391395ada08b0531c562bb6b5905f41b Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >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(' <i class="fa fa-globe" aria-hidden="true"></i>'); >6) Refresh the OPAC and confirm the text changes to reflect your JS. > >Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >--- > .../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 52a59027c9..27aaaa0d76 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 ) %] > <!-- This is what is displayed if cas login has failed --> >- <p>Sorry, the CAS login also failed. If you have a local login you may use that below.</p> >+ <p class="cas_invalid">Sorry, the CAS login also failed. If you have a local login you may use that below.</p> > [% ELSE %] > <p>If you have a CAS account, you may use that below.</p> > [% END %] >@@ -103,7 +103,7 @@ > [% END # /IF invalidShibLogin %] > [% UNLESS ( Koha.Preference('OPACShibOnly') ) %] > [% IF ( casAuthentication ) %] >- <h2>CAS login</h2> >+ <h2 class="cas_title">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 class="shib_local_title">Local login</h2> >@@ -116,34 +116,36 @@ > [% IF ( casAuthentication ) %] > [% IF ( shibbolethAuthentication ) %] > [% IF ( casServerUrl ) %] >- <p><a href="[% casServerUrl | $raw %]">Log in.</a><p> >+ <p><a class="cas_url" href="[% casServerUrl | $raw %]">Log in.</a><p> > [% END %] > > [% IF ( casServersLoop ) %] > <p>Please choose against which one you would like to authenticate: </p> > <ul> > [% FOREACH casServer IN casServersLoop %] >- <li><a href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li> >+ <li><a class="cas_url" href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li> > [% END %] > </ul> > [% END %] > [% ELSE %] >- <h2>CAS login</h2> >- > [% IF ( invalidCasLogin ) %] >- <!-- This is what is displayed if cas login has failed --> >- <p>Sorry, the CAS login failed.</p> >+ <div class="alert alert-info"> >+ <!-- This is what is displayed if cas login has failed --> >+ <p class="cas_invalid">Sorry, the CAS login failed.</p> >+ </div> > [% END %] > >+ <h2 class="cas_title">CAS login</h2> >+ > [% IF ( casServerUrl ) %] >- <p><a href="[% casServerUrl | $raw %]">Log in using a CAS account.</a><p> >+ <p><a class="cas_url" href="[% casServerUrl | $raw %]">Log in using a CAS account.</a><p> > [% END %] > > [% IF ( casServersLoop ) %] > <p>If you have a CAS account, please choose against which one you would like to authenticate:</p> > <ul> > [% FOREACH casServer IN casServersLoop %] >- <li><a href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li> >+ <li><a class="cas_url" href="[% casServer.value | $raw %]">[% casServer.name | html %]</a></li> > [% END %] > </ul> > [% END %] >-- >2.37.1 (Apple Git-137.1)
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 36141
:
162315
| 166676