From 2ed959c70cef1ea203bd3b269a61f531620a9c35 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 24 2014 15:23:02 +0000 Subject: Add macro to represent a form field as list (
  • tags) --- diff --git a/progit/templates/_formhelper.html b/progit/templates/_formhelper.html index 091b07b..2846168 100644 --- a/progit/templates/_formhelper.html +++ b/progit/templates/_formhelper.html @@ -49,3 +49,14 @@ {% endfor %} {% endif %} {% endmacro %} + + +{% macro render_field_in_list(field) %} +
  • {{ field.label }}
  • +
  • {{ field(**kwargs)|safe }}
  • +{% if field.errors %} +{% for error in field.errors %} +
  • {{ error }}
  • +{% endfor %} +{% endif %} +{% endmacro %}