Move csrf_token out of form loop

This commit is contained in:
PCoder 2018-09-23 13:10:26 +02:00
parent bce47032ab
commit bc3eaaa7eb

View file

@ -71,8 +71,8 @@
<h3>{%trans "Make a payment" %}</h3> <h3>{%trans "Make a payment" %}</h3>
<hr class="top-hr"> <hr class="top-hr">
<form role="form" id="generic-payment-form" method="post" action="" novalidate> <form role="form" id="generic-payment-form" method="post" action="" novalidate>
{% for field in generic_payment_form %}
{% csrf_token %} {% csrf_token %}
{% for field in generic_payment_form %}
{% bootstrap_field field show_label=False type='fields'%} {% bootstrap_field field show_label=False type='fields'%}
{% endfor %} {% endfor %}
<p class="text-danger">{{generic_payment_form.non_field_errors|striptags}}</p> <p class="text-danger">{{generic_payment_form.non_field_errors|striptags}}</p>