mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-14 10:13:13 +00:00
Set enctype as multipart if form.is_multipart returns true.
This commit is contained in:
parent
97eaa045fd
commit
a61327c92c
2 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
<form id="page-edit-form" action="{% url 'wagtailadmin_pages:add' content_type.app_label content_type.model parent_page.id %}" method="POST">
|
||||
<form id="page-edit-form" action="{% url 'wagtailadmin_pages:add' content_type.app_label content_type.model parent_page.id %}" method="POST"{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
|
||||
{% csrf_token %}
|
||||
{{ edit_handler.render_form_content }}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
<form id="page-edit-form" action="{% url 'wagtailadmin_pages:edit' page.id %}" method="POST">
|
||||
<form id="page-edit-form" action="{% url 'wagtailadmin_pages:edit' page.id %}" method="POST"{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
|
||||
{% csrf_token %}
|
||||
{{ edit_handler.render_form_content }}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue