Bug 30979: Add modal trigger to shibboleth target url
Signed-off-by: Silvia Meakins <smeakins@eso.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
1d2539b803
commit
89b008bccd
|
|
@ -385,7 +385,7 @@
|
|||
</div>
|
||||
[% ELSE %]
|
||||
<h3>Shibboleth login</h3>
|
||||
<p><a href="[% shibbolethLoginUrl | $raw %]">Log in using a Shibboleth account</a>.</p>
|
||||
<p><a id="shib_url" href="[% shibbolethLoginUrl | $raw %]">Log in using a Shibboleth account</a>.</p>
|
||||
[% UNLESS Koha.Preference('opacShibOnly') %]
|
||||
<h3>Local login</h3>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -68,6 +68,9 @@ $(document).ready(function() {
|
|||
let url = new URL(window.location.href);
|
||||
url.searchParams.append('modal','checkout');
|
||||
$('#modalAuth').append('<input type="hidden" name="return" value="' + url.href +'" />');
|
||||
$('#shib_login').each(function(){
|
||||
this.url = this.url.replace(/target=(.*)/, "target=" + url.href);
|
||||
});
|
||||
$('#loginModal').modal('show');
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue