diff --git a/components/case/representation/consultationAgent.js b/components/case/representation/consultationAgent.js index 50a8d6dd..bfae03e6 100644 --- a/components/case/representation/consultationAgent.js +++ b/components/case/representation/consultationAgent.js @@ -10,6 +10,7 @@ import { RenderCondtionalRadioList, RenderPickList, RenderRichMultiline, + shouldDisableButton, } from "./representationElements"; import { useDropzone } from "react-dropzone"; @@ -145,14 +146,75 @@ const ConsultationAgent = (props) => {

- {t( - "myrepresentations:consultation-comment-label" - )} + {formObj.representationForm.values + .representationType == + "Consultation Response" + ? t( + "myrepresentations:enter-comment-label" + ) + : t( + "myrepresentations:consultation-comment-label" + )}

+ {formObj.representationForm.values + .representationType == + "Consultation Response" && ( +
+ + {formObj.representationForm.values + .appealType == "846040004" ? ( +

+ {t( + "myrepresentations:publish-policy-label" + )}{" "} + + {t( + "myrepresentations:publish-policy-link-label" + )} + {" "} + {t( + "myrepresentations:publish-policy-label-two" + )} +

+ ) : ( +

+ {t( + "myrepresentations:publish-policy-label" + )}{" "} + + {t( + "myrepresentations:publish-policy-link-label" + )} + {" "} + {t( + "myrepresentations:publish-policy-label-two" + )} +

+ )} +
+ )}
{ type="submit" className="govuk-button" data-module="govuk-button" - disabled={ - props.currentView.fileList.length < 1 - ? true - : false - } + disabled={shouldDisableButton({ + props, + formObj, + })} > {t("common:continue-button")} diff --git a/components/case/representation/consultationAppellant.js b/components/case/representation/consultationAppellant.js index 033591a3..2973b3cd 100644 --- a/components/case/representation/consultationAppellant.js +++ b/components/case/representation/consultationAppellant.js @@ -9,6 +9,7 @@ import { FileUploadField, RenderPickList, RenderRichMultiline, + shouldDisableButton, } from "./representationElements"; import { useDropzone } from "react-dropzone"; @@ -119,14 +120,74 @@ const ConsultationAppellant = (props) => {

- {t( - "myrepresentations:consultation-comment-label" - )} + {formObj.representationForm.values + .representationType == + "Consultation Response" + ? t("myrepresentations:enter-comment-label") + : t( + "myrepresentations:consultation-comment-label" + )}

+ {formObj.representationForm.values + .representationType == + "Consultation Response" && ( +
+ + {formObj.representationForm.values + .appealType == "846040004" ? ( +

+ {t( + "myrepresentations:publish-policy-label" + )}{" "} + + {t( + "myrepresentations:publish-policy-link-label" + )} + {" "} + {t( + "myrepresentations:publish-policy-label-two" + )} +

+ ) : ( +

+ {t( + "myrepresentations:publish-policy-label" + )}{" "} + + {t( + "myrepresentations:publish-policy-link-label" + )} + {" "} + {t( + "myrepresentations:publish-policy-label-two" + )} +

+ )} +
+ )} +
{ type="submit" className="govuk-button" data-module="govuk-button" - disabled={ - props.currentView.fileList.length < 1 - ? true - : false - } + disabled={shouldDisableButton({ + props, + formObj, + })} > {t("common:continue-button")} diff --git a/components/case/representation/consultationInterestedPartyPerson.js b/components/case/representation/consultationInterestedPartyPerson.js index d9e8130a..5aa1bf16 100644 --- a/components/case/representation/consultationInterestedPartyPerson.js +++ b/components/case/representation/consultationInterestedPartyPerson.js @@ -10,6 +10,7 @@ import { RenderCondtionalRadioList, RenderPickList, RenderRichMultiline, + shouldDisableButton, } from "./representationElements"; import { useDropzone } from "react-dropzone"; @@ -153,14 +154,76 @@ const ConsultationInterestedPartyPerson = (props) => {

- {t( - "myrepresentations:consultation-comment-label" - )} + {formObj.representationForm.values + .representationType == + "Consultation Response" + ? t( + "myrepresentations:enter-comment-label" + ) + : t( + "myrepresentations:consultation-comment-label" + )}

+ {" "} + {formObj.representationForm.values + .representationType == + "Consultation Response" && ( +
+ + {formObj.representationForm.values + .appealType == "846040004" ? ( +

+ {t( + "myrepresentations:publish-policy-label" + )}{" "} + + {t( + "myrepresentations:publish-policy-link-label" + )} + {" "} + {t( + "myrepresentations:publish-policy-label-two" + )} +

+ ) : ( +

+ {t( + "myrepresentations:publish-policy-label" + )}{" "} + + {t( + "myrepresentations:publish-policy-link-label" + )} + {" "} + {t( + "myrepresentations:publish-policy-label-two" + )} +

+ )} +
+ )}
{ type="submit" className="govuk-button" data-module="govuk-button" - disabled={ - props.currentView.fileList.length < 1 - ? true - : false - } + disabled={shouldDisableButton({ + props, + formObj, + })} > {t("common:continue-button")}