Bug 27318

Summary: make shibboleth instructions customizable in the loginModal
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: OPACAssignee: Lucas Gass (lukeg) <lucas>
Status: CLOSED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, lucy.vaux-harvey
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 25405    
Bug Blocks:    
Attachments: Bug 27318: Add ShibbolethLoginInstructions to News

Description Lucas Gass (lukeg) 2020-12-30 21:58:46 UTC
If you enable shibboleth for sign on in the OPAC and go to the loginModal the instructions say "If you have a Shibboleth account, please click here to login."

That language is confusing to most users who don't know what shibboleth is. This area should be editable via the News Tool so librarians can add their own language here.

I have moved some things in the loginModal in Bug 25405 and this would build upon that.
Comment 1 Lucas Gass (lukeg) 2020-12-30 23:04:04 UTC
Created attachment 114755 [details] [review]
Bug 27318: Add ShibbolethLoginInstructions to News

This patch adds ShibbolethLoginInstructions as an option in the News Tool so librarians customize the wording within the loginModal
To test:
1. Enable shibboleth in your koha-conf.xml by changng the value of <useshibboleth> to 1.
2. I also add the following to my koha-conf:
   <shibboleth>
    <matchpoint>email</matchpoint>
        <mapping>
            <email        is="SHIB_ATTR_email"></email>
        </mapping>
    </shibboleth>
3. Look at the OPAC loginModal and make sure something like "If you have a Shibboleth account, please click here to login." is visiible.
4. Apply patch
5. Go to /cgi-bin/koha/tools/koha-news.pl and make a New entry
6. Choose ShibbolethLoginInstructions and enter something like: '<h1>Sign in using:</h1>
<a href="localhost:8080/Shibboleth.sso/Login?target=localhost:8080/cgi-bin/koha/opac-main.pl"><div class="shibGoogle">Google</div></a>'
7. Reload the OPAC and look at the loginModal again, it should show your new login instructions instead of the default.
Comment 2 David Cook 2021-01-04 01:11:59 UTC
I like this idea in theory.

As I noted on Bug 25405, I agree that most users aren't going to know what Shibboleth is. Moreover, it's not meaningful, since many Koha libraries don't actually use Shibboleth as an Identity Provider, and we really do want to be referencing the Identity Provider branding at this point (whether it is Google, Facebook, Department of X, et cetera).

However, this patch isn't really workable at the moment, since we lose the "shibbolethLoginUrl" variable, which is dynamically defined based on the page you are on at any given time.
Comment 3 Lucas Gass (lukeg) 2021-01-06 15:58:14 UTC
(In reply to David Cook from comment #2)
> I like this idea in theory.
> 
> As I noted on Bug 25405, I agree that most users aren't going to know what
> Shibboleth is. Moreover, it's not meaningful, since many Koha libraries
> don't actually use Shibboleth as an Identity Provider, and we really do want
> to be referencing the Identity Provider branding at this point (whether it
> is Google, Facebook, Department of X, et cetera).
> 
> However, this patch isn't really workable at the moment, since we lose the
> "shibbolethLoginUrl" variable, which is dynamically defined based on the
> page you are on at any given time.

David,

I appreciate you testing this. It is unfortunate that we loose the shibbolethLoginUrl variable and I see that this makes this solution unworkable. Since we cannot use Template Toolkit from within the News Editor I don't see anyway to let the user add the variable back into the custom field.

Therefore I think the best thing we can do is add class names and ID's as you mentioned in Bug 25405 in order to make it easier to customize via jQuery/CSS. 

I'll close this bug at this time.
Comment 4 David Cook 2021-01-06 23:55:41 UTC
(In reply to Lucas Gass from comment #3)
> David,
> 
> I appreciate you testing this. It is unfortunate that we loose the
> shibbolethLoginUrl variable and I see that this makes this solution
> unworkable. Since we cannot use Template Toolkit from within the News Editor
> I don't see anyway to let the user add the variable back into the custom
> field.
> 
> Therefore I think the best thing we can do is add class names and ID's as
> you mentioned in Bug 25405 in order to make it easier to customize via
> jQuery/CSS. 
> 
> I'll close this bug at this time.

Sorry for being a buzzkill!