-
-
Notifications
You must be signed in to change notification settings - Fork 26
Add symfonycasts/reset-password-bundle@1.11 template
#53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cavasinf
wants to merge
35
commits into
kevinpapst:main
Choose a base branch
from
TeamAllsoftware:feature/reset-password
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
abbfa4a
Add `symfonycasts/reset-password-bundle@1.11` template
eb0c257
Update templates/security.html.twig
cavasinf b4eee0e
Re-use existing translations
76b2781
Update link to redo password reset
4843248
Add default titles
5c14296
Add block help request
0807bdb
Fix indents
c3f016e
Add base template for `reset_password` templates
fb0834e
Update DOC
328c8d1
Add french translations
2b61fac
BugFix translation FR
b31899f
Merge branch 'main' into feature/reset-password
106bcc0
Merge branch 'main' into feature/reset-password
0148977
Add more detailed french translations
cavasinf ff46569
Merge branch 'main' into feature/reset-password
cavasinf d72b422
Ranme `base` into `_layout` + use submit button macro
cavasinf bf1f236
Remove unused password-reset html
cavasinf 9b34bae
Rervert BC break from login logo
cavasinf 4f4dfca
Add default english translation
cavasinf cf49f78
Revert "Remove unused password-reset html"
cavasinf 37539d7
Deprecate the `password-reset` template
cavasinf 78d7a9d
Revert delete config option
cavasinf 33a95c6
Revert delete config option
cavasinf f85204b
Add link to doc
cavasinf aafd6fd
Suggest reset-password-bundle
cavasinf 703d23d
Add german translations
cavasinf 2ae492a
`check_email.html.twig` should be `check-email.html.twig`
cavasinf 5681f15
Update DOC
cavasinf 75f60be
Merge branch 'main' into feature/reset-password
cavasinf fbacc9f
Change translation template EN
cavasinf 950b9de
use alert component
cavasinf 4db12a8
Rename `token` to `expirationMessage`
cavasinf 322aa0c
Merge branch 'kevinpapst:main' into feature/reset-password
cavasinf 51d6f3b
Apply suggestion from @kevinpapst
kevinpapst 0faf2c8
Apply suggestion from @kevinpapst
kevinpapst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 %} | ||
| <a href="." class="navbar-brand navbar-brand-autodark"> | ||
| <img src="{{ asset('images/logo.svg') }}" height="36"> | ||
| </a> | ||
| {% 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
|
|
||
| {% extends '@Tabler/security.html.twig' %} | ||
|
|
||
| {% block login_social_auth %}{% endblock %} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| {% extends '@Tabler/security.html.twig' %} | ||
|
|
||
| {% block login_social_auth %}{% endblock %} | ||
|
|
||
| {% block login_box_error %} | ||
| {% from '@Tabler/components/alert.html.twig' import alert %} | ||
| {% for flashError in app.flashes('reset_password_error') %} | ||
| {{ alert({important: true, description : flashError}) }} | ||
| {% endfor %} | ||
| {% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| {% extends '@Tabler/security/reset_password/_layout.html.twig' %} | ||
|
|
||
| {% block title %} | ||
| {{ 'Password Reset Email Sent'|trans({}, 'TablerBundle') }} | ||
| {% endblock %} | ||
|
|
||
| {% block login_box_msg %} | ||
| {{ 'Password Reset Email Sent'|trans({}, 'TablerBundle') }} | ||
| {% endblock %} | ||
|
|
||
| {% block login_form %} | ||
| {% set expirationMessage = resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') %} | ||
| <p> | ||
| {{ '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') }} | ||
| </p> | ||
| <p>{{ "If you don't receive an email please check your spam folder or"|trans({}, 'TablerBundle') }} <a href="{{ path('tabler_password_reset'|tabler_route) }}">{{ 'Try again'|trans({}, 'TablerBundle') }}</a>.</p> | ||
| {% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 %} | ||
| <p class="text-muted mb-4">{{ 'Enter your email address and you will be emailed a link that allows to reset your password'|trans({}, 'TablerBundle') }}</p> | ||
| {% endblock %} | ||
|
|
||
| {{ form_start(requestForm) }} | ||
|
|
||
| {{ form_row(requestForm.email) }} | ||
|
|
||
| <div class="form-footer"> | ||
| {{ submit_button('mail', { | ||
| title : 'Reset your password'|trans({}, 'TablerBundle'), | ||
| class : 'w-100', | ||
| combined : true, | ||
| }, 'primary') }} | ||
| </div> | ||
|
|
||
| {{ form_end(requestForm) }} | ||
| {% endblock %} | ||
|
|
||
| {% block login_actions %} | ||
| <div class="text-center text-muted mt-3"> | ||
| <a href="{{ path('tabler_login'|tabler_route) }}"> | ||
| {{ 'Back to login'|trans({}, 'TablerBundle') }} | ||
| </a> | ||
| </div> | ||
| {% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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) }} | ||
|
|
||
| <div class="form-footer"> | ||
| {{ submit_button(false, { | ||
| title : 'Reset your password'|trans({}, 'TablerBundle'), | ||
| class : 'w-100', | ||
| combined : true, | ||
| }, 'primary') }} | ||
| </div> | ||
|
|
||
| {{ form_end(resetForm) }} | ||
| {% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.