summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2017-04-24 13:30:08 +0200
committerGeorge Goldberg <george@gberg.me>2017-04-24 12:30:08 +0100
commitdc5ddd4ac0bdbf99ec100c57cb8402f18409bfa3 (patch)
tree4bb6d52fac3852ff6cfc6bf445b5cf443c54a301 /webapp
parent788df7a4bdc8d7495fe436b7d37885cfd53ef2f2 (diff)
downloadchat-dc5ddd4ac0bdbf99ec100c57cb8402f18409bfa3.tar.gz
chat-dc5ddd4ac0bdbf99ec100c57cb8402f18409bfa3.tar.bz2
chat-dc5ddd4ac0bdbf99ec100c57cb8402f18409bfa3.zip
PLT-6376: Button for "Add Members to Team" modal should say "Add", not "Go" (#6185)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/add_users_to_team.jsx8
-rw-r--r--webapp/components/more_direct_channels.jsx8
-rw-r--r--webapp/components/multiselect/multiselect.jsx20
-rwxr-xr-xwebapp/i18n/en.json1
4 files changed, 32 insertions, 5 deletions
diff --git a/webapp/components/add_users_to_team.jsx b/webapp/components/add_users_to_team.jsx
index c03d9ccd9..f0936c0d7 100644
--- a/webapp/components/add_users_to_team.jsx
+++ b/webapp/components/add_users_to_team.jsx
@@ -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>
diff --git a/webapp/components/more_direct_channels.jsx b/webapp/components/more_direct_channels.jsx
index 0fbd9053f..c8a0d22ee 100644
--- a/webapp/components/more_direct_channels.jsx
+++ b/webapp/components/more_direct_channels.jsx
@@ -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>
diff --git a/webapp/components/multiselect/multiselect.jsx b/webapp/components/multiselect/multiselect.jsx
index bba739ae5..c2bf60172 100644
--- a/webapp/components/multiselect/multiselect.jsx
+++ b/webapp/components/multiselect/multiselect.jsx
@@ -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
};
diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json
index 791e994f6..8086bcfef 100755
--- a/webapp/i18n/en.json
+++ b/webapp/i18n/en.json
@@ -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",