fixed page flow from submission of questionnaire
This commit is contained in:
@@ -5,6 +5,7 @@ import { useDropzone } from "react-dropzone";
|
||||
import RepComplete from "./representationComplete";
|
||||
import RepLPAQuestionnaireCheck_s78 from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78";
|
||||
import RepLPAQuestionnaireCheck_enforcement from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement";
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
import {
|
||||
getFormCollectionByID,
|
||||
@@ -35,6 +36,8 @@ const RepCompleteSubmit = (props) => {
|
||||
</li>
|
||||
));
|
||||
|
||||
const [confirmSections, setConfirmSections] = useState(false);
|
||||
|
||||
const repFormData = formObj.representationForm.values;
|
||||
|
||||
// const repDate = new Date();
|
||||
@@ -364,15 +367,31 @@ const RepCompleteSubmit = (props) => {
|
||||
</p>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
<label
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
{" "}
|
||||
{t(
|
||||
"myrepresentations:rep-check-tandc-para-four"
|
||||
)}
|
||||
</label>
|
||||
<div className="govuk-checkboxes govuk-checkboxes--small">
|
||||
<div className="govuk-checkboxes__item">
|
||||
<input
|
||||
name="pinswg_checkconfirmation"
|
||||
id="pinswg_checkconfirmation"
|
||||
type="checkbox"
|
||||
className="govuk-checkboxes__input"
|
||||
value=""
|
||||
onChange={(e) => {
|
||||
setConfirmSections(
|
||||
!confirmSections
|
||||
);
|
||||
}}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="pinswg_checkconfirmation"
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:rep-check-tandc-para-four"
|
||||
)}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* <Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
@@ -384,13 +403,16 @@ const RepCompleteSubmit = (props) => {
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
disabled={confirmSections ? false : true}
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
// onClick={() => {
|
||||
// setRepresentationSubmitConfirmation();
|
||||
// setRepresentationSubmit(true);
|
||||
// }}
|
||||
onClick={() => {
|
||||
setRepresentationSubmitConfirmation(
|
||||
true
|
||||
);
|
||||
setRepresentationSubmit(true);
|
||||
}}
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user