|
|
@ -284,10 +284,26 @@ class NewEcoAccountForm(AbstractCompensationForm, CompensationResponsibleFormMix
|
|
|
|
Inherits from basic AbstractCompensationForm and further form fields from CompensationResponsibleFormMixin
|
|
|
|
Inherits from basic AbstractCompensationForm and further form fields from CompensationResponsibleFormMixin
|
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
surface = forms.DecimalField(
|
|
|
|
|
|
|
|
min_value=0.00,
|
|
|
|
|
|
|
|
decimal_places=2,
|
|
|
|
|
|
|
|
label=_("Available Surface"),
|
|
|
|
|
|
|
|
label_suffix="",
|
|
|
|
|
|
|
|
required=False,
|
|
|
|
|
|
|
|
help_text=_("The amount that can be used for deductions"),
|
|
|
|
|
|
|
|
widget=forms.NumberInput(
|
|
|
|
|
|
|
|
attrs={
|
|
|
|
|
|
|
|
"class": "form-control",
|
|
|
|
|
|
|
|
"placeholder": "0,00"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
field_order = [
|
|
|
|
field_order = [
|
|
|
|
"identifier",
|
|
|
|
"identifier",
|
|
|
|
"title",
|
|
|
|
"title",
|
|
|
|
"conservation_office",
|
|
|
|
"conservation_office",
|
|
|
|
|
|
|
|
"surface",
|
|
|
|
"conservation_file_number",
|
|
|
|
"conservation_file_number",
|
|
|
|
"handler",
|
|
|
|
"handler",
|
|
|
|
"fundings",
|
|
|
|
"fundings",
|
|
|
@ -314,6 +330,7 @@ class NewEcoAccountForm(AbstractCompensationForm, CompensationResponsibleFormMix
|
|
|
|
title = self.cleaned_data.get("title", None)
|
|
|
|
title = self.cleaned_data.get("title", None)
|
|
|
|
fundings = self.cleaned_data.get("fundings", None)
|
|
|
|
fundings = self.cleaned_data.get("fundings", None)
|
|
|
|
handler = self.cleaned_data.get("handler", None)
|
|
|
|
handler = self.cleaned_data.get("handler", None)
|
|
|
|
|
|
|
|
surface = self.cleaned_data.get("surface", None)
|
|
|
|
conservation_office = self.cleaned_data.get("conservation_office", None)
|
|
|
|
conservation_office = self.cleaned_data.get("conservation_office", None)
|
|
|
|
conservation_file_number = self.cleaned_data.get("conservation_file_number", None)
|
|
|
|
conservation_file_number = self.cleaned_data.get("conservation_file_number", None)
|
|
|
|
comment = self.cleaned_data.get("comment", None)
|
|
|
|
comment = self.cleaned_data.get("comment", None)
|
|
|
@ -337,7 +354,7 @@ class NewEcoAccountForm(AbstractCompensationForm, CompensationResponsibleFormMix
|
|
|
|
identifier=identifier,
|
|
|
|
identifier=identifier,
|
|
|
|
title=title,
|
|
|
|
title=title,
|
|
|
|
responsible=responsible,
|
|
|
|
responsible=responsible,
|
|
|
|
deductable_surface=0.00,
|
|
|
|
deductable_surface=surface,
|
|
|
|
created=action,
|
|
|
|
created=action,
|
|
|
|
geometry=geometry,
|
|
|
|
geometry=geometry,
|
|
|
|
comment=comment,
|
|
|
|
comment=comment,
|
|
|
@ -354,30 +371,6 @@ class EditEcoAccountForm(NewEcoAccountForm):
|
|
|
|
""" Form for editing eco accounts
|
|
|
|
""" Form for editing eco accounts
|
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
surface = forms.DecimalField(
|
|
|
|
|
|
|
|
min_value=0.00,
|
|
|
|
|
|
|
|
decimal_places=2,
|
|
|
|
|
|
|
|
label=_("Available Surface"),
|
|
|
|
|
|
|
|
label_suffix="",
|
|
|
|
|
|
|
|
required=False,
|
|
|
|
|
|
|
|
help_text=_("The amount that can be used for deductions"),
|
|
|
|
|
|
|
|
widget=forms.NumberInput(
|
|
|
|
|
|
|
|
attrs={
|
|
|
|
|
|
|
|
"class": "form-control",
|
|
|
|
|
|
|
|
"placeholder": "0,00"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
field_order = [
|
|
|
|
|
|
|
|
"identifier",
|
|
|
|
|
|
|
|
"title",
|
|
|
|
|
|
|
|
"conservation_office",
|
|
|
|
|
|
|
|
"surface",
|
|
|
|
|
|
|
|
"conservation_file_number",
|
|
|
|
|
|
|
|
"handler",
|
|
|
|
|
|
|
|
"fundings",
|
|
|
|
|
|
|
|
"comment",
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
|
super().__init__(*args, **kwargs)
|
|
|
|
super().__init__(*args, **kwargs)
|
|
|
|