From f44af341ec088d04e0f774978ed545fc4effffba Mon Sep 17 00:00:00 2001 From: Owen Leonard 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 Signed-off-by: Katrin Fischer --- 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 %] [% ELSIF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %] - + [% ELSE %] [% END %] @@ -371,6 +371,10 @@