Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add partial for form rendering

Marek Brzóska0ca74ab246c6
diff --git a/saleor/templates/saleor/partials/form.html b/saleor/templates/saleor/partials/form.html
new file mode 100644
index 0000000000..edef95e1d4
--- /dev/null
+++ b/saleor/templates/saleor/partials/form.html
@@ -0,0 +1,9 @@
+{% for field in form %}
+ <div class="control-group{% if field.errors %} error{% endif %}">
+ <label for="{{ field.id }}">{{ field.label }}</label>
+ <div class="control">
+ {{ field }}
+ <span class="help-inline">{{ field.errors }}</span>
+ </div>
+</div>
+{% endfor %}