Bug 36141

Summary: Add classes to CAS text on OPAC login page
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: OPACAssignee: Fridolin Somers <fridolin.somers>
Status: Pushed to oldstable --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: david, lucas, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds classes to the CAS-related messages on the OPAC login page. This will make it easier for libraries to customize using CSS and JavaScript. The new classes are cas_invalid, cas_title, and cas_url. It also moves the invalid CAS login message to above the CAS login heading (the same as for the Shibboleth login).
Version(s) released in:
24.11.00,24.05.02,23.11.07
Circulation function:
Bug Depends on: 35147    
Bug Blocks:    
Attachments: Bug 36141 - Add classes to CAS text on OPAC login page
Bug 36141 - Add classes to CAS text on OPAC login page

Description Fridolin Somers 2024-02-21 09:09:08 UTC
Like Bug 35147 for Shibboleth, add classes to CAS authentication on OPAC to make it easier to customize.
Comment 1 Fridolin Somers 2024-02-21 09:37:38 UTC
Created attachment 162315 [details] [review]
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.
Comment 2 Matt Blenkinsop 2024-05-14 08:36:27 UTC
Created attachment 166676 [details] [review]
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>
Comment 3 Lucas Gass (lukeg) 2024-05-14 19:54:38 UTC
What about these messages? 

-If you have a CAS account, you may use that below.
-If you have a CAS account, please choose against which one you would like to authenticate
Comment 4 Katrin Fischer 2024-06-27 13:20:54 UTC
Picking an easy one out of the QA queue for main.

Fixed inline:
* Commit title does not start with 'Bug XXXXX: ' - b62a82e347d
Comment 5 Katrin Fischer 2024-06-27 15:26:30 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-07-01 15:05:43 UTC
> 
> Fixed inline:
> * Commit title does not start with 'Bug XXXXX: ' - b62a82e347d


Oups I did it again :D
Comment 7 Lucas Gass (lukeg) 2024-07-19 15:31:44 UTC
Backported to 24.05.x for upcoming 24.05.02
Comment 8 Fridolin Somers 2024-07-22 09:54:12 UTC
Pushed to 23.11.x for 23.11.07
Comment 9 Wainui Witika-Park 2024-09-17 03:53:07 UTC
Not backporting to 23.05.x unless requested