From e120e1dfcb1d83cf5d7b90fdfca0b31b8e426c18 Mon Sep 17 00:00:00 2001 From: Bachurin Sergey Date: Mon, 7 Jul 2014 16:32:25 +0300 Subject: [PATCH] dynamic formsets for aktsverki and dover --- project/templates/docs/aktsverki/form_tbl_items.html | 10 +++++++--- project/templates/docs/dover/form_tbl_items.html | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/project/templates/docs/aktsverki/form_tbl_items.html b/project/templates/docs/aktsverki/form_tbl_items.html index ef8b19a..ea1ae95 100644 --- a/project/templates/docs/aktsverki/form_tbl_items.html +++ b/project/templates/docs/aktsverki/form_tbl_items.html @@ -9,23 +9,27 @@ {% for iform in formset %} - + {% for field in iform %} {% if field.name == "id" or field.name == "parent" %} {{ field }} {% else %} - + {% if field.name != "DELETE" %} + {{ field.errors }} {{ field }} + {% endif %} {% endif %} {% endfor %} + + {% if iform.instance.pk %}{{ iform.DELETE }}{% endif %} + {% endfor %} - diff --git a/project/templates/docs/dover/form_tbl_items.html b/project/templates/docs/dover/form_tbl_items.html index 6806fae..2a979d1 100644 --- a/project/templates/docs/dover/form_tbl_items.html +++ b/project/templates/docs/dover/form_tbl_items.html @@ -9,23 +9,27 @@ {% for iform in formset %} - + {% for field in iform %} {% if field.name == "id" or field.name == "parent" %} {{ field }} {% else %} - + {% if field.name != "DELETE" %} + {{ field.errors }} {{ field }} + {% endif %} {% endif %} {% endfor %} + + {% if iform.instance.pk %}{{ iform.DELETE }}{% endif %} + {% endfor %} -