summaryrefslogtreecommitdiff
path: root/archaeological_finds/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-11-21 15:26:41 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-11-21 15:26:41 +0100
commitff60c200ddc406250c335de3b59a56b9327a16ec (patch)
treeb631fd7d258640517b986708b1db9f35239d95ce /archaeological_finds/forms.py
parent6a3c8c3ff340110960bf64dbfc31e526243f6616 (diff)
downloadIshtar-ff60c200ddc406250c335de3b59a56b9327a16ec.tar.bz2
Ishtar-ff60c200ddc406250c335de3b59a56b9327a16ec.zip
Custom forms: manage formsets
Diffstat (limited to 'archaeological_finds/forms.py')
-rw-r--r--archaeological_finds/forms.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py
index b88ee164e..2a895064f 100644
--- a/archaeological_finds/forms.py
+++ b/archaeological_finds/forms.py
@@ -41,7 +41,7 @@ import models
from ishtar_common.forms import FormSet, FloatField, \
get_form_selection, reverse_lazy, TableSelect, get_now, FinalForm, \
- ManageOldType
+ ManageOldType, FieldType
from ishtar_common.forms_common import get_town_field, SourceSelect
from ishtar_common.utils import convert_coordinates_to_point
@@ -316,11 +316,11 @@ class PreservationForm(ManageOldType, forms.Form):
widget=forms.Textarea)
TYPES = [
- ('conservatory_state', models.ConservatoryState, False),
- ('treatment_emergency', models.TreatmentEmergencyType, False),
- ('preservation_to_consider', models.TreatmentType, True),
- ('alteration', models.AlterationType, True),
- ('alteration_cause', models.AlterationCauseType, True),
+ FieldType('conservatory_state', models.ConservatoryState),
+ FieldType('treatment_emergency', models.TreatmentEmergencyType),
+ FieldType('preservation_to_consider', models.TreatmentType, True),
+ FieldType('alteration', models.AlterationType, True),
+ FieldType('alteration_cause', models.AlterationCauseType, True),
]
def __init__(self, *args, **kwargs):