summaryrefslogtreecommitdiffstats
path: root/client/components/settings/settingBody.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2017-03-31 11:03:55 +0300
committerLauri Ojansivu <x@xet7.org>2017-03-31 11:03:55 +0300
commite3aa65b96e687ccbb1494ae0c94f5c50fa01b50d (patch)
tree41d3c77e351c463bf7c189358dde19e871dc4c5c /client/components/settings/settingBody.js
parentee6aa7a6b20a3839f92d91e9bc24136aa07306b9 (diff)
parentdb2c381c005269557018b560a04abd0f59dfc7aa (diff)
downloadwekan-e3aa65b96e687ccbb1494ae0c94f5c50fa01b50d.tar.gz
wekan-e3aa65b96e687ccbb1494ae0c94f5c50fa01b50d.tar.bz2
wekan-e3aa65b96e687ccbb1494ae0c94f5c50fa01b50d.zip
Merge branch 'Zokormazo-tls' into devel
Diffstat (limited to 'client/components/settings/settingBody.js')
-rw-r--r--client/components/settings/settingBody.js8
1 files changed, 6 insertions, 2 deletions
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,