Bug 30265

Summary: Hide 'Log into your account' in OPAC authentication page
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: OPACAssignee: Fridolin Somers <fridolin.somers>
Status: In Discussion --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, nick, oleonard, sally.healey
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Screenshot showing double auth form
Bug 30265 - Hide 'Log into your account' in OPAC authentication page
Bug 30077: Add system preference IntranetAddMastheadLibraryPulldown
Bug 30265 - Hide 'Log into your account' in OPAC authentication page

Description Fridolin Somers 2022-03-10 04:58:52 UTC
Created attachment 131536 [details]
Screenshot showing double auth form

If not logged in, in OPAC header there is link 'Log into your account'.
Using it shows a popup with authentication form.

In authentication page /cgi-bin/koha/opac-user.pl this double authentication form feels not ergonomic. It may lead to misunderstanding.

We can simply hide this link in this special page.
Comment 1 Fridolin Somers 2022-03-10 05:28:38 UTC
Created attachment 131537 [details] [review]
Bug 30265 - Hide 'Log into your account' in OPAC authentication page

If not logged in, in OPAC header there is link 'Log into your account'.
Using it shows a popup with authentication form.

In authentication page /cgi-bin/koha/opac-user.pl this double authentication form feels not ergonomic. It may lead to misunderstanding.

We can simply hide this link in this special page.

Test plan :
1) Go to OPAC not logged in
2) Go to main page => You see link 'Log into your account'
3) Go to /cgi-bin/koha/opac-user.pl => You don't see 'Log into your account'
4) Authenticate
5) You are still in /cgi-bin/koha/opac-user.pl => You see link 'Welcome, XXX'
6) Go to main page => You see link 'Welcome, XXX'
Comment 2 Biblibre Sandboxes 2022-03-10 12:15:48 UTC
Created attachment 131545 [details] [review]
Bug 30077: Add system preference IntranetAddMastheadLibraryPulldown

To test:
1. Apply patch, updatedatabase, restart_all
2. Search for the system pref 'IntranetAddMastheadLibraryPulldown'
3. Set it to 'Show'.
4. Go to any page that contains header search box and click on 'Search the catalog'.
5. To the left of the search bar you should see a dropdown for branches.
6. This should be defaulted to 'All libraries'.
7. In the dropdown choose any branch and do a search and make sure it is correctly limiting to that branch.
8. Try changing to a different branch and doing another search. It should correcrly limit to that branch BUT it should also default back to 'All libraries' for the next search.
9. Try selecting 'All libraries' from the top of the dropdown and make sure it is correctly searching all branches.
10. Turn on the system pref 'IntranetCatalogSearchPulldown' and make sure it looks nice with both of those dropdowns and functions when you use limiters from both dropdowns.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 3 Biblibre Sandboxes 2022-03-10 12:15:51 UTC
Created attachment 131546 [details] [review]
Bug 30265 - Hide 'Log into your account' in OPAC authentication page

If not logged in, in OPAC header there is link 'Log into your account'.
Using it shows a popup with authentication form.

In authentication page /cgi-bin/koha/opac-user.pl this double authentication form feels not ergonomic. It may lead to misunderstanding.

We can simply hide this link in this special page.

Test plan :
1) Go to OPAC not logged in
2) Go to main page => You see link 'Log into your account'
3) Go to /cgi-bin/koha/opac-user.pl => You don't see 'Log into your account'
4) Authenticate
5) You are still in /cgi-bin/koha/opac-user.pl => You see link 'Welcome, XXX'
6) Go to main page => You see link 'Welcome, XXX'

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 4 Sally 2022-03-10 12:17:34 UTC
Works great, so signed off - thanks Fridolin.

Apologies for the extra patch; I was signing off multiple bugs on a sandbox.  Should've reloaded :(
Comment 5 Fridolin Somers 2022-03-10 21:59:56 UTC
Thanks a lot for testing Sally ;)
Comment 6 Jonathan Druart 2022-03-21 14:05:32 UTC
I am not sure about this change.
We are introducing an inconsistency IMO. If you are used to click on the login button on the header, you will simply click it, no matter on which page you are.
Comment 7 Jonathan Druart 2022-03-21 14:43:26 UTC
Joubu> oleonard What's your opinion on bug 30265?
oleonard> Joubu I don't think it's that confusing, but I don't object to the patch. Better safe than confusing.
Joubu> To me it's confusing with the patch :)
oleonard> Because you think folks will look for the link in the header and not find it? 
Joubu> yes 
oleonard> I think we'd have to do actual user testing to be sure.
Comment 8 Fridolin Somers 2022-03-21 22:08:51 UTC
An example of this behavior :
We don't show catalog search form in advanced search.
Comment 9 Nick Clemens (kidclamp) 2022-03-28 12:51:59 UTC
I see the two forms as a feature, not a bug 

We have users that customise the two forms and use them differently, or have JS to make the header link a direct link to SSO, and use the form for local only users - removing this is going to cause confusion
Comment 10 Katrin Fischer 2022-03-28 12:59:34 UTC
(In reply to Nick Clemens from comment #9)
> I see the two forms as a feature, not a bug 
> 
> We have users that customise the two forms and use them differently, or have
> JS to make the header link a direct link to SSO, and use the form for local
> only users - removing this is going to cause confusion

Reading that... we do somethig similar and I think I'd also like to keep the link on top.
Comment 11 Fridolin Somers 2022-04-12 15:09:25 UTC
OK lets keep it.
Comment 12 Fridolin Somers 2022-12-16 20:50:26 UTC
Hi,

I reopen because I found a JS in actual code :

In opac-auth.tt
<script>
    // Hide circular 'Log in to Your Account' link in opac-auth.pl
    $(document).ready(function() {
        if ( $("#auth" ) ) { $("#members ul li a").hide(); }
    });
</script>

https://git.koha-community.org/Koha-community/Koha/src/commit/3dcdd6db788b2c23320ca24a900d37d0454dbbec/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt#L284

It does actually not work because the id="members" is now on ul itself.

If we decide to keep the actual behavior we should remove this JS.
Comment 13 Jonathan Druart 2023-01-04 14:30:07 UTC
Owen, what's your opinion on this?
Comment 14 Katrin Fischer 2023-04-16 12:31:32 UTC
(In reply to Fridolin Somers from comment #11)
> OK lets keep it.

+1

Should we remove the non-functional JS then?