Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FORMS-14814: allow multiple file attachment #191

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

lovelymandal16
Copy link

Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):

Fix #

Test URLs:

Copy link

aem-code-sync bot commented Oct 29, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

aem-code-sync bot commented Oct 29, 2024

Page Scores Audits Google
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync aem-code-sync bot temporarily deployed to multiplefileupload November 7, 2024 08:20 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to multiplefileupload November 7, 2024 08:47 Inactive
@TalmizAhmed
Copy link

@lovelymandal16 Could you refactor the changes to align with the new boilerplate structure?

Copy link
Collaborator

@nit23uec nit23uec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

min/max items missing for multiple attach support

@@ -74,6 +81,30 @@
"name": "acceptMessage",
"label": "File type error message",
"valueType": "string"
},
Copy link
Collaborator

@nit23uec nit23uec Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These fields should only come if multiple is true

@@ -211,15 +211,26 @@
}
},
{
"title": "Captcha (Invisible)",
"id": "captcha",
"title": "Checkbox group",
Copy link
Collaborator

@nit23uec nit23uec Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for these changes?

if (input.multiple) {
field.type = 'file[]';
if (field.properties?.maxFilesMessage) {
input.dataset.maxFilesMessage = field.properties.maxFilesMessage;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should come in constraints msgs and not as custom props.

@@ -303,7 +303,7 @@ function inputDecorator(field, element) {
input.checked = field.value === input.value;
}
} else {
input.multiple = field.type === 'file[]';
input.multiple = field.type === 'file[]' || field.properties?.allowMultiple;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allow multiple check should not be required here. It should be handled via sling models.

Copy link
Collaborator

@nit23uec nit23uec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants