0.0.76 add btn profile
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
function SendLoginForm(el){
|
||||
|
||||
event.preventDefault()
|
||||
let form = el.form;
|
||||
let formData = new FormData(form);
|
||||
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/login/',
|
||||
@@ -16,6 +20,13 @@ function SendLoginForm(el){
|
||||
success: function(data){
|
||||
|
||||
location.href = '/profile'
|
||||
// let profile_btn = document.createElement("a");
|
||||
// profile_btn.classList.add("profile_button");
|
||||
// profile_btn.innerText = "Профиль";
|
||||
// let reg_btn = document.querySelector(".registration_button");
|
||||
// let replace_btn = reg_btn.parentNode;
|
||||
// replace_btn.replaceChild(profile_btn, reg_btn);
|
||||
|
||||
},
|
||||
error: function (data, exception){
|
||||
document.querySelector(".login").innerHTML = data.responseJSON.html
|
||||
|
||||
Reference in New Issue
Block a user