Refactoring
* moves updating of shared access users into ShareableObjectMixin * renames ShareInterventionModalForm to ShareModalForm since it's used for EMA and eco accounts as well
This commit is contained in:
@@ -4,7 +4,7 @@ from django.http import HttpRequest, JsonResponse
|
||||
from django.shortcuts import render
|
||||
|
||||
from intervention.forms.forms import NewInterventionForm, EditInterventionForm
|
||||
from intervention.forms.modalForms import ShareInterventionModalForm, NewRevocationModalForm, \
|
||||
from intervention.forms.modalForms import ShareModalForm, NewRevocationModalForm, \
|
||||
CheckModalForm, NewDeductionModalForm, NewInterventionDocumentForm
|
||||
from intervention.models import Intervention, Revocation, InterventionDocument, RevocationDocument
|
||||
from intervention.tables import InterventionTable
|
||||
@@ -402,7 +402,7 @@ def create_share_view(request: HttpRequest, id: str):
|
||||
|
||||
"""
|
||||
intervention = get_object_or_404(Intervention, id=id)
|
||||
form = ShareInterventionModalForm(request.POST or None, instance=intervention, request=request, user=request.user)
|
||||
form = ShareModalForm(request.POST or None, instance=intervention, request=request, user=request.user)
|
||||
return form.process_request(
|
||||
request,
|
||||
msg_success=_("Share settings updated")
|
||||
|
||||
Reference in New Issue
Block a user