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

Fix dynamic upload file field required indicator + make option naming consistent #10497

Merged

Conversation

ahukkanen
Copy link
Contributor

@ahukkanen ahukkanen commented Mar 9, 2023

🎩 What? Why?

Fix missing required file indicator from the dynamic upload file field label as described at #10495.

Additionally, refactor the optional option for the file field and upload modal to required (inverse option) to maintain consistency over the option naming for all form fields. Other fields, such as text_area have the required option and it is consistent with the HTML spec, see:
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required

Note that for this PR I am still maintaining support for the optional attribute to make this change backportable. After this PR is merged, I will create another PR that removes that option for the develop branch.

📌 Related Issues

Testing

  • Go manage budgets component's project attachments
  • See that the file field is marked as required

📷 Screenshots

Required indicator for file fields

- Fix missing required file indicator from the dynamic upload file
  field label
- Refactor the `optional` option for the file field and upload
  modal to `required` (inverse option) to maintain concistency
  over the option naming for all form fields
@alecslupu alecslupu merged commit 7504b59 into decidim:develop Mar 13, 2023
@ahukkanen ahukkanen deleted the fix/dynamic-file-field-required-indicator branch March 13, 2023 09:44
alecslupu pushed a commit that referenced this pull request Mar 13, 2023
… consistent (#10497)

* Fix file field required indicator + consistency on option naming

- Fix missing required file indicator from the dynamic upload file
  field label
- Refactor the `optional` option for the file field and upload
  modal to `required` (inverse option) to maintain concistency
  over the option naming for all form fields

* Fix a11y issue with the label `for` attribute in the upload label
alecslupu pushed a commit that referenced this pull request Mar 13, 2023
… consistent (#10497)

* Fix file field required indicator + consistency on option naming

- Fix missing required file indicator from the dynamic upload file
  field label
- Refactor the `optional` option for the file field and upload
  modal to `required` (inverse option) to maintain concistency
  over the option naming for all form fields

* Fix a11y issue with the label `for` attribute in the upload label
fblupi pushed a commit that referenced this pull request Mar 14, 2023
… consistent (#10497) (#10541)

* Fix file field required indicator + consistency on option naming

- Fix missing required file indicator from the dynamic upload file
  field label
- Refactor the `optional` option for the file field and upload
  modal to `required` (inverse option) to maintain concistency
  over the option naming for all form fields

* Fix a11y issue with the label `for` attribute in the upload label

Co-authored-by: Antti Hukkanen <[email protected]>
entantoencuanto added a commit that referenced this pull request Mar 23, 2023
…le-card

* feature/redesign: (94 commits)
  Fix test
  Finalize word standardization (#10557)
  Fix iframes stripped from admin entered proposals, meetings and debates (#10466)
  Fix ImageMagick errors when trying to identify image dimensions (#10343)
  Add required to proposal limit field in Proposal component (#10525)
  Standardize the format of the words "is not" (#10511)
  Standardize the format of the words "has not" (#10510)
  Standardize the format of the words "will not" (#10509)
  Make buttons respect the organizations' primary color (#10526)
  Fix flaky spec for questionnaire templates (#10544)
  Remove the deprecated `optional` option from the file upload modal (#10542)
  Standardize the format of the words "does not" (#10505)
  Standardize the format of the words "was not" (#10514)
  Add Procfile support (#10519)
  Standardize the format of the words "do not" (#10513)
  Change the `optional` option to `required` at participatory texts (#10498)
  Fix destroying scope types that have been associated with processes (#10496)
  Fix dynamic upload file field required indicator + make option naming consistent (#10497)
  Standardize the format of the words "should not" (#10515)
  Standardize the format of the words "were not" (#10516)
  ...
entantoencuanto added a commit that referenced this pull request Mar 23, 2023
* feature/redesign: (94 commits)
  Fix test
  Finalize word standardization (#10557)
  Fix iframes stripped from admin entered proposals, meetings and debates (#10466)
  Fix ImageMagick errors when trying to identify image dimensions (#10343)
  Add required to proposal limit field in Proposal component (#10525)
  Standardize the format of the words "is not" (#10511)
  Standardize the format of the words "has not" (#10510)
  Standardize the format of the words "will not" (#10509)
  Make buttons respect the organizations' primary color (#10526)
  Fix flaky spec for questionnaire templates (#10544)
  Remove the deprecated `optional` option from the file upload modal (#10542)
  Standardize the format of the words "does not" (#10505)
  Standardize the format of the words "was not" (#10514)
  Add Procfile support (#10519)
  Standardize the format of the words "do not" (#10513)
  Change the `optional` option to `required` at participatory texts (#10498)
  Fix destroying scope types that have been associated with processes (#10496)
  Fix dynamic upload file field required indicator + make option naming consistent (#10497)
  Standardize the format of the words "should not" (#10515)
  Standardize the format of the words "were not" (#10516)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Budgets - Project - Attachment - Mandatory File appears Optional
2 participants