From b2657bb15d04da2bfaa5eb8f52de52a5760a68ca Mon Sep 17 00:00:00 2001 From: Bernard Siebens Date: Tue, 11 Aug 2026 18:40:52 +0200 Subject: [PATCH] Fix the claims page's mismatched control heights, and separate approve/reject Two things, found together while looking at the row of controls under each pending claim. The child dropdown stood taller than the btn-sm/input-sm around it because ClaimReviewForm.child hardcoded its own class="select select-bordered w-full" on the widget. templatetags/field.html's select branch already builds the full class list itself (base classes + the size modifier), so the widget's own class rendered as a second, non-merging class="..." attribute right next to the generated one -- select-sm was in the markup, just shadowed by a duplicate attribute the browser never applied. No other Select field in the app hardcodes a class this way, which is why nothing else had the problem. Fixed by dropping it and passing size="small" through {% form_field %} instead, the same way every other compact inline select in the app does. Also pulled Approve and Reject apart with justify-between rather than letting both sit in one flex-wrap run, so they stay on opposite sides of the row (and don't end up adjacent on a wrap) rather than one stray click apart. Co-Authored-By: Claude Opus 5 --- .../management/parent_claim_list.html | 19 +++++++++++++++---- management/tests.py | 16 ++++++++++++++++ members/forms.py | 6 +++++- static/css/app.css | 3 +++ 4 files changed, 39 insertions(+), 5 deletions(-) diff --git a/management/templates/management/parent_claim_list.html b/management/templates/management/parent_claim_list.html index 30e5e8b..96819ba 100644 --- a/management/templates/management/parent_claim_list.html +++ b/management/templates/management/parent_claim_list.html @@ -27,18 +27,29 @@ -
+ {% comment %} + size="small" + show_label=False on the dropdown: {% form_field %} + defaults to daisyUI's medium control height, taller than the btn-sm/ + input-sm used by everything else in this row -- without it the + dropdown stands out against the buttons either side of it. + + justify-between (rather than everything in one flex-wrap run) keeps + Approve and Reject apart even as the row wraps on a narrow screen -- + Approve stays pinned left, Reject right, so the two are never one + stray click apart the way adjacent buttons would be. + {% endcomment %} +
{% if claim.has_candidates %} -
+ {% csrf_token %} -
{% form_field claim.review_form.child %}
+
{% form_field claim.review_form.child size="small" show_label=False %}
{% else %}

{% trans "No child without a parent matches this. Check the spelling and the date of birth with them before rejecting." %}

{% endif %} -
+ {% csrf_token %} diff --git a/management/tests.py b/management/tests.py index 6963400..b883c3b 100644 --- a/management/tests.py +++ b/management/tests.py @@ -1454,6 +1454,22 @@ class ParentClaimViewTests(ManagementTestBase): self.assertContains(response, "taylor.doe@example.com") self.assertContains(response, "Jamie Doe") + def test_the_child_dropdown_matches_the_height_of_the_buttons_beside_it(self): + # Regression: ClaimReviewForm.child used to hardcode its own class= + # attrs, which rendered a second class="..." on the