mirror of
https://github.com/wekan/wekan.git
synced 2026-01-29 12:46:09 +01:00
Merge branch 'improve-smtp-testing' of https://github.com/nztqa/wekan into nztqa-improve-smtp-testing
This commit is contained in:
commit
c048ce89f1
4 changed files with 50 additions and 0 deletions
|
|
@ -89,6 +89,9 @@ template(name='email')
|
|||
li
|
||||
button.js-save.primary {{_ 'save'}}
|
||||
|
||||
li
|
||||
button.js-send-smtp-test-email.primary {{_ 'send-smtp-test'}}
|
||||
|
||||
template(name='accountSettings')
|
||||
ul#account-setting.setting-detail
|
||||
li.smtp-form
|
||||
|
|
|
|||
|
|
@ -125,6 +125,21 @@ BlazeComponent.extendComponent({
|
|||
|
||||
},
|
||||
|
||||
sendSMTPTestEmail() {
|
||||
Meteor.call('sendSMTPTestEmail', (err, ret) => {
|
||||
if (!err && ret) { /* eslint-disable no-console */
|
||||
const message = `${TAPi18n.__(ret.message)}: ${ret.email}`;
|
||||
console.log(message);
|
||||
alert(message);
|
||||
} else {
|
||||
const reason = err.reason || '';
|
||||
const message = `${TAPi18n.__(err.error)}\n${reason}`;
|
||||
console.log(message, err);
|
||||
alert(message);
|
||||
} /* eslint-enable no-console */
|
||||
});
|
||||
},
|
||||
|
||||
events(){
|
||||
return [{
|
||||
'click a.js-toggle-registration': this.toggleRegistration,
|
||||
|
|
@ -133,6 +148,7 @@ BlazeComponent.extendComponent({
|
|||
'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,
|
||||
}];
|
||||
},
|
||||
}).register('setting');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue