This commit is contained in:
SBD
2023-11-25 15:37:37 +03:00
parent 237666d96f
commit 4f2c7aeb2c
2 changed files with 7 additions and 7 deletions

View File

@@ -45,13 +45,13 @@ function select_tab_profile (el,url,owner_type=null) {
let confirm_url_f_lang_ru = ''
let confirm_url_f_lang_en = ''
if (owner_type){
window.history.pushState(null, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`)
confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`
confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`
window.history.pushState(null, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/?mobile=${getInfoAboutUser() === 'mobile'}`)
confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/?mobile=${getInfoAboutUser() === 'mobile'}`
confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/?mobile=${getInfoAboutUser() === 'mobile'}`
} else {
window.history.pushState(null, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(url)}/`)
confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(url)}/`
confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(url)}/`
window.history.pushState(null, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(url)}/?mobile=${getInfoAboutUser() === 'mobile'}`)
confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(url)}/?mobile=${getInfoAboutUser() === 'mobile'}`
confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(url)}/?mobile=${getInfoAboutUser() === 'mobile'}`
}
document.querySelector("#ru_lang").href = confirm_url_f_lang_ru
document.querySelector("#en_lang").href = confirm_url_f_lang_en

View File

@@ -19,7 +19,7 @@
<a href="/profile/logout/" class="text_btn_profile logout">
<span class="logout_span">
{% elif sel_page_name != 'logoout' %}
<a onclick="changeHrefCl()" data-href="{% url "profile_page" sel_page_name %}" class="text_btn_profile">
<a onclick="changeHrefCl(this)" data-href="{% url "profile_page" sel_page_name %}" class="text_btn_profile">
{% endif %}
{% endif %}
{{ title }}