Bug 32125: Impliment modal context return on opac-detail.
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 6 Oct 2022 13:41:19 +0000 (14:41 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 9 Feb 2023 13:21:31 +0000 (10:21 -0300)
This patch utilises the generic return option introduced in the previous
patch to prevent lose of context when clicking to login to add a comment
to a biblio.

Test plan
1/ Test that prior to this patch, upon clicking 'Log in to your account
to post a comment' you are redirected to opac-user.pl and thus loose
your context.
2/ Apply the patch
3/ Confirm that a login using the 'Log in to your account to post a
comment' link now redirect immediatly back the correct record and thus
maintains context.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt

index ad1229a..dba7c9b 100644 (file)
                                         [% END %]
                                     [% ELSE %]
                                         <div id="addcomment">
-                                            <a class="login-link loginModal-trigger" role="button" data-toggle="modal" href="/cgi-bin/koha/opac-user.pl">Log in to your account</a> to post a comment.
+                                            <a class="login-link loginModal-trigger" role="button" data-toggle="modal" data-return="true" href="/cgi-bin/koha/opac-user.pl">Log in to your account</a> to post a comment.
                                         </div>
                                     [% END # / IF loggedinusername %]
                                 </div> <!-- / #comments -->