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 {
}
bindEvents() {
this.container.on('click', this.toggleRememberMe);
this.container.on('click', this.constructor.toggleRememberMe);
}
toggleRememberMe(event) {
var rememberMe = $(event.target).is(":checked");
static toggleRememberMe(event) {
const rememberMe = $(event.target).is(':checked');
$('.oauth-login').each(function(i, element) {
var href = $(element).attr('href');
$('.oauth-login').each((i, element) => {
const href = $(element).attr('href');
if (rememberMe) {
$(element).attr('href', href + '?remember_me=1');
$(element).attr('href', `${href}?remember_me=1`);
} else {
$(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