1.2.6 password recovery TRI-108
This commit is contained in:
@@ -1303,7 +1303,8 @@ section.login>form {
|
||||
color: rgba(39, 36, 36, 0.60);
|
||||
}
|
||||
.call_to_reg {
|
||||
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
color: rgba(39, 36, 36, 0.60);
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
@@ -3365,6 +3366,16 @@ details[open] summary ~ *{
|
||||
|
||||
/*END news articles all*/
|
||||
|
||||
.login_form.hide{
|
||||
display: none;
|
||||
}
|
||||
.password_recovery{
|
||||
display: none;
|
||||
}
|
||||
.password_recovery.show{
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,14 +3,18 @@ function SendLoginForm(el){
|
||||
event.preventDefault()
|
||||
let form = el.form;
|
||||
let formData = new FormData(form);
|
||||
let msr = sessionStorage.getItem('mailingSubscribeRequired')
|
||||
formData.set('mailingSubscribeRequired',msr)
|
||||
let url = '/user_account/password_recovery/'
|
||||
if(!el.classList.contains('recovery')){
|
||||
url = '/user_account/login/'
|
||||
let msr = sessionStorage.getItem('mailingSubscribeRequired')
|
||||
formData.set('mailingSubscribeRequired',msr)
|
||||
}
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/user_account/login/',
|
||||
url: url,
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
function SendRegistrationForm(el){
|
||||
function SendRegistrationForm(el, user_id){
|
||||
event.preventDefault()
|
||||
let form = el.form;
|
||||
let formData = new FormData(form);
|
||||
let msr = sessionStorage.getItem('mailingSubscribeRequired')
|
||||
formData.set('mailingSubscribeRequired',msr)
|
||||
let url = '/user_account/password_recovery_confirm/'
|
||||
formData.set('user_id', user_id)
|
||||
if(!el.classList.contains('recovery')){
|
||||
url = '/user_account/registration/';
|
||||
let msr = sessionStorage.getItem('mailingSubscribeRequired')
|
||||
formData.set('mailingSubscribeRequired',msr)
|
||||
}
|
||||
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/user_account/registration/',
|
||||
url: url,
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -16,6 +22,9 @@ function SendRegistrationForm(el){
|
||||
// enctype: 'json',
|
||||
data: formData,
|
||||
success: function(data){
|
||||
|
||||
document.getElementById('confirm_password').innerHTML = data.message
|
||||
|
||||
document.querySelector('.info_text').classList.add('show')
|
||||
// location.href = `/profile/page/dashboard/`
|
||||
window.sessionStorage.removeItem('mailingSubscribeRequired')
|
||||
|
||||
@@ -1395,6 +1395,13 @@ function showTabBtn(el) {
|
||||
|
||||
}
|
||||
|
||||
function showForm(){
|
||||
let hide_form = document.getElementsByClassName('login_form')
|
||||
let show_form = document.getElementsByClassName('password_recovery')
|
||||
hide_form[0].classList.add('hide')
|
||||
show_form[0].classList.add('show')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user