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.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py
index a69c65f0e..8acd5ffcc 100644
--- a/ishtar_common/forms.py
+++ b/ishtar_common/forms.py
@@ -698,7 +698,7 @@ def get_form_selection(
class_name, label, key, model, base_form, get_url,
not_selected_error=_(u"You should select an item."), new=False,
new_message=_(u"Add a new item"), get_full_url=None,
- gallery=False, map=False):
+ gallery=False, map=False, base_form_select=None):
"""
Generate a class selection form
class_name -- name of the class
@@ -746,7 +746,9 @@ def get_form_selection(
return cleaned_data
attrs['clean'] = clean
attrs['SEARCH_AND_SELECT'] = True
- return type(class_name, (forms.Form,), attrs)
+ if not base_form_select:
+ base_form_select = forms.Form
+ return type(class_name, (base_form_select,), attrs)
def get_data_from_formset(data):