diff --git a/progit/templates/_formhelper.html b/progit/templates/_formhelper.html new file mode 100644 index 0000000..091b07b --- /dev/null +++ b/progit/templates/_formhelper.html @@ -0,0 +1,51 @@ +{% macro render_field(field, after="") %} +
+ {{ field.label }}{{ field(**kwargs)|safe }} + {% if after %} {{ after }}{% endif %} + {% if field.errors %} + + {% endif %} +
+{% endmacro %} + +{% macro render_field_invert(field, after="") %} +
+ {{ field(**kwargs)|safe }}{{ field.label }} + {% if after %} {{ after }}{% endif %} + {% if field.errors %} + + {% endif %} +
+{% endmacro %} + +{% macro render_field_in_row(field, after="") %} + + {{ field.label }} + {{ field(**kwargs)|safe }} +{% if after %} {{ after }}{% endif %} +{% if field.errors %} +{% for error in field.errors %} +{{ error }} +{% endfor %} +{% endif %} + +{% endmacro %} + +{% macro render_field_in_cell(field, after="") %} + {{ field.label }} + {{ field(**kwargs)|safe }} +{% if after %} {{ after }}{% endif %} +{% if field.errors %} +{% for error in field.errors %} +{{ error }} +{% endfor %} +{% endif %} +{% endmacro %}