mirror of
https://github.com/EDeev/deev.space.git
synced 2026-06-15 11:01:10 +03:00
v. 1.4
This commit is contained in:
parent
b6da1682fa
commit
34ee8ee686
3 changed files with 61 additions and 1 deletions
|
|
@ -384,7 +384,8 @@ def register_view(request):
|
|||
|
||||
return render(request, 'auth/register.html', {
|
||||
'form': form,
|
||||
'page_title': 'Регистрация — deev.space'
|
||||
'page_title': 'Регистрация — deev.space',
|
||||
'smartcaptcha_client_key': settings.SMARTCAPTCHA_CLIENT_KEY
|
||||
})
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -475,3 +475,42 @@ textarea.form-control {
|
|||
.empty-state p {
|
||||
margin-bottom: var(--space-lg);
|
||||
}
|
||||
|
||||
/* Password Toggle Button */
|
||||
.password-input-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.password-input-wrapper .form-control {
|
||||
padding-right: 3rem;
|
||||
}
|
||||
|
||||
.password-toggle {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 3rem;
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: var(--transition);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.password-toggle:hover {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.password-toggle:focus {
|
||||
outline: none;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.password-toggle i {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
|
@ -549,4 +549,24 @@
|
|||
});
|
||||
}
|
||||
|
||||
// ===== Password Visibility Toggle =====
|
||||
window.togglePasswordVisibility = function(inputId, button) {
|
||||
const input = document.getElementById(inputId);
|
||||
const icon = button.querySelector('i');
|
||||
|
||||
if (!input) return;
|
||||
|
||||
if (input.type === 'password') {
|
||||
input.type = 'text';
|
||||
icon.classList.remove('fa-eye');
|
||||
icon.classList.add('fa-eye-slash');
|
||||
button.setAttribute('aria-label', 'Скрыть пароль');
|
||||
} else {
|
||||
input.type = 'password';
|
||||
icon.classList.remove('fa-eye-slash');
|
||||
icon.classList.add('fa-eye');
|
||||
button.setAttribute('aria-label', 'Показать пароль');
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
Loading…
Add table
Reference in a new issue