From 0e5d823cf15dd32c2f5e1cbe3a255b52006267fb Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 5 May 2017 14:57:48 -0400 Subject: [PATCH] Bug 18549: Provide logout modal dialogue I'm sure someone else could make the bootstrap and javascript prettier. However, this functions. TEST PLAN --------- 1) log in with Google OAuth and log out -- notice if you click login again, you continue as if you never logged out. This is because the current log out is a Koha only logout. 2) apply patch 3) log in with Google OAuth and log out 4) click 'Koha only' 5) log in with Google OAuth -- same continuation as before. 6) log out, but click 'Koha and Google' 7) log in with Google OAuth -- authentication is required again 8) koha qa test tools Signed-off-by: Nick Clemens --- .../opac-tmpl/bootstrap/en/includes/masthead.inc | 27 ++++++++++++++++++++-- koha-tmpl/opac-tmpl/bootstrap/js/script.js | 6 ++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index fbb7d51..c8ecf3c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -92,7 +92,7 @@ [%# CAS authentication is too complicated for modal window %]
  • Log in to your account
  • [% ELSIF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %] -
  • Log in to your account
  • +
  • Log in to your account
  • [% ELSE %]
  • Log in to your account
  • [% END %] @@ -109,8 +109,12 @@ [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] [% IF ( loggedinusername ) %]
  • + [% END %] + Log out

    [% END %] [% END %] @@ -337,3 +341,22 @@ + + + diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/script.js b/koha-tmpl/opac-tmpl/bootstrap/js/script.js index de8401b..d9a5b7e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/script.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/script.js @@ -58,9 +58,13 @@ $(document).ready(function(){ $("#loginModal").modal("show"); $("#members").removeAttr("style"); }); + $(".logoutOAuthModal-trigger").on("click",function(e){ + e.preventDefault(); + $("#logoutOAuthModal").modal("show"); + }); $("#loginModal").on("hide",function(){ if($("#user-menu-trigger").is(":hidden")){ $("#members").removeAttr("style"); } }); -}); \ No newline at end of file +}); -- 2.1.4