* refactors large forms.py into forms/modalForms.py and forms/forms.py
* refactors custom input fields into intervention/inputs.py
This commit is contained in:
2021-09-27 11:45:13 +02:00
parent 58eefbdbe6
commit fdb6f2d105
7 changed files with 772 additions and 754 deletions

View File

@@ -16,7 +16,7 @@ from django.shortcuts import render, get_object_or_404
from compensation.forms import NewStateModalForm, NewActionModalForm, NewDeadlineModalForm
from compensation.models import EcoAccount, EcoAccountDocument
from compensation.tables import EcoAccountTable
from intervention.forms import NewDeductionForm
from intervention.forms.modalForms import NewDeductionModalForm
from konova.contexts import BaseContext
from konova.decorators import any_group_check, default_group_required, conservation_office_group_required
from konova.forms import RemoveModalForm, SimpleGeomForm, NewDocumentForm, RecordModalForm
@@ -340,7 +340,7 @@ def new_deduction_view(request: HttpRequest, id: str):
"""
acc = get_object_or_404(EcoAccount, id=id)
form = NewDeductionForm(request.POST or None, instance=acc, user=request.user)
form = NewDeductionModalForm(request.POST or None, instance=acc, user=request.user)
return form.process_request(
request,
msg_success=_("Deduction added")