summaryrefslogtreecommitdiff
path: root/archaeological_files/forms.py
diff options
context:
space:
mode:
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
commit56ab75d6ee08ca3a83eac113b1459d0348a271cd (patch)
treea7fe5e03a2ca360c2e1e4af6e690d2d6e4bd4fcb /archaeological_files/forms.py
parentf87fd09770ab0738855a5efbaff905a7c9f346ac (diff)
downloadIshtar-56ab75d6ee08ca3a83eac113b1459d0348a271cd.tar.bz2
Ishtar-56ab75d6ee08ca3a83eac113b1459d0348a271cd.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.py5
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()