Remove form renaming
* renames new remove modal forms to match a more coherent style
This commit is contained in:
@@ -172,7 +172,7 @@ class NewRevocationModalForm(BaseModalForm):
|
||||
return revocation
|
||||
|
||||
|
||||
class RevocationRemoveModalForm(RemoveModalForm):
|
||||
class RemoveRevocationModalForm(RemoveModalForm):
|
||||
""" Removing modal form for Revocation
|
||||
|
||||
Can be used for anything, where removing shall be confirmed by the user a second time.
|
||||
@@ -407,7 +407,7 @@ class NewDeductionModalForm(BaseModalForm):
|
||||
return deduction
|
||||
|
||||
|
||||
class DeductionRemoveModalForm(RemoveModalForm):
|
||||
class RemoveEcoAccountDeductionModalForm(RemoveModalForm):
|
||||
""" Removing modal form for EcoAccountDeduction
|
||||
|
||||
Can be used for anything, where removing shall be confirmed by the user a second time.
|
||||
|
||||
@@ -234,7 +234,7 @@ class Intervention(BaseObject, ShareableObjectMixin, RecordableObjectMixin, Chec
|
||||
""" Removes a revocation from the intervention
|
||||
|
||||
Args:
|
||||
form (RevocationRemoveModalForm): The form holding all relevant data
|
||||
form (RemoveRevocationModalForm): The form holding all relevant data
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -309,7 +309,7 @@ class Intervention(BaseObject, ShareableObjectMixin, RecordableObjectMixin, Chec
|
||||
""" Removes a Payment from the intervention
|
||||
|
||||
Args:
|
||||
form (PaymentRemoveModalForm): The form holding all relevant data
|
||||
form (RemovePaymentModalForm): The form holding all relevant data
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ from django.shortcuts import render
|
||||
|
||||
from intervention.forms.forms import NewInterventionForm, EditInterventionForm
|
||||
from intervention.forms.modalForms import ShareModalForm, NewRevocationModalForm, \
|
||||
CheckModalForm, NewDeductionModalForm, NewInterventionDocumentForm, DeductionRemoveModalForm, \
|
||||
RevocationRemoveModalForm
|
||||
CheckModalForm, NewDeductionModalForm, NewInterventionDocumentForm, RemoveEcoAccountDeductionModalForm, \
|
||||
RemoveRevocationModalForm
|
||||
from intervention.models import Intervention, Revocation, InterventionDocument, RevocationDocument
|
||||
from intervention.tables import InterventionTable
|
||||
from konova.contexts import BaseContext
|
||||
@@ -355,7 +355,7 @@ def remove_revocation_view(request: HttpRequest, id: str, revocation_id: str):
|
||||
intervention = get_object_or_404(Intervention, id=id)
|
||||
revocation = get_object_or_404(Revocation, id=revocation_id)
|
||||
|
||||
form = RevocationRemoveModalForm(request.POST or None, instance=intervention, revocation=revocation, request=request)
|
||||
form = RemoveRevocationModalForm(request.POST or None, instance=intervention, revocation=revocation, request=request)
|
||||
return form.process_request(
|
||||
request,
|
||||
REVOCATION_REMOVED,
|
||||
@@ -536,7 +536,7 @@ def remove_deduction_view(request: HttpRequest, id: str, deduction_id: str):
|
||||
except ObjectDoesNotExist:
|
||||
raise Http404("Unknown deduction")
|
||||
|
||||
form = DeductionRemoveModalForm(request.POST or None, instance=intervention, deduction=eco_deduction, request=request)
|
||||
form = RemoveEcoAccountDeductionModalForm(request.POST or None, instance=intervention, deduction=eco_deduction, request=request)
|
||||
return form.process_request(
|
||||
request=request,
|
||||
msg_success=DEDUCTION_REMOVED,
|
||||
|
||||
Reference in New Issue
Block a user