Test change password with flash message
This commit is contained in:
parent
b3585047be
commit
1d5278eb06
@ -15,4 +15,12 @@ class ProfileController extends AbstractController
|
|||||||
'controller_name' => 'ProfileController',
|
'controller_name' => 'ProfileController',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[Route('/changepasswd', name: 'app_change_passwd')]
|
||||||
|
public function changePassword(): Response
|
||||||
|
{
|
||||||
|
$this->addFlash('notice', 'Password successfully updated');
|
||||||
|
|
||||||
|
return $this->redirectToRoute('app_profile');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card ml-6 content">
|
<div class="card ml-6 content">
|
||||||
<form class="card-content" id="change-password">
|
{% for message in app.flashes('notice') %}
|
||||||
|
<article class="message is-success">
|
||||||
|
<div class="message-body">{{ message }}</div>
|
||||||
|
</article>
|
||||||
|
{% endfor %}
|
||||||
|
<form class="card-content" id="change-password" method="post" action="{{ path('app_change_passwd') }}">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<h3 class="is-size-4 has-text-centered">Change password</h3>
|
<h3 class="is-size-4 has-text-centered">Change password</h3>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user