From 6fd6072e4974858a88fd83fa1ada3dd97372e4c7 Mon Sep 17 00:00:00 2001 From: David Cook 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 Signed-off-by: Bernardo Gonzalez Kriegel JS error verified, and corrected. No qa errors. --- 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 ) %] [% ELSE %] - + [% 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.17.1