summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-18 15:26:41 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-18 15:27:12 +0200
commit2b51a034854ae1b15f8f9ccc3e2350be6f5dcf76 (patch)
tree7e058a7efdbd7fa78a71103c4ffa1fdb928a426b /archaeological_operations/forms.py
parentdb47e8e3396f63a0f82b82fb2ecbef404a70e737 (diff)
downloadIshtar-2b51a034854ae1b15f8f9ccc3e2350be6f5dcf76.tar.bz2
Ishtar-2b51a034854ae1b15f8f9ccc3e2350be6f5dcf76.zip
Operation: change type of judiciary fields
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py27
1 files changed, 21 insertions, 6 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index d86eb2085..a03513861 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -1015,9 +1015,15 @@ OperationFormModifGeneral.associated_models['associated_file'] = File
class CourtOrderedSeizureForm(CustomForm, IshtarForm):
- form_label = _(u"Court-ordered seizure")
- form_admin_name = _(u"Operation - 015 - Court-ordered seizure")
+ form_label = _("Court-ordered seizure")
+ form_admin_name = _("Operation - 015 - Court-ordered seizure")
form_slug = "operation-015-court-ordered-seizure"
+ extra_form_modals = ["person", "organization"]
+ associated_models = {
+ 'protagonist': Person,
+ 'applicant_authority': Organization,
+ 'minutes_writer': Person,
+ }
seizure_name = forms.CharField(
label=_(u"Seizure name"), required=False,
@@ -1025,13 +1031,22 @@ class CourtOrderedSeizureForm(CustomForm, IshtarForm):
official_report_number = forms.CharField(
label=_(u"Official report number"), required=False,
)
- name_of_the_protagonist = forms.CharField(
- label=_(u"Name of the protagonist"), required=False,
+ protagonist = forms.IntegerField(
+ widget=widgets.JQueryAutoComplete(
+ reverse_lazy('autocomplete-person-permissive'),
+ associated_model=Person, new=True),
+ label=_(u"Protagonist"), required=False,
)
- applicant_authority = forms.CharField(
+ applicant_authority = forms.IntegerField(
+ widget=widgets.JQueryAutoComplete(
+ reverse_lazy('autocomplete-organization'),
+ associated_model=Organization, new=True),
label=_("Applicant authority"), required=False,
)
- minutes_writer = forms.CharField(
+ minutes_writer = forms.IntegerField(
+ widget=widgets.JQueryAutoComplete(
+ reverse_lazy('autocomplete-person-permissive'),
+ associated_model=Person, new=True),
label=_("Writer of the minutes"), required=False,
)