diff options
author | Saturnino Abril <saturnino.abril@gmail.com> | 2017-06-30 16:06:59 +0800 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-06-30 09:06:59 +0100 |
commit | eea64f8049d90c5dcf14a739d640f5aa6a9c7add (patch) | |
tree | fabaa232bad7f4ebddf30b073c37a5962029f7fd /webapp/components/admin_console/users_and_teams_settings.jsx | |
parent | fb57b3dd53eaca28a557ea7e334e9d7216ce6aab (diff) | |
download | chat-eea64f8049d90c5dcf14a739d640f5aa6a9c7add.tar.gz chat-eea64f8049d90c5dcf14a739d640f5aa6a9c7add.tar.bz2 chat-eea64f8049d90c5dcf14a739d640f5aa6a9c7add.zip |
[PLT-5864] Move teammate name display setting to the System Console (#6681)
* move teammate name display setting to the system console
* update all the likes of TeammateNameDisplay names
* fix gofmt error
* rebase and fix conflict
Diffstat (limited to 'webapp/components/admin_console/users_and_teams_settings.jsx')
-rw-r--r-- | webapp/components/admin_console/users_and_teams_settings.jsx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/webapp/components/admin_console/users_and_teams_settings.jsx b/webapp/components/admin_console/users_and_teams_settings.jsx index 4535aec7b..9d33f0648 100644 --- a/webapp/components/admin_console/users_and_teams_settings.jsx +++ b/webapp/components/admin_console/users_and_teams_settings.jsx @@ -31,6 +31,7 @@ export default class UsersAndTeamsSettings extends AdminSettings { config.TeamSettings.MaxUsersPerTeam = this.parseIntNonZero(this.state.maxUsersPerTeam, Constants.DEFAULT_MAX_USERS_PER_TEAM); config.TeamSettings.RestrictCreationToDomains = this.state.restrictCreationToDomains; config.TeamSettings.RestrictDirectMessage = this.state.restrictDirectMessage; + config.TeamSettings.TeammateNameDisplay = this.state.teammateNameDisplay; config.TeamSettings.MaxChannelsPerTeam = this.parseIntNonZero(this.state.maxChannelsPerTeam, Constants.DEFAULT_MAX_CHANNELS_PER_TEAM); config.TeamSettings.MaxNotificationsPerChannel = this.parseIntNonZero(this.state.maxNotificationsPerChannel, Constants.DEFAULT_MAX_NOTIFICATIONS_PER_CHANNEL); @@ -44,6 +45,7 @@ export default class UsersAndTeamsSettings extends AdminSettings { maxUsersPerTeam: config.TeamSettings.MaxUsersPerTeam, restrictCreationToDomains: config.TeamSettings.RestrictCreationToDomains, restrictDirectMessage: config.TeamSettings.RestrictDirectMessage, + teammateNameDisplay: config.TeamSettings.TeammateNameDisplay, maxChannelsPerTeam: config.TeamSettings.MaxChannelsPerTeam, maxNotificationsPerChannel: config.TeamSettings.MaxNotificationsPerChannel }; @@ -188,6 +190,28 @@ export default class UsersAndTeamsSettings extends AdminSettings { value={this.state.restrictDirectMessage} onChange={this.handleChange} /> + <DropdownSetting + id='teammateNameDisplay' + values={[ + {value: Constants.TEAMMATE_NAME_DISPLAY.SHOW_USERNAME, text: Utils.localizeMessage('admin.team.showUsername', 'Show username')}, + {value: Constants.TEAMMATE_NAME_DISPLAY.SHOW_NICKNAME_FULLNAME, text: Utils.localizeMessage('admin.team.showNickname', 'Show nickname if one exists, otherwise show first and last name')}, + {value: Constants.TEAMMATE_NAME_DISPLAY.SHOW_FULLNAME, text: Utils.localizeMessage('admin.team.showFullname', 'Show first and last name (default)')} + ]} + label={ + <FormattedMessage + id='admin.team.teammateNameDisplay' + defaultMessage='Teammate Name Display:' + /> + } + helpText={ + <FormattedHTMLMessage + id='admin.team.teammateNameDisplayDesc' + defaultMessage="Set how to display users' names in posts and the Direct Messages list." + /> + } + value={this.state.teammateNameDisplay} + onChange={this.handleChange} + /> </SettingsGroup> ); } |