Bugzilla – Attachment 100156 Details for
Bug 24803
Clicking "Log in to your account" throws fatal Javascript error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24803: Remove JS error by following Bootstrap instructions
Bug-24803-Remove-JS-error-by-following-Bootstrap-i.patch (text/plain), 2.58 KB, created by
David Cook
on 2020-03-05 00:04:25 UTC
(
hide
)
Description:
Bug 24803: Remove JS error by following Bootstrap instructions
Filename:
MIME Type:
Creator:
David Cook
Created:
2020-03-05 00:04:25 UTC
Size:
2.58 KB
patch
obsolete
>From 113a34f97b3d315ea09aab1a0c58bd47fdc60f76 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Wed, 4 Mar 2020 23:47:34 +0000 >Subject: [PATCH] Bug 24803: Remove JS error by following Bootstrap > instructions > >This patch patches #lodinModal to Bootstrap's click.modal.data-api event handler >for the '[data-toggle="modal"] selector, so Bootstrap can handle the >hide/show behaviour of the login modal. > >Test plan: >1. Apply patch >2. Open F12 dev tools >3. Click "Log in to your account" on OPAC >4. Observe no Javascript errors in console >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 2 +- > koha-tmpl/opac-tmpl/bootstrap/js/script.js | 6 +----- > 2 files changed, 2 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index a27be4d487..ca0b96a317 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -102,7 +102,7 @@ > [% ELSIF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %] > <a class="login-link" href="/cgi-bin/koha/svc/auth/googleopenidconnect" role="button" data-toggle="modal"><i class="fa fa-user fa-icon-white fa-fw"></i> <span class="userlabel">Log in to your account</span></a> > [% ELSE %] >- <a href="/cgi-bin/koha/opac-user.pl" class="login-link loginModal-trigger" role="button" data-toggle="modal"><i class="fa fa-user fa-icon-white fa-fw"></i> <span class="userlabel">Log in to your account</span></a> >+ <a href="#loginModal" class="login-link loginModal-trigger" role="button" data-toggle="modal"><i class="fa fa-user fa-icon-white fa-fw"></i> <span class="userlabel">Log in to your account</span></a> > [% END %] > [% END %] > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/script.js b/koha-tmpl/opac-tmpl/bootstrap/js/script.js >index 30d792f448..e8cd079bb3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/script.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/script.js >@@ -66,8 +66,4 @@ $(document).ready(function(){ > $(".menu-collapse").toggle(); > }); > >- $(".loginModal-trigger").on("click",function(e){ >- e.preventDefault(); >- $("#loginModal").modal("show"); >- }); >-}); >\ No newline at end of file >+}); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24803
:
100156
|
100157
|
100159
|
100160
|
100191
|
100208
|
100209
|
100217