Skip to content

Commit 018eebc

Browse files
committed
minor #1384 Tweak the password field (javiereguiluz)
This PR was merged into the main branch. Discussion ---------- Tweak the password field This tweaks the #1284 feature by changing the button that reveals the password. Instead of an independent button, I propose to integrate it right inside the password field, which I think it's a more common practice: ![password-field](https://user-images.githubusercontent.com/73419/208960860-987eebb0-205e-4746-85ff-9fc2a5fa621e.gif) Commits ------- 1d779cf Tweak the password field
2 parents e4dd387 + 1d779cf commit 018eebc

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

assets/styles/app.scss

+16
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,22 @@ body#login #login-users-help p .console {
253253
padding: 10px
254254
}
255255

256+
body#login .form-group-password {
257+
position: relative;
258+
259+
input { padding-right: 48px; }
260+
button {
261+
background: transparent;
262+
border: 0;
263+
color: #2C3E50;
264+
height: 45px;
265+
outline: 0;
266+
position: absolute;
267+
bottom: 0;
268+
right: 0;
269+
}
270+
}
271+
256272
/* Common Blog page elements
257273
------------------------------------------------------------------------- */
258274
.post-metadata {

public/build/app.fd6de4a2.css public/build/app.041f0894.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/entrypoints.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"css": [
1212
"/build/523.af638d6a.css",
13-
"/build/app.fd6de4a2.css"
13+
"/build/app.041f0894.css"
1414
]
1515
},
1616
"admin": {
@@ -41,7 +41,7 @@
4141
"/build/523.4e56168f.js": "sha384-RhWg+IG69qzBiXWLeR1y4zDAUKShELmPhW/ljLkM6dvDAAAZ8G53S8eSfJCD2ysh",
4242
"/build/app.6d6d5305.js": "sha384-66G5BXqY9YPdbY6X74e9zhtxcrcsuI+ZNgwcalqQZjApTspsa6tttO/m6/5Q9qeH",
4343
"/build/523.af638d6a.css": "sha384-v8JR3eGGaAt4v00TVoQw8eXVP3VII6ELEb0ICEiZiWCQAjSLBhTjjvJI3OD6dM8l",
44-
"/build/app.fd6de4a2.css": "sha384-kEXfKrysXeUZF5tX/t9lBCeEcxwnMDPu3uRzDpt9R+nWzOc/7Ee/9NpqcqUlMf4C",
44+
"/build/app.041f0894.css": "sha384-OSx4GHdlkv4D/Zum3kIF+q8gdjuBkPD9rZfVN8PYGvr3hXjbYkkcstKDpePPLv2v",
4545
"/build/919.08dbe796.js": "sha384-dzi3OjmstJUAQWj6dVwXZ9S9bOiSC65gm5bBaUjl3cpEPNNjo0m6SW14cdB0+Xma",
4646
"/build/admin.01a1ae56.js": "sha384-LOSDVRmGz+4BPOMk0InaJfGREPO4tBFmPzWApnJ4uvuiAxf4BfnDh43JkIewAm8T",
4747
"/build/admin.4e2dcc67.css": "sha384-ijpylu55+5LEOVSzTnWBeA7JuRKZ1HWi4TiJBM6Uil3h7FjmwVjUK8hN86UU1nOj",

public/build/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"build/app.css": "/build/app.fd6de4a2.css",
2+
"build/app.css": "/build/app.041f0894.css",
33
"build/app.js": "/build/app.6d6d5305.js",
44
"build/admin.css": "/build/admin.4e2dcc67.css",
55
"build/admin.js": "/build/admin.01a1ae56.js",

templates/security/login.html.twig

+4-8
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,13 @@
2525
<label for="username">{{ 'label.username'|trans }}</label>
2626
<input type="text" id="username" name="_username" value="{{ last_username }}" class="form-control" {{ stimulus_target('login', 'username') }} />
2727
</div>
28-
<div class="form-group">
28+
29+
<div class="form-group form-group-password">
2930
<label for="password">{{ 'label.password'|trans }}</label>
3031
<input type="password" id="password" name="_password" class="form-control" {{ stimulus_target('login', 'password') }} />
32+
<button class="btn btn-primary pull-right" type="button" {{ stimulus_action('login', 'togglePasswordInputType') }}><i class="fa fa-eye"></i></button>
3133
</div>
32-
<button class="btn btn-primary pull-right" type="button" {{ stimulus_action('login', 'togglePasswordInputType') }}><i class="fa fa-eye"></i></button>
33-
<div class="form-group">
34-
<label>
35-
<input type="checkbox" name="_remember_me" checked/>
36-
Keep me logged in
37-
</label>
38-
</div>
34+
3935
<div class="form-group">
4036
<label>
4137
<input type="checkbox" name="_remember_me" checked/>

0 commit comments

Comments
 (0)