Allow workflows to support multipart POST.

Enabled by setting multipart = True in the Workflow sublcass.

Required for blueprint: heat-ui

Change-Id: I557c7ad99333d69241e7fa7726f1db30939c8d2c
This commit is contained in:
Steve Baker
2013-03-21 13:26:23 +13:00
parent d17fd51359
commit ba59f8ba72
2 changed files with 2 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
{% load i18n %}
{% with workflow.get_entry_point as entry_point %}
<div class="workflow {% if modal %}modal hide{% else %}static_page{% endif %}">
<form {{ workflow.attr_string|safe }} action="{{ workflow.get_absolute_url }}" {% if add_to_field %}data-add-to-field="{{ add_to_field }}"{% endif %} method="POST">{% csrf_token %}
<form {{ workflow.attr_string|safe }} action="{{ workflow.get_absolute_url }}" {% if add_to_field %}data-add-to-field="{{ add_to_field }}"{% endif %} method="POST"{% if workflow.multipart %} enctype="multipart/form-data"{% endif %}>{% csrf_token %}
{% if REDIRECT_URL %}<input type="hidden" name="{{ workflow.redirect_param_name }}" value="{{ REDIRECT_URL }}"/>{% endif %}
<div class="modal-header">
{% block modal-header %}

View File

@@ -570,6 +570,7 @@ class Workflow(html.HTMLElement):
success_message = _("%s completed successfully.")
failure_message = _("%s did not complete.")
redirect_param_name = "next"
multipart = False
_registerable_class = Step
def __unicode__(self):