require actual password for change + insert link in menu

This commit is contained in:
2018-08-16 13:41:32 +02:00
parent af803cc87d
commit 5b1ba71a8a
9 changed files with 169 additions and 36 deletions

View File

@@ -79,6 +79,6 @@ login_check:
logout:
path: /logout
password:
path: /password
change_my_password:
path: /{_locale}/password/edit
defaults: { _controller: ChillMainBundle:Password:userPassword }

View File

@@ -4,3 +4,9 @@ services:
autowire: true
resource: '../../../Controller'
tags: ['controller.service_arguments']
Chill\MainBundle\Controller\PasswordController:
autowire: true
arguments:
$chillLogger: '@monolog.logger.chill'
tags: ['controller.service_arguments']

View File

@@ -123,5 +123,12 @@ services:
class: Chill\MainBundle\Form\AdvancedSearchType
arguments:
- "@chill.main.search_provider"
tags:
- { name: form.type }
Chill\MainBundle\Form\UserPasswordType:
arguments:
$chillLogger: '@monolog.logger.chill'
$passwordEncoder: '@Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface'
tags:
- { name: form.type }

View File

@@ -1,5 +1,7 @@
services:
Chill\MainBundle\Routing\MenuBuilder\UserMenuBuilder:
arguments:
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
tags:
- { name: 'chill.menu_builder' }

View File

@@ -187,4 +187,8 @@ Choose the format: Choisir le format
# select2
'select2.no_results': Aucun résultat
'select2.error_loading': Erreur de chargement des résultats
'select2.searching': Recherche en cours...
'select2.searching': Recherche en cours...
# page changement mot de passe
Change my password: Modification du mot de passe
Your actual password: Mot de passe actuel

View File

@@ -23,12 +23,22 @@
{% block title %}{{"Change my password"|trans}}{% endblock %}
{% block content %}
<div class="grid-10 grid-mobile-10 grid-tablet-10 centered">
<h1>{{ 'Choose a new password'|trans }}</h1>
<h1>{{ 'Change my password'|trans }}</h1>
{{ form_start(form) }}
{{ form_row(form.password) }}
{{ form_widget(form.submit, { 'attr': { 'class': 'sc-button orange' } } ) }}
{{ form_end(form) }}
{{ form_start(form) }}
{{ form_row(form.actual_password) }}
{{ form_row(form.new_password) }}
<ul class="record_actions">
<li>
{{ form_widget(form.submit, { 'attr': { 'class': 'sc-button orange' } } ) }}
</li>
</ul>
{{ form_end(form) }}
</div>
{% endblock %}