From dc5ddd4ac0bdbf99ec100c57cb8402f18409bfa3 Mon Sep 17 00:00:00 2001
From: Carlos Tadeu Panato Junior <ctadeu@gmail.com>
Date: Mon, 24 Apr 2017 13:30:08 +0200
Subject: PLT-6376: Button for "Add Members to Team" modal should say "Add",
 not "Go" (#6185)

---
 webapp/components/multiselect/multiselect.jsx | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

(limited to 'webapp/components/multiselect/multiselect.jsx')

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
 };
-- 
cgit v1.2.3-1-g7c22

