Project

General

Profile

« Previous | Next » 

Revision 3e9b47e9

Added by Benjamin Dauvergne about 13 years ago

agenda: add editing of periodic events

View differences:

calebasse/agenda/forms.py
from ajax_select import make_ajax_field
from models import Event, EventWithAct, EventType
class NewAppointmentForm(forms.ModelForm):
class BaseForm(forms.ModelForm):
date = forms.DateField(label=u'Date', localize=True)
time = forms.TimeField(label=u'Heure de début')
duration = forms.CharField(label=u'Durée',
help_text=u'en minutes; vous pouvez utiliser la roulette de votre souris.')
participants = make_ajax_field(EventWithAct, 'participants', 'worker-or-group', True)
class NewAppointmentForm(BaseForm):
patient = make_ajax_field(EventWithAct, 'patient', 'patientrecord', False)
class Meta:
......
)
class NewEventForm(forms.ModelForm):
class NewEventForm(BaseForm):
title = forms.CharField(label=u"Complément de l'intitulé", max_length=32, required=False)
date = forms.DateField(label=u'Date', localize=True)
time = forms.TimeField(label=u'Heure de début')
duration = forms.CharField(label=u'Durée',
help_text=u'en minutes; vous pouvez utiliser la roulette de votre souris.')
participants = make_ajax_field(Event, 'participants', 'worker-or-group', True)
class Meta:
model = Event

Also available in: Unified diff