summaryrefslogtreecommitdiff
path: root/ishtar_common/widgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/widgets.py')
-rw-r--r--ishtar_common/widgets.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py
index a1d9aeec6..cc4f5c8e8 100644
--- a/ishtar_common/widgets.py
+++ b/ishtar_common/widgets.py
@@ -953,7 +953,7 @@ class DataTable(Select2Media, forms.RadioSelect):
table_cols='TABLE_COLS', multiple=False, multiple_cols=[2],
new=False, new_message="", source_full=None,
multiple_select=False, sortname="__default__",
- col_prefix='', gallery=False):
+ col_prefix='', gallery=False, map=False):
"""
DataTable widget init.
@@ -971,6 +971,7 @@ class DataTable(Select2Media, forms.RadioSelect):
:param sortname: column name (model attribute) to use to sort
:param col_prefix: prefix to remove to col_names
:param gallery: display the gallery if True
+ :param map: display the map if True
"""
super(DataTable, self).__init__(attrs=attrs)
self.source = source
@@ -989,6 +990,7 @@ class DataTable(Select2Media, forms.RadioSelect):
self.col_prefix = col_prefix
self.user = None
self.gallery = gallery
+ self.map = map
if self.col_prefix and not self.col_prefix.endswith('__'):
self.col_prefix += "__"
@@ -1111,6 +1113,7 @@ class DataTable(Select2Media, forms.RadioSelect):
'remove': unicode(_(u"Remove")),
'sname': name.replace('-', ''),
'gallery': self.gallery,
+ 'use_map': self.map,
'multiple': self.multiple,
'multiple_select': self.multiple_select,
'multi_cols': ",".join((u'"%d"' % col