no smtp sutup message
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
"Forwarded message": "Forwarded message",
|
||||
"Email Accounts": "Email Accounts"
|
||||
},
|
||||
"messages": {
|
||||
"noSmtpSetup": "No SMTP setup. {link}."
|
||||
},
|
||||
"presetFilters": {
|
||||
"sent": "Sent",
|
||||
"archived": "Archived"
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<select name="{{name}}" class="form-control main-element">
|
||||
{{#each list}}
|
||||
<option value="{{./this}}">{{./this}}</optopn>
|
||||
{{/each}}
|
||||
{{#if list.length}}
|
||||
<select name="{{name}}" class="form-control main-element">
|
||||
{{#each list}}
|
||||
<option value="{{./this}}">{{./this}}</optopn>
|
||||
{{/each}}
|
||||
</select>
|
||||
{{else}}
|
||||
{{{noSmtpMessage}}}
|
||||
{{/if}}
|
||||
|
||||
@@ -27,6 +27,7 @@ Espo.define('Views.Email.Fields.ComposeFromAddress', 'Views.Fields.Base', functi
|
||||
data: function () {
|
||||
return _.extend({
|
||||
list: this.list,
|
||||
noSmtpMessage: this.translate('noSmtpSetup', 'messages', 'Email').replace('{link}', '<a href="#Preferences">'+this.translate('Preferences')+'</a>')
|
||||
}, Dep.prototype.data.call(this));
|
||||
},
|
||||
|
||||
@@ -34,13 +35,13 @@ Espo.define('Views.Email.Fields.ComposeFromAddress', 'Views.Fields.Base', functi
|
||||
Dep.prototype.setup.call(this);
|
||||
this.list = [];
|
||||
|
||||
if (this.getUser().get('emailAddress')) {
|
||||
if (this.getUser().get('emailAddress') && this.getPreferences().get('smtpServer')) {
|
||||
this.list.push(this.getUser().get('emailAddress'));
|
||||
}
|
||||
|
||||
if (this.getConfig().get('outboundEmailIsShared') && this.getConfig().get('outboundEmailFromAddress')) {
|
||||
this.list.push(this.getConfig().get('outboundEmailFromAddress'));
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user