From 022819cbe6c1dc15a4252b1abc6087edde403f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 1 Jul 2026 10:29:30 +0200 Subject: [PATCH] feat: reveal password toggle for login form addresses #869cqrw6w --- .../controllers/password_reveal_controller.js | 11 ++++++++++ .../booking/create/authenticate.html.twig | 22 +++++++++++++------ templates/security/login.html.twig | 22 +++++++++++++------ 3 files changed, 41 insertions(+), 14 deletions(-) create mode 100644 assets/controllers/password_reveal_controller.js diff --git a/assets/controllers/password_reveal_controller.js b/assets/controllers/password_reveal_controller.js new file mode 100644 index 0000000..547ece4 --- /dev/null +++ b/assets/controllers/password_reveal_controller.js @@ -0,0 +1,11 @@ +import { Controller } from '@hotwired/stimulus' + +export default class extends Controller { + + static targets = [ 'field' ] + + toggle() { + let type = this.fieldTarget.getAttribute('type') === 'password' ? 'text' : 'password' + this.fieldTarget.setAttribute('type', type) + } +} diff --git a/templates/booking/create/authenticate.html.twig b/templates/booking/create/authenticate.html.twig index ed05a18..072a91b 100644 --- a/templates/booking/create/authenticate.html.twig +++ b/templates/booking/create/authenticate.html.twig @@ -59,16 +59,24 @@ autocomplete="username"> -
+
- +
+ + +
-
+
- +
+ + +