updated with oauth, footer docs,

This commit is contained in:
2021-11-30 07:22:07 +00:00
parent f9f7b777e7
commit af5354d19f
32 changed files with 4790 additions and 250 deletions
+3 -8
View File
@@ -1,6 +1,8 @@
import Link from "next/link";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
import AccessibilityEN from "./footerDocs/accessibility_en";
import AccessibilityCY from "./footerDocs/accessibility_cy";
const AccessibilityStatement = (props) => {
let { t } = useTranslation();
@@ -16,14 +18,7 @@ const AccessibilityStatement = (props) => {
id="main-content"
role="main"
>
<div className="govuk-grid-row">
<div className="govuk-grid-column-full">
<h1 className="govuk-heading-l govuk-!-margin-bottom-7">
Accessibility Statement
</h1>
<p>bkah blah</p>
</div>
</div>
{router.locale != "en" ? <AccessibilityCY /> : <AccessibilityEN />}
</main>
);
};
+61 -43
View File
@@ -75,52 +75,70 @@ const RegisterComplete = (props) => {
}
});
return props.accountDetails.accCr == "created" ? (
<>
<p className="govuk-body">
{t("account:register-new-account-confirmation-email")}
</p>
var registerBody = "";
switch (props.accountDetails.accCr) {
case "created":
return (registerBody = (
<>
<p className="govuk-body">
{t("account:register-new-account-confirmation-email")}
</p>
<h2 className="govuk-heading-m">
{t("account:register-new-account-sub-heading-what-next")}
</h2>
<h2 className="govuk-heading-m">
{t(
"account:register-new-account-sub-heading-what-next"
)}
</h2>
<p className="govuk-body">
{t("account:register-new-account-paragraph-what-next")}
</p>
<p className="govuk-body">
{t("account:register-new-account-paragraph-what-next")}
</p>
<p className="govuk-body">
<Link href="/">
<a
className="govuk-link"
onClick={() => {
setLogout(), window.localStorage.clear();
}}
>
{t("account:register-new-account-my-portal-link")}
</a>
</Link>
</p>
</>
) : (
<>
<h2 className="govuk-heading-m">
{t("account:register-new-account-account-failed")}
</h2>
<p className="govuk-body">
<a
onClick={() => {
setRegisterFormComplete(false),
setAccountCreatedComplete(false),
setAccCr("false");
}}
className="govuk-link"
>
Try registering again
</a>
</p>
</>
);
<p className="govuk-body">
<Link href="/">
<a
className="govuk-link"
onClick={() => {
setLogout(), window.localStorage.clear();
}}
>
{t(
"account:register-new-account-my-portal-link"
)}
</a>
</Link>
</p>
</>
));
break;
case "exists":
return (registerBody = (
<>
<h2 className="govuk-heading-m">
{t("account:register-new-account-account-failed")}
</h2>
<p className="govuk-body">
<a
onClick={() => {
setRegisterFormComplete(false),
setAccountCreatedComplete(false),
setAccCr(false);
}}
className="govuk-link"
>
Try registering again
</a>
</p>
</>
));
default:
return (registerBody = "");
break;
}
return registerBody;
};
const mapStateToProps = (state) => {
+1 -1
View File
@@ -109,7 +109,7 @@ const RegisterForm = (props) => {
setRegisterFormComplete(true);
};
console.log(pristine);
//console.log(pristine);
return (
<>
{!pristine && !valid && (
+1 -1
View File
@@ -28,7 +28,7 @@ export default function Footer(props) {
};
//console.log(router.asPath);
const shareBodyStr = t("common:gov-wales-link") + router.asPath;
const shareBodyStr = t("common:service-home-url") + router.asPath;
const shareSubjectStr =
t("common:social-shared-from") +
" " +
+225
View File
@@ -0,0 +1,225 @@
import Link from "next/link";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
export default function AccessibilityCY() {
let { t } = useTranslation();
const router = useRouter();
const { locale } = router;
return (
<div className="govuk-grid-row govuk-body">
<div className="govuk-grid-column-full">
<h2 className="govuk-heading-l govuk-!-margin-bottom-7">
Datganiad Hygyrchedd ar gyfer Porth Penderfyniadau Cynllunio
ac Amgylchedd Cymru{" "}
</h2>
<p>
Maer datganiad hygyrchedd hwn yn berthnasol i borth ar-lein
Penderfyniadau Cynllunio ac Amgylchedd Cymru (PCAC) ar gyfer
cyflwyno ac adolygu dogfennau syn ymwneud âr gwaith achos
rydym yn ei brosesu.
</p>
<p>
Cynhelir y wefan hon gan PCAC, sef un o Is-adrannau
Llywodraeth Cymru. Rydym eisiau i gynifer o bobl â phosibl
allu defnyddior wefan hon. Er enghraifft, mae hynnyn
golygu y dylech allu:
</p>
<ul>
<li>newid lliwiau, lefelau cyferbynnedd a ffontiau</li>
<li>
chwyddo i mewn hyd at 300% heb ir testun fynd oddi ar y
sgrin
</li>
<li>
llywior rhan fwyaf or wefan gan ddefnyddio bysellfwrdd
yn unig
</li>
<li>
llywior rhan fwyaf or wefan gan ddefnyddio meddalwedd
adnabod llais
</li>
<li>
gwrando ar y rhan fwyaf or wefan gan ddefnyddio rhaglen
darllen sgrin (gan gynnwys fersiynau diweddaraf JAWS,
NVDA a VoiceOver)
</li>
</ul>
<p>
Rydym hefyd wedi gwneud testun y wefan mor syml ei ddeall â
phosibl.
</p>
<p>
Mae AbilityNet yn rhoi cyngor ar wneud eich dyfais yn haws
ei defnyddio os oes gennych anabledd.
</p>
<h3>Pa mor hygyrch ywr wefan hon</h3>
<p>
Rydym yn gwybod nad yw rhai rhannau or wefan hon yn gwbl
hygyrch:
</p>
<ul>
<li>
ni fydd y testun yn ail-lifo mewn un golofn pan fyddwch
yn newid maint y ffenestr bori{" "}
</li>
<li>
ni allwch addasu uchder llinell testun nar gofod rhwng
testun
</li>
<li>
nid ywr rhan fwyaf o ddogfennau PDF hŷn yn gwbl hygyrch
i feddalwedd darllen sgrin
</li>
<li>nid oes gan ffrydiau fideo byw gapsiynau</li>
<li>
mae rhai on ffurflenni ar-lein yn anodd eu llywio gan
ddefnyddio bysellfwrdd yn unig{" "}
</li>
<li>
ni allwch neidio ir prif gynnwys pan fyddwch yn
defnyddio rhaglen darllen sgrin{" "}
</li>
<li>
mae terfyn ar ba mor fawr y gallwch chwyddor map ar ein
tudalen cysylltwch â ni
</li>
</ul>
<h3>Adborth a gwybodaeth gyswllt</h3>
<p>
Os oes arnoch angen y wybodaeth ar y wefan hon mewn fformat
arall, fel PDF hygyrch, print bras, fersiwn hawdd ei
darllen, recordiad sain neu braille:
</p>
<ul>
<li>
Anfonwch neges e-bost at:{" "}
<a
className="govuk-link--no-underline govuk-!-font-weight-bold"
href="mailto:PEDW.GwaithAchos@llyw.cymru"
>
PEDW.GwaithAchos@llyw.cymru
</a>
</li>
<li>
Ffoniwch:{" "}
<a
className="govuk-link--no-underline govuk-!-font-weight-bold"
href="tel:03000 604400"
>
03000 604400
</a>
</li>
</ul>
<p>
Byddwn yn ystyried eich cais ac yn cysylltu â chi ymhen 5
niwrnod.
</p>
<p>
Os na allwch weld y map ar ein tudalen cysylltwch â ni,
ffoniwch ni neu anfonwch neges e-bost atom i gael
cyfarwyddiadau;{" "}
<a
className="govuk-link--no-underline govuk-!-font-weight-bold"
href="https://llyw.cymru/penderfyndiadau-cynllunio-ac-amgylchedd-cymru/cysylltwch-ni"
>
Cysylltwch â Ni
</a>
.
</p>
<h3>Gweithdrefn orfodi</h3>
<p>
Maer Comisiwn Cydraddoldeb a Hawliau Dynol (EHRC) yn
gyfrifol am orfodi Rheoliadau Hygyrchedd Cyrff Sector
Cyhoeddus (Gwefannau ac Apiau Symudol) (Rhif 2) 2018 (y
rheoliadau hygyrchedd). Os nad ydych yn fodlon âr ffordd
rydym yn ymateb ich cwyn, cysylltwch âr Gwasanaeth
Cynghori a Chymorth Cydraddoldeb (EASS).
</p>
<h3>Cysylltu â ni ar y ffôn neu ymweld â nin bersonol</h3>
<p>
Rydym yn darparu gwasanaeth cyfnewid testun ar gyfer pobl
B/byddar, pobl sydd â nam ar y clyw neu bobl sydd â nam ar y
lleferydd.
</p>
<p>
Mae dolenni sain yn ein swyddfeydd hefyd, neu os byddwch yn
cysylltu â ni cyn eich ymweliad gallwn drefnu dehonglydd
Iaith Arwyddion Prydain (BSL).
</p>
<p>Dysgwch sut i gysylltu â ni.</p>
<h3>Gwybodaeth dechnegol am hygyrchedd y wefan hon</h3>
<p>
Mae PCAC wedi ymrwymo i wneud ei wefan yn hygyrch, yn unol â
Rheoliadau Hygyrchedd Cyrff Sector Cyhoeddus (Gwefannau ac
Apiau Symudol) (Rhif 2) 2018.
</p>
<h3>Statws cydymffurfio</h3>
<p>
Maer wefan hon yn cydymffurfion rhannol â Chanllawiau
Hygyrchedd Cynnwys y We (WCAG) fersiwn 2.1 safon Lefel AA,
o ganlyniad ir achosion o ddiffyg
cydymffurfio/eithriadau neur achosion o ddiffyg
cydymffurfio ac eithriadau] a restrir isod.
</p>
<h3>Diffyg cydymffurfio âr rheoliadau hygyrchedd</h3>
<p>
Nid oes testun amgen ar gyfer rhai delweddau, felly ni all
pobl syn defnyddio rhaglen darllen sgrin gael at y
wybodaeth. Mae hyn yn methu maen prawf llwyddiant 1.1.1
(cynnwys nad ywn destun).
</p>
<p>
Bwriadwn ychwanegu testun amgen at yr holl ddelweddau erbyn
mis Medi 2020. Pan fyddwn yn cyhoeddi cynnwys newydd, byddwn
yn sicrhau bod ein defnydd o ddelweddaun bodloni safonau
hygyrchedd.
</p>
<h3>Paratoir datganiad hygyrchedd hwn</h3>
<p>
Paratowyd y datganiad hwn ar [TBC]. Fei hadolygwyd
ddiwethaf ar [TBC when signed off].
</p>
<p>
Profwyd y wefan hon ddiwethaf ar [TBC]. Cynhaliwyd y prawf
gan [add name of organisation that carried out test, or
indicate that you did your own testing].
</p>
<p>
Gwnaethom ddefnyddior dull hwn i benderfynu ar sampl o
dudalennau iw profi [add link to explanation of how you
decided which pages to test].
</p>
<p>
Gallwch ddarllen yr adroddiad llawn ar y prawf hygyrchedd
[add link to report].
</p>
</div>
</div>
);
}
+219
View File
@@ -0,0 +1,219 @@
import Link from "next/link";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
export default function AccessibilityEN() {
let { t } = useTranslation();
const router = useRouter();
const { locale } = router;
return (
<div className="govuk-grid-row govuk-body">
<div className="govuk-grid-column-full">
<h2 className="govuk-heading-l govuk-!-margin-bottom-7">
Accessibility Statement for Planning and Environment
Decisions Wales Portal
</h2>
<p>
This accessibility statement applies to Planning and
Environment Decisions Wales (PEDW) online portal for the
submission and review of documents related to the casework
we process.
</p>
<p>
This website is run by PEDW, a Division of The Welsh
Government. We want as many people as possible to be able to
use this website. For example, that means you should be able
to:
</p>
<ul>
<li>change colours, contrast levels and fonts</li>
<li>
zoom in up to 300% without the text spilling off the
screen
</li>
<li>navigate most of the website using just a keyboard</li>
<li>
navigate most of the website using speech recognition
software
</li>
<li>
listen to most of the website using a screen reader
(including the most recent versions of JAWS, NVDA and
VoiceOver)
</li>
</ul>
<p>
Weve also made the website text as simple as possible to
understand.
</p>
<p>
AbilityNet has advice on making your device easier to use if
you have a disability.
</p>
<h3>How accessible this website is</h3>
<p>
We know some parts of this website are not fully accessible:
</p>
<ul>
<li>
the text will not reflow in a single column when you
change the size of the browser window
</li>
<li>
you cannot modify the line height or spacing of text
</li>
<li>
most older PDF documents are not fully accessible to
screen reader software
</li>
<li>live video streams do not have captions</li>
<li>
some of our online forms are difficult to navigate using
just a keyboard
</li>
<li>
you cannot skip to the main content when using a screen
reader
</li>
<li>
theres a limit to how far you can magnify the map on
our contact us page
</li>
</ul>
<h3>Feedback and contact information</h3>
<p>
If you need information on this website in a different
format like accessible PDF, large print, easy read, audio
recording or braille:
</p>
<ul>
<li>
Email:{" "}
<a
className="govuk-link--no-underline govuk-!-font-weight-bold"
href="mailto:PEDW.Casework@gov.wales"
>
PEDW.Casework@gov.wales
</a>{" "}
</li>
<li>
Call:{" "}
<a
className="govuk-link--no-underline govuk-!-font-weight-bold"
href="tel:03000 604400"
>
03000 604400
</a>
</li>
</ul>
<p>
Well consider your request and get back to you in no later
than 5 days.
</p>
<p>
If you cannot view the map on our contact us page, please
call or email us for directions; Contact Us.
</p>
<h3>Enforcement procedure</h3>
<p>
The Equality and Human Rights Commission (EHRC) is
responsible for enforcing the Public Sector Bodies (Websites
and Mobile Applications) (No. 2) Accessibility Regulations
2018 (the accessibility regulations). If youre not happy
with how we respond to your complaint, contact the Equality
Advisory and Support Service (EASS).
</p>
<h3>Contacting us by phone or visiting us in person</h3>
<p>
We provide a text relay service for people who are D/deaf,
hearing impaired or have a speech impediment.
</p>
<p>
Our offices have audio induction loops, or if you contact us
before your visit we can arrange a British Sign Language
(BSL) interpreter.
</p>
<p>
Find out how to{" "}
<a
className="govuk-link--no-underline govuk-!-font-weight-bold"
href="https://gov.wales/planning-and-environment-decisions-wales/contact-us"
>
contact us
</a>
.
</p>
<h3>
Technical information about this websites accessibility
</h3>
<p>
PEDW is committed to making its website accessible, in
accordance with the Public Sector Bodies (Websites and
Mobile Applications) (No. 2) Accessibility Regulations 2018.
</p>
<h3>Compliance status</h3>
<p>
This website is partially compliant with the Web Content
Accessibility Guidelines version 2.1 Level AA standard,
due to the non-compliances/the exemptions or the
non-compliances and exemptions] listed below.
</p>
<h3>Non-compliance with the accessibility regulations</h3>
<p>
Some images do not have a text alternative, so people using
a screen reader cannot access the information. This fails
WCAG 2.1 success criterion 1.1.1 (non-text content).
</p>
<p>
We plan to add text alternatives for all images by September
2020. When we publish new content well make sure our use of
images meets accessibility standards.
</p>
<h3>Preparation of this accessibility statement</h3>
<p>
This statement was prepared on [TBC]. It was last reviewed
on [TBC when signed off].
</p>
<p>
This website was last tested on [TBC]. The test was carried
out by [add name of organisation that carried out test, or
indicate that you did your own testing].
</p>
<p>
We used this approach to deciding on a sample of pages to
test [add link to explanation of how you decided which pages
to test].
</p>
<p>
You can read the full accessibility test report [add link to
report].
</p>
</div>
</div>
);
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+19
View File
@@ -0,0 +1,19 @@
import Link from "next/link";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
export default function TandCCY() {
let { t } = useTranslation();
const router = useRouter();
const { locale } = router;
return (
<div className="govuk-grid-row govuk-body">
<div className="govuk-grid-column-full">
<h2 className="govuk-heading-l govuk-!-margin-bottom-7">
T and c CY
</h2>
</div>
</div>
);
}
+19
View File
@@ -0,0 +1,19 @@
import Link from "next/link";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
export default function TandCEN() {
let { t } = useTranslation();
const router = useRouter();
const { locale } = router;
return (
<div className="govuk-grid-row govuk-body">
<div className="govuk-grid-column-full">
<h2 className="govuk-heading-l govuk-!-margin-bottom-7">
T and c
</h2>
</div>
</div>
);
}
+30 -22
View File
@@ -24,41 +24,46 @@ const RenderTextfield = ({
input,
hint1,
hint2,
hint3,
meta: { touched, error },
...custom
}) => {
return (
<>
<div
className={
touched && error
? "govuk-form-group govuk-form-group--error"
: "govuk-form-group "
}
>
<div className="govuk-form-group">
<div id="basicSearch-hint" className="govuk-hint ">
<label
className="govuk-label "
htmlFor={id}
id={id + "_label"}
>
{label}
<span className="govuk-body-m">{hint1}</span>
<span className="govuk-body-s">{hint1}</span>
</label>
<br />
<span className="govuk-body-s">
{hint2} CAS-00009-W8N6W4
</span>
<ul className="govuk-body-s govuk-!-margin-top-3">
<li>{hint2} </li>
<li>{hint3}</li>
</ul>
</div>
{touched && error && (
<span id={id + "-error"} className="govuk-error-message">
<span className="govuk-visually-hidden">Error:</span>{" "}
{error}
</span>
)}
<input {...input} className={className} name={name} id={id} />
<div>
<input
{...input}
className={className}
name={name}
id={id}
/>
{touched && error && (
<span
id={id + "-error"}
className="govuk-error-message govuk-form-group--error"
>
<span className="govuk-visually-hidden">
Error:
</span>{" "}
{error}
</span>
)}
</div>
</div>
</>
);
@@ -121,7 +126,10 @@ let CaseSearch = (props) => {
aria-describedby="basicSearch-hint"
hint1={t("myportal:searchcases-card-search-hint")}
hint2={t(
"myportal:searchcases-card-search-example-label"
"myportal:searchcases-card-search-example-label-1"
)}
hint3={t(
"myportal:searchcases-card-search-example-label-2"
)}
/>
+4 -4
View File
@@ -218,16 +218,16 @@ const TopThree = (props) => {
let noRecordsLabel = "";
switch (topThreeType) {
case "watchedCases":
noRecordsLabel = "You are not watching any cases";
noRecordsLabel = t("myportal:norecords-watched-cases");
break;
case "myRepresentations":
noRecordsLabel = "You have no representations";
noRecordsLabel = t("myportal:norecords-representations");
break;
case "myCases":
noRecordsLabel = "You have no cases";
noRecordsLabel = t("myportal:norecords-cases");
break;
case "awaitingSubmission":
noRecordsLabel = "You have no awaiting submissions";
noRecordsLabel = t("myportal:norecords-awaiting-submissions");
break;
}
return (
+3 -9
View File
@@ -1,7 +1,8 @@
import Link from "next/link";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
import PrivacyEN from "./footerDocs/privacy_en";
import PrivacyCY from "./footerDocs/privacy_cy";
const PrivacyStatement = (props) => {
let { t } = useTranslation();
@@ -16,14 +17,7 @@ const PrivacyStatement = (props) => {
id="main-content"
role="main"
>
<div className="govuk-grid-row">
<div className="govuk-grid-column-full">
<h1 className="govuk-heading-l govuk-!-margin-bottom-7">
Privacy Statement
</h1>
<p>bkah blah</p>
</div>
</div>
{router.locale != "en" ? <PrivacyCY /> : <PrivacyEN />}
</main>
);
};
+3 -8
View File
@@ -1,6 +1,8 @@
import Link from "next/link";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
import TandCEN from "./footerDocs/tandc_en";
import TandCCY from "./footerDocs/tandc_cy";
const TermsAndConditionsStatement = (props) => {
let { t } = useTranslation();
@@ -16,14 +18,7 @@ const TermsAndConditionsStatement = (props) => {
id="main-content"
role="main"
>
<div className="govuk-grid-row">
<div className="govuk-grid-column-full">
<h1 className="govuk-heading-l govuk-!-margin-bottom-7">
{t("common:footer-terms-conditions-link-label")}
</h1>
<p>bkah blah</p>
</div>
</div>
{router.locale != "en" ? <TandCCY /> : <TandCEN />}
</main>
);
};