diff --git a/static/js/user_profile(boris).js b/static/js/user_profile(boris).js index 7ba5905..41716a0 100644 --- a/static/js/user_profile(boris).js +++ b/static/js/user_profile(boris).js @@ -209,12 +209,12 @@ function sendMessage(id_ticket=null,sender,receiver){ data: JSON.stringify(data), success: function(data){ - document.querySelector(".info_profile").innerHTML = data.html; + document.querySelector(".container-messages").innerHTML = data.html; }, error: function (data){ - document.querySelector(".info_profile").innerHTML = data.responseJSON.error; + document.querySelector(".container-messages").innerHTML = data.responseJSON.error; } }); diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 899e7c6..4fdf066 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -21,6 +21,8 @@ function writeMessage(){ } }); } + + function technicalSupport(){ $.ajax({ headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, diff --git a/templates/blocks/profile/b_chats.html b/templates/blocks/profile/b_chats.html index 310df78..9004a28 100644 --- a/templates/blocks/profile/b_chats.html +++ b/templates/blocks/profile/b_chats.html @@ -51,15 +51,7 @@ -
- {% if not messages %} - {% include "widgets/w_message.html" %} - {% else %} - {% for msg in messages %} - {% include "widgets/w_message.html" %} - {% endfor %} - {% endif %} -
+ {% include "blocks/profile/b_messages_container.html" %}