diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-08-19 12:04:58 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-08-19 12:04:58 +0200 |
commit | 6443d7865bd7ac37cf3969b429cf0659b7d7ac2e (patch) | |
tree | de69c2af87cef1e2c7f89feae3c53aaa860c96d8 /archaeological_context_records/forms.py | |
parent | 958a9a61c3a6fc54189fe941cb41782d1d19e9ed (diff) | |
download | Ishtar-6443d7865bd7ac37cf3969b429cf0659b7d7ac2e.tar.bz2 Ishtar-6443d7865bd7ac37cf3969b429cf0659b7d7ac2e.zip |
Operations: check PATRIARCHE unicity inside forms (refs #2930)
Diffstat (limited to 'archaeological_context_records/forms.py')
-rw-r--r-- | archaeological_context_records/forms.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index 512d2069b..0bdc04fb4 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -34,6 +34,7 @@ from archaeological_operations.models import Period, Parcel, Operation, \ import models from ishtar_common import widgets +from archaeological_operations.widgets import OAWidget from ishtar_common.forms import FinalForm, FormSet, \ reverse_lazy, get_form_selection, TableSelect from ishtar_common.forms_common import get_town_field, SourceSelect @@ -46,6 +47,7 @@ class RecordSelect(TableSelect): parcel__town = get_town_field() if settings.COUNTRY == 'fr': operation__code_patriarche = forms.IntegerField( + widget=OAWidget, label=_(u"Code PATRIARCHE")) operation__year = forms.IntegerField(label=_(u"Operation's year")) operation__operation_code = forms.IntegerField( @@ -295,7 +297,8 @@ class RecordSourceSelect(SourceSelect): label=_(u"Numeric reference")) if settings.COUNTRY == 'fr': context_record__operation__code_patriarche = forms.IntegerField( - label="Numéro d'opération (OA Patriarche)") + widget=OAWidget, + label="Code PATRIARCHE") context_record__parcel__town = get_town_field( label=_(u"Town of the operation")) context_record__datings__period = forms.ChoiceField( |