diff --git a/src/Controller/KontaktController.php b/src/Controller/KontaktController.php index 01d03317..ce784482 100644 --- a/src/Controller/KontaktController.php +++ b/src/Controller/KontaktController.php @@ -68,6 +68,7 @@ public function addKontakt( 'errors' => $errors, 'title' => $this->translator->trans(id: 'contact.create', domain: 'kontakt'), 'new' => true, + 'urlBack' => $this->generateUrl('kontakt'), ]); } @@ -152,7 +153,8 @@ public function editKontakt( 'kontakt' => $kontakt, 'errors' => $errors, 'title' => $this->translator->trans(id: 'contact.create', domain: 'kontakt'), - 'snack' => $request->get('snack') + 'snack' => $request->get('snack'), + 'urlBack' => $this->generateUrl('kontakt'), ]); } diff --git a/templates/kontakt/edit.html.twig b/templates/kontakt/edit.html.twig index 39c62a34..06b03c63 100644 --- a/templates/kontakt/edit.html.twig +++ b/templates/kontakt/edit.html.twig @@ -1,45 +1,45 @@ {% extends 'base.html.twig' %} + +{% block title %} + {{ title }} +{% endblock %} + {% block CTA %} {% if new is not defined %} {{ include('base/__approveBtn.html.twig',{'data':kontakt,'dataLink':'kontakt_approve'}) }} {{ include('base/__disableBtn.html.twig',{'data':kontakt,'dataLink':'kontakt_disable'}) }} {% endif %} {% endblock %} + {% block body %} -

{{ title }}

{{ include('base/__approvedBy.html.twig', {'data':kontakt}) }} -
{{ form_start(form) }} -
-
{{ form_row(form.art) }}
-
{{ form_row(form.nummer) }}
-
{{ form_row(form.firma) }}
-
-
-
{{ form_row(form.anrede) }}
-
{{ form_row(form.vorname) }}
-
{{ form_row(form.nachname) }}
-
-
-
{{ form_row(form.strase) }}
-
{{ form_row(form.plz) }}
-
{{ form_row(form.ort) }}
-
-
-
{{ form_row(form.email) }}
-
{{ form_row(form.telefon) }}
-
-
-
{{ form_row(form.bemerkung) }}
-
- {{ form_widget(form.save) }} +
+ {{ form_row(form.art) }} + {{ form_row(form.nummer) }} + {{ form_row(form.firma) }} +
+
+ {{ form_row(form.anrede) }} + {{ form_row(form.vorname) }} + {{ form_row(form.nachname) }} +
+
+ {{ form_row(form.strase) }} + {{ form_row(form.plz) }} + {{ form_row(form.ort) }} +
+
+ {{ form_row(form.email) }} + {{ form_row(form.telefon) }} +
+
+ {{ form_row(form.bemerkung) }} +
+ {{ form_row(form.save, {row_attr: {class: 'form-buttons'}}) }} {{ form_end(form) }} -
{{ include('base/__snack.html.twig') }} -{% endblock %} - -{% block javascript %} -{% endblock %} +{% endblock %} \ No newline at end of file