mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-11-13 12:23:44 +01:00
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.
This commit is contained in:
1 parent
34f6066187
commit
48afe0b7b3
1 file changed
+13
-26
+13
-26
@@ -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,
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user