Merge pull request #985 from ae-utbm/form-fixes

small form fixes
This commit is contained in:
Bartuccio Antoine 2025-01-05 15:47:44 +01:00 committed by GitHub
commit 3c4daeadb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 20 additions and 7 deletions

View File

@ -59,8 +59,3 @@
font-size: small; font-size: small;
} }
} }
.helptext {
margin-top: 10px;
display: block;
}

View File

@ -145,6 +145,7 @@ form {
margin-top: .25rem; margin-top: .25rem;
margin-bottom: .25rem; margin-bottom: .25rem;
font-size: 80%; font-size: 80%;
display: block;
} }
fieldset { fieldset {

View File

@ -154,6 +154,9 @@ class CounterEditForm(forms.ModelForm):
class ProductEditForm(forms.ModelForm): class ProductEditForm(forms.ModelForm):
error_css_class = "error"
required_css_class = "required"
class Meta: class Meta:
model = Product model = Product
fields = [ fields = [
@ -171,6 +174,12 @@ class ProductEditForm(forms.ModelForm):
"tray", "tray",
"archived", "archived",
] ]
help_texts = {
"description": _(
"Describe the product. If it's an event's click, "
"give some insights about it, like the date (including the year)."
)
}
widgets = { widgets = {
"product_type": AutoCompleteSelect, "product_type": AutoCompleteSelect,
"buying_groups": AutoCompleteSelectMultipleGroup, "buying_groups": AutoCompleteSelectMultipleGroup,

View File

@ -6,7 +6,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-04 23:05+0100\n" "POT-Creation-Date: 2025-01-05 15:28+0100\n"
"PO-Revision-Date: 2016-07-18\n" "PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Maréchal <thomas.girod@utbm.fr\n" "Last-Translator: Maréchal <thomas.girod@utbm.fr\n"
"Language-Team: AE info <ae.info@utbm.fr>\n" "Language-Team: AE info <ae.info@utbm.fr>\n"
@ -1607,7 +1607,7 @@ msgstr "Anniversaires"
msgid "%(age)s year old" msgid "%(age)s year old"
msgstr "%(age)s ans" msgstr "%(age)s ans"
#: com/templates/com/news_list.jinja com/tests.py #: com/templates/com/news_list.jinja com/tests/test_views.py
msgid "You need to subscribe to access this content" msgid "You need to subscribe to access this content"
msgstr "Vous devez cotiser pour accéder à ce contenu" msgstr "Vous devez cotiser pour accéder à ce contenu"
@ -3364,6 +3364,14 @@ msgstr "Cet UID est invalide"
msgid "User not found" msgid "User not found"
msgstr "Utilisateur non trouvé" msgstr "Utilisateur non trouvé"
#: counter/forms.py
msgid ""
"Describe the product. If it's an event's click, give some insights about it, "
"like the date (including the year)."
msgstr ""
"Décrivez le produit. Si c'est un click pour un évènement, donnez quelques détails "
"dessus, comme la date (en incluant l'année)."
#: counter/management/commands/dump_accounts.py #: counter/management/commands/dump_accounts.py
msgid "Your AE account has been emptied" msgid "Your AE account has been emptied"
msgstr "Votre compte AE a été vidé" msgstr "Votre compte AE a été vidé"