comparison default/input/form.html @ 37:eb9a42fca6c8

input/form: added csrf_token hidden field if it is defined, and import form with context to get this variable
author Goffi <goffi@goffi.org>
date Mon, 10 Jul 2017 19:11:34 +0200
parents 8b5615a1bf3d
children 87680eed9e25
comparison
equal deleted inserted replaced
36:baa0942d6b45 37:eb9a42fca6c8
1 {% macro form(action='') %} 1 {% macro form(action='') %}
2 <form method="post" action="{{action}}"> 2 <form method="post" action="{{action}}">
3 {% if csrf_token is defined %}
4 <input type="hidden" name="csrf_token" value="{{csrf_token}}">
5 {% endif %}
3 {{ caller() }} 6 {{ caller() }}
4 </form> 7 </form>
5 {% endmacro %} 8 {% endmacro %}