2014-12-10 16:28:21 +01:00
|
|
|
from django import forms
|
2014-12-03 11:27:10 +01:00
|
|
|
from frontend.models import Presentation, PresentationEvent, PresentationPerson
|
|
|
|
from django.forms.models import inlineformset_factory
|
|
|
|
|
2014-12-11 16:30:54 +01:00
|
|
|
from bootstrap3_datetime.widgets import DateTimePicker
|
|
|
|
|
2014-12-10 16:28:21 +01:00
|
|
|
|
2014-12-03 11:27:10 +01:00
|
|
|
PresentationPersonInlineFormset = inlineformset_factory(
|
|
|
|
Presentation,
|
|
|
|
PresentationPerson,
|
2014-12-08 12:21:13 +01:00
|
|
|
extra=1,
|
2014-12-10 16:28:21 +01:00
|
|
|
can_delete=False,
|
|
|
|
widgets={'hshmembership': forms.RadioSelect}
|
2014-12-03 11:27:10 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
PresentationEventInlineFormset = inlineformset_factory(
|
|
|
|
Presentation,
|
|
|
|
PresentationEvent,
|
2014-12-08 12:21:13 +01:00
|
|
|
extra=1,
|
2014-12-11 16:30:54 +01:00
|
|
|
can_delete=False,
|
|
|
|
widgets={
|
|
|
|
'date': DateTimePicker(options={"format": "YYYY-MM-DD", 'pickSeconds': False}),
|
|
|
|
'start_date': DateTimePicker(options={"format": "YYYY-MM-DD", 'pickSeconds': False}),
|
|
|
|
'end_date': DateTimePicker(options={"format": "YYYY-MM-DD", 'pickSeconds': False})
|
|
|
|
}
|
|
|
|
)
|