diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-04-29 11:07:55 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-04-29 11:07:55 +0200 |
commit | 962f02573fb8670b248c071450cfe766a2fe240f (patch) | |
tree | 0cc9e8540fd006ee6a6042b929d56b8185a1e9ea /ishtar_common | |
parent | 949df48b4e5ad27d1bdb74515831683cc02a9c87 (diff) | |
download | Ishtar-962f02573fb8670b248c071450cfe766a2fe240f.tar.bz2 Ishtar-962f02573fb8670b248c071450cfe766a2fe240f.zip |
🐛 fix quick add of organization and persons on some wizards forms (refs #6280, refs #6279)
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/forms_common.py | 2 | ||||
-rw-r--r-- | ishtar_common/templates/base.html | 4 | ||||
-rw-r--r-- | ishtar_common/widgets.py | 1 |
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: |