Bug 17993 - Do not use modal authentication with CAS - tags
authorFridolin Somers <fridolin.somers@biblibre.com>
Wed, 25 Jan 2017 13:47:02 +0000 (14:47 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Mon, 8 May 2017 13:02:17 +0000 (09:02 -0400)
Bug 12046 corrected the fact that modal dialog does not allow to use the CAS authentication in main authentication link.
This must also be corrected in link for tags in detail page : "Log in to add tags"

Test plan :
- Enable syspref casAuthentication
- Go to OPAC
- Go to a record detail page opac-detail.pl
- Click on "Log in to add tags"
=> Without patch you get the modal login popup
=> With patch you go to the login page opac-user.pl

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt

index b5066fe..1e62157 100644 (file)
                                     </span>
                                     <a class="tag_add" id="tag_add[% biblionumber %]" href="#">Add tag(s)</a>
                                 [% ELSE %]
-                                    <span id="login4tags"><a class="loginModal-trigger" data-toggle="modal" role="button" href="/cgi-bin/koha/opac-user.pl">Log in to add tags.</a></span>
+                                    <span id="login4tags">
+                                        [% IF Koha.Preference('casAuthentication') %]
+                                            [%# CAS authentication is too complicated for modal window %]
+                                            <a href="/cgi-bin/koha/opac-user.pl">Log in to add tags.</a>
+                                        [% ELSE %]
+                                            <a class="loginModal-trigger" data-toggle="modal" role="button" href="/cgi-bin/koha/opac-user.pl">Log in to add tags.</a>
+                                        [% END %]
+                                    </span>
                                 [% END %]
                             [% END # / IF TagsInputEnabled %]
                         </div>