Merge pull request 'dev' (#34) from dev into main
Reviewed-on: #34
This commit was merged in pull request #34.
This commit is contained in:
@@ -3382,6 +3382,11 @@ details[open] summary ~ *{
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.error::placeholder {
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,22 @@ function SendRegistrationForm(el, user_id){
|
|||||||
|
|
||||||
},
|
},
|
||||||
error: function (data, exception){
|
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