Skip to content

Commit

Permalink
Merge pull request #21 from carsolcas/master
Browse files Browse the repository at this point in the history
Fix 'disable_csrf' option that was not honored from template forms
  • Loading branch information
sveetch committed May 2, 2015
2 parents 774f7ab + 69156e8 commit ca0fb0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if form_tag %}<form {{ flat_attrs|safe }} method="{{ form_method }}"{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>{% endif %}
{% if form_method|lower == 'post' %}{% csrf_token %}{% endif %}
{% if form_method|lower == 'post' and not disable_csrf %}{% csrf_token %}{% endif %}

{% include "foundation-5/display_form.html" %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% if formset_tag %}
<form {{ flat_attrs|safe }} method="{{ formset_method }}" {% if formset.is_multipart %} enctype="multipart/form-data"{% endif %}>
{% endif %}
{% if formset_method|lower == 'post' %}
{% if formset_method|lower == 'post' and not disable_csrf %}
{% csrf_token %}
{% endif %}

Expand Down

0 comments on commit ca0fb0a

Please sign in to comment.