{# -*- mode:web -*- engine:django -*- #}
{% comment %}

Dialogform form rendering

Parameters: form, dlgfrm_tags, dialogform_cssclass

dialogform_cssclass may be optionally set by views using DialogFormMixin

{% endcomment %}

<form method="{{ form.method|default:"post" }}" class="dialogform {{ dialogform_cssclass }}">
  {% if form.method|lower == "post" %}{% csrf_token %}{% endif %}
  {% if form.render_as == "table" %}<table>{% endif %}
  {{ form.as_render_as }}
  {% if form.render_as == "table" %}</table>{% endif %}
  <div class="dialogform-buttons">
    {% if form %}
      <button class="dialogform" value="cancel">Cancel</button></td>
    {% endif %}
    <button class="dialogform" value="confirm">OK</button>
  </div>
</form>
