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 dada24f commit 623e413
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
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@
class string:form-control $is_invalid;
"
/>
<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
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@
maxlength view/maxlength;
"
/>
<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 623e413

Please sign in to comment.