summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/components/settings/settingBody.jade12
-rw-r--r--client/components/settings/settingBody.js8
2 files changed, 16 insertions, 4 deletions
diff --git a/client/components/settings/settingBody.jade b/client/components/settings/settingBody.jade
index fdab3173..d490ec93 100644
--- a/client/components/settings/settingBody.jade
+++ b/client/components/settings/settingBody.jade
@@ -16,7 +16,7 @@ template(name="setting")
+general
else if emailSetting.get
+email
-
+
template(name="general")
ul#registration-setting.setting-detail
li
@@ -63,9 +63,17 @@ template(name='email')
.form-group
input.form-control#mail-server-password(type="text", placeholder="{{_ 'password'}}" value="{{currentSetting.mailServer.password}}")
li.smtp-form
+ .title {{_ 'smtp-tls'}}
+ .form-group
+ a.flex.js-toggle-tls
+ .materialCheckBox#mail-server-tls(class="{{#if currentSetting.mailServer.enableTLS}}is-checked{{/if}}")
+
+ span {{_ 'smtp-tls-description'}}
+
+ li.smtp-form
.title {{_ 'send-from'}}
.form-group
input.form-control#mail-server-from(type="email", placeholder="no-reply@domain.com" value="{{currentSetting.mailServer.from}}")
li
- button.js-save.primary Save
+ button.js-save.primary Save
diff --git a/client/components/settings/settingBody.js b/client/components/settings/settingBody.js
index 0dc3c5f0..f96312a5 100644
--- a/client/components/settings/settingBody.js
+++ b/client/components/settings/settingBody.js
@@ -51,7 +51,9 @@ BlazeComponent.extendComponent({
$('.invite-people').slideDown();
}
},
-
+ toggleTLS(){
+ $('#mail-server-tls').toggleClass('is-checked');
+ },
switchMenu(event){
const target = $(event.target);
if(!target.hasClass('active')){
@@ -106,8 +108,9 @@ BlazeComponent.extendComponent({
const username = $('#mail-server-username').val().trim();
const password = $('#mail-server-password').val().trim();
const from = this.checkField('#mail-server-from');
+ const tls = $('#mail-server-tls.is-checked').length > 0;
Settings.update(Settings.findOne()._id, {$set:{'mailServer.host':host, 'mailServer.port': port, 'mailServer.username': username,
- 'mailServer.password': password, 'mailServer.from': from}});
+ 'mailServer.password': password, 'mailServer.enableTLS': tls, 'mailServer.from': from}});
} catch (e) {
return;
} finally {
@@ -119,6 +122,7 @@ BlazeComponent.extendComponent({
events(){
return [{
'click a.js-toggle-registration': this.toggleRegistration,
+ 'click a.js-toggle-tls': this.toggleTLS,
'click a.js-setting-menu': this.switchMenu,
'click a.js-toggle-board-choose': this.checkBoard,
'click button.js-email-invite': this.inviteThroughEmail,