summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/admin_console/email_settings.jsx44
1 files changed, 43 insertions, 1 deletions
diff --git a/webapp/components/admin_console/email_settings.jsx b/webapp/components/admin_console/email_settings.jsx
index 1decdae91..e591b636d 100644
--- a/webapp/components/admin_console/email_settings.jsx
+++ b/webapp/components/admin_console/email_settings.jsx
@@ -58,6 +58,14 @@ var holders = defineMessages({
id: 'admin.email.pushServerEx',
defaultMessage: 'E.g.: "http://push-test.mattermost.com"'
},
+ genericPush: {
+ id: 'admin.email.genericPushNotification',
+ defaultMessage: 'Send generic description with user and channel names'
+ },
+ fullPush: {
+ id: 'admin.email.fullPushNotification',
+ defaultMessage: 'Send full message snippet'
+ },
testing: {
id: 'admin.email.testing',
defaultMessage: 'Testing...'
@@ -87,7 +95,8 @@ class EmailSettings extends React.Component {
saveNeeded: false,
serverError: null,
emailSuccess: null,
- emailFail: null
+ emailFail: null,
+ pushNotificationContents: this.props.config.EmailSettings.PushNotificationContents
};
}
@@ -125,6 +134,7 @@ class EmailSettings extends React.Component {
config.EmailSettings.FeedbackEmail = ReactDOM.findDOMNode(this.refs.feedbackEmail).value.trim();
config.EmailSettings.SMTPServer = ReactDOM.findDOMNode(this.refs.SMTPServer).value.trim();
config.EmailSettings.PushNotificationServer = ReactDOM.findDOMNode(this.refs.PushNotificationServer).value.trim();
+ config.EmailSettings.PushNotificationContents = ReactDOM.findDOMNode(this.refs.PushNotificationContents).value;
config.EmailSettings.SMTPPort = ReactDOM.findDOMNode(this.refs.SMTPPort).value.trim();
config.EmailSettings.SMTPUsername = ReactDOM.findDOMNode(this.refs.SMTPUsername).value.trim();
config.EmailSettings.SMTPPassword = ReactDOM.findDOMNode(this.refs.SMTPPassword).value.trim();
@@ -929,6 +939,38 @@ class EmailSettings extends React.Component {
</div>
<div className='form-group'>
+ <label
+ className='control-label col-sm-4'
+ htmlFor='pushNotificationContents'
+ >
+ <FormattedMessage
+ id='admin.email.pushContentTitle'
+ defaultMessage='Push Notification Contents:'
+ />
+ </label>
+ <div className='col-sm-8'>
+ <select
+ className='form-control'
+ id='pushNotificationContents'
+ ref='PushNotificationContents'
+ defaultValue={this.props.config.EmailSettings.PushNotificationContents}
+ onChange={this.handleChange.bind(this, 'pushNotificationContents')}
+ disabled={!this.state.sendPushNotifications}
+ >
+ <option value='generic'>{formatMessage(holders.genericPush)}</option>
+ <option value='full'>{formatMessage(holders.fullPush)}</option>
+ </select>
+ <p className='help-text'>
+ <FormattedHTMLMessage
+ id='admin.email.pushContentDesc'
+ defaultMessage='Selecting "Send generic description with user and channel names" provides push notifications with generic messages, including names of users and channels but no specific details from the message text.<br /><br />
+ Selecting "Send full message snippet" sends excerpts from messages triggering notifications with specifics and may include confidential information sent in messages. If your Push Notification Service is outside your firewall, it is HIGHLY RECOMMENDED this option only be used with an "https" protocol to encrypt the connection.'
+ />
+ </p>
+ </div>
+ </div>
+
+ <div className='form-group'>
<div className='col-sm-12'>
{serverError}
<button