From 0617eb77ae20de7865884d10eedcd5e32c6af2f0 Mon Sep 17 00:00:00 2001 From: William Tam Date: Mon, 23 Sep 2024 10:34:17 -0400 Subject: [PATCH] fixing error introduced to legacy code while developing new code --- assets/js/loginform_helpers.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/assets/js/loginform_helpers.js b/assets/js/loginform_helpers.js index 83985ee..a5b21d8 100644 --- a/assets/js/loginform_helpers.js +++ b/assets/js/loginform_helpers.js @@ -16,20 +16,16 @@ jQuery(document).ready(function($) { setPBSOAuthRememberMe(); }); - /* Various things to do when someone clicks on a login link */ - $(".passport-login-wrap li a").on("click") { + /* set a loginprovider cookie when the person chooses one */ + $(".passport-login-wrap li a").click(function(event) { event.preventDefault(); - // set the loginprovider cookie var logintype = $(this).closest('li').attr("class"); if (logintype) { document.cookie='pbsoauth_loginprovider=' + logintype + ';domain=' + window.location.hostname + ';path=/'; window.dataLayer = window.dataLayer || []; dataLayer.push({ 'event': 'login', 'method': logintype }); } - var appended_href = $(this).attr('href'); - // send them along their way - window.location.href = appended_href; + window.location.href = $(this).attr('href'); }); }); -