* refactors resubmission view for eiv, kom, oek, ema * removes unused attributes on BaseModalFormView
29 lines
923 B
Python
29 lines
923 B
Python
"""
|
|
Author: Michel Peltriaux
|
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
|
Contact: ksp-servicestelle@sgdnord.rlp.de
|
|
Created on: 19.08.22
|
|
|
|
"""
|
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from intervention.forms.modals.check import CheckModalForm
|
|
from intervention.models import Intervention
|
|
from konova.views.base import BaseModalFormView
|
|
|
|
|
|
class InterventionCheckView(LoginRequiredMixin, BaseModalFormView):
|
|
_MODEL_CLS = Intervention
|
|
_FORM_CLS = CheckModalForm
|
|
_MSG_SUCCESS = _("Check performed")
|
|
_REDIRECT_URL = "intervention:detail"
|
|
|
|
def _user_has_permission(self, user):
|
|
return user.is_zb_user()
|
|
|
|
def _get_redirect_url(self, *args, **kwargs):
|
|
redirect_url = super()._get_redirect_url(*args, **kwargs)
|
|
redirect_url += "#related_data"
|
|
return redirect_url
|