Added help_text to history form

This commit is contained in:
Dorian Lesbre 2021-02-19 10:32:12 +01:00
parent b97bc8bfa8
commit fa8c57269c

View file

@ -2,6 +2,7 @@ from datetime import timedelta
from decimal import Decimal from decimal import Decimal
from django import forms from django import forms
from django.conf import settings
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.core import validators from django.core import validators
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
@ -484,7 +485,14 @@ class KFetConfigForm(ConfigForm):
class FilterHistoryForm(forms.Form): class FilterHistoryForm(forms.Form):
start = forms.DateTimeField(label=_("De"), widget=DateTimeWidget, required=False) start = forms.DateTimeField(
label=_("De"),
widget=DateTimeWidget,
required=False,
help_text="L'historique est limité à {} jours".format(
settings.KFET_HISTORY_DATE_LIMIT.days
),
)
end = forms.DateTimeField(label=_("À"), widget=DateTimeWidget, required=False) end = forms.DateTimeField(label=_("À"), widget=DateTimeWidget, required=False)
checkout = forms.ModelChoiceField( checkout = forms.ModelChoiceField(
label=_("Caisse"), label=_("Caisse"),