summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-08-20 23:16:24 +0300
committerLauri Ojansivu <x@xet7.org>2018-08-20 23:16:24 +0300
commitb216c63c132e587e590e5faa0285ca5ca2641765 (patch)
treee5cfa95160d1c3df7e199f218e269b48f8ce0dae /client/components
parentc9ca79aac8ff3e08ed26c8c828f8e314196839d5 (diff)
downloadwekan-b216c63c132e587e590e5faa0285ca5ca2641765.tar.gz
wekan-b216c63c132e587e590e5faa0285ca5ca2641765.tar.bz2
wekan-b216c63c132e587e590e5faa0285ca5ca2641765.zip
- Restored SMTP settings at Admin Panel, and disabled showing password.
Thanks to xet7 ! Closes #1790
Diffstat (limited to 'client/components')
-rw-r--r--client/components/settings/settingBody.jade34
-rw-r--r--client/components/settings/settingBody.js14
2 files changed, 37 insertions, 11 deletions
diff --git a/client/components/settings/settingBody.jade b/client/components/settings/settingBody.jade
index 1832894c..dcf71f4d 100644
--- a/client/components/settings/settingBody.jade
+++ b/client/components/settings/settingBody.jade
@@ -55,6 +55,40 @@ template(name="general")
template(name='email')
ul#email-setting.setting-detail
+ li.smtp-form
+ .title {{_ 'smtp-host'}}
+ .description {{_ 'smtp-host-description'}}
+ .form-group
+ input.form-control#mail-server-host(type="text", placeholder="smtp.domain.com" value="{{currentSetting.mailServer.host}}")
+ li.smtp-form
+ .title {{_ 'smtp-port'}}
+ .description {{_ 'smtp-port-description'}}
+ .form-group
+ input.form-control#mail-server-port(type="text", placeholder="25" value="{{currentSetting.mailServer.port}}")
+ li.smtp-form
+ .title {{_ 'smtp-username'}}
+ .form-group
+ input.form-control#mail-server-username(type="text", placeholder="{{_ 'username'}}" value="{{currentSetting.mailServer.username}}")
+ li.smtp-form
+ .title {{_ 'smtp-password'}}
+ .form-group
+ input.form-control#mail-server-password(type="text", placeholder="{{_ 'password'}}" value="")
+ 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'}}
+
li
button.js-send-smtp-test-email.primary {{_ 'send-smtp-test'}}
diff --git a/client/components/settings/settingBody.js b/client/components/settings/settingBody.js
index de96c100..7230d893 100644
--- a/client/components/settings/settingBody.js
+++ b/client/components/settings/settingBody.js
@@ -20,7 +20,7 @@ BlazeComponent.extendComponent({
setLoading(w) {
this.loading.set(w);
},
- /*
+
checkField(selector) {
const value = $(selector).val();
if (!value || value.trim() === '') {
@@ -30,7 +30,7 @@ BlazeComponent.extendComponent({
return value;
}
},
-*/
+
currentSetting() {
return Settings.findOne();
},
@@ -55,11 +55,9 @@ BlazeComponent.extendComponent({
$('.invite-people').slideDown();
}
},
- /*
toggleTLS() {
$('#mail-server-tls').toggleClass('is-checked');
},
-*/
switchMenu(event) {
const target = $(event.target);
if (!target.hasClass('active')) {
@@ -101,13 +99,11 @@ BlazeComponent.extendComponent({
// if (!err) {
// TODO - show more info to user
// }
-
this.setLoading(false);
});
}
},
- /*
saveMailServerInfo() {
this.setLoading(true);
$('li').removeClass('has-error');
@@ -132,7 +128,7 @@ BlazeComponent.extendComponent({
}
},
-*/
+
sendSMTPTestEmail() {
Meteor.call('sendSMTPTestEmail', (err, ret) => {
if (!err && ret) { /* eslint-disable no-console */
@@ -152,15 +148,11 @@ 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,
- /*
'click button.js-save': this.saveMailServerInfo,
-*/
'click button.js-send-smtp-test-email': this.sendSMTPTestEmail,
}];
},