diff options
Diffstat (limited to 'ishtar_common/forms.py')
-rw-r--r-- | ishtar_common/forms.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py index c5058ab0d..d15352e64 100644 --- a/ishtar_common/forms.py +++ b/ishtar_common/forms.py @@ -1292,3 +1292,24 @@ class DocumentGenerationForm(forms.Form): except models.DocumentTemplate.DoesNotExist: return return template.publish(c_object) + + +class GeoItemSelect(DocumentItemSelect): # all geo item can have documents + geodata__name = forms.CharField(label=_("Geo - Name"), max_length=300) + geodata__data_type = forms.ChoiceField(label=_("Geo - Data type"), choices=[]) + geodata__origin = forms.ChoiceField(label=_("Geo - Origin"), choices=[]) + geodata__provider = forms.ChoiceField(label=_("Geo - Provider"), choices=[]) + geodata__comment = forms.CharField(label=_("Geo - Comment"), max_length=500) + CURRENT_FIELDS = [ + "geodata__name", + "geodata__data_type", + "geodata__origin", + "geodata__provider", + "geodata__comment", + ] + DocumentItemSelect.CURRENT_FIELDS + _explicit_ordering = True + TYPES = [ + FieldType("geodata__data_type", models.GeoDataType), + FieldType("geodata__origin", models.GeoOriginType), + FieldType("geodata__provider", models.GeoProviderType), + ] + DocumentItemSelect.TYPES |