diff options
Diffstat (limited to 'client/config/accounts.js')
-rw-r--r-- | client/config/accounts.js | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/client/config/accounts.js b/client/config/accounts.js index a448d612..df0935f7 100644 --- a/client/config/accounts.js +++ b/client/config/accounts.js @@ -1,11 +1,11 @@ -var passwordField = AccountsTemplates.removeField('password'); -var emailField = AccountsTemplates.removeField('email'); +const passwordField = AccountsTemplates.removeField('password'); +const emailField = AccountsTemplates.removeField('email'); AccountsTemplates.addFields([{ _id: 'username', type: 'text', displayName: 'username', required: true, - minLength: 2 + minLength: 2, }, emailField, passwordField]); AccountsTemplates.configure({ @@ -15,36 +15,34 @@ AccountsTemplates.configure({ enablePasswordChange: true, sendVerificationEmail: true, showForgotPasswordLink: true, - onLogoutHook: function() { - var homePage = 'home'; + onLogoutHook() { + const homePage = 'home'; if (FlowRouter.getRouteName() === homePage) { FlowRouter.reload(); } else { FlowRouter.go(homePage); } - } + }, }); _.each(['signIn', 'signUp', 'resetPwd', 'forgotPwd', 'enrollAccount'], - function(routeName) { - AccountsTemplates.configureRoute(routeName); -}); + (routeName) => AccountsTemplates.configureRoute(routeName)); // We display the form to change the password in a popup window that already // have a title, so we unset the title automatically displayed by useraccounts. AccountsTemplates.configure({ texts: { title: { - changePwd: '' - } - } + changePwd: '', + }, + }, }); AccountsTemplates.configureRoute('changePwd', { - redirect: function() { + redirect() { // XXX We should emit a notification once we have a notification system. // Currently the user has no indication that his modification has been // applied. Popup.back(); - } + }, }); |