From f883d5afe2b843b427a1d9eb0cad59a4d6c392d6 Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Thu, 6 Jun 2024 12:01:26 +0200 Subject: [PATCH 1/2] Fix file upload labels The file upload dialog in the add events dialog does not work well with long filenames and even renders the filename twice. This patch fixes that. --- .../events/partials/ModalTabsAndPages/NewSourcePage.tsx | 8 -------- src/styles/main.scss | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/components/events/partials/ModalTabsAndPages/NewSourcePage.tsx b/src/components/events/partials/ModalTabsAndPages/NewSourcePage.tsx index 63a2c3fe37..e481553f56 100644 --- a/src/components/events/partials/ModalTabsAndPages/NewSourcePage.tsx +++ b/src/components/events/partials/ModalTabsAndPages/NewSourcePage.tsx @@ -314,14 +314,6 @@ const Upload = ({ formik }) => { name={`uploadAssetsTrack.${key}.file`} tabIndex={0} /> - {/* Show name of file that is uploaded */} - {formik.values.uploadAssetsTrack[key].file && ( - - {formik.values.uploadAssetsTrack[ - key - ].file[0].name.substr(0, 50)} - - )} diff --git a/src/styles/main.scss b/src/styles/main.scss index ded61d5636..146333c392 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -489,9 +489,9 @@ input.disabled, select.disabled { // Use HTML5 input field for file upload .file-upload > input[type="file"] { - width: inherit !important; + width: 300px; visibility: visible !important; - hidden: false !important; + text-align: left; } // Notification alias error to danger From 6effade5dbe94369ee6b1bfb3b8a61c8431e7586 Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Thu, 6 Jun 2024 14:26:18 +0200 Subject: [PATCH 2/2] Make upload label full width --- src/styles/main.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/main.scss b/src/styles/main.scss index 146333c392..399cea2f8d 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -489,7 +489,7 @@ input.disabled, select.disabled { // Use HTML5 input field for file upload .file-upload > input[type="file"] { - width: 300px; + width: 100%; visibility: visible !important; text-align: left; }