From 962a7c59fe40f121cb05bd4a391f3769cf96f375 Mon Sep 17 00:00:00 2001 From: bshardi Date: Thu, 27 Feb 2014 14:06:40 -0500 Subject: [PATCH] Changing setting name to usernameToLower and emailToLower, just struggled with insensitive and casesensitive keeping what they ment in my head, i think this is clearer --- client/entry.coffee | 4 ++-- client/views/signIn/signIn.coffee | 4 ++-- client/views/signUp/signUp.coffee | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/entry.coffee b/client/entry.coffee index 89f715d8..6e058da6 100644 --- a/client/entry.coffee +++ b/client/entry.coffee @@ -4,8 +4,8 @@ AccountsEntry = homeRoute: '/home' dashboardRoute: '/dashboard' passwordSignupFields: 'EMAIL_ONLY' - emailInsensitive: true - usernameInsensitive: false + emailToLower: true + usernameToLower: false isStringEmail: (email) -> emailPattern = /^([\w.-]+)@([\w.-]+)\.([a-zA-Z.]{2,6})$/i diff --git a/client/views/signIn/signIn.coffee b/client/views/signIn/signIn.coffee index b8f0c687..1a2ac18e 100644 --- a/client/views/signIn/signIn.coffee +++ b/client/views/signIn/signIn.coffee @@ -26,8 +26,8 @@ Template.entrySignIn.events event.preventDefault() email = $('input[name="email"]').val() - if (AccountsEntry.isStringEmail(email) and AccountsEntry.settings.emailInsensitive) or - (not AccountsEntry.isStringEmail(email) and AccountsEntry.settings.usernameInsensitive) + if (AccountsEntry.isStringEmail(email) and AccountsEntry.settings.emailToLower) or + (not AccountsEntry.isStringEmail(email) and AccountsEntry.settings.usernameToLower) email = email.toLowerCase() Session.set('email', email) diff --git a/client/views/signUp/signUp.coffee b/client/views/signUp/signUp.coffee index 20f8dd81..d16b1a7e 100644 --- a/client/views/signUp/signUp.coffee +++ b/client/views/signUp/signUp.coffee @@ -49,7 +49,7 @@ Template.entrySignUp.events t.find('input[name="username"]').value.toLowerCase() else undefined - if username && AccountsEntry.settings.usernameInsensitive then username = username.toLowerCase() + if username && AccountsEntry.settings.usernameToLower then username = username.toLowerCase() signupCode = if t.find('input[name="signupCode"]') @@ -58,7 +58,7 @@ Template.entrySignUp.events undefined email = t.find('input[type="email"]').value - if AccountsEntry.settings.emailInsensitive then email = email.toLowerCase() + if AccountsEntry.settings.emailToLower then email = email.toLowerCase() password = t.find('input[type="password"]').value