1.3.6 recovery password TRI-261

This commit is contained in:
2024-11-28 13:37:14 +03:00
parent baadc67fcf
commit 4b0c923ec0
2 changed files with 21 additions and 1 deletions

View File

@@ -3382,6 +3382,11 @@ details[open] summary ~ *{
display: none;
}
input.error::placeholder {
color: red;
font-weight: bold;
}

View File

@@ -68,7 +68,22 @@ function SendRegistrationForm(el, user_id){
},
error: function (data, exception){
document.querySelector(".register").innerHTML = data.responseJSON.html
if(data.responseJSON.html){
document.querySelector(".register").innerHTML = data.responseJSON.html
} else if(data.responseJSON.error){
const passwordInput = document.querySelector('input[name="pass"]');
if (passwordInput && data.responseJSON.error) {
passwordInput.placeholder = data.responseJSON.error;
passwordInput.value = '';
passwordInput.classList.add('error');
}
}
}
});
}