Project

General

Profile

Download (1.38 KB) Statistics
| Branch: | Tag: | Revision:

calebasse / calebasse / statistics / forms.py @ 1f4ae3b3

1
# -*- coding: utf-8 -*-
2
from django import forms
3
from django.forms import Form
4
from ajax_select.fields import AutoCompleteSelectMultipleField
5

    
6
class BaseForm(Form):
7
    display_or_export = forms.BooleanField(label=u'Exporter dans un fichier', required=False, localize=True)
8

    
9
class OneDateForm(BaseForm):
10
    start_date = forms.DateField(label=u'Date', required=False, localize=True)
11

    
12
class TwoDatesForm(BaseForm):
13
    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

    
16
class AnnualActivityForm(BaseForm):
17
    start_date = forms.DateField(label=u"Date de l'année souhaitée", required=False, localize=True)
18
    participants = AutoCompleteSelectMultipleField('all-worker-or-group', required=False)
19

    
20
class PatientsTwoDatesForm(TwoDatesForm):
21
    patients = AutoCompleteSelectMultipleField('patientrecord', required=False)
22

    
23
class ParticipantsPatientsTwoDatesForm(PatientsTwoDatesForm):
24
    participants = AutoCompleteSelectMultipleField('all-worker-or-group', required=False)
25

    
26
class PatientsPerWorkerForPeriodForm(ParticipantsPatientsTwoDatesForm):
27
    no_synthesis = forms.BooleanField(label=u'Exclure les synthèses', required=False, localize=True)
28

    
29
class PatientsSynthesisForm(TwoDatesForm):
30
    inscriptions = forms.BooleanField(label=u'Seulement les inscriptions', required=False, localize=True)
(3-3/8)