| 1 |
3bd3181d
|
Mikaël Ates
|
# -*- coding: utf-8 -*-
|
| 2 |
|
|
from django import forms
|
| 3 |
2c033fb5
|
Mikaël Ates
|
from django.forms import Form
|
| 4 |
e5afc1aa
|
Jérôme Schneider
|
from ajax_select.fields import AutoCompleteSelectMultipleField
|
| 5 |
3bd3181d
|
Mikaël Ates
|
|
| 6 |
cb424fd8
|
Mikaël Ates
|
class BaseForm(Form):
|
| 7 |
2c033fb5
|
Mikaël Ates
|
display_or_export = forms.BooleanField(label=u'Exporter dans un fichier', required=False, localize=True)
|
| 8 |
|
|
|
| 9 |
cb424fd8
|
Mikaël Ates
|
class OneDateForm(BaseForm):
|
| 10 |
|
|
start_date = forms.DateField(label=u'Date', required=False, localize=True)
|
| 11 |
|
|
|
| 12 |
|
|
class TwoDatesForm(BaseForm):
|
| 13 |
399f7834
|
Mikaël Ates
|
start_date = forms.DateField(label=u'Date de début', required=False, localize=True)
|
| 14 |
|
|
end_date = forms.DateField(label=u'Date de fin', required=False, localize=True)
|
| 15 |
2c033fb5
|
Mikaël Ates
|
|
| 16 |
cb424fd8
|
Mikaël Ates
|
class AnnualActivityForm(BaseForm):
|
| 17 |
2c033fb5
|
Mikaël Ates
|
start_date = forms.DateField(label=u"Date de l'année souhaitée", required=False, localize=True)
|
| 18 |
623df411
|
Jérôme Schneider
|
participants = AutoCompleteSelectMultipleField('all-worker-or-group', required=False)
|
| 19 |
8970af36
|
Mikaël Ates
|
|
| 20 |
cb424fd8
|
Mikaël Ates
|
class PatientsTwoDatesForm(TwoDatesForm):
|
| 21 |
623df411
|
Jérôme Schneider
|
patients = AutoCompleteSelectMultipleField('patientrecord', required=False)
|
| 22 |
cb424fd8
|
Mikaël Ates
|
|
| 23 |
|
|
class ParticipantsPatientsTwoDatesForm(PatientsTwoDatesForm):
|
| 24 |
623df411
|
Jérôme Schneider
|
participants = AutoCompleteSelectMultipleField('all-worker-or-group', required=False)
|
| 25 |
9a85b134
|
Mikaël Ates
|
|
| 26 |
5d0556a0
|
Mikaël Ates
|
class PatientsPerWorkerForPeriodForm(ParticipantsPatientsTwoDatesForm):
|
| 27 |
|
|
no_synthesis = forms.BooleanField(label=u'Exclure les synthèses', required=False, localize=True)
|
| 28 |
|
|
|
| 29 |
9a85b134
|
Mikaël Ates
|
class PatientsSynthesisForm(TwoDatesForm):
|
| 30 |
|
|
inscriptions = forms.BooleanField(label=u'Seulement les inscriptions', required=False, localize=True)
|