Skip to content

Allow customization of the upload help messages#6683

Merged
tramuntanal merged 1 commit intodecidim:developfrom
mainio:feature/file-validation-custom-message
Oct 15, 2020
Merged

Allow customization of the upload help messages#6683
tramuntanal merged 1 commit intodecidim:developfrom
mainio:feature/file-validation-custom-message

Conversation

@ahukkanen
Copy link
Copy Markdown
Contributor

🎩 What? Why?

Sometimes we want to use different upload help messages than the defaults. This makes it possible.

Testing

You can create the upload field with the form builder e.g. as follows:

form.upload :file, help_i18n_messages: "custom_message", help_i18n_scope: "custom.scope"

This will make the upload help messages appear based on the translation for custom_message.custom.scope.

📋 Checklist

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

@tramuntanal tramuntanal self-assigned this Oct 15, 2020
@tramuntanal
Copy link
Copy Markdown
Contributor

This is not being used right now, but I find it useful!

@tramuntanal tramuntanal merged commit 7eef9cd into decidim:develop Oct 15, 2020
@ahukkanen ahukkanen deleted the feature/file-validation-custom-message branch October 15, 2020 09:17
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.

3 participants