mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-6376: Button for "Add Members to Team" modal should say "Add", not "Go" (#6185)
This commit is contained in:
committed by
George Goldberg
parent
788df7a4bd
commit
dc5ddd4ac0
@@ -223,6 +223,13 @@ export default class AddUsersToTeam extends React.Component {
|
||||
/>
|
||||
);
|
||||
|
||||
const buttonSubmitText = (
|
||||
<FormattedMessage
|
||||
id='multiselect.add'
|
||||
defaultMessage='Add'
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
dialogClassName={'more-modal more-direct-channels'}
|
||||
@@ -258,6 +265,7 @@ export default class AddUsersToTeam extends React.Component {
|
||||
handleSubmit={this.handleSubmit}
|
||||
maxValues={MAX_SELECTABLE_VALUES}
|
||||
numRemainingText={numRemainingText}
|
||||
buttonSubmitText={buttonSubmitText}
|
||||
/>
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
|
||||
@@ -279,6 +279,13 @@ export default class MoreDirectChannels extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
const buttonSubmitText = (
|
||||
<FormattedMessage
|
||||
id='multiselect.go'
|
||||
defaultMessage='Go'
|
||||
/>
|
||||
);
|
||||
|
||||
const numRemainingText = (
|
||||
<FormattedMessage
|
||||
id='multiselect.numPeopleRemaining'
|
||||
@@ -320,6 +327,7 @@ export default class MoreDirectChannels extends React.Component {
|
||||
noteText={note}
|
||||
maxValues={MAX_SELECTABLE_VALUES}
|
||||
numRemainingText={numRemainingText}
|
||||
buttonSubmitText={buttonSubmitText}
|
||||
/>
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
|
||||
@@ -129,6 +129,18 @@ export default class MultiSelect extends React.Component {
|
||||
);
|
||||
}
|
||||
|
||||
let buttonSubmitText;
|
||||
if (this.props.buttonSubmitText) {
|
||||
buttonSubmitText = this.props.buttonSubmitText;
|
||||
} else if (this.props.maxValues != null) {
|
||||
buttonSubmitText = (
|
||||
<FormattedMessage
|
||||
id='multiselect.go'
|
||||
defaultMessage='Go'
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
let optionsToDisplay = [];
|
||||
let nextButton;
|
||||
let previousButton;
|
||||
@@ -216,10 +228,7 @@ export default class MultiSelect extends React.Component {
|
||||
className='btn btn-primary btn-sm'
|
||||
onClick={this.props.handleSubmit}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='multiselect.go'
|
||||
defaultMessage='Go'
|
||||
/>
|
||||
{buttonSubmitText}
|
||||
</button>
|
||||
</div>
|
||||
<div className='multi-select__help'>
|
||||
@@ -265,5 +274,6 @@ MultiSelect.propTypes = {
|
||||
handleSubmit: React.PropTypes.func,
|
||||
noteText: React.PropTypes.node,
|
||||
maxValues: React.PropTypes.number,
|
||||
numRemainingText: React.PropTypes.node
|
||||
numRemainingText: React.PropTypes.node,
|
||||
buttonSubmitText: React.PropTypes.node
|
||||
};
|
||||
|
||||
@@ -1742,6 +1742,7 @@
|
||||
"msg_typing.isTyping": "{user} is typing...",
|
||||
"msg_typing.someone": "Someone",
|
||||
"multiselect.go": "Go",
|
||||
"multiselect.add": "Add",
|
||||
"multiselect.instructions": "Use up/down arrows to navigate and enter to select",
|
||||
"multiselect.numPeopleRemaining": "You can add {num, number} more {num, plural, =0 {people} one {person} other {people}}. ",
|
||||
"multiselect.numRemaining": "You can add {num, number} more",
|
||||
|
||||
Reference in New Issue
Block a user