From a9ee76f0338277ad28a359893365ca73c8346197 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Tue, 28 Apr 2015 19:11:20 +0200 Subject: [PATCH] Part of the fix for #715. --- modoboa/lib/form_utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modoboa/lib/form_utils.py b/modoboa/lib/form_utils.py index c52a94a39..f21a9a21d 100644 --- a/modoboa/lib/form_utils.py +++ b/modoboa/lib/form_utils.py @@ -223,6 +223,7 @@ class TabForms(object): def __init__(self, request, instances=None, classes=None): self.request = request + self.instances = {} to_remove = [] for fd in self.forms: args = [] @@ -330,9 +331,12 @@ class TabForms(object): ) context = { "tabs": self, - "action_label": _("Update"), - "action_classes": "submit", } + if self.forms: + context.update({ + "action_label": _("Update"), + "action_classes": "submit", + }) self.extra_context(context) active_tab_id = self.request.GET.get("active_tab", "default") if active_tab_id != "default":