summaryrefslogtreecommitdiff
path: root/ishtar_common/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/forms.py')
-rw-r--r--ishtar_common/forms.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py
index b0bf64b46..0f1263bef 100644
--- a/ishtar_common/forms.py
+++ b/ishtar_common/forms.py
@@ -195,6 +195,16 @@ class CustomForm(BSForm):
if not self._explicit_ordering:
self.custom_form_ordering()
+ def _remove_fields(self, field_names):
+ """
+ Remove field (if already present)
+ """
+ if not getattr(self, "fields", None):
+ return
+ for name in field_names:
+ if name in self.fields:
+ self.fields.pop(name)
+
def custom_form_ordering(self):
available, header, excluded, json_fields = self.check_custom_form(
self.current_user)