From 266112c8a109609f8b4947ccc8ba6ae181a64fa3 Mon Sep 17 00:00:00 2001 From: "sabrina.bongiovanni" Date: Mon, 13 Jan 2025 14:24:12 +0100 Subject: [PATCH 1/4] fix: remove file upload restraint from contents modal if modules are allowed --- .../volto/components/manage/Contents/ContentsUploadModal.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx b/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx index 6dd724971..0563b03cd 100644 --- a/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx +++ b/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx @@ -199,7 +199,9 @@ class ContentsUploadModal extends Component { // as addable type const showFileRestraint = this.props.pathname.includes('modulistica') && - !this.props.types.some((type) => type.id === 'File'); + !this.props.types.some( + (type) => type.id === 'File' || type.id === 'Modulo', + ); return ( this.props.open && ( From 64f9af70fbaabc3010c34ec41a4def917085a8c0 Mon Sep 17 00:00:00 2001 From: "sabrina.bongiovanni" Date: Mon, 13 Jan 2025 14:25:09 +0100 Subject: [PATCH 2/4] chore: comment --- .../volto/components/manage/Contents/ContentsUploadModal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx b/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx index 0563b03cd..6fd003843 100644 --- a/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx +++ b/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx @@ -196,7 +196,7 @@ class ContentsUploadModal extends Component { // as per agid guidelines, files cannot be uploaded in modulistica folder inside ct servizio // show restraint and hide upload button when page is called modulistica and when there's a restraint // this is enough to identify this only case bc even if another page is called 'modulistica', it will have 'File' - // as addable type + // and "Modulo" as addable type const showFileRestraint = this.props.pathname.includes('modulistica') && !this.props.types.some( From c1ffe5af6c922955e566da5b4ade977d20fd7c37 Mon Sep 17 00:00:00 2001 From: "sabrina.bongiovanni" Date: Mon, 13 Jan 2025 14:26:11 +0100 Subject: [PATCH 3/4] chore: release.md info --- RELEASE.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/RELEASE.md b/RELEASE.md index 6a35b8f6b..128bfeb31 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,20 @@ - ... --> +## Versione X.X.X (dd/mm/yyyy) + +### Migliorie + +- ... + +### Novità + +- ... + +### Fix + +- E' possibile caricare moduli in maniera massiva nei documenti all'interno delle aree corrette dentro Documenti e Dati > Modulistica + ## Versione 11.26.1 (27/12/2024) ### Fix From 74d50bb9533917aff65783d24ee9f227b5da0578 Mon Sep 17 00:00:00 2001 From: "sabrina.bongiovanni" Date: Mon, 13 Jan 2025 17:31:57 +0100 Subject: [PATCH 4/4] fix: added specific pathname in upload file restriction --- .../volto/components/manage/Contents/ContentsUploadModal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx b/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx index 6fd003843..c117cf1d1 100644 --- a/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx +++ b/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx @@ -198,7 +198,7 @@ class ContentsUploadModal extends Component { // this is enough to identify this only case bc even if another page is called 'modulistica', it will have 'File' // and "Modulo" as addable type const showFileRestraint = - this.props.pathname.includes('modulistica') && + getBaseUrl(this.props.pathname).match(/\/servizi\/.*\/modulistica\/?$/) && !this.props.types.some( (type) => type.id === 'File' || type.id === 'Modulo', );