From 4552b1166b82f694e01a6cf0ee59272a4d7654b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sat, 2 Nov 2024 04:08:15 +0100 Subject: [PATCH] Import user templates --- templates/_footer.html.twig | 35 ++++++++++++++++------------- templates/index.html.twig | 3 ++- templates/login.html.twig | 5 +++-- templates/mail/_base.html.twig | 37 +++++++++++++++++++++++++++++++ templates/mail/recover.html.twig | 18 +++++++++++++++ templates/mail/recover.text.twig | 17 ++++++++++++++ templates/mail/register.html.twig | 18 +++++++++++++++ templates/mail/register.text.twig | 17 ++++++++++++++ templates/recover.html.twig | 33 +++++++++++++-------------- templates/register.html.twig | 8 +++---- 10 files changed, 149 insertions(+), 42 deletions(-) create mode 100644 templates/mail/_base.html.twig create mode 100644 templates/mail/recover.html.twig create mode 100644 templates/mail/recover.text.twig create mode 100644 templates/mail/register.html.twig create mode 100644 templates/mail/register.text.twig diff --git a/templates/_footer.html.twig b/templates/_footer.html.twig index 8df1ba8..843ac85 100644 --- a/templates/_footer.html.twig +++ b/templates/_footer.html.twig @@ -1,17 +1,20 @@ - +{% endif %} diff --git a/templates/index.html.twig b/templates/index.html.twig index 2369d00..4c5eb51 100644 --- a/templates/index.html.twig +++ b/templates/index.html.twig @@ -1,4 +1,5 @@ -{% extends '@RapsysUser/base.html.twig' %} +{% trans_default_domain 'rapsysuser' %} +{% extends '@RapsysUser/_base.html.twig' %} {% block content %}
diff --git a/templates/login.html.twig b/templates/login.html.twig index c57fd6e..cb1473c 100644 --- a/templates/login.html.twig +++ b/templates/login.html.twig @@ -1,4 +1,5 @@ -{% extends '@RapsysUser/base.html.twig' %} +{% trans_default_domain 'rapsysuser' %} +{% extends '@RapsysUser/_base.html.twig' %} {% block content %}
@@ -20,7 +21,7 @@ {% if recover is defined %}
-

{% trans from "rapsysuser" %}Recover{% endtrans %}

+

{% trans %}Recover{% endtrans %}

{{ form_start(recover) }}
diff --git a/templates/mail/_base.html.twig b/templates/mail/_base.html.twig new file mode 100644 index 0000000..dea7b17 --- /dev/null +++ b/templates/mail/_base.html.twig @@ -0,0 +1,37 @@ +{% extends '@RapsysUser/_base.html.twig' %} +{% block head %} + + + {% if locale is defined and locale %}{% endif %} +{% endblock %} +{% block stylesheet %} + +{% endblock %} +{% block body %} + + + {% if logo is defined and logo %}{% endif %} + + +
{{ logo.alt|escape('html_attr') }}

{{ site }}

+ {% block content %}{% endblock %} + {% if copy is defined and copy %} + + + + + + {% endif %} +{% endblock %} diff --git a/templates/mail/recover.html.twig b/templates/mail/recover.html.twig new file mode 100644 index 0000000..8bc591e --- /dev/null +++ b/templates/mail/recover.html.twig @@ -0,0 +1,18 @@ +{% trans_default_domain 'rapsysuser' %} +{% extends '@RapsysUser/mail/_base.html.twig' %} +{% block content %} + + + + + + +
  +

{{ subject }}

+

{% if recipient_name %}{{ 'Hi %recipient_name%,'|trans({'%recipient_name%': recipient_name}) }}{% else %}{% trans %}Hi,{% endtrans %}{% endif %}

+

{{ 'Thanks so much for rejoining %site%:'|trans({'%site%': site}) }}

+

{{ home_url }}

+

{% trans %}To recover your account follow this link:{% endtrans %}

+

{{ recover_url }}

+
 
+{% endblock %} diff --git a/templates/mail/recover.text.twig b/templates/mail/recover.text.twig new file mode 100644 index 0000000..458cc8e --- /dev/null +++ b/templates/mail/recover.text.twig @@ -0,0 +1,17 @@ +{% trans_default_domain 'rapsysuser' %} +{{ subject }} +{% for i in range(1, subject|length) %}={% endfor %} + + +{{ 'Thanks so much for rejoining %site%:'|trans({'%site%': site})|raw }} +{{ home_url }} + +{% trans %}To recover your account follow this link:{% endtrans %} + +{{ recover_url }} +{% if copy is defined and copy %} + +-- + +{{ copy.long }} - {{ copy.short }} +{% endif %} diff --git a/templates/mail/register.html.twig b/templates/mail/register.html.twig new file mode 100644 index 0000000..66fcf2c --- /dev/null +++ b/templates/mail/register.html.twig @@ -0,0 +1,18 @@ +{% trans_default_domain 'rapsysuser' %} +{% extends '@RapsysUser/mail/_base.html.twig' %} +{% block content %} + + + + + + +
  +

{{ subject }}

+

{% if recipient_name %}{{ 'Hi %recipient_name%,'|trans({'%recipient_name%': recipient_name}) }}{% else %}{% trans %}Hi,{% endtrans %}{% endif %}

+

{{ 'Thanks so much for joining %site%:'|trans({'%site%': site}) }}

+

{{ home_url }}

+

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

+

{{ confirm_url }}

+
 
+{% endblock %} diff --git a/templates/mail/register.text.twig b/templates/mail/register.text.twig new file mode 100644 index 0000000..52e8467 --- /dev/null +++ b/templates/mail/register.text.twig @@ -0,0 +1,17 @@ +{% trans_default_domain 'rapsysuser' %} +{{ subject }} +{% for i in range(1, subject|length) %}={% endfor %} + + +{{ 'Thanks so much for joining %site%:'|trans({'%site%': site})|raw }} +{{ home_url }} + +{% trans %}To create your account you must follow this link:{% endtrans %} + +{{ confirm_url }} +{% if copy is defined and copy %} + +-- + +{{ copy.long }} - {{ copy.short }} +{% endif %} diff --git a/templates/recover.html.twig b/templates/recover.html.twig index 3b7dab9..b67177f 100644 --- a/templates/recover.html.twig +++ b/templates/recover.html.twig @@ -1,28 +1,25 @@ -{% extends '@RapsysUser/base.html.twig' %} +{% trans_default_domain 'rapsysuser' %} +{% extends '@RapsysUser/_base.html.twig' %} {% block content %}

{{ title }}

- {% if sent %} -

{% trans from "rapsysuser" %}Your recover account message has been sent{% endtrans %}

- {% else %} - {{ form_start(recover) }} -
- {% if recover.mail is defined %} - {{ form_row(recover.mail) }} - {% endif %} + {{ form_start(recover) }} +
+ {% if recover.mail is defined %} + {{ form_row(recover.mail) }} + {% endif %} - {% if recover.password is defined %} - {{ form_row(recover.password) }} - {% endif %} + {% if recover.password is defined %} + {{ form_row(recover.password) }} + {% endif %} - {{ form_row(recover.submit) }} -
+ {{ form_row(recover.submit) }} +
- {# Render CSRF token etc .#} -
{{ form_rest(recover) }}
- {{ form_end(recover) }} - {% endif %} + {# Render CSRF token etc .#} +
{{ form_rest(recover) }}
+ {{ form_end(recover) }}
{% endblock %} diff --git a/templates/register.html.twig b/templates/register.html.twig index 222c90c..df83ac2 100644 --- a/templates/register.html.twig +++ b/templates/register.html.twig @@ -1,14 +1,12 @@ -{% extends '@RapsysUser/base.html.twig' %} +{% trans_default_domain 'rapsysuser' %} +{% extends '@RapsysUser/_base.html.twig' %} {% block content %}

{{ title }}

{% if disabled is defined and disabled %} -

{% trans from "rapsysuser" %}Your account has been disabled{% endtrans %}

- {% elseif sent is defined and sent %} -

{% trans from "rapsysuser" %}Your verification mail has been sent, to activate your account you must follow the confirmation link inside{% endtrans %}

-

{% trans from "rapsysuser" %}If you did not receive a verification mail, check your Spam or Junk mail folders{% endtrans %}

+

{% trans %}Your account has been disabled{% endtrans %}

{% else %} {{ form_start(register) }} {% if register.mail is defined %} -- 2.41.1