PLT-6376: Button for "Add Members to Team" modal should say "Add", not "Go" (#6185)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
788df7a4bd
Коммит
dc5ddd4ac0
@@ -223,6 +223,13 @@ export default class AddUsersToTeam extends React.Component {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const buttonSubmitText = (
|
||||||
|
<FormattedMessage
|
||||||
|
id='multiselect.add'
|
||||||
|
defaultMessage='Add'
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
dialogClassName={'more-modal more-direct-channels'}
|
dialogClassName={'more-modal more-direct-channels'}
|
||||||
@@ -258,6 +265,7 @@ export default class AddUsersToTeam extends React.Component {
|
|||||||
handleSubmit={this.handleSubmit}
|
handleSubmit={this.handleSubmit}
|
||||||
maxValues={MAX_SELECTABLE_VALUES}
|
maxValues={MAX_SELECTABLE_VALUES}
|
||||||
numRemainingText={numRemainingText}
|
numRemainingText={numRemainingText}
|
||||||
|
buttonSubmitText={buttonSubmitText}
|
||||||
/>
|
/>
|
||||||
</Modal.Body>
|
</Modal.Body>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -279,6 +279,13 @@ export default class MoreDirectChannels extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const buttonSubmitText = (
|
||||||
|
<FormattedMessage
|
||||||
|
id='multiselect.go'
|
||||||
|
defaultMessage='Go'
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
|
||||||
const numRemainingText = (
|
const numRemainingText = (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='multiselect.numPeopleRemaining'
|
id='multiselect.numPeopleRemaining'
|
||||||
@@ -320,6 +327,7 @@ export default class MoreDirectChannels extends React.Component {
|
|||||||
noteText={note}
|
noteText={note}
|
||||||
maxValues={MAX_SELECTABLE_VALUES}
|
maxValues={MAX_SELECTABLE_VALUES}
|
||||||
numRemainingText={numRemainingText}
|
numRemainingText={numRemainingText}
|
||||||
|
buttonSubmitText={buttonSubmitText}
|
||||||
/>
|
/>
|
||||||
</Modal.Body>
|
</Modal.Body>
|
||||||
</Modal>
|
</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 optionsToDisplay = [];
|
||||||
let nextButton;
|
let nextButton;
|
||||||
let previousButton;
|
let previousButton;
|
||||||
@@ -216,10 +228,7 @@ export default class MultiSelect extends React.Component {
|
|||||||
className='btn btn-primary btn-sm'
|
className='btn btn-primary btn-sm'
|
||||||
onClick={this.props.handleSubmit}
|
onClick={this.props.handleSubmit}
|
||||||
>
|
>
|
||||||
<FormattedMessage
|
{buttonSubmitText}
|
||||||
id='multiselect.go'
|
|
||||||
defaultMessage='Go'
|
|
||||||
/>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className='multi-select__help'>
|
<div className='multi-select__help'>
|
||||||
@@ -265,5 +274,6 @@ MultiSelect.propTypes = {
|
|||||||
handleSubmit: React.PropTypes.func,
|
handleSubmit: React.PropTypes.func,
|
||||||
noteText: React.PropTypes.node,
|
noteText: React.PropTypes.node,
|
||||||
maxValues: React.PropTypes.number,
|
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.isTyping": "{user} is typing...",
|
||||||
"msg_typing.someone": "Someone",
|
"msg_typing.someone": "Someone",
|
||||||
"multiselect.go": "Go",
|
"multiselect.go": "Go",
|
||||||
|
"multiselect.add": "Add",
|
||||||
"multiselect.instructions": "Use up/down arrows to navigate and enter to select",
|
"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.numPeopleRemaining": "You can add {num, number} more {num, plural, =0 {people} one {person} other {people}}. ",
|
||||||
"multiselect.numRemaining": "You can add {num, number} more",
|
"multiselect.numRemaining": "You can add {num, number} more",
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user