diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2015-11-17 20:05:58 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-11-17 20:05:58 +0100 |
commit | aeb382cc4db125d4170223f477597bede2dd67af (patch) | |
tree | 6908dba039db7b2f4b1150d98c2afe5bd12578a3 /archaeological_finds/forms.py | |
parent | 8af8e41836ba5eebc6d1d7c784b05a0f5d8672ab (diff) | |
download | Ishtar-aeb382cc4db125d4170223f477597bede2dd67af.tar.bz2 Ishtar-aeb382cc4db125d4170223f477597bede2dd67af.zip |
Archaeological finds: add a "checked date" field (refs #2947)
Diffstat (limited to 'archaeological_finds/forms.py')
-rw-r--r-- | archaeological_finds/forms.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index 975772bac..258b0d34a 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -36,7 +36,7 @@ import models from ishtar_common import widgets from ishtar_common.forms import FormSet, FloatField, \ - get_form_selection, reverse_lazy, TableSelect + get_form_selection, reverse_lazy, TableSelect, get_now from ishtar_common.forms_common import get_town_field, SourceSelect @@ -72,6 +72,8 @@ class FindForm(forms.Form): find_number = forms.IntegerField(label=_(u"Find number"), required=False) mark = forms.CharField(label=_("Mark"), required=False) checked = forms.ChoiceField(label=_("Check")) + checked_date = forms.DateField( + initial=get_now, label=_(u"Check date"), widget=widgets.JQueryDate) comment = forms.CharField(label=_("Comment"), required=False, widget=forms.Textarea) dating_comment = forms.CharField( @@ -141,6 +143,7 @@ class FindSelect(TableSelect): choices=[]) base_finds__find__description = forms.CharField(label=_(u"Description")) base_finds__is_isolated = forms.NullBooleanField(label=_(u"Is isolated?")) + checked = forms.ChoiceField(label=_("Check")) image = forms.NullBooleanField(label=_(u"Has an image?")) def __init__(self, *args, **kwargs): @@ -157,6 +160,8 @@ class FindSelect(TableSelect): models.ConservatoryState.get_help() self.fields['object_types'].choices = \ models.ObjectType.get_types() + self.fields['checked'].choices = \ + [('', '--')] + list(models.CHECK_CHOICES) class FindFormSelection(forms.Form): |