File upload file type exclusions and language variations
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -55,5 +55,7 @@
|
||||
"new-appeal-agricultural-holding-option-NA": "(b) (ii) Mae safle’r apêl yn ddaliad amaethyddol neu’n rhan o ddaliad amaethyddol ac mae’r apelydd (neu’r asiant) wedi rhoi’r hysbysiad gofynnol i bob person (ac eithrio’r apelydd) sydd, ar y diwrnod 21 diwrnod cyn y dyddiad o’r apêl, a oedd yn denant daliad amaethyddol ar y cyfan neu ran o’r tir y mae’r 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"
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user