summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ishtar_common/forms_common.py2
-rw-r--r--ishtar_common/templates/base.html4
-rw-r--r--ishtar_common/widgets.py1
3 files changed, 5 insertions, 2 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py
index e6428fa86..963527e6f 100644
--- a/ishtar_common/forms_common.py
+++ b/ishtar_common/forms_common.py
@@ -1359,7 +1359,7 @@ class PersonForm(SimplePersonForm):
label=_("Person types"),
choices=[],
required=False,
- widget=widgets.Select2Multiple,
+ widget=widgets.Select2Multiple(attrs={"cols": True, "full-width": True}),
)
TYPES = SimplePersonForm.TYPES + [
FieldType("person_types", models.PersonType, True)
diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html
index f08bfc77b..5101e9040 100644
--- a/ishtar_common/templates/base.html
+++ b/ishtar_common/templates/base.html
@@ -18,6 +18,7 @@
<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/bootstrap-show-password/bootstrap-show-password.min.js?ver={{VERSION}}"></script>
<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/papaparse.min.js?ver={{VERSION}}"></script>
<script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/chosen/chosen.jquery.min.js?ver={{VERSION}}"></script>
+ <script language="javascript" type="text/javascript" src="{{STATIC_URL}}select2/js/select2.full.min.js?ver={{VERSION}}"></script>
{# <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/prettyPhoto/js/jquery.prettyPhoto.js?ver={{VERSION}}"></script> #}
<script language="javascript" type="text/javascript"
src="{{STATIC_URL}}ol/ol.js?ver={{VERSION}}"></script>
@@ -65,7 +66,8 @@
<link rel="stylesheet" href="{{STATIC_URL}}datatables/dataTables.bootstrap4.min.css?ver={{VERSION}}">
<link type="text/css" rel="stylesheet" href="{{STATIC_URL}}lightgallery/css/lightgallery.css?ver={{VERSION}}">
<link rel="stylesheet" href="{{STATIC_URL}}ol/ol.css?ver={{VERSION}}">
- <link rel="stylesheet" href="{{STATIC_URL}}js/jqplot/jquery.jqplot.min.css?ver={{VERSION}}" />
+ <link rel="stylesheet" href="{{STATIC_URL}}js/jqplot/jquery.jqplot.min.css?ver={{VERSION}}">
+ <link rel="stylesheet" href="{{STATIC_URL}}select2/css/select2.css?ver={{VERSION}}">
<link rel="stylesheet" href="{{STATIC_URL}}media/styles.css?ver={{VERSION}}">
{% for url_css in JQGRID_CSS %}<link rel="stylesheet" href="{{url_css}}?ver={{VERSION}}">{% endfor %}
{{EXTRA_CSS|safe}}
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py
index 765ed7b77..d0ade6fea 100644
--- a/ishtar_common/widgets.py
+++ b/ishtar_common/widgets.py
@@ -124,6 +124,7 @@ class SelectReadonlyField(forms.ChoiceField):
class Select2Media:
@property
def media(self):
+ # TODO: to remove? put in on base.html
css = {"all": ("select2/css/select2.css",)}
js = ["select2/js/select2.full.min.js"]
for lang_code, lang in settings.LANGUAGES: