From 56ab75d6ee08ca3a83eac113b1459d0348a271cd Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 21 Oct 2014 00:35:40 +0200 Subject: 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 --- archaeological_files/forms.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'archaeological_files/forms.py') 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() -- cgit v1.2.3