diff --git a/client/build.js b/client/build.js index fa3fccfe..827b4c07 100644 --- a/client/build.js +++ b/client/build.js @@ -43,6 +43,7 @@ function getConfig() { console.warn('Local config does not exist, ignoring'); } + config.canSendMails = !!config.smtp.host; delete config.secret; delete config.smtp; delete config.database; diff --git a/client/html/login.hbs b/client/html/login.hbs index d6dd2629..36fcfad0 100644 --- a/client/html/login.hbs +++ b/client/html/login.hbs @@ -20,7 +20,9 @@
diff --git a/client/js/views/login_view.js b/client/js/views/login_view.js index f8b82a20..f0e90c09 100644 --- a/client/js/views/login_view.js +++ b/client/js/views/login_view.js @@ -12,7 +12,7 @@ class LoginView extends BaseView { render(ctx) { const target = this.contentHolder; - const source = this.template(); + const source = this.template({canSendMails: config.canSendMails}); const form = source.querySelector('form'); const userNameField = source.querySelector('#user-name');