From e852a2b3581c5a56ccc7aa66066662b54929a2b3 Mon Sep 17 00:00:00 2001 From: borissedw Date: Wed, 30 Aug 2023 15:03:27 +0300 Subject: [PATCH] 0.0.207 --- static/js/user_profile.js | 6 ++-- .../blocks/profile/b_subscribe_variants.html | 33 +++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/static/js/user_profile.js b/static/js/user_profile.js index e4403ea..46a91f8 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -62,9 +62,10 @@ function technicalSupport(el){ }); } function mySubscription(el){ + // boris changed $.ajax({ headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, - url: '/ru/user_account/subscribe/', + url: '/ru/subscribes/show_cur_subscribe/', type: "POST", // async: true, cache: false, @@ -76,9 +77,10 @@ function mySubscription(el){ if (data.user_alerts) { getNewMessageSession() } + document.querySelector(".info_profile").innerHTML = data.html; // location.href = '/profile' - document.querySelector(".info_profile").innerHTML = data.html; + // document.querySelector(".info_profile").innerHTML = data.html; let list_div = document.querySelectorAll('.menu_profile div'); list_div.forEach(el=>{ el.classList.remove('selected'); }); diff --git a/templates/blocks/profile/b_subscribe_variants.html b/templates/blocks/profile/b_subscribe_variants.html index d5a28be..bda72e3 100644 --- a/templates/blocks/profile/b_subscribe_variants.html +++ b/templates/blocks/profile/b_subscribe_variants.html @@ -17,6 +17,39 @@ +{% for subscribe in subscribes %} +
+
+
+ {{ subscribe.name }} +
+
+ {{ subscribe.price }} +
+
+ Период: {{ subscribe.period_name }} +
+
+
+
+ Опции: +
+
+
    + {% for opt in subscribe.options.all %} +
  • {{ opt.name }}
  • + {% endfor %} + + +
+
+
+
+ +
+
+{% endfor %} +