diff --git a/composer.json b/composer.json
index 7424b4d0..ce25dc8f 100644
--- a/composer.json
+++ b/composer.json
@@ -33,7 +33,8 @@
"knplabs/knp-menu-bundle": "^3.0"
},
"suggest" : {
- "knplabs/knp-menu-bundle" : "Allows easy menu integration"
+ "knplabs/knp-menu-bundle" : "Allows easy menu integration",
+ "symfonycasts/reset-password-bundle" : "Includes all Symfony logic to reset user password"
},
"autoload": {
"psr-4": {
diff --git a/docs/index.md b/docs/index.md
index 8e0b414d..b863fe7f 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -9,6 +9,7 @@ If you cannot find the needed information in this list of topics, please create
* [Override theme](override_theme.md)
* [Access bundle configuration](twig-context.md)
* [Customizing forms](form_theme.md)
+* [Reset password templates](reset_password_pages.md)
Components (Twig macros):
diff --git a/docs/reset_password_pages.md b/docs/reset_password_pages.md
new file mode 100644
index 00000000..3405bc73
--- /dev/null
+++ b/docs/reset_password_pages.md
@@ -0,0 +1,43 @@
+## How it was made
+
+3 pre-implemented layouts are available for the `reset-password` form.
+
+There are inspired by `symfonycasts/reset-password-bundle@1.11`.
+See here: https://github.com/SymfonyCasts/reset-password-bundle
+
+Filenames and variables/forms name follows what `reset-password-bundle` as generated by default.
+You can of course override everything if needed.
+
+## Using the layout
+
+In order to use the layouts,
+you should extend the one you want from `@Tabler/security/reset_password/`:
+- check-email.html.twig
+- request.html.twig
+- reset.html.twig
+
+Here's an example for the reset request form with the email input.
+```twig
+{% extends '@Tabler/security/reset_password/request.html.twig' %}
+
+{% block logo_login %}
+
+
+
+{% endblock %}
+```
+
+### Extra
+
+You shouldn't directly extend `@Tabler\security\reset_password\_layout.html.twig`,
+it's only there to emptying the `login_social_auth` block, and add the flash errors.
+
+If you want to make your own template with that base, you can.
+
+## Layout blocks
+
+TODO explain blocks
+
+## Next steps
+
+Please go back to the [Tabler bundle documentation](README.md) to find out more about using the theme.
diff --git a/templates/security.html.twig b/templates/security.html.twig
index 3741754a..789f39ed 100644
--- a/templates/security.html.twig
+++ b/templates/security.html.twig
@@ -20,7 +20,7 @@
{% block container_before %}{% endblock %}
+ {{ 'If an account matching your email exists, then an email was just sent that contains a link that you can use to reset your password. This link will expire in %expirationMessage%.' | trans({'%expirationMessage%' : expirationMessage}, 'TablerBundle') }} +
+{{ "If you don't receive an email please check your spam folder or"|trans({}, 'TablerBundle') }} {{ 'Try again'|trans({}, 'TablerBundle') }}.
+{% endblock %} diff --git a/templates/security/reset_password/request.html.twig b/templates/security/reset_password/request.html.twig new file mode 100644 index 00000000..ce188d8e --- /dev/null +++ b/templates/security/reset_password/request.html.twig @@ -0,0 +1,38 @@ +{% extends '@Tabler/security/reset_password/_layout.html.twig' %} +{% from '@Tabler/components/buttons.html.twig' import submit_button %} + +{% block title %} + {{ 'I forgot my password'|trans({}, 'TablerBundle') }} +{% endblock %} + +{% block login_box_msg %} + {{ 'I forgot my password'|trans({}, 'TablerBundle') }} +{% endblock %} + +{% block login_form %} + {% block request_help %} +{{ 'Enter your email address and you will be emailed a link that allows to reset your password'|trans({}, 'TablerBundle') }}
+ {% endblock %} + + {{ form_start(requestForm) }} + + {{ form_row(requestForm.email) }} + + + + {{ form_end(requestForm) }} +{% endblock %} + +{% block login_actions %} + +{% endblock %} diff --git a/templates/security/reset_password/reset.html.twig b/templates/security/reset_password/reset.html.twig new file mode 100644 index 00000000..5b1d4e06 --- /dev/null +++ b/templates/security/reset_password/reset.html.twig @@ -0,0 +1,26 @@ +{% extends '@Tabler/security/reset_password/_layout.html.twig' %} +{% from '@Tabler/components/buttons.html.twig' import submit_button %} + +{% block title %} + {{ 'Reset your password'|trans({}, 'TablerBundle') }} +{% endblock %} + +{% block login_box_msg %} + {{ 'Reset your password'|trans({}, 'TablerBundle') }} +{% endblock %} + +{% block login_form %} + {{ form_start(resetForm) }} + + {{ form_row(resetForm.plainPassword) }} + + + + {{ form_end(resetForm) }} +{% endblock %} diff --git a/translations/TablerBundle.de.xlf b/translations/TablerBundle.de.xlf index 6051cb9c..a968264b 100644 --- a/translations/TablerBundle.de.xlf +++ b/translations/TablerBundle.de.xlf @@ -146,6 +146,26 @@