From 48afe0b7b3ecaf2914efbcb0dba3a473c75cdeb1 Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Sun, 8 Nov 2026 03:26:21 -0300 Subject: [PATCH] fix(dca): repair the create transaction section layout Nesting Row(Column(Row(Column))) shrank every field to a quarter of the width, since Column defaults to half, and rounded-3 is a Bootstrap class that doesn't exist here. Use the same card layout as the transfer form: account at full width with category and tags side by side. --- app/apps/dca/forms.py | 39 +++++++++++++-------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/app/apps/dca/forms.py b/app/apps/dca/forms.py index 39b73aca..29667b97 100644 --- a/app/apps/dca/forms.py +++ b/app/apps/dca/forms.py @@ -12,7 +12,7 @@ from apps.dca.models import DCAEntry, DCAStrategy from apps.transactions.models import Transaction, TransactionCategory, TransactionTag from crispy_forms.bootstrap import AccordionGroup, FormActions, Accordion from crispy_forms.helper import FormHelper -from crispy_forms.layout import HTML, Column, Layout, Row +from crispy_forms.layout import HTML, Column, Div, Layout, Row from django import forms from django.utils.translation import gettext_lazy as _ @@ -157,34 +157,21 @@ class DCAEntryForm(forms.ModelForm): AccordionGroup( _("Create transaction"), Switch("create_transaction"), - Row( - Column( - Row( - Column( - "from_account", - ), - ), - Row( - Column("from_category"), - Column("from_tags"), - ), + Div( + "from_account", + Row( + Column("from_category"), + Column("from_tags"), ), - css_class="p-1 mx-1 my-3 border rounded-3", + css_class="bg-base-100 rounded-box p-4 border-base-content/60 border my-3", ), - Row( - Column( - Row( - Column( - "to_account", - css_class="form-group", - ), - ), - Row( - Column("to_category"), - Column("to_tags"), - ), + Div( + "to_account", + Row( + Column("to_category"), + Column("to_tags"), ), - css_class="p-1 mx-1 my-3 border rounded-3", + css_class="bg-base-100 rounded-box p-4 border-base-content/60 border", ), active=False, ),