From a26bade1a01d2f1873a2d4c724faaf68896172a2 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 --- 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 685d72b499..0abc71fc86 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.40.1