Skip to content

Commit

Permalink
file input: Show accepted media types.
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Mar 14, 2024
1 parent c52dd4e commit c6e1d78
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plone/app/z3cform/templates/file_input.pt
Expand Up @@ -98,6 +98,13 @@
size="${view/size}"
type="file"
/>
<div class="form-text"
tal:condition="view/accept"
i18n:translate="namedfile_accepted_types"
>
Allowed types:
<tal:i18n i18n:name="accepted_types">${view/accept}</tal:i18n>.
</div>

<script type="text/javascript"
tal:condition="python:allow_nochange and action != 'replace'"
Expand Down
7 changes: 7 additions & 0 deletions plone/app/z3cform/templates/image_input.pt
Expand Up @@ -102,6 +102,13 @@
size="${view/size}"
type="file"
/>
<div class="form-text"
tal:condition="view/accept"
i18n:translate="namedfile_accepted_types"
>
Allowed types:
<tal:i18n i18n:name="accepted_types">${view/accept}</tal:i18n>.
</div>

<script type="text/javascript"
tal:condition="python:allow_nochange and action != 'replace'"
Expand Down

0 comments on commit c6e1d78

Please sign in to comment.