From 89b008bccd54dfc2c85458e8f346dac367804d0e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 20 Feb 2023 17:02:05 +0000 Subject: [PATCH] Bug 30979: Add modal trigger to shibboleth target url Signed-off-by: Silvia Meakins Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index d916d73973..8ea412792d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -385,7 +385,7 @@ [% ELSE %]

Shibboleth login

-

Log in using a Shibboleth account.

+

Log in using a Shibboleth account.

[% UNLESS Koha.Preference('opacShibOnly') %]

Local login

[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js b/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js index f846a1bf57..1243ee67c8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js @@ -68,6 +68,9 @@ $(document).ready(function() { let url = new URL(window.location.href); url.searchParams.append('modal','checkout'); $('#modalAuth').append(''); + $('#shib_login').each(function(){ + this.url = this.url.replace(/target=(.*)/, "target=" + url.href); + }); $('#loginModal').modal('show'); return false; } -- 2.39.5