PLT-2971 Added email footer for address (#3319)
* Added email footer for address * added default * Update html.go * Changed according to PM
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
4e38796e69
Коммит
3f333678d8
@@ -87,6 +87,7 @@
|
|||||||
"RequireEmailVerification": false,
|
"RequireEmailVerification": false,
|
||||||
"FeedbackName": "",
|
"FeedbackName": "",
|
||||||
"FeedbackEmail": "",
|
"FeedbackEmail": "",
|
||||||
|
"FeedbackOrganization": "",
|
||||||
"SMTPUsername": "",
|
"SMTPUsername": "",
|
||||||
"SMTPPassword": "",
|
"SMTPPassword": "",
|
||||||
"SMTPServer": "",
|
"SMTPServer": "",
|
||||||
|
|||||||
@@ -1363,6 +1363,10 @@
|
|||||||
"id": "api.templates.email_footer",
|
"id": "api.templates.email_footer",
|
||||||
"translation": "To change your notification preferences, log in to your team site and go to Account Settings > Notifications."
|
"translation": "To change your notification preferences, log in to your team site and go to Account Settings > Notifications."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "api.templates.email_organization",
|
||||||
|
"translation": "Sent by "
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "api.templates.email_info",
|
"id": "api.templates.email_info",
|
||||||
"translation": "Any questions at all, mail us any time: <a href='mailto:{{.SupportEmail}}' style='text-decoration: none; color:#2389D7;'>{{.SupportEmail}}</a>.<br>Best wishes,<br>The {{.SiteName}} Team<br>"
|
"translation": "Any questions at all, mail us any time: <a href='mailto:{{.SupportEmail}}' style='text-decoration: none; color:#2389D7;'>{{.SupportEmail}}</a>.<br>Best wishes,<br>The {{.SiteName}} Team<br>"
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ type EmailSettings struct {
|
|||||||
RequireEmailVerification bool
|
RequireEmailVerification bool
|
||||||
FeedbackName string
|
FeedbackName string
|
||||||
FeedbackEmail string
|
FeedbackEmail string
|
||||||
|
FeedbackOrganization *string
|
||||||
SMTPUsername string
|
SMTPUsername string
|
||||||
SMTPPassword string
|
SMTPPassword string
|
||||||
SMTPServer string
|
SMTPServer string
|
||||||
@@ -375,6 +376,11 @@ func (o *Config) SetDefaults() {
|
|||||||
*o.EmailSettings.PushNotificationContents = GENERIC_NOTIFICATION
|
*o.EmailSettings.PushNotificationContents = GENERIC_NOTIFICATION
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if o.EmailSettings.FeedbackOrganization == nil {
|
||||||
|
o.EmailSettings.FeedbackOrganization = new(string)
|
||||||
|
*o.EmailSettings.FeedbackOrganization = ""
|
||||||
|
}
|
||||||
|
|
||||||
if !IsSafeLink(o.SupportSettings.TermsOfServiceLink) {
|
if !IsSafeLink(o.SupportSettings.TermsOfServiceLink) {
|
||||||
o.SupportSettings.TermsOfServiceLink = nil
|
o.SupportSettings.TermsOfServiceLink = nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<td style="text-align: center;color: #AAA; font-size: 11px; padding-bottom: 10px;">
|
<td style="text-align: center;color: #AAA; font-size: 11px; padding-bottom: 10px;">
|
||||||
<p style="padding: 0 50px;">
|
<p style="padding: 0 50px;">
|
||||||
(c) 2015 Mattermost, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.<br>
|
{{.Props.Organization}}<br>
|
||||||
{{.Props.Footer}}
|
{{.Props.Footer}}
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -86,6 +86,13 @@ func (t *HTMLTemplate) addDefaultProps() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
t.Props["Footer"] = localT("api.templates.email_footer")
|
t.Props["Footer"] = localT("api.templates.email_footer")
|
||||||
|
|
||||||
|
if *Cfg.EmailSettings.FeedbackOrganization != "" {
|
||||||
|
t.Props["Organization"] = localT("api.templates.email_organization") + *Cfg.EmailSettings.FeedbackOrganization
|
||||||
|
} else {
|
||||||
|
t.Props["Organization"] = ""
|
||||||
|
}
|
||||||
|
|
||||||
t.Html["EmailInfo"] = template.HTML(localT("api.templates.email_info",
|
t.Html["EmailInfo"] = template.HTML(localT("api.templates.email_info",
|
||||||
map[string]interface{}{"SupportEmail": Cfg.SupportSettings.SupportEmail, "SiteName": Cfg.TeamSettings.SiteName}))
|
map[string]interface{}{"SupportEmail": Cfg.SupportSettings.SupportEmail, "SiteName": Cfg.TeamSettings.SiteName}))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export default class EmailSettings extends AdminSettings {
|
|||||||
sendEmailNotifications: props.config.EmailSettings.SendEmailNotifications,
|
sendEmailNotifications: props.config.EmailSettings.SendEmailNotifications,
|
||||||
feedbackName: props.config.EmailSettings.FeedbackName,
|
feedbackName: props.config.EmailSettings.FeedbackName,
|
||||||
feedbackEmail: props.config.EmailSettings.FeedbackEmail,
|
feedbackEmail: props.config.EmailSettings.FeedbackEmail,
|
||||||
|
feedbackOrganization: props.config.EmailSettings.FeedbackOrganization,
|
||||||
smtpUsername: props.config.EmailSettings.SMTPUsername,
|
smtpUsername: props.config.EmailSettings.SMTPUsername,
|
||||||
smtpPassword: props.config.EmailSettings.SMTPPassword,
|
smtpPassword: props.config.EmailSettings.SMTPPassword,
|
||||||
smtpServer: props.config.EmailSettings.SMTPServer,
|
smtpServer: props.config.EmailSettings.SMTPServer,
|
||||||
@@ -38,6 +39,7 @@ export default class EmailSettings extends AdminSettings {
|
|||||||
config.EmailSettings.SendEmailNotifications = this.state.sendEmailNotifications;
|
config.EmailSettings.SendEmailNotifications = this.state.sendEmailNotifications;
|
||||||
config.EmailSettings.FeedbackName = this.state.feedbackName;
|
config.EmailSettings.FeedbackName = this.state.feedbackName;
|
||||||
config.EmailSettings.FeedbackEmail = this.state.feedbackEmail;
|
config.EmailSettings.FeedbackEmail = this.state.feedbackEmail;
|
||||||
|
config.EmailSettings.FeedbackOrganization = this.state.feedbackOrganization;
|
||||||
config.EmailSettings.SMTPUsername = this.state.smtpUsername;
|
config.EmailSettings.SMTPUsername = this.state.smtpUsername;
|
||||||
config.EmailSettings.SMTPPassword = this.state.smtpPassword;
|
config.EmailSettings.SMTPPassword = this.state.smtpPassword;
|
||||||
config.EmailSettings.SMTPServer = this.state.smtpServer;
|
config.EmailSettings.SMTPServer = this.state.smtpServer;
|
||||||
@@ -117,6 +119,25 @@ export default class EmailSettings extends AdminSettings {
|
|||||||
onChange={this.handleChange}
|
onChange={this.handleChange}
|
||||||
disabled={!this.state.sendEmailNotifications}
|
disabled={!this.state.sendEmailNotifications}
|
||||||
/>
|
/>
|
||||||
|
<TextSetting
|
||||||
|
id='feedbackOrganization'
|
||||||
|
label={
|
||||||
|
<FormattedMessage
|
||||||
|
id='admin.email.notificationOrganization'
|
||||||
|
defaultMessage='Notification Footer Address:'
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
placeholder={Utils.localizeMessage('admin.email.notificationOrganizationExample', 'Ex: "© ABC Corporation, 565 Knight Way, Palo Alto, California, 94305, USA"')}
|
||||||
|
helpText={
|
||||||
|
<FormattedMessage
|
||||||
|
id='admin.email.notificationOrganizationDescription'
|
||||||
|
defaultMessage='Organization name and address displayed on email notifications from Mattermost, such as "© ABC Corporation, 565 Knight Way, Palo Alto, California, 94305, USA". If the field is left empty, the organization name and address will not be displayed.'
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
value={this.state.feedbackOrganization}
|
||||||
|
onChange={this.handleChange}
|
||||||
|
disabled={!this.state.sendEmailNotifications}
|
||||||
|
/>
|
||||||
<TextSetting
|
<TextSetting
|
||||||
id='smtpUsername'
|
id='smtpUsername'
|
||||||
label={
|
label={
|
||||||
|
|||||||
@@ -157,6 +157,9 @@
|
|||||||
"admin.email.notificationEmailDescription": "Email address displayed on email account used when sending notification emails from Mattermost.",
|
"admin.email.notificationEmailDescription": "Email address displayed on email account used when sending notification emails from Mattermost.",
|
||||||
"admin.email.notificationEmailExample": "Ex: \"mattermost@yourcompany.com\", \"admin@yourcompany.com\"",
|
"admin.email.notificationEmailExample": "Ex: \"mattermost@yourcompany.com\", \"admin@yourcompany.com\"",
|
||||||
"admin.email.notificationEmailTitle": "Notification Email Address:",
|
"admin.email.notificationEmailTitle": "Notification Email Address:",
|
||||||
|
"admin.email.notificationOrganization": "Notification Footer Address",
|
||||||
|
"admin.email.notificationOrganizationDescription": "Organization name and address displayed on email notifications from Mattermost, such as \"© ABC Corporation, 565 Knight Way, Palo Alto, California, 94305, USA\". If the field is left empty, the organization name and address will not be displayed.",
|
||||||
|
"admin.email.nofificationOrganizationExample": "Ex. \"© ABC Corporation, 565 Knight Way, Palo Alto, California, 94305, USA\"",
|
||||||
"admin.email.notificationsDescription": "Typically set to true in production. When true, Mattermost attempts to send email notifications. Developers may set this field to false to skip email setup for faster development.<br />Setting this to true removes the Preview Mode banner (requires logging out and logging back in after setting is changed).",
|
"admin.email.notificationsDescription": "Typically set to true in production. When true, Mattermost attempts to send email notifications. Developers may set this field to false to skip email setup for faster development.<br />Setting this to true removes the Preview Mode banner (requires logging out and logging back in after setting is changed).",
|
||||||
"admin.email.notificationsTitle": "Send Email Notifications: ",
|
"admin.email.notificationsTitle": "Send Email Notifications: ",
|
||||||
"admin.email.passwordSaltDescription": "32-character salt added to signing of password reset emails. Randomly generated on install. Click \"Re-Generate\" to create new salt.",
|
"admin.email.passwordSaltDescription": "32-character salt added to signing of password reset emails. Randomly generated on install. Click \"Re-Generate\" to create new salt.",
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user