diff options
Diffstat (limited to 'templates/_macros.html')
-rw-r--r-- | templates/_macros.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/_macros.html b/templates/_macros.html index 265584f..1608c1f 100644 --- a/templates/_macros.html +++ b/templates/_macros.html @@ -8,6 +8,17 @@ </div> {%- endmacro %} +{% macro render_csrf(form) %} +{{ form.csrf_token }} +{%- if 'csrf_token' in form.errors %} +<div class="control-group"> + <div class="controls"> + {{ render_errors(form.errors.csrf_token) }} + </div> +</div> +{%- endif %} +{%- endmacro %} + {% macro render_errors(errors) %} {%- if errors|length == 1 %} <div class="errors"> |