| 1 | {% macro form(action='', class=none, id=none, method="post", use_csrf_token=true) %} |
| 2 | <form method="{{method}}" action="{{action}}" {{ {'id': id, 'class': class}|xmlattr }} {{kwargs|xmlattr}} > |
| 3 | {% if csrf_token is defined and use_csrf_token %} |
| 4 | <input type="hidden" name="csrf_token" value="{{csrf_token}}"> |
| 5 | {% endif %} |
| 6 | {{ caller() }} |
| 7 | </form> |
| 8 | {% endmacro %} |