Add files via upload
This commit is contained in:
parent
fa4769d77b
commit
038de91627
@ -22,6 +22,10 @@ $(document).ready(function() {
|
||||
$("#passInvalid").hide();
|
||||
$("#passWarning").hide();
|
||||
|
||||
//Iconos para validar que las contraseñas coindicen:
|
||||
$("#repassValid").hide();
|
||||
$("#repassInvalid").hide();
|
||||
|
||||
//Comprueba que el nombre de usuario introducido para el login, exista.
|
||||
$("#name").change(function(){
|
||||
var url = "../assets/php/common/checkUser.php?user=" + $("#name").val();
|
||||
@ -66,6 +70,24 @@ $(document).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
//Comprueba que las contraseñas sean iguales.
|
||||
$("#repass").change(function(){
|
||||
const fieldPass = $("#new_pass");
|
||||
const fieldRepass = $("#repass");
|
||||
fieldRepass[0].setCustomValidity("");
|
||||
|
||||
if (Object.is(fieldPass.val(), fieldRepass.val())) {
|
||||
$("#repassValid").show();
|
||||
$("#repassInvalid").hide();
|
||||
fieldRepass[0].setCustomValidity("");
|
||||
} else {
|
||||
$("#repassValid").hide();
|
||||
$("#repassInvalid").show();
|
||||
fieldRepass[0].setCustomValidity("Las contraseñas deben coincidir.");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//Muestra si el nombre de usuario introducido para el login existe o no.
|
||||
function userLoginCheck(data, status) {
|
||||
const fieldLogin = $("#name");
|
||||
|
@ -26,6 +26,7 @@ class FormChangePass extends Form {
|
||||
<input type='password' name='new_pass' id='new_pass' value='' placeholder='Nueva Contraseña' required/><pre>".$errorPassword."</pre>
|
||||
<span id='passValid'>✔</span><span id='passWarning'>⚠</span></span><span id='passInvalid'>❌</span>
|
||||
<input type='password' name='repass' id='repass' value='' placeholder='Repita la nueva contraseña' required/><pre>".$errorPassword2."</pre>
|
||||
<span id='repassValid'>✔</span></span><span id='repassInvalid'>❌</span>
|
||||
</fieldset>
|
||||
<div class='actions'>
|
||||
<input type='submit' id='submit' value='Cambiar Contraseña' class='primary' />
|
||||
|
@ -27,8 +27,9 @@ class FormDeleteAccount extends Form {
|
||||
<legend>Datos de la cuenta</legend>
|
||||
<input type='text' name='name' id='name' value='' placeholder='Nombre de usuario' required/><pre>".$errorNombre."</pre>
|
||||
<input type='text' name='email' id='email' value='' placeholder='Email de usuario' required/><pre>".$errorEmail."</pre>
|
||||
<input type='password' name='pass' id='pass' value='' placeholder='Contraseña' required/><pre>".$errorPassword."</pre>
|
||||
<input type='password' name='pass' id='new_pass' value='' placeholder='Contraseña' required/><pre>".$errorPassword."</pre>
|
||||
<input type='password' name='repass' id='repass' value='' placeholder='Repita la contraseña' required/><pre>".$errorPassword2."</pre>
|
||||
<span id='repassValid'>✔</span></span><span id='repassInvalid'>❌</span>
|
||||
</fieldset>
|
||||
<div class='verify'>
|
||||
<input type='checkbox' id='checkbox' name='verify' required>
|
||||
|
@ -38,6 +38,7 @@ class FormRegister extends Form {
|
||||
<input type='password' name='new_pass' id='new_pass' value='' placeholder='Contraseña' required/><pre>".$errorPassword."</pre>
|
||||
<span id='passValid'>✔</span><span id='passWarning'>⚠</span></span><span id='passInvalid'>❌</span>
|
||||
<input type='password' name='repass' id='repass' value='' placeholder='Repita la contraseña' required/><pre>".$errorPassword2."</pre>
|
||||
<span id='repassValid'>✔</span></span><span id='repassInvalid'>❌</span>
|
||||
</fieldset>
|
||||
<div class='verify'>
|
||||
<input type='checkbox' id='checkbox' name='terms' required>
|
||||
|
Loading…
Reference in New Issue
Block a user