From c17d81d065055da8d17657c42ed09341776a06dd Mon Sep 17 00:00:00 2001
From: Bogdan Cochior <bogdan.cochior@thinslices.com>
Date: Thu, 5 Jul 2018 13:31:02 +0300
Subject: [PATCH] style(signup): disable submit button on form submit

---
 .../src/components/SignUp/SignUpStep0.js       | 18 +++++++++++++++---
 .../src/components/SignUp/SignUpStep1.js       |  4 ++--
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/packages/components-faraday/src/components/SignUp/SignUpStep0.js b/packages/components-faraday/src/components/SignUp/SignUpStep0.js
index d3e786e08..dbee6e7e0 100644
--- a/packages/components-faraday/src/components/SignUp/SignUpStep0.js
+++ b/packages/components-faraday/src/components/SignUp/SignUpStep0.js
@@ -65,7 +65,13 @@ const Step0 = ({ journal, handleSubmit, initialValues, error }) =>
         />
         <DefaultText>
           By creating this account, you agree to the{' '}
-          <a href="https://www.hindawi.com/terms/">Terms of Service</a>.
+          <a
+            href="https://www.hindawi.com/terms/"
+            rel="noopener noreferrer"
+            target="_blank"
+          >
+            Terms of Service
+          </a>.
         </DefaultText>
       </Row>
       <Row>
@@ -74,8 +80,14 @@ const Step0 = ({ journal, handleSubmit, initialValues, error }) =>
           our Privacy Policy for the purpose of registering your Faraday account
           and allowing you to use the services available via the Faraday
           platform. Please read our{' '}
-          <a href="https://www.hindawi.com/privacy/">Privacy Policy</a> for
-          further information.
+          <a
+            href="https://www.hindawi.com/privacy/"
+            rel="noopener noreferrer"
+            target="_blank"
+          >
+            Privacy Policy
+          </a>{' '}
+          for further information.
         </PrivatePolicy>
       </Row>
       <Row>
diff --git a/packages/components-faraday/src/components/SignUp/SignUpStep1.js b/packages/components-faraday/src/components/SignUp/SignUpStep1.js
index 8403c6440..55a407e0a 100644
--- a/packages/components-faraday/src/components/SignUp/SignUpStep1.js
+++ b/packages/components-faraday/src/components/SignUp/SignUpStep1.js
@@ -11,7 +11,7 @@ const { Row, Err, Label, RowItem, FormContainer } = FormItems
 const PasswordField = input => <TextField {...input} type="password" />
 const EmailField = input => <TextField {...input} type="email" />
 
-const Step1 = ({ handleSubmit, error, type, prevStep }) => (
+const Step1 = ({ handleSubmit, error, type, prevStep, submitting }) => (
   <FormContainer onSubmit={handleSubmit}>
     {type === 'signup' && (
       <Row>
@@ -56,7 +56,7 @@ const Step1 = ({ handleSubmit, error, type, prevStep }) => (
       <Button onClick={prevStep} type="button">
         BACK
       </Button>
-      <Button primary type="submit">
+      <Button disabled={submitting} primary type="submit">
         CONFIRM
       </Button>
     </Row>
-- 
GitLab