refactor: move help_text to model definition

This commit is contained in:
Herculino Trotta
2026-02-15 23:22:52 -03:00
parent 0413921dbe
commit c787565c04
3 changed files with 26 additions and 8 deletions

View File

@@ -120,8 +120,8 @@ class UserSettingsForm(forms.ModelForm):
default_account = forms.ModelChoiceField(
queryset=Account.objects.filter(
is_archived=False,
),
is_archived=False,
),
label=_("Default Account"),
widget=TomSelect(clear_button=False, group_by="group"),
required=False,
@@ -160,9 +160,9 @@ class UserSettingsForm(forms.ModelForm):
"date_format",
"datetime_format",
"number_format",
"default_account",
HTML('<hr class="hr my-3" />'),
"start_page",
"default_account",
HTML('<hr class="hr my-3" />'),
"volume",
FormActions(
@@ -177,10 +177,6 @@ class UserSettingsForm(forms.ModelForm):
"translation_link": '<a href="https://translations.herculino.com" target="_blank">translations.herculino.com</a>'
}
self.fields["default_account"].help_text = _(
"Selects the account by default when creating new transactions"
)
class UserUpdateForm(forms.ModelForm):
new_password1 = forms.CharField(