manager: use proper widget for agenda minimal booking time (#75884) #133
|
@ -18,7 +18,7 @@ class Migration(migrations.Migration):
|
|||
blank=True,
|
||||
default=datetime.time(0, 0),
|
||||
null=True,
|
||||
help_text='Ex.: 08:00:00. If left empty, available events will be those that are later than the current time.',
|
||||
help_text='If left empty, available events will be those that are later than the current time.',
|
||||
verbose_name='Booking opening time',
|
||||
),
|
||||
),
|
||||
|
|
|
@ -284,9 +284,7 @@ class Agenda(models.Model):
|
|||
minimal_booking_time = models.TimeField(
|
||||
verbose_name=_('Booking opening time'),
|
||||
default=datetime.time(0, 0, 0), # booking is possible starting and finishin at 00:00
|
||||
help_text=_(
|
||||
'Ex.: 08:00:00. If left empty, available events will be those that are later than the current time.'
|
||||
),
|
||||
help_text=_('If left empty, available events will be those that are later than the current time.'),
|
||||
null=True,
|
||||
blank=True,
|
||||
)
|
||||
|
|
|
@ -145,6 +145,9 @@ class AgendaBookingDelaysForm(forms.ModelForm):
|
|||
'maximal_booking_delay',
|
||||
'minimal_booking_time',
|
||||
]
|
||||
widgets = {
|
||||
'minimal_booking_time': widgets.TimeWidget,
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue