Lay the plan modal out in two columns instead of one tall one

PlanForm grew to seven fields with the billing rework, three of them
short day counts, and the modal ran off the bottom of the screen.

_modal_form.html gains two optional knobs -- box_class to widen the
box, two_columns to grid the fields -- so only the plan create/edit
modals opt in and every other modal renders exactly as before.
Textareas and file inputs still span the full width; below `sm` it
stays single-column, since two columns of form fields on a phone is
worse than a long scroll.

PlanForm's field order is chosen to suit that grid: pairing name with
duration and the two day-counts with each other fills every row
rather than leaving half of one empty next to the full-width
description.

Rebuilt static/css/app.css (unminified, matching how it is committed)
to pick up the new grid utilities.
This commit is contained in:
2026-08-08 19:01:14 +02:00
parent fc6488ce55
commit c2a4380b70
5 changed files with 95 additions and 9 deletions

View File

@@ -83,9 +83,19 @@ class FlagForm(forms.ModelForm):
class PlanForm(forms.ModelForm):
"""Field order is chosen for the two-column modal (see _form_fields.html): description
spans both columns, so pairing name with duration and the two day-counts with each other
fills every row instead of leaving half of one empty.
name | duration_months
description ....................... (spans both)
renewal_lead_days | grace_days
is_trial | is_active
"""
class Meta:
model = Plan
fields = ["name", "description", "duration_months", "renewal_lead_days", "grace_days", "is_trial", "is_active"]
fields = ["name", "duration_months", "description", "renewal_lead_days", "grace_days", "is_trial", "is_active"]
class PlanPriceForm(forms.ModelForm):