diff --git a/static/js/user_profile_2.js b/static/js/user_profile_2.js index ab6b4f7..fa25420 100644 --- a/static/js/user_profile_2.js +++ b/static/js/user_profile_2.js @@ -9,7 +9,7 @@ profile_tabs_f_static_map = new Map([ ['dashboard','dashboard'] ]) -function select_tab_profile (el,url,owner_type=null) { +function select_tab_profile (el,url,owner_type=null, check_orders_required) { let data = {} let confirm_url = `/user_account/${url}/` if (url.includes('subscribe')){ @@ -20,7 +20,12 @@ function select_tab_profile (el,url,owner_type=null) { } } else if (url.includes('get_routes')){ confirm_url = `/routes/${url}/` + } else if(url.includes('my_subscribe')){ + data = { + 'check_orders_required': check_orders_required + } } + if (window.location.href.includes("profile")){ document.querySelector(".info_profile").innerHTML = '' } @@ -95,8 +100,9 @@ function select_tab_profile (el,url,owner_type=null) { } } } - if(window.location.href.includes("my_subscribe") && data.check_orders_required === true) { - select_tab_profile() + if(window.location.href.includes("my_subscribe") ) { + select_tab_profile(el,url,owner_type=null, data.check_orders_required ) + return } setCokie(365,'twb_new_messages','false') @@ -754,7 +760,7 @@ function sendMessageEnter (e,id_ticket,sender,receiver){ } } -function send_subscribe (id,for_movers,subscribe){ +function send_subscribe (id, for_movers, subscribe){ if (!for_movers) { let data = { 'subscribe_id': id diff --git a/templates/blocks/profile/b_profile.html b/templates/blocks/profile/b_profile.html index 121c57c..902499d 100644 --- a/templates/blocks/profile/b_profile.html +++ b/templates/blocks/profile/b_profile.html @@ -16,7 +16,7 @@
{% translate "Текущая подписка:" %}
{% if user_subscribe.subscribe.name %}{{ user_subscribe.subscribe.name }}{% else %}{% translate "Нет активных подписок" %}{% endif %}
-
{% translate "Перейти к подпискам" %}
+
{% translate "Перейти к подпискам" %}
diff --git a/templates/blocks/profile/b_profile_first_page.html b/templates/blocks/profile/b_profile_first_page.html index d60f477..7b3f079 100644 --- a/templates/blocks/profile/b_profile_first_page.html +++ b/templates/blocks/profile/b_profile_first_page.html @@ -23,6 +23,6 @@
{% translate "Если у Вас возникнут вопросы Вы можете связаться с нами:" %} support@twb.com
{% blocktrans %}У Вас {{ unanswered_msgs_count }} новых сообщений{% endblocktrans %} - {% translate "Посмотреть" %} + {% translate "Посмотреть" %}
{#
{% translate "Хотите получать уведомление о появлении посылок?" %} {% translate "Заполните форму" %}
#} \ No newline at end of file diff --git a/templates/widgets/profile/w_button_for_profile_menu.html b/templates/widgets/profile/w_button_for_profile_menu.html index 4d28593..a656f19 100644 --- a/templates/widgets/profile/w_button_for_profile_menu.html +++ b/templates/widgets/profile/w_button_for_profile_menu.html @@ -1,6 +1,6 @@