Biotope code list

* integrates biotope code list to NewStateForm
* adds dal scripts automatically on compensation view
This commit is contained in:
mipel
2021-08-24 09:37:59 +02:00
parent de925c8cc6
commit 06d74f8ccb
4 changed files with 22 additions and 5 deletions
+12 -2
View File
@@ -97,11 +97,21 @@ class NewPaymentForm(BaseModalForm):
class NewStateModalForm(BaseModalForm):
biotope_type = forms.CharField(
biotope_type = forms.ModelChoiceField(
label=_("Biotope Type"),
label_suffix="",
required=True,
help_text=_("Select the biotope type")
help_text=_("Select the biotope type"),
queryset=KonovaCode.objects.filter(
is_active=True,
),
widget=autocomplete.ModelSelect2(
url="codes-biotope-autocomplete",
attrs={
"data-placeholder": _("Biotope Type"),
"data-minimum-input-length": 3,
}
),
)
surface = forms.DecimalField(
min_value=0.00,