diff --git a/sapl/materia/forms.py b/sapl/materia/forms.py index 58e9fa3d1..d90d02d35 100644 --- a/sapl/materia/forms.py +++ b/sapl/materia/forms.py @@ -2,10 +2,9 @@ import logging import os -from crispy_forms.bootstrap import Alert, InlineRadios, FormActions -from crispy_forms.helper import FormHelper -from crispy_forms.layout import (HTML, Button, Column, Div, Field, Fieldset, - Layout, Row, Submit) +from crispy_forms.bootstrap import Alert, InlineRadios +from crispy_forms.layout import (HTML, Button, Field, Fieldset, + Layout, Row) from django import forms from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist, ValidationError diff --git a/sapl/materia/views.py b/sapl/materia/views.py index 3da6b84f6..a22268545 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -1529,6 +1529,11 @@ class DespachoInicialMultiCreateView(PermissionRequiredForAppCrudMixin, FormView return FormView.form_valid(self, form) + @property + def cancel_url(self): + return reverse( + 'sapl.materia:despachoinicial_list', kwargs={'pk': self.materia.pk}) + class DespachoInicialCrud(MasterDetailCrud): model = DespachoInicial diff --git a/sapl/templates/materia/despachoinicial_detail.html b/sapl/templates/materia/despachoinicial_detail.html deleted file mode 100644 index d3b177e72..000000000 --- a/sapl/templates/materia/despachoinicial_detail.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "crud/detail_detail.html" %} -{% load i18n common_tags crispy_forms_tags%} - -{% block extra_js %} - -{% endblock extra_js %} \ No newline at end of file diff --git a/sapl/templates/materia/despachoinicial_multicreate_form.html b/sapl/templates/materia/despachoinicial_multicreate_form.html index 087388b48..2d1045d09 100644 --- a/sapl/templates/materia/despachoinicial_multicreate_form.html +++ b/sapl/templates/materia/despachoinicial_multicreate_form.html @@ -4,9 +4,4 @@ {% load common_tags %} {% block extra_js %} - {% endblock %}