summaryrefslogtreecommitdiffstats
path: root/client/components/main/layouts.js
diff options
context:
space:
mode:
authorguillaume <guillaume.cassou@supinfo.com>2018-11-23 18:04:05 +0100
committerguillaume <guillaume.cassou@supinfo.com>2018-11-23 18:04:05 +0100
commit745bd7e8068213487f5829f24ba99b26f6935818 (patch)
treef80df5a7027fb6592c15aa2d05a24c8655edb666 /client/components/main/layouts.js
parentf23448be3340c56f6fae85b19a52aecf55e4753b (diff)
downloadwekan-745bd7e8068213487f5829f24ba99b26f6935818.tar.gz
wekan-745bd7e8068213487f5829f24ba99b26f6935818.tar.bz2
wekan-745bd7e8068213487f5829f24ba99b26f6935818.zip
finish prepare for test
Diffstat (limited to 'client/components/main/layouts.js')
-rw-r--r--client/components/main/layouts.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js
index c98eb6b9..3db228ee 100644
--- a/client/components/main/layouts.js
+++ b/client/components/main/layouts.js
@@ -6,11 +6,11 @@ const i18nTagToT9n = (i18nTag) => {
return i18nTag;
};
-Template.userFormsLayout.onCreated(() => {
- Meteor.subscribe('setting');
+Template.userFormsLayout.onCreated(function() {
Meteor.call('getDefaultAuthenticationMethod', (error, result) => {
this.data.defaultAuthenticationMethod = new ReactiveVar(error ? undefined : result);
});
+ Meteor.subscribe('setting');
});
Template.userFormsLayout.onRendered(() => {
@@ -83,7 +83,7 @@ Template.userFormsLayout.events({
const email = $('#at-field-username_and_email').val();
const password = $('#at-field-password').val();
- if (FlowRouter.getRouteName() !== 'atSignIn' || password === '') {
+ if (FlowRouter.getRouteName() !== 'atSignIn' || password === '' || email === '') {
return;
}
@@ -132,5 +132,10 @@ function authentication(instance, email, password) {
return error;
});
}
+
+ /* else {
+ process.env.DEFAULT_AUTHENTICATION_METHOD is not defined
+ } */
+
return this.stop();
}