Merged PR 1111: content amends for create appeal

content amends for create appeal

Related work items: #10700, #10702, #10703, #10704
This commit is contained in:
Robert Bond
2024-03-26 11:38:59 +00:00
7 changed files with 169 additions and 40 deletions
+8
View File
@@ -24,6 +24,14 @@ export default function MakeNewAppeal() {
{t("myportal:makenewappeal-card-button-label")}
</Link>
</div>
<p className="govuk-body-s govuk govuk-!-margin-top-5">
{t("myportal:makenewappeal-card-paragraph-three")}
</p>
<p className="govuk-body-s govuk govuk-!-margin-top-5">
<Link href="https://gov.wales">
{t("myportal:makenewappeal-card-link-label")}
</Link>
</p>
</div>
</div>
);
+121 -33
View File
@@ -3,7 +3,6 @@ import { useRouter } from "next/router";
import { connect } from "react-redux";
import { useEffect, useState } from "react";
import { Field, formValueSelector, reduxForm, change } from "redux-form";
import { tr } from "date-fns/locale";
const RenderTextfield = ({
id,
@@ -191,6 +190,11 @@ const RenderRadio = ({
<fieldset className="govuk-fieldset">
<legend className="govuk-fieldset__legend govuk-fieldset__legend--s govuk-!-font-weight-regular">
{label}
{(custom.hint != false || custom.hint != undefined) && (
<div className="govuk-hint govuk-!-margin-top-4 govuk-!-font-size-16">
{custom.hint}
</div>
)}
</legend>
{touched && error && (
<span
@@ -282,6 +286,7 @@ function Radiofield(props) {
formProps,
parentFieldShowOnValue,
validation,
hint,
} = props;
const router = useRouter();
@@ -326,7 +331,7 @@ function Radiofield(props) {
errorMsg={t("newappeal:select-an-option-label")}
component={RenderRadio}
inline={props.inline}
hint={props.hint}
hint={hint}
//validate={eval(validation)}
requiredDocumentLabel={props.requiredDocumentLabel}
requiredDocumentValue={props.requiredDocumentValue}
@@ -345,7 +350,7 @@ function Radiofield(props) {
errorMsg={t("newappeal:select-an-option-label")}
component={RenderRadio}
inline={props.inline}
hint={props.hint}
hint={hint}
//validate={eval(validation)}
requiredDocumentLabel={props.requiredDocumentLabel}
requiredDocumentValue={props.requiredDocumentValue}
@@ -356,6 +361,67 @@ function Radiofield(props) {
</>
);
}
const RenderCheckBox = ({
datafieldname,
name,
label,
id,
errorMsg,
options,
input: { onChange, value },
meta: { touched, error },
...custom
}) => {
let { t } = useTranslation();
const required = (value) => (value ? undefined : "Required");
return (
<>
<div
className={
touched && error
? "govuk-form-group govuk-form-group--error"
: "govuk-form-group "
}
>
<fieldset className="govuk-fieldset">
{touched && error && (
<span
id={id + "-error"}
className="govuk-error-message"
>
<span className="govuk-visually-hidden">
Error:
</span>{" "}
{errorMsg}
</span>
)}
<div className={"govuk-checkboxes govuk-checkboxes--small"}>
<div className="govuk-checkboxes__item">
<Field
id={id}
name={id}
component="input"
type="checkbox"
className="govuk-checkboxes__input"
value={true}
validate={[required]}
/>
<label
className="govuk-label govuk-checkboxes__label"
htmlFor={id}
>
{label}
</label>
</div>
</div>
</fieldset>
</div>
</>
);
};
let AboutYou = (props) => {
let { t } = useTranslation();
@@ -440,6 +506,9 @@ let AboutYou = (props) => {
return (
<form onSubmit={handleSubmit(onHandleSubmit)}>
<div>
<p className="govuk-body-m">{t("newappeal:about-you-hint")}</p>
</div>
<Field
name={"pinswg_onbehalfof"}
id={"pinswg_onbehalfof"}
@@ -462,7 +531,6 @@ let AboutYou = (props) => {
</div>
</details>
</div>
<Radiofield
name={"pinswg_appellantagent"}
datafieldname={"pinswg_appellantagent"}
@@ -472,8 +540,8 @@ let AboutYou = (props) => {
className="govuk-radios__input"
validate={"[required]"}
errorMsg={t("newappeal:select-an-option-label")}
hint={t("newappeal:about-you-who-are-you-hint-label")}
/>
{appellantAgentValue == "846040000" && (
<>
<h2 className="govuk-heading-s">
@@ -536,18 +604,6 @@ let AboutYou = (props) => {
)}
/>
<Radiofield
name={"pinswg_contactprefs"}
datafieldname={"pinswg_contactprefs"}
label={t(
"newappeal:about-you-agent-contact-preferences-label"
)}
options="[846040000|newappeal:about-you-agent-contact-preferences-value-email,846040001|newappeal:about-you-agent-contact-preferences-value-post]"
id={"pinswg_contactprefs"}
className="govuk-radios__input"
validate={"[required]"}
errorMsg={t("newappeal:select-an-option-label")}
/>
<Radiofield
name={"pinswg_languagepreference"}
datafieldname={"pinswg_languagepreference"}
@@ -557,9 +613,27 @@ let AboutYou = (props) => {
options="[846040000|newappeal:about-you-agent-language-preferences-value-english,846040001|newappeal:about-you-agent-language-preferences-value-welsh]"
id={"pinswg_languagepreference"}
className="govuk-radios__input"
validate={"[required]"}
validate={[required]}
errorMsg={t("newappeal:select-an-option-label")}
/>
<div>
<p className="govuk-body-m">
{t(
"newappeal:about-you-communication-disclaimer-label"
)}
</p>
</div>
<Field
name={"pinswg_nondeterminationconfirmation"}
datafieldname={"pinswg_nondeterminationconfirmation"}
options={"[yes]"}
label={t("newappeal:appeal-confirmation-label")}
id={"pinswg_nondeterminationconfirmation"}
validate={[required]}
errorMsg={t("newappeal:select-to-confirm-label")}
component={RenderCheckBox}
/>
</>
)}
{appellantAgentValue == "846040001" && (
@@ -607,7 +681,7 @@ let AboutYou = (props) => {
component={RenderTextfield}
type="email"
className="govuk-input govuk-input--width-20"
validate={[required]}
//validate={[required]}
label={t(
"newappeal:about-you-appellant-contact-details-email-label"
)}
@@ -618,7 +692,7 @@ let AboutYou = (props) => {
component={RenderTextfield}
type="text"
className="govuk-input govuk-input--width-20"
validate={[required, phoneNumber]}
validate={[phoneNumber]}
label={t(
"newappeal:about-you-appellant-contact-details-phone-label"
)}
@@ -632,11 +706,20 @@ let AboutYou = (props) => {
component={RenderTextfield}
type="text"
className="govuk-input govuk-input--width-20"
validate={[required]}
//validate={[required]}
label={t(
"newappeal:about-you-agent-contact-details-companyname-label"
)}
/>
<Field
name={"pinswg_agentreference"}
id={"pinswg_agentreference"}
component={RenderTextfield}
type="text"
className="govuk-input govuk-input--width-20"
// validate={[required]}
label={t("newappeal:about-you-agent-reference-label")}
/>
<Field
name={"pinswg_agentfirstname"}
id={"pinswg_agentfirstname"}
@@ -693,18 +776,6 @@ let AboutYou = (props) => {
"newappeal:about-you-agent-contact-details-phone-label"
)}
/>
<Radiofield
name={"pinswg_contactprefs"}
datafieldname={"pinswg_contactprefs"}
label={t(
"newappeal:about-you-agent-contact-preferences-label"
)}
options="[846040000|newappeal:about-you-agent-contact-preferences-value-email,846040001|newappeal:about-you-agent-contact-preferences-value-post]"
id={"pinswg_contactprefs"}
className="govuk-radios__input"
validate={[required]}
errorMsg={t("newappeal:select-an-option-label")}
/>
<Radiofield
name={"pinswg_languagepreference"}
datafieldname={"pinswg_languagepreference"}
@@ -717,6 +788,23 @@ let AboutYou = (props) => {
validate={[required]}
errorMsg={t("newappeal:select-an-option-label")}
/>
<div>
<p className="govuk-body-m">
{t(
"newappeal:about-you-communication-disclaimer-label"
)}
</p>
</div>
<Field
name={"pinswg_nondeterminationconfirmation"}
datafieldname={"pinswg_nondeterminationconfirmation"}
options={"[yes]"}
label={t("newappeal:appeal-confirmation-label")}
id={"pinswg_nondeterminationconfirmation"}
validate={[required]}
errorMsg={t("newappeal:select-to-confirm-label")}
component={RenderCheckBox}
/>
</>
)}
+15
View File
@@ -523,6 +523,21 @@ let CreateCase = (props) => {
)}
/>
<div className="govuk-warning-text">
<span
className="govuk-warning-text__icon"
aria-hidden="true"
>
!
</span>
<strong className="govuk-warning-text__text">
<span className="govuk-visually-hidden">
Warning
</span>
{t("newappeal:s78-appeals-only-label")}
</strong>
</div>
{showIfHasParentShowValue && (
<Radiofield
name={"confirmHASCAS"}
+2
View File
@@ -5,6 +5,8 @@
"makenewappeal-card-paragraph-one": "Cyn cyflwyno apêl newydd, sicrhewch eich bod wedi darllen yr holl ganllawiau sy'n",
"makenewappeal-card-link": "berthnasol i'r math o apêl sydd gennych.",
"makenewappeal-card-paragraph-two": "Wedi i chi glicio'r botwm 'gwneud apêl newydd' isod, cewch eich arwain drwy broses i'ch helpu i ddewis y math cywir o apêl.",
"makenewappeal-card-paragraph-three": "Dim ond yn erbyn Gwrthod Caniatâd Cynllunio neu Fethiant i Benderfynu o fewn amser i'r Porth Gwaith Achos hwn y gallwch chi Gyflwyno apêl. Rhaid cyflwyno pob apêl arall trwy e-bost neu'r post.",
"makenewappeal-card-link-label": "Link label",
"makenewappeal-card-button-label": "Gwneud apêl newydd",
"mycases-card-title": "Fy achosion",
"searchcases-card-title": "Chwilio apeliadau a Datblygiadau o Arwyddocâd Cenedlaethol",
+10 -3
View File
@@ -2,7 +2,7 @@
"viewall-link": "View all",
"parent-page-title": "Fy Mhorth",
"page-title": "Apêl newydd",
"select-lpa-label": "Dewiswch eich awdurdod cynllunio lleol",
"select-lpa-label": "Dewiswch eich Awdurdod Cynllunio Lleol (ACLl)",
"select-lpa-label-error-msg": "Mae angen awdurdod lleol",
"select-appeal-type-label": "Dewiswch fath o achos",
"select-appeal-type-label-error-msg": "Mae angen math o achos",
@@ -12,15 +12,19 @@
"yes-option-label": "Ydw",
"no-option-label": "Na",
"select-an-option-label": "Dewiswch opsiwn",
"appeal-confirmation-label": "Cadarnhaf fy mod yn apelio yn erbyn cynllunio neu ddiffyg penderfyniad",
"select-to-confirm-label": "Cadarnhau i barhau",
"is-required-label": "Yn ofynnol",
"invalid-postcode-label": "Cod post annilys",
"hascas-confirmation-label": "Cadarnhau bod angen apêl HAS/CAS",
"hascas-confirmation-hint": "Mae'r llwybr apêl hwn yn berthnasol dim ond os yw'ch cais yn ymwneud â gwrthod caniatâd cynllunio, neu wrthodiad i gais i amrywio neu ddileu amod sydd ynghlwm wrth ganiatâd blaenorol. Bydd pob cais arall yn cael ei gyflwyno drwy Apêl Cynllunio Adran 78",
"about-you-page-title": "Amdanat ti",
"about-you-on-behalf-label": "Cyflwynwyd apêl ar ran:",
"about-you-hint": "Os ydych yn gwneud mwy nag un apêl ar gyfer y safle yna cyflwynwch drwy e-bost",
"about-you-on-behalf-label": "Enwr apelydd/enwr sefydliad (os ywn berthnasol):",
"about-you-who-can-appeal-label": "Pwy all apelio?",
"about-you-who-can-appeal-paragraph": "Dim ond y rhai a enwir fel ymgeisydd ar y ffurflen gais wreiddiol all gyflwyno apêl. os ydych yn cyflwyno apêl ar ran cwmni nodwch enw'r cwmni yr ydych yn ei gynrychioli",
"about-you-who-are-you-label": "Ai chi yw'r apelydd neu asiant sy'n gweithredu ar ran yr apelydd?",
"about-you-who-are-you-hint-label": "Os ydych yn cyflwyno ar ran yr apelydd, marciwch eich hun fel Asiant. Sylwch, os rhowch fanylion yr asiant, bydd yr holl ohebiaeth yn cael ei hanfon at yr asiant",
"about-you-who-are-you-label-appellant": "Apelydd",
"about-you-who-are-you-label-agent": "Asiant",
"about-you-appellant-contact-details": "Manylion cyswllt yr Apelydd",
@@ -32,6 +36,7 @@
"about-you-appellant-language-preferences-label": "Dewis iaith",
"about-you-agent-contact-details": "Manylion cyswllt yr Asiant",
"about-you-agent-contact-details-companyname-label": "Enw cwmni",
"about-you-agent-reference-label": "Cyfeirnod yr asiant",
"about-you-agent-contact-details-firstname-label": "Enw cyntaf",
"about-you-agent-contact-details-lastname-label": "Enw olaf",
"about-you-agent-contact-details-address-label": "Cyfeiriad",
@@ -43,6 +48,7 @@
"about-you-agent-language-preferences-label": "Dewis iaith",
"about-you-agent-language-preferences-value-english": "Saesneg",
"about-you-agent-language-preferences-value-welsh": "Cymraeg",
"about-you-communication-disclaimer-label": "Bydd cyfathrebu trwy e-bost rhagosodedig. Os byddai'n well gennych gyfathrebu drwy'r post yna cysylltwch â ni. Byddwch yn ymwybodol y gall cyfathrebu drwy'r post fod yn arafach.",
"new-appeal-progress-nav-label": "Cynnydd",
"new-appeal-documentlist-nav": "Angen dogfen",
"new-appeal-introduction-paragraph": "Intro text to explain process. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ornare lobortis sollicitudin. Pellentesque ac libero auctor, efficitur urna faucibus, fringilla nisi. Fusce viverra pharetra tristique. In diam est, interdum sagittis tempus non, ultricies at ante. Nullam porta dolor sit amet.",
@@ -59,5 +65,6 @@
"new-appeal-procedure-option-inperson": "Yn bersonol",
"new-appeal-procedure-option-hybrid": "Hybrid",
"new-appeal-fileupload-drop-label": "Llusgwch a gollwng eich ffeiliau yma.",
"new-appeal-fileupload-file-list-label": "Dim ond ffeiliau .pdf, .doc, .docx, .tif, .tiff, .jpeg, .jpg neu .zip a dderbynnir"
"new-appeal-fileupload-file-list-label": "Dim ond ffeiliau .pdf, .doc, .docx, .tif, .tiff, .jpeg, .jpg neu .zip a dderbynnir",
"s78-appeals-only-label": "Dim ond drwy'r Porth Gwaith Achos y gallwch gyflwyno apêl yn erbyn Gwrthod Caniatâd Cynllunio neu Fethiant i Benderfynu o fewn yr amser ar gyfer Apeliadau Cynllunio a78 drwy'r Porth Gwaith Achos. Rhaid cyflwyno pob apêl arall drwy'r post neu e-bost."
}
+2
View File
@@ -5,6 +5,8 @@
"makenewappeal-card-paragraph-one": "Before submitting a new appeal, please ensure you have read all of the guidance",
"makenewappeal-card-link": "relevant to your appeal type.",
"makenewappeal-card-paragraph-two": "Once you click the 'make a new appeal' button below you will be guided through a process to help you select the correct appeal type",
"makenewappeal-card-paragraph-three": "You can only Submit an appeal against a Refusal of planning Permission or Failure to determine within time vai this Casework Portal. All other appeals must be submitted via Email or post.",
"makenewappeal-card-link-label": "Link label",
"makenewappeal-card-button-label": "Make a new appeal",
"mycases-card-title": "My cases",
"searchcases-card-title": "Search appeals and Developments of National Significance",
+11 -4
View File
@@ -2,7 +2,7 @@
"viewall-link": "View all",
"parent-page-title": "My portal",
"page-title": "New appeal",
"select-lpa-label": "Select your local planning authority",
"select-lpa-label": "Select your Local Planning Authority (LPA)",
"select-lpa-label-error-msg": "Local authority is required",
"select-appeal-type-label": "Select a case type",
"select-appeal-type-label-error-msg": "Appeal type is required",
@@ -12,15 +12,19 @@
"yes-option-label": "Yes",
"no-option-label": "No",
"select-an-option-label": "Select an option",
"appeal-confirmation-label": "I confirm that I am making an appeal against planning or non determination",
"select-to-confirm-label": "Confirm to continue",
"is-required-label": "Is required",
"invalid-postcode-label": "Invalid postcode",
"hascas-confirmation-label": "Confirm HAS/CAS appeal is required",
"hascas-confirmation-hint": "This appeal route is only applicable if your application relates the refusal of planning permission, orthe refusal of an application to vary or remove a condition attached to a previous permision. All other applications will be submitted via a Section 78 Planning Appeal",
"about-you-page-title": "About you",
"about-you-on-behalf-label": "Appeal submitted on behalf of:",
"about-you-hint": "If you are making more than one appeal for the site then please submit via email",
"about-you-on-behalf-label": "Appellants name/Organisations name (if applicable):",
"about-you-who-can-appeal-label": "Who can appeal?",
"about-you-who-can-appeal-paragraph": "Only those named as an applicant on the original application form can submit an appeal. if you are submitting an appeal on behalf of a company state the name of the company you are representing",
"about-you-who-are-you-label": "Are you the appellant or an agent acting on behalf of the appeallant?",
"about-you-who-are-you-label": "Are you the appellant or an agent acting on behalf of the appellant?",
"about-you-who-are-you-hint-label": "If you are submitting on behalf of the appellant, mark yourself as an Agent. Please note that if you enter agent details all correspondence will be sent to the agent",
"about-you-who-are-you-label-appellant": "Appellant",
"about-you-who-are-you-label-agent": "Agent",
"about-you-appellant-contact-details": "Contact details for Appellant",
@@ -32,6 +36,7 @@
"about-you-appellant-language-preferences-label": "Language preference",
"about-you-agent-contact-details": "Contact details for Agent",
"about-you-agent-contact-details-companyname-label": "Company name",
"about-you-agent-reference-label": "Agent's reference",
"about-you-agent-contact-details-firstname-label": "First name",
"about-you-agent-contact-details-lastname-label": "Last name",
"about-you-agent-contact-details-address-label": "Address",
@@ -43,6 +48,7 @@
"about-you-agent-language-preferences-label": "Language preference",
"about-you-agent-language-preferences-value-english": "English",
"about-you-agent-language-preferences-value-welsh": "Welsh",
"about-you-communication-disclaimer-label": "Communication will be by default email. If you would prefer postal communication then please contact us. Please be aware that postal communication may be slower.",
"new-appeal-progress-nav-label": "Progress",
"new-appeal-documentlist-nav": "Documents needed",
"new-appeal-introduction-paragraph": "Intro text to explain process. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ornare lobortis sollicitudin. Pellentesque ac libero auctor, efficitur urna faucibus, fringilla nisi. Fusce viverra pharetra tristique. In diam est, interdum sagittis tempus non, ultricies at ante. Nullam porta dolor sit amet.",
@@ -59,5 +65,6 @@
"new-appeal-procedure-option-inperson": "In person",
"new-appeal-procedure-option-hybrid": "Hybrid",
"new-appeal-fileupload-drop-label": "Drag and drop your files here.",
"new-appeal-fileupload-file-list-label": "Only .pdf, .doc, .docx, .tif, .tiff, .jpeg, .jpg or .zip files will be accepted"
"new-appeal-fileupload-file-list-label": "Only .pdf, .doc, .docx, .tif, .tiff, .jpeg, .jpg or .zip files will be accepted",
"s78-appeals-only-label": "You can only submit an appeal against a Refusal of Planning Permission or Failure to Determine within time for Planning Appeals s78 via the Casework Portal. All other appeals must be submitted by by post or email."
}