diff --git a/atlas/filters.py b/atlas/filters.py index 47857abe..2f58c963 100755 --- a/atlas/filters.py +++ b/atlas/filters.py @@ -412,19 +412,22 @@ class NormalCaseFilter(django_filters.FilterSet): helper = FormHelper() helper.form_method = "get" helper.form_tag = False - helper.form_class = "row g-2 align-items-end" + helper.form_class = "row g-2" helper.layout = Layout( Div( Div("examination", css_class="col-md-3"), Div("modality", css_class="col-md-3"), + css_class="row g-2", + ), + Div( Div( - Field("min_value", wrapper_class="mb-0"), - Field("max_value", wrapper_class="mb-0"), - Field("age_unit", wrapper_class="mb-0"), - css_class="col-md-6 d-flex gap-2 align-items-stretch border rounded p-2 bg-body-tertiary", + Field("min_value", wrapper_class="mb-0 d-flex align-items-center"), + Field("max_value", wrapper_class="mb-0 d-flex align-items-center"), + Field("age_unit", wrapper_class="mb-0 d-flex align-items-center"), + css_class="col-12 d-flex gap-2 align-items-center", ), - css_class="row g-2 align-items-end", - ) + css_class="row g-2", + ), ) # Assign helper to the generated form instance and tweak widgets if hasattr(self, 'form') and self.form is not None: @@ -432,12 +435,12 @@ class NormalCaseFilter(django_filters.FilterSet): try: form = self.form if "min_value" in form.fields: - form.fields["min_value"].widget = forms.NumberInput(attrs={"class": "form-control", "min": "0", "step": "1", "style": "width:140px;"}) + form.fields["min_value"].widget = forms.NumberInput(attrs={"class": "form-control w-auto", "min": "0", "step": "1", "style": "min-width:140px;"}) if "max_value" in form.fields: - form.fields["max_value"].widget = forms.NumberInput(attrs={"class": "form-control", "min": "0", "step": "1", "style": "width:140px;"}) + form.fields["max_value"].widget = forms.NumberInput(attrs={"class": "form-control w-auto", "min": "0", "step": "1", "style": "min-width:140px;"}) if "age_unit" in form.fields: form.fields["age_unit"].initial = "days" - form.fields["age_unit"].widget.attrs.update({"class": "form-select", "style": "width:220px;"}) + form.fields["age_unit"].widget.attrs.update({"class": "form-select w-auto", "style": "min-width:220px;"}) form.helper = helper except Exception: # don't crash if form structure differs diff --git a/atlas/templates/atlas/case_display_block.html b/atlas/templates/atlas/case_display_block.html index 2f36e3f4..7740fe50 100755 --- a/atlas/templates/atlas/case_display_block.html +++ b/atlas/templates/atlas/case_display_block.html @@ -453,7 +453,7 @@ Add to collection {% endif %}
-