summaryrefslogtreecommitdiffstats
path: root/webapp/components/admin_console/privacy_settings.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-07-06 16:07:56 -0400
committerGitHub <noreply@github.com>2016-07-06 16:07:56 -0400
commitb114062c1b8128fe650fce72454ba4f1fcbe5733 (patch)
tree0a51e9d1342bf89c435662c618d9aac5ba651b4b /webapp/components/admin_console/privacy_settings.jsx
parentb1520d0b9458d1dab09d9e3e05dd7522fc28ba57 (diff)
downloadchat-b114062c1b8128fe650fce72454ba4f1fcbe5733.tar.gz
chat-b114062c1b8128fe650fce72454ba4f1fcbe5733.tar.bz2
chat-b114062c1b8128fe650fce72454ba4f1fcbe5733.zip
PLT-3237 Update displayed config values in admin console after saving (#3506)
* Reloaded admin console data when settings are saved * Fixed attempting to save an invalid config setting overwriting the stored config
Diffstat (limited to 'webapp/components/admin_console/privacy_settings.jsx')
-rw-r--r--webapp/components/admin_console/privacy_settings.jsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/webapp/components/admin_console/privacy_settings.jsx b/webapp/components/admin_console/privacy_settings.jsx
index 5ef57e467..0a899635d 100644
--- a/webapp/components/admin_console/privacy_settings.jsx
+++ b/webapp/components/admin_console/privacy_settings.jsx
@@ -15,11 +15,6 @@ export default class PrivacySettings extends AdminSettings {
this.getConfigFromState = this.getConfigFromState.bind(this);
this.renderSettings = this.renderSettings.bind(this);
-
- this.state = Object.assign(this.state, {
- showEmailAddress: props.config.PrivacySettings.ShowEmailAddress,
- showFullName: props.config.PrivacySettings.ShowFullName
- });
}
getConfigFromState(config) {
@@ -29,6 +24,13 @@ export default class PrivacySettings extends AdminSettings {
return config;
}
+ getStateFromConfig(config) {
+ return {
+ showEmailAddress: config.PrivacySettings.ShowEmailAddress,
+ showFullName: config.PrivacySettings.ShowFullName
+ };
+ }
+
renderTitle() {
return (
<h3>