more
This commit is contained in:
@@ -33,6 +33,7 @@ const SignupPage = () => {
|
|||||||
getFormDataDefaults(paymentfields)
|
getFormDataDefaults(paymentfields)
|
||||||
);
|
);
|
||||||
const [showPaymentModal, setShowPaymentModal] = useState(false);
|
const [showPaymentModal, setShowPaymentModal] = useState(false);
|
||||||
|
const [showSelectPlan, setShowSelectPlan] = useState(true);
|
||||||
const modalText = "Description of monthly and annual subscriptions";
|
const modalText = "Description of monthly and annual subscriptions";
|
||||||
|
|
||||||
// this could also go in App.js if needed in the future
|
// this could also go in App.js if needed in the future
|
||||||
@@ -129,6 +130,11 @@ const SignupPage = () => {
|
|||||||
const handleProceedToPayment = (e) => {
|
const handleProceedToPayment = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
setShowPaymentModal(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleOpenSelectPlan = (e) => {
|
||||||
|
e.preventDefault();
|
||||||
if (isBusy) {
|
if (isBusy) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -137,10 +143,7 @@ const SignupPage = () => {
|
|||||||
if (dataValues === null) {
|
if (dataValues === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setShowPaymentModal(true);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
async function handleStripeAuthorization(
|
async function handleStripeAuthorization(
|
||||||
user,
|
user,
|
||||||
paymentDataValues,
|
paymentDataValues,
|
||||||
@@ -276,7 +279,6 @@ const SignupPage = () => {
|
|||||||
<Row key={`row${j}`}>
|
<Row key={`row${j}`}>
|
||||||
{names.map((name, i) => (
|
{names.map((name, i) => (
|
||||||
<Col key={`${name}${i + fieldsChunkSize * j}`} className="mb-3">
|
<Col key={`${name}${i + fieldsChunkSize * j}`} className="mb-3">
|
||||||
{console.log("data, name", data, name)}
|
|
||||||
<TextInput
|
<TextInput
|
||||||
name={name}
|
name={name}
|
||||||
value={data[name].value}
|
value={data[name].value}
|
||||||
@@ -296,7 +298,7 @@ const SignupPage = () => {
|
|||||||
))}
|
))}
|
||||||
</Row>
|
</Row>
|
||||||
))}
|
))}
|
||||||
<Row>
|
<Row style={{ width: "80%" }}>
|
||||||
<Col className="mb-3">
|
<Col className="mb-3">
|
||||||
<TextInput
|
<TextInput
|
||||||
id="signupPassword"
|
id="signupPassword"
|
||||||
@@ -314,7 +316,7 @@ const SignupPage = () => {
|
|||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row style={{ width: "80%" }}>
|
||||||
<Col className="mb-3">
|
<Col className="mb-3">
|
||||||
<TextInput
|
<TextInput
|
||||||
id="confirmPassword"
|
id="confirmPassword"
|
||||||
@@ -338,15 +340,10 @@ const SignupPage = () => {
|
|||||||
className="primary-button signup-proceed"
|
className="primary-button signup-proceed"
|
||||||
type="button"
|
type="button"
|
||||||
size="lg"
|
size="lg"
|
||||||
onClick={handleProceedToPayment}
|
onClick={handleOpenSelectPlan}
|
||||||
disabled={isBusy}
|
disabled={isBusy}
|
||||||
labelText="Proceed to Payment"
|
labelText="Select A Plan"
|
||||||
/>
|
/>
|
||||||
<div className="mt-3">
|
|
||||||
<span>
|
|
||||||
<Link to="/login">Go to login</Link>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{showNoticeOnPage ? (
|
{showNoticeOnPage ? (
|
||||||
@@ -360,6 +357,30 @@ const SignupPage = () => {
|
|||||||
<></>
|
<></>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{showSelectPlan ? (
|
||||||
|
<div className="select-plan-container">
|
||||||
|
<div className="select-sub-left">
|
||||||
|
<div>
|
||||||
|
<h5 className="signup-subheader-text">
|
||||||
|
Select your subscription plan
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div className="radio-group-box"></div>
|
||||||
|
</div>
|
||||||
|
<div className="select-sub-right">
|
||||||
|
<Button
|
||||||
|
className="primary-button signup-proceed"
|
||||||
|
type="button"
|
||||||
|
size="lg"
|
||||||
|
onClick={handleProceedToPayment}
|
||||||
|
disabled={isBusy}
|
||||||
|
labelText="Select A Plan"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
|
)}
|
||||||
{showPaymentModal ? (
|
{showPaymentModal ? (
|
||||||
<PaymentModal
|
<PaymentModal
|
||||||
key="modal-one-xc"
|
key="modal-one-xc"
|
||||||
|
|||||||
@@ -31,7 +31,13 @@ export const signupFields = {
|
|||||||
},
|
},
|
||||||
barNumber: { required: true, label: "Bar Number", maxLength: 45 },
|
barNumber: { required: true, label: "Bar Number", maxLength: 45 },
|
||||||
practiceArea: { required: true, label: "Practice Area", maxLength: 45 },
|
practiceArea: { required: true, label: "Practice Area", maxLength: 45 },
|
||||||
email: { required: true, label: "Email", maxLength: 45, type: "email" },
|
email: {
|
||||||
|
required: true,
|
||||||
|
label: "Email",
|
||||||
|
maxLength: 45,
|
||||||
|
type: "email",
|
||||||
|
inputWidth: "80%",
|
||||||
|
},
|
||||||
password: {
|
password: {
|
||||||
required: true,
|
required: true,
|
||||||
label: "Password",
|
label: "Password",
|
||||||
|
|||||||
@@ -32,12 +32,21 @@
|
|||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.signup-subheader-text {
|
||||||
|
letter-spacing: -0.6px;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 1.7rem;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
.signup-form {
|
.signup-form {
|
||||||
width: 880px;
|
width: 880px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.signup-button-box {
|
.signup-button-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
margin-bottom: 24px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
@@ -46,3 +55,38 @@
|
|||||||
.signup-proceed {
|
.signup-proceed {
|
||||||
width: 160px;
|
width: 160px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.select-plan-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
margin-top: 24px;
|
||||||
|
width: 920px;
|
||||||
|
height: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-sub-left {
|
||||||
|
width: 60%;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: rgb(240, 247, 250);
|
||||||
|
margin-right: 8px;
|
||||||
|
border: 1px solid #e9e9e9;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-sub-right {
|
||||||
|
width: 40%;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: rgb(240, 247, 250);
|
||||||
|
margin-left: 8px;
|
||||||
|
border: 1px solid #e9e9e9;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-group-box {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 6px;
|
||||||
|
width: 100%;
|
||||||
|
height: 300px;
|
||||||
|
background-color: green;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user