Код: Выделить всё
Password
[i] control {{$errors->has('password')?'error':''}}" placeholder="Enter your password" />
[/i]
[i][/i]
{!!$errors->first('password', ':message')!!}
[/b]
< /code>
.form-control {
width: 100%;
padding: 0.8rem 1rem 0.8rem 2.8rem;
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 10px;
background: rgba(255, 255, 255, 0.8);
font-size: 1rem;
transition: var(--transition);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}
.password-toggle {
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
color: #aaa;
transition: var(--transition);
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
}
< /code>
$("#togglePassword").click(function() {
var passwordInput = $("#password");
var icon = $(this).find("i");
if (passwordInput.attr("type") === "password") {
passwordInput.attr("type", "text");
icon.removeClass("fa-eye").addClass("fa-eye-slash");
} else {
passwordInput.attr("type", "password");
icon.removeClass("fa-eye-slash").addClass("fa-eye");
}
});
Подробнее здесь: https://stackoverflow.com/questions/796 ... -other-one