diff --git a/static/js/user_profile_2.js b/static/js/user_profile_2.js index ca53a53..9b21eaa 100644 --- a/static/js/user_profile_2.js +++ b/static/js/user_profile_2.js @@ -750,31 +750,35 @@ function sendMessageEnter (e,id_ticket,sender,receiver){ } } -function send_subscribe (id){ - let data = { - 'subscribe_id':id - } - $.ajax({ - headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, - url: '/subscribes/subscribe_now/', - type: "POST", - // async: true, - cache: false, - processData: false, - contentType: false, - // enctype: 'json', - data: JSON.stringify(data), - success: function(data){ - - document.querySelector(".info_profile").innerHTML = data.html; - - }, - error: function (data){ - - document.querySelector(".info_profile").innerHTML = data.responseJSON.html; - +function send_subscribe (id,for_movers,subscribe){ + if (!for_movers) { + let data = { + 'subscribe_id': id } - }); + $.ajax({ + headers: {"X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val()}, + url: '/subscribes/subscribe_now/', + type: "POST", + // async: true, + cache: false, + processData: false, + contentType: false, + // enctype: 'json', + data: JSON.stringify(data), + success: function (data) { + + document.querySelector(".info_profile").innerHTML = data.html; + + }, + error: function (data) { + + document.querySelector(".info_profile").innerHTML = data.responseJSON.html; + + } + }); + } else { + window.location = subscribe + } } var last_open_curtain = null diff --git a/templates/blocks/profile/b_buttons_menu_profile.html b/templates/blocks/profile/b_buttons_menu_profile.html index 94a20bd..dc2e486 100644 --- a/templates/blocks/profile/b_buttons_menu_profile.html +++ b/templates/blocks/profile/b_buttons_menu_profile.html @@ -109,7 +109,7 @@ {# class="selected"#} {# {% endif %}>#} {# #} -{# Моя подписка#} +{# Моя подписка#} {# #} {# {% translate "Период" %}: {{ item.period_name }} - + {% endif %} diff --git a/templates/blocks/profile/b_subscribe_variants.html b/templates/blocks/profile/b_subscribe_variants.html index 458f76d..45c767d 100644 --- a/templates/blocks/profile/b_subscribe_variants.html +++ b/templates/blocks/profile/b_subscribe_variants.html @@ -54,7 +54,7 @@
- +
*{% translate "для отмены подписки создайте запрос в техподдержке" %}
diff --git a/templates/blocks/static_pages_blocks/b_mover_search.html b/templates/blocks/static_pages_blocks/b_mover_search.html index e82b4dc..f3946b7 100644 --- a/templates/blocks/static_pages_blocks/b_mover_search.html +++ b/templates/blocks/static_pages_blocks/b_mover_search.html @@ -188,7 +188,7 @@
- +
*{% translate "для отмены подписки создайте запрос в техподдержке" %}