|
@@ -11,11 +11,11 @@ def get_interval():
|
|
|
return [(x, datetime.timedelta(minutes=x)) for x in [15, 30, 60]]
|
|
|
|
|
|
class CreateEventForm(forms.Form):
|
|
|
- event_name = forms.CharField(label=_('Event name'), max_length=100)
|
|
|
+ event_name = forms.CharField(label=_('Event name'), max_length=100, help_text=_('The name of your event. This will be displayed to participants.'))
|
|
|
event_date = forms.Field(label=_('Event date'), widget=DatePickerWidget)
|
|
|
- start_time = forms.ChoiceField(label=_('Start time'), initial=9, choices=get_hours)
|
|
|
- end_time = forms.ChoiceField(label=_('End time'), initial=20, choices=get_hours)
|
|
|
- slot_interval = forms.ChoiceField(label=_('Time slot interval'), initial=15, choices=get_interval)
|
|
|
+ start_time = forms.ChoiceField(label=_('Start time'), initial=9, choices=get_hours, help_text=_('The first time slot available for participants to select.'))
|
|
|
+ end_time = forms.ChoiceField(label=_('End time'), initial=20, choices=get_hours, help_text=_('The last time slot available for participants to select.'))
|
|
|
+ slot_interval = forms.ChoiceField(label=_('Time slot interval'), initial=15, choices=get_interval, help_text=_('The interval between time slots.'))
|
|
|
|
|
|
def clean(self) -> dict:
|
|
|
cleaned_data = super().clean()
|
|
@@ -28,11 +28,11 @@ class CreateEventForm(forms.Form):
|
|
|
return cleaned_data
|
|
|
|
|
|
class LoginForm(forms.Form):
|
|
|
- username = forms.CharField(label=_('Username'), max_length=100)
|
|
|
- password = forms.CharField(label=_('Password'), max_length=100, widget=forms.PasswordInput, required=False)
|
|
|
+ username = forms.CharField(label=_('Username'), max_length=100, help_text=_('This will be displayed to other participants.'))
|
|
|
+ password = forms.CharField(label=_('Password'), max_length=100, widget=forms.PasswordInput, required=False, help_text=_('Fill in a password to create a new account. Leave empty to login as a guest.'))
|
|
|
|
|
|
class UpdateSlotsForm(forms.Form):
|
|
|
- slots = forms.Field(label=_('Slots'))
|
|
|
+ slots = forms.Field(label=_('Slots'), help_text=_('Click on a time slot to select it. Click again to deselect it. You can also drag the mouse to select multiple slots.'))
|
|
|
|
|
|
def __init__(self, *args, participant, **kwargs):
|
|
|
super().__init__(*args, **kwargs)
|