diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-10-21 00:35:40 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2014-10-21 00:35:40 +0200 |
commit | 8a2d977a8a2dabb1513bb4f809fbf3ee5c641c72 (patch) | |
tree | a7fe5e03a2ca360c2e1e4af6e690d2d6e4bd4fcb /archaeological_files/forms.py | |
parent | 57cdf8896f854de7ba573cfe8d5040155df1e656 (diff) | |
download | Ishtar-8a2d977a8a2dabb1513bb4f809fbf3ee5c641c72.tar.bz2 Ishtar-8a2d977a8a2dabb1513bb4f809fbf3ee5c641c72.zip |
Dashboard: work on graphs for operations (refs #2076)
* add a new creation date field for operations
* refactoring of management of dashboard forms
* dashboard form for operations
Diffstat (limited to 'archaeological_files/forms.py')
-rw-r--r-- | archaeological_files/forms.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/archaeological_files/forms.py b/archaeological_files/forms.py index 68a004e4f..d2e31d80c 100644 --- a/archaeological_files/forms.py +++ b/archaeological_files/forms.py @@ -42,7 +42,7 @@ from ishtar_common.forms import FinalForm, FormSet, ClosingDateFormSelection, \ from ishtar_common.forms_common import get_town_field, get_person_field from archaeological_operations.forms import AdministrativeActOpeForm, \ AdministrativeActOpeFormSelection, FinalAdministrativeActDeleteForm, \ - ParcelField + ParcelField, SLICING from ishtar_common import widgets GENERAL_CONTRACTOR, created = PersonType.objects.get_or_create( @@ -122,7 +122,6 @@ class FileFormSelection(forms.Form): raise forms.ValidationError(_(u"You should select a file.")) return cleaned_data -SLICING = (("month",_(u"months")), ('year',_(u"years")),) DATE_SOURCE = (('creation',_(u"Creation date")), ("reception",_(u"Reception date"))) @@ -143,6 +142,8 @@ class DashboardForm(forms.Form): widget=widgets.JQueryDate, required=False) def __init__(self, *args, **kwargs): + if 'prefix' not in kwargs: + kwargs['prefix'] = 'files' super(DashboardForm, self).__init__(*args, **kwargs) self.fields['saisine_type'].choices = models.SaisineType.get_types() self.fields['file_type'].choices = models.FileType.get_types() |