Skip to content

Commit

Permalink
fixing error introduced to legacy code while developing new code
Browse files Browse the repository at this point in the history
  • Loading branch information
tamw-wnet committed Sep 23, 2024
1 parent dafcbf1 commit 0617eb7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions assets/js/loginform_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});

});

0 comments on commit 0617eb7

Please sign in to comment.