Commit 738789d2 authored by Timothy Andrew's avatar Timothy Andrew

Get ESLint spec passing for the `OAuthRememberMe` class.

parent 15dba34c
...@@ -12,17 +12,17 @@ export default class OAuthRememberMe { ...@@ -12,17 +12,17 @@ export default class OAuthRememberMe {
} }
bindEvents() { bindEvents() {
this.container.on('click', this.toggleRememberMe); this.container.on('click', this.constructor.toggleRememberMe);
} }
toggleRememberMe(event) { static toggleRememberMe(event) {
var rememberMe = $(event.target).is(":checked"); const rememberMe = $(event.target).is(':checked');
$('.oauth-login').each(function(i, element) { $('.oauth-login').each((i, element) => {
var href = $(element).attr('href'); const href = $(element).attr('href');
if (rememberMe) { if (rememberMe) {
$(element).attr('href', href + '?remember_me=1'); $(element).attr('href', `${href}?remember_me=1`);
} else { } else {
$(element).attr('href', href.replace('?remember_me=1', '')); $(element).attr('href', href.replace('?remember_me=1', ''));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment