diff --git a/python/nav/web/templates/seeddb/_form_fields.html b/python/nav/web/templates/seeddb/_form_fields.html new file mode 100644 index 0000000000..31fd5483cd --- /dev/null +++ b/python/nav/web/templates/seeddb/_form_fields.html @@ -0,0 +1,18 @@ +{% for field in form %} +
+ + {{ field }} + {% for error in field.field.errors %} + + {{ error }} + + {% endfor %} +
+{% endfor %} diff --git a/python/nav/web/templates/seeddb/edit.html b/python/nav/web/templates/seeddb/edit.html index fe76665408..b411845138 100644 --- a/python/nav/web/templates/seeddb/edit.html +++ b/python/nav/web/templates/seeddb/edit.html @@ -41,14 +41,15 @@

{{ title }}
Attributes - {% if form.no_crispy %} - {% block formfields %} - {% endblock %} - {% else %} - {% block crispyfields %} - {{ form|crispy }} - {% endblock %} - {% endif %} + {% if form.no_crispy %} + {% block formfields %} + {% include "seeddb/_form_fields.html" %} + {% endblock %} + {% else %} + {% block crispyfields %} + {{ form|crispy }} + {% endblock %} + {% endif %}