[Koha-bugs] [Bug 31699] Add a generic way to redirect back to the page you were on at login for modal logins

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Oct 28 10:09:18 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31699

--- Comment #13 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
(In reply to Katrin Fischer from comment #10)
> This works well and is an improvement.
> 
> Tiny glitch: We return to the same page, but the active tab is 'holdings',
> instead of 'comments' now. I was wondering: Maybe it would be nice to be
> able to set the return URL in the data attribute? Then we could also put
> things like the anchor for the tab.
> 
> I don't think this is worth failing this tho :)

So this isn't actually about setting the return url.. we already do that.. it's
that the # values in the URI are local to the browser and not taken into
account on return.

I actually added code to deal with this for my catalog concerns bug, but for
re-triggering the modal rather than switching tab.. It will need custom JS per
case though I believe.

Example of what I did for catalog concerns:

    let urlParams = new URLSearchParams(window.location.search);
    if ( urlParams.has('modal') ) {
        let modal = urlParams.get('modal');
        if ( modal == 'concern' ) {
            $("#addConcernModal").modal('show');
        }
    }

We'd need to do something similar for 'tab' to trigger the JS to select the
right tab after page load.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list