Commit e3a25fe6 by Kálmán Viktor

dashboard: display form errors

parent 2b196549
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
<h3 class="no-margin"><i class="icon-desktop"></i> Edit lease</h3> <h3 class="no-margin"><i class="icon-desktop"></i> Edit lease</h3>
</div> </div>
<div class="panel-body"> <div class="panel-body">
{% with form=form %}
{% include "display-form-errors.html" %}
{% endwith %}
{% crispy form %} {% crispy form %}
</div> </div>
</div> </div>
......
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
<h3 class="no-margin"><i class="icon-desktop"></i> Edit template</h3> <h3 class="no-margin"><i class="icon-desktop"></i> Edit template</h3>
</div> </div>
<div class="panel-body"> <div class="panel-body">
{% with form=form %}
{% include "display-form-errors.html" %}
{% endwith %}
{% crispy form %} {% crispy form %}
</div> </div>
</div> </div>
......
{% if form.errors %}
<div class="alert alert-danger">
{% for field in form %}
{% if field.errors %}
<div><strong>{{ field.label }}</strong>: {{ field.errors|striptags }}</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment