Bugzilla – Attachment 116346 Details for
Bug 25405
Make separation of Shibboleth and Local login clearer in modal login on OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25405: clearly define local login and shib login sections
Bug-25405-clearly-define-local-login-and-shib-logi.patch (text/plain), 8.96 KB, created by
Lucas Gass (lukeg)
on 2021-02-04 23:47:52 UTC
(
hide
)
Description:
Bug 25405: clearly define local login and shib login sections
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2021-02-04 23:47:52 UTC
Size:
8.96 KB
patch
obsolete
>From 49c3c2765c0ac0b8cd023c8a3bd201c23fb3f1ed Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 30 Dec 2020 21:39:22 +0000 >Subject: [PATCH] Bug 25405: clearly define local login and shib login sections > >This patch attempts to clearly seperate local login from shibboleth login in the OPAC loginModal. >It includes seperate id's for local and shibboleth to make it easier to customize this login > >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 loginModal in the OPAC by clicking 'Log in to your account' in the top right corner. >4. Apply patch, restart all, and regenerate CSS. (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client) >5. Look at the loginModal again the shibboleth section should be underneath the local login stuff. >6. Inscept the loginModal and make sure there is a <div> for both local_login and external_login >7. Make sure it all works. >8. Turn Shibboleth back off and restart all. >9. Make sure everything still works and looks good without Shibboleth off. >10. Check HTML elements #external_login, #external_login_button, #external_login_name, and #external_login_icon. There were added to allow for further customization with css/js >--- > koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 36 +++++++++++ > .../opac-tmpl/bootstrap/en/includes/masthead.inc | 75 +++++++++++----------- > 2 files changed, 75 insertions(+), 36 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index 8f411ae789..4225c35788 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -1810,6 +1810,41 @@ nav { > } > > #loginModal { >+ #local_login, #external_login { >+ border: 1px solid #dbdbdb; >+ padding: 7px; >+ } >+ >+ #external_login { >+ box-shadow: 0 0 0 1px #dbdbdb; >+ padding: 7px; >+ } >+ >+ #external_login_button { >+ border: 1px solid #dbdbdb; >+ padding: 2px 10px 2px 10px; >+ color: #000; >+ border-radius: 4px; >+ } >+ >+ #external_login { >+ box-shadow: 0 0 0 1px #dbdbdb; >+ padding: 1em; >+ } >+ >+ #external_login a:hover { >+ text-decoration: none; >+ } >+ >+ #external_login_button:hover { >+ text-decoration: none; >+ background-color: #f0f0f0; >+ } >+ >+ #external_login_name { >+ padding-left: 1em; >+ } >+ > input { > box-sizing: border-box; > display: block; >@@ -1822,6 +1857,7 @@ nav { > font-size: 100%; > padding: .5em; > transition: background-color .5s ease; >+ margin-top: 1em; > > &:hover { > background: #77b50f none; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 9436d99e49..da92627952 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -367,46 +367,49 @@ > <span aria-hidden="true">×</span> > </button> > </div> >- <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 ( shibbolethAuthentication ) %] >+ <div class="modal-body"> >+ <div id="local_login"> >+ <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="" /> >+ <input type="hidden" name="koha_login_context" value="opac" /> >+ <fieldset class="brief"> >+ <label for="muserid">Login:</label><input type="text" id="muserid" name="userid" /> >+ <label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" /> >+ </fieldset> >+ <input type="submit" class="btn btn-primary" value="Log in" /> >+ </form> <!-- /#auth --> >+ </div> >+ [% IF Koha.Preference( 'OpacLoginInstructions' ) %] >+ <div id="nologininstructions-modal" class="nologininstructions"> >+ [% Koha.Preference( 'OpacLoginInstructions' ) | $raw %] >+ </div> >+ [% END %] >+ [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] >+ <div id="forgotpassword-modal" class="forgotpassword"> >+ <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a> >+ </div> >+ [% END %] >+ [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %] >+ <div id="patronregistration-modal" class="patronregistration"> >+ <p>Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></p> >+ </div> >+ [% END %] >+ [% IF ( shibbolethAuthentication ) %] >+ <div id="external_login"> > [% IF ( invalidShibLogin ) %] > <!-- This is what is displayed if shibboleth login has failed to match a koha user --> >- <div class="alert alert-info"> >- <p>Sorry, your Shibboleth identity does not match a valid library identity. If you have a local login, you may use that below.</p> >- </div> >+ <div class="alert alert-info"> >+ <p>Sorry, your Shibboleth identity does not match a valid library identity. If you have a local login, you may use that below.</p> >+ </div> > [% ELSE %] >- <h3>Shibboleth login</h3> >- <p>If you have a Shibboleth account, please <a href="[% shibbolethLoginUrl | $raw %]">click here to login</a>.</p> >- <h3>Local Login</h3> >- [% END %] >- [% END %] >- <input type="hidden" name="koha_login_context" value="opac" /> >- <fieldset class="brief"> >- <label for="muserid">Login:</label><input type="text" id="muserid" name="userid" /> >- <label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" /> >- [% IF Koha.Preference( 'OpacLoginInstructions' ) %] >- <div id="nologininstructions-modal" class="nologininstructions"> >- [% Koha.Preference( 'OpacLoginInstructions' ) | $raw %] >- </div> >- [% END %] >- [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] >- <div id="forgotpassword-modal" class="forgotpassword"> >- <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a> >- </div> >- [% END %] >- [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %] >- <div id="patronregistration-modal" class="patronregistration"> >- <p>Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></p> >- </div> >+ <h3>Sign in using:</h3> >+ <a href="[% shibbolethLoginUrl | $raw %]"> >+ <div id="external_login_button"><i id="external_login_icon" class="fa fa-user-circle-o" aria-hidden="true"></i><span id="external_login_name"> Shibboleth</span></div> >+ </a> > [% END %] >- </fieldset> >- </div> >- <div class="modal-footer"> >- <input type="submit" class="btn btn-primary" value="Log in" /> >- </div> >- </form> <!-- /#auth --> >+ </div> >+ [% END %] >+ </div> > </div> <!-- /.modal-content --> > </div> <!-- /.modal-dialog --> > </div> <!-- /#modalAuth --> >-- >2.11.0
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 25405
:
104464
|
104465
|
104516
|
104520
|
104522
|
104542
|
114754
|
116346
|
116348
|
116349
|
116350
|
116351