Compare commits
2 Commits
87f67aa24a
...
5a16466766
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a16466766 | |||
| 4b0c923ec0 |
@@ -3382,6 +3382,11 @@ details[open] summary ~ *{
|
||||
display: none;
|
||||
}
|
||||
|
||||
input.error::placeholder {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user