1.2.6 password recovery TRI-108

This commit is contained in:
2024-09-23 16:02:27 +03:00
parent 86d78fdd06
commit b4beac26a7
5 changed files with 33 additions and 20 deletions

View File

@@ -9,6 +9,7 @@ function SendLoginForm(el){
let msr = sessionStorage.getItem('mailingSubscribeRequired')
formData.set('mailingSubscribeRequired',msr)
}
document.getElementsByClassName('recovery')[0].classList.add('hide')
@@ -25,20 +26,21 @@ function SendLoginForm(el){
success: function(data){
location.href = data.redirect_url//`/profile/page/dashboard/`
window.sessionStorage.removeItem('mailingSubscribeRequired')
window.sessionStorage.removeItem('email')
if(url === '/user_account/login/'){
location.href = data.redirect_url//`/profile/page/dashboard/`
window.sessionStorage.removeItem('mailingSubscribeRequired')
window.sessionStorage.removeItem('email')
} else if(url === '/user_account/password_recovery/'){
document.getElementById('password_recovery').innerHTML = data.message
}
},
error: function (data, exception){
document.querySelector(".login").innerHTML = data.responseJSON.html
document.getElementsByClassName('recovery')[0].classList.remove('hide')
}
});
}

View File

@@ -1396,8 +1396,8 @@ function showTabBtn(el) {
}
function showForm(){
let hide_form = document.getElementsByClassName('login_form')
let show_form = document.getElementsByClassName('password_recovery')
let hide_form = document.getElementsByClassName('login')
let show_form = document.getElementsByClassName('recovery_pas')
hide_form[0].classList.add('hide')
show_form[0].classList.add('show')
}