summaryrefslogtreecommitdiffstats
path: root/web/react/components/admin_console/user_item.jsx
diff options
context:
space:
mode:
authorElias Nahum <nahumhbl@gmail.com>2016-01-31 22:03:30 -0300
committerElias Nahum <nahumhbl@gmail.com>2016-02-01 11:25:07 -0300
commita6102e27d48d00fcc733c4d16754961903a239e0 (patch)
treed93a69e839666a9626ba936b7e44f52ac9d48845 /web/react/components/admin_console/user_item.jsx
parent4a214cdaa2912f48dec4361722522c424384af49 (diff)
downloadchat-a6102e27d48d00fcc733c4d16754961903a239e0.tar.gz
chat-a6102e27d48d00fcc733c4d16754961903a239e0.tar.bz2
chat-a6102e27d48d00fcc733c4d16754961903a239e0.zip
PLT-7: Refactoring frontend (chunk 8)
- Sidebar and related components - Small Tweak to demotion and add msg for terminal cmd
Diffstat (limited to 'web/react/components/admin_console/user_item.jsx')
-rw-r--r--web/react/components/admin_console/user_item.jsx13
1 files changed, 9 insertions, 4 deletions
diff --git a/web/react/components/admin_console/user_item.jsx b/web/react/components/admin_console/user_item.jsx
index 5ab429dd5..02b01b090 100644
--- a/web/react/components/admin_console/user_item.jsx
+++ b/web/react/components/admin_console/user_item.jsx
@@ -9,7 +9,7 @@ import TeamStore from '../../stores/team_store.jsx';
import {injectIntl, intlShape, defineMessages, FormattedMessage} from 'mm-intl';
-var messages = defineMessages({
+var holders = defineMessages({
confirmDemoteRoleTitle: {
id: 'admin.user_item.confirmDemoteRoleTitle',
defaultMessage: 'Confirm demotion from System Admin role'
@@ -21,6 +21,10 @@ var messages = defineMessages({
confirmDemoteDescription: {
id: 'admin.user_item.confirmDemoteDescription',
defaultMessage: 'If you demote yourself from the System Admin role and there is not another user with System Admin privileges, you\'ll need to re-assign a System Admin by accessing the Mattermost server through a terminal and running the following command.'
+ },
+ confirmDemotionCmd: {
+ id: 'admin.user_item.confirmDemotionCmd',
+ defaultMessage: 'platform -assign_role -team_name="yourteam" -email="name@yourcompany.com" -role="system_admin"'
}
});
@@ -332,14 +336,15 @@ export default class UserItem extends React.Component {
);
}
const me = UserStore.getCurrentUser();
+ const {formatMessage} = this.props.intl;
let makeDemoteModal = null;
if (this.props.user.id === me.id) {
makeDemoteModal = (
<ConfirmModal
show={this.state.showDemoteModal}
- title={this.props.intl.formatMessage(messages.confirmDemoteRoleTitle)}
- message={[this.props.intl.formatMessage(messages.confirmDemoteDescription), React.createElement('br'), React.createElement('br'), './platform -assign_role -team_name="yourteam" -email="name@yourcompany.com" -role="system_admin"', serverError]}
- confirm_button={this.props.intl.formatMessage(messages.confirmDemotion)}
+ title={formatMessage(holders.confirmDemoteRoleTitle)}
+ message={[formatMessage(holders.confirmDemoteDescription), React.createElement('br'), React.createElement('br'), formatMessage(holders.confirmDemotionCmd), serverError]}
+ confirm_button={formatMessage(holders.confirmDemotion)}
onConfirm={this.handleDemoteSubmit}
onCancel={this.handleDemoteCancel}
/>