File upload file type exclusions and language variations

This commit is contained in:
2022-10-04 11:18:59 +01:00
parent 6bfdd76f1c
commit cd97bc6a19
3 changed files with 20 additions and 7 deletions
+14 -5
View File
@@ -1290,6 +1290,7 @@ const rejectStyle = {
const RenderFileUpload = (field) => {
const files = field.input.value;
let { t } = useTranslation();
const style = useMemo(
() => ({
...baseStyle,
@@ -1478,10 +1479,7 @@ const RenderFileUpload = (field) => {
return (
<>
<Dropzone
// onDrop={(filesToUpload, e) =>
// field.input.onChange(filesToUpload)
// }
accept="application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/tiff,image/jpeg,application/zip"
onDrop={(filesToUpload, e) => {
const renamedAcceptedFiles = filesToUpload.map(
(file) =>
@@ -1508,7 +1506,18 @@ const RenderFileUpload = (field) => {
<div {...getRootProps({ style })}>
{" "}
<input id={field.id} {...getInputProps()} />
<div>Drag and drop your files here.</div>
<div>
{t(
"newappeal:new-appeal-fileupload-drop-label"
)}
</div>
<em>
(
{t(
"newappeal:new-appeal-fileupload-file-list-label"
)}
)
</em>
</div>
<aside>{thumbs}</aside>
</section>
+3 -1
View File
@@ -55,5 +55,7 @@
"new-appeal-agricultural-holding-option-NA": "(b) (ii) Mae safler apêl yn ddaliad amaethyddol neun rhan o ddaliad amaethyddol ac maer apelydd (neur asiant) wedi rhoir hysbysiad gofynnol i bob person (ac eithrior apelydd) sydd, ar y diwrnod 21 diwrnod cyn y dyddiad or apêl, a oedd yn denant daliad amaethyddol ar y cyfan neu ran or tir y maer apêl yn ymwneud ag ef fel a restrir isod:",
"new-appeal-procedure-option-virtual": "Rhith",
"new-appeal-procedure-option-inperson": "Yn bersonol",
"new-appeal-procedure-option-hybrid": "Hybrid"
"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"
}
+3 -1
View File
@@ -55,5 +55,7 @@
"new-appeal-agricultural-holding-option-NA": "(b) (ii) The appeal site is, or is part of, an agricultural holding and the appellant (or the agent) has given the requisite notice to every person (other than the appellant) who, on the day 21 days before the date of the appeal, was a tenant of anagricultural holding on all or part of the land to which the appeal relates as listed below:",
"new-appeal-procedure-option-virtual": "Virtual",
"new-appeal-procedure-option-inperson": "In person",
"new-appeal-procedure-option-hybrid": "Hybrid"
"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"
}