]> Raphaël G. Git Repositories - airbundle/commitdiff
Fix dispute template path
authorRaphaël Gertz <git@rapsys.eu>
Wed, 7 Jul 2021 15:18:34 +0000 (17:18 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Wed, 7 Jul 2021 15:18:34 +0000 (17:18 +0200)
Controller/DefaultController.php
Resources/views/default/dispute.html.twig [new file with mode: 0644]

index c64a96c242df5f703ff73daea9b89db89d858a11..034448a94de5179d0da9f88a942b67ef3bd66134 100644 (file)
@@ -351,7 +351,7 @@ class DefaultController {
                }
 
                //Render template
                }
 
                //Render template
-               return $this->render('@RapsysAir/form/dispute.html.twig', ['title' => $title, 'section' => $section, 'form' => $form->createView(), 'sent' => $request->query->get('sent', 0)]+$this->context);
+               return $this->render('@RapsysAir/default/dispute.html.twig', ['title' => $title, 'section' => $section, 'form' => $form->createView(), 'sent' => $request->query->get('sent', 0)]+$this->context);
        }
 
        /**
        }
 
        /**
diff --git a/Resources/views/default/dispute.html.twig b/Resources/views/default/dispute.html.twig
new file mode 100644 (file)
index 0000000..9fd930e
--- /dev/null
@@ -0,0 +1,33 @@
+{% extends '@RapsysAir/body.html.twig' %}
+{% block content %}
+       <section id="form">
+               <header>
+                       <h2><a href="{{ path('rapsys_air_dispute') }}">{{ section }}</a></h2>
+                       <p>{{ description }}</p>
+               </header>
+               {% if sent %}
+                       <p class="message notice">{% trans %}Your message has been sent{% endtrans %}</p>
+               {% else %}
+                       {{ form_start(form) }}
+                               <div>
+                                       {{ form_row(form.offense) }}
+
+                                       {{ form_row(form.court) }}
+
+                                       {{ form_row(form.notice) }}
+
+                                       {{ form_row(form.agent) }}
+
+                                       {{ form_row(form.service) }}
+
+                                       {{ form_row(form.abstract) }}
+
+                                       {{ form_row(form.submit) }}
+                               </div>
+
+                               {# Render CSRF token etc .#}
+                               <footer style="display:none">{{ form_rest(form) }}</footer>
+                       {{ form_end(form) }}
+               {% endif %}
+       </section>
+{% endblock %}