summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index 3ad8dbb5a..6640ae7e3 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -392,6 +392,8 @@ class OperationSelect(TableSelect):
reverse_lazy('autocomplete-person', args=['0', 'user']),
associated_model=Person),
validators=[valid_id(Person)])
+ record_quality = forms.ChoiceField(label=_(u"Record quality"))
+ virtual_operation = forms.NullBooleanField(label=_(u"Virtual operation"))
def __init__(self, *args, **kwargs):
super(OperationSelect, self).__init__(*args, **kwargs)
@@ -403,6 +405,8 @@ class OperationSelect(TableSelect):
self.fields['remains'].help_text = models.RemainType.get_help()
self.fields['periods'].choices = models.Period.get_types()
self.fields['periods'].help_text = models.Period.get_help()
+ self.fields['record_quality'].choices = \
+ [('', '--')] + list(models.QUALITY)
def get_input_ids(self):
ids = super(OperationSelect, self).get_input_ids()
@@ -635,6 +639,10 @@ class OperationFormGeneral(forms.Form):
validators=[valid_id(Person)], required=False)
comment = forms.CharField(label=_(u"Comment"), widget=forms.Textarea,
required=False)
+ record_quality = forms.ChoiceField(label=_(u"Record quality"),
+ required=False)
+ virtual_operation = forms.BooleanField(required=False,
+ label=_(u"Virtual operation"))
def __init__(self, *args, **kwargs):
super(OperationFormGeneral, self).__init__(*args, **kwargs)
@@ -642,6 +650,8 @@ class OperationFormGeneral(forms.Form):
models.OperationType.get_types()
self.fields['operation_type'].help_text = \
models.OperationType.get_help()
+ self.fields['record_quality'].choices = \
+ [('', '--')] + list(models.QUALITY)
# data POSTED
if kwargs and kwargs['data'] \
and 'readonly' in self.fields['operation_code'].widget.attrs: