From 365165fd4171444860b0ddb4ffd32b5f8ff523d3 Mon Sep 17 00:00:00 2001 From: Tony Air Date: Fri, 15 Jan 2021 00:23:05 +0700 Subject: [PATCH] IMPR: Login form UX improvements --- app/src/Extensions/SiteMemberLoginForm.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/Extensions/SiteMemberLoginForm.php b/app/src/Extensions/SiteMemberLoginForm.php index 3ea9ab1..3405e74 100644 --- a/app/src/Extensions/SiteMemberLoginForm.php +++ b/app/src/Extensions/SiteMemberLoginForm.php @@ -24,12 +24,16 @@ class SiteMemberLoginForm extends MemberLoginForm $email = $fields->fieldByName('Email'); if ($email) { - $email->setAttribute('autocomplete', 'email'); + $email + ->setAttribute('placeholder', 'your@email.com') + ->setAttribute('autocomplete', 'email') + ->setAttribute('type', 'email'); } $pass = $fields->fieldByName('Password'); if($pass) { //$pass->setAttribute('autocomplete', 'current-password'); + $pass->setAttribute('placeholder', '**********'); $pass->setAutofocus(true); }