summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-03-17 12:57:52 -0400
committerChristopher Speller <crspeller@gmail.com>2016-03-17 12:57:52 -0400
commitbd225dca738400495a8ef8fea0fc81fd11d225c7 (patch)
treeff9f6fa2e119e6dd62081d73b91a63aad9a55071 /webapp/components
parent876ef15ac126f0a9aec0b9ad4e98a35223641167 (diff)
parent919fb8274bc13beaa260602f8f77bbb5a526f1a3 (diff)
downloadchat-bd225dca738400495a8ef8fea0fc81fd11d225c7.tar.gz
chat-bd225dca738400495a8ef8fea0fc81fd11d225c7.tar.bz2
chat-bd225dca738400495a8ef8fea0fc81fd11d225c7.zip
Merge pull request #2418 from ZBoxApp/PLT-2053
PLT-2053: Option to enable full snippets in push notifications
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