From 1a7aac267c075fb1715fadbe0d51173a18c694c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 17 Aug 2021 01:05:48 +0200 Subject: [PATCH] Add subscribe and edit templates --- Resources/views/form/_subscribe.html.twig | 13 +++++ Resources/views/form/edit.html.twig | 58 +++++++++++++++++++++++ Resources/views/mail/subscribe.html.twig | 17 +++++++ Resources/views/mail/subscribe.text.twig | 11 +++++ 4 files changed, 99 insertions(+) create mode 100644 Resources/views/form/_subscribe.html.twig create mode 100644 Resources/views/form/edit.html.twig create mode 100644 Resources/views/mail/subscribe.html.twig create mode 100644 Resources/views/mail/subscribe.text.twig diff --git a/Resources/views/form/_subscribe.html.twig b/Resources/views/form/_subscribe.html.twig new file mode 100644 index 0000000..2d52544 --- /dev/null +++ b/Resources/views/form/_subscribe.html.twig @@ -0,0 +1,13 @@ +
+

{% trans %}Subscribe{% endtrans %}

+ {{ form_start(forms.subscribe) }} +
+ {{ form_row(forms.subscribe.mail) }} + + {{ form_row(forms.subscribe.submit) }} +
+ + {# Render CSRF token etc .#} +
{{ form_rest(forms.subscribe) }}
+ {{ form_end(forms.subscribe) }} +
diff --git a/Resources/views/form/edit.html.twig b/Resources/views/form/edit.html.twig new file mode 100644 index 0000000..8540c46 --- /dev/null +++ b/Resources/views/form/edit.html.twig @@ -0,0 +1,58 @@ +{% extends '@RapsysAir/body.html.twig' %} +{% block title %}{{ site.title }} - {{ title }}{% endblock %} +{% block content %} +
+

{{ title }}

+ {{ form_start(edit) }} +
+ {% if edit.mail is defined %} + {{ form_row(edit.mail) }} + {% endif %} + + {% if edit.civility is defined %} + {{ form_row(edit.civility) }} + {% endif %} + + {% if edit.forename is defined %} + {{ form_row(edit.forename) }} + {% endif %} + + {% if edit.surname is defined %} + {{ form_row(edit.surname) }} + {% endif %} + + {% if edit.pseudonym is defined %} + {{ form_row(edit.pseudonym) }} + {% endif %} + + {% if edit.phone is defined %} + {{ form_row(edit.phone) }} + {% endif %} + + {{ form_row(edit.submit) }} +
+ + {# Render CSRF token etc .#} +
{{ form_rest(edit) }}
+ {{ form_end(edit) }} +
+ {% if reset is defined %} +
+

{{ password }}

+ {{ form_start(reset) }} +
+ {% if reset.password is defined %} + {{ form_row(reset.password.first) }} + + {{ form_row(reset.password.second) }} + {% endif %} + + {{ form_row(reset.submit) }} +
+ + {# Render CSRF token etc .#} +
{{ form_rest(reset) }}
+ {{ form_end(reset) }} +
+ {% endif %} +{% endblock %} diff --git a/Resources/views/mail/subscribe.html.twig b/Resources/views/mail/subscribe.html.twig new file mode 100644 index 0000000..fd0ae29 --- /dev/null +++ b/Resources/views/mail/subscribe.html.twig @@ -0,0 +1,17 @@ +{% extends '@RapsysAir/mail/body.html.twig' %} +{% block title %}{{ subject }}{% endblock %} +{% block content %} + + + + + + +
  +

{{ 'Subject: %subject%'|trans({'%subject%': 'welcome to %site.title%'|trans({'%site.title%': site.title})|raw}) }}

+

{{ 'Hi %recipient_name%,'|trans({'%recipient_name%': recipient_name}) }}

+

{{ 'Thanks so much for joining %site.title%, the space reservation program.'|trans({'%site.title%': site.title}) }}

+

{% trans %}To create your account you can follow this link:{% endtrans %}

+

{{ subscribe_url }}

+
 
+{% endblock %} diff --git a/Resources/views/mail/subscribe.text.twig b/Resources/views/mail/subscribe.text.twig new file mode 100644 index 0000000..620352b --- /dev/null +++ b/Resources/views/mail/subscribe.text.twig @@ -0,0 +1,11 @@ +{{ subject }} +{% for i in range(1, subject|length) %}={% endfor %} + + +*{{ 'Thanks so much for joining %site.title%, the space reservation program.'|trans({'%site.title%': site.title}) }}* + +{{ 'To create your account you must follow this link: %subscribe_url%'|trans({'%subscribe_url%': subscribe_url}) }} + +-- + +{{ copy.long }} - {{ copy.short }} -- 2.41.0