diff options
Diffstat (limited to 'archaeological_operations/forms.py')
| -rw-r--r-- | archaeological_operations/forms.py | 14 | 
1 files changed, 9 insertions, 5 deletions
| diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 7d7b79d63..bcdd44cf6 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -589,8 +589,13 @@ OperationSourceFormSelection = get_form_selection(  ################################################  class AdministrativeActOpeSelect(TableSelect): -    operation__towns = get_town_field() +    year = forms.IntegerField(label=_("Year")) +    index = forms.IntegerField(label=_("Index")) +    if settings.COUNTRY == 'fr': +        ref_sra = forms.CharField(label=u"Référence SRA", +                                  max_length=15)      act_type = forms.ChoiceField(label=_("Act type"), choices=[]) +    operation__towns = get_town_field()      def __init__(self, *args, **kwargs):          super(AdministrativeActOpeSelect, self).__init__(*args, **kwargs) @@ -682,13 +687,12 @@ class GenerateDocForm(forms.Form):          self.fields['doc_generation'].choices = [('', u'-'*9)] + \                  [(choice.pk , unicode(choice)) for choice in choices] -class AdministrativeActRegisterSelect(TableSelect): -    signature_date__year = forms.IntegerField(label=_(u"Year")) -    act_type = forms.ChoiceField(label=_("Act type"), choices=[]) +class AdministrativeActRegisterSelect(AdministrativeActOpeSelect):      def __init__(self, *args, **kwargs):          super(AdministrativeActRegisterSelect, self).__init__(*args, **kwargs) -        self.fields['act_type'].choices = models.ActType.get_types() +        self.fields['act_type'].choices = models.ActType.get_types( +                                                           dct={'indexed':True})          self.fields['act_type'].help_text = models.ActType.get_help()  class AdministrativeActRegisterFormSelection(forms.Form): | 
