Bugzilla – Attachment 125486 Details for
Bug 29006
Make GoogleOpenIDConnect options consistent in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29006: Make GoogleOpenIDConnect options consistent in the OPAC
Bug-29006-Make-GoogleOpenIDConnect-options-consist.patch (text/plain), 7.20 KB, created by
Owen Leonard
on 2021-09-30 10:46:00 UTC
(
hide
)
Description:
Bug 29006: Make GoogleOpenIDConnect options consistent in the OPAC
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-09-30 10:46:00 UTC
Size:
7.20 KB
patch
obsolete
>From f44af341ec088d04e0f774978ed545fc4effffba Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 13 Sep 2021 14:49:53 +0000 >Subject: [PATCH] Bug 29006: Make GoogleOpenIDConnect options consistent in the > OPAC > >This patch makes modifications to OPAC templates to make the Google >login options more consistent. > >To test, apply the patch and rebuild the OPAC CSS >(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). > >- In the staff interface, enable the GoogleOpenIDConnect preference, and > populate the GoogleOAuth2ClientID the GoogleOAuth2ClientSecret with > values (they don't need to be valid). >- On the OPAC main page you should see a "Log in with Google" button > above the Koha login form. >- If you click the "Log in to your account" link at the top of the page > you should see a "Log in with Google" button in the modal window >- If you navigate directly to /cgi-bin/koha/opac-user.pl when not logged > in you should see the same "Log in with Google" button on that page. >- In each case the Google button should point to /cgi-bin/koha/svc/auth/googleopenidconnect >- If you disable GoogleOpenIDConnect the buttons should disappear. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 12 ++++++++++++ > .../opac-tmpl/bootstrap/en/includes/masthead.inc | 6 +++++- > .../opac-tmpl/bootstrap/en/modules/opac-auth.tt | 2 +- > .../opac-tmpl/bootstrap/en/modules/opac-main.tt | 4 ++++ > 4 files changed, 22 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index b5d1367634..e2f246f373 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -2656,4 +2656,16 @@ $star-selected: #EDB867; > margin-bottom: 1rem; > } > >+#openid_connect { >+ background-color: #fff; >+ border: 1px solid #AAA; >+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.2); >+ margin: .5em 0; >+ >+ i { >+ color: #b53329; >+ margin: 0 .5em; >+ } >+} >+ > @import "responsive"; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 6e612239bf..c7b678919b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -99,7 +99,7 @@ > [%# CAS authentication is too complicated for modal window %] > <a class="nav-link login-link" href="/cgi-bin/koha/opac-user.pl"><i class="fa fa-user fa-icon-black fa-fw" aria-hidden="true"></i> <span class="userlabel">Log in to your account</span></a> > [% ELSIF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %] >- <a class="nav-link login-link" href="/cgi-bin/koha/svc/auth/googleopenidconnect"><i class="fa fa-user fa-icon-black fa-fw" aria-hidden="true"></i> <span class="userlabel">Log in to your account</span></a> >+ <a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="nav-link login-link loginModal-trigger"><i class="fa fa-user fa-icon-black fa-fw" aria-hidden="true"></i> <span class="userlabel">Log in to your account</span></a> > [% ELSE %] > <a href="/cgi-bin/koha/opac-user.pl" class="nav-link login-link loginModal-trigger"><i class="fa fa-user fa-icon-black fa-fw" aria-hidden="true"></i> <span class="userlabel">Log in to your account</span></a> > [% END %] >@@ -371,6 +371,10 @@ > <form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="modalAuth"> > <input type="hidden" name="has-search-query" id="has-search-query" value="" /> > <div class="modal-body"> >+ [% IF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %] >+ <a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="btn btn-light" id="openid_connect"><i class="fa fa-google" aria-hidden="true"></i> Log in with Google</a> >+ <p>If you do not have a Google account, but do have a local account, you can still log in: </p> >+ [% END # /IF GoogleOpenIDConnect %] > [% IF ( shibbolethAuthentication ) %] > [% IF ( invalidShibLogin ) %] > <!-- This is what is displayed if shibboleth login has failed to match a koha user --> >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 e8b03356fa..0edcba968d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >@@ -162,7 +162,7 @@ > <p>Please note that the Google login will only work if you are using the e-mail address registered with this library.</p> > <p>If you want to, you can try to <a href="/cgi-bin/koha/svc/auth/googleopenidconnect?reauthenticate=select_account">log in using a different account</a> > [% END %] >- <a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="btn btn-primary" id="openid_connect">Log in with Google</a> >+ <a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="btn btn-light" id="openid_connect"><i class="fa fa-google" aria-hidden="true"></i> Log in with Google</a> > <p>If you do not have a Google account, but do have a local account, you can still log in: </p> > [% END # /IF GoogleOpenIDConnect %] > [% END # /UNLESS OPACShibOnly %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >index 5e0c99f229..ffa32a91c5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >@@ -183,6 +183,10 @@ > <input type="hidden" name="koha_login_context" value="opac" /> > <fieldset class="brief"> > <legend>Log in to your account:</legend> >+ [% IF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %] >+ <a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="btn btn-light" id="openid_connect"><i class="fa fa-google" aria-hidden="true"></i> Log in with Google</a> >+ <p>If you do not have a Google account, but do have a local account, you can still log in: </p> >+ [% END # /IF GoogleOpenIDConnect %] > <label for="userid">Login:</label> > <input class="form-control" type="text" id="userid" name="userid" /> > <label for="password">Password:</label> >-- >2.20.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 29006
:
124862
|
125177
|
125314
| 125486