Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -17,7 +17,7 @@ urlpatterns = [
|
|||||||
path('subscribe/', subscribe_ajax, name='subscribe_ajax'),
|
path('subscribe/', subscribe_ajax, name='subscribe_ajax'),
|
||||||
path('new_msg_to_user/', new_msg_to_user_ajax, name='new_msg_to_user' ),
|
path('new_msg_to_user/', new_msg_to_user_ajax, name='new_msg_to_user' ),
|
||||||
|
|
||||||
path('new_msg_to_support/', new_msg_to_support_ajax, name='new_msg_to_support_ajax'),
|
path('support_tickets/', support_tickets_ajax, name='support_tickets_ajax'),
|
||||||
|
|
||||||
|
|
||||||
path('change_profile/', change_profile_ajax, name='change_profile_ajax'),
|
path('change_profile/', change_profile_ajax, name='change_profile_ajax'),
|
||||||
|
|||||||
@@ -36,20 +36,18 @@ def new_msg_to_user_ajax(request):
|
|||||||
return JsonResponse({'html': html}, status=200)
|
return JsonResponse({'html': html}, status=200)
|
||||||
|
|
||||||
@login_required(login_url='/profile/login/')
|
@login_required(login_url='/profile/login/')
|
||||||
def new_msg_to_support_ajax(request):
|
def support_tickets_ajax(request):
|
||||||
if request.method != 'POST':
|
if request.method != 'POST':
|
||||||
raise Http404
|
raise Http404
|
||||||
|
|
||||||
Dict = {
|
Dict = {
|
||||||
}
|
}
|
||||||
|
|
||||||
html = render_to_string('blocks/profile/b_new_msg_to_support.html', Dict, request=request)
|
html = render_to_string('blocks/profile/b_support_tickets.html', Dict, request=request)
|
||||||
return JsonResponse({'html': html}, status=200)
|
return JsonResponse({'html': html}, status=200)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@login_required(login_url='/profile/login/')
|
@login_required(login_url='/profile/login/')
|
||||||
def change_profile_ajax(request):
|
def change_profile_ajax(request):
|
||||||
if request.method != 'POST':
|
if request.method != 'POST':
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ from datetime import datetime
|
|||||||
from django.template.loader import render_to_string
|
from django.template.loader import render_to_string
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@login_required(login_url='/profile/login/')
|
@login_required(login_url='/profile/login/')
|
||||||
def support_create_ticket_form_ajax(request):
|
def support_create_ticket_form_ajax(request):
|
||||||
from ChatServiceApp.forms import TicketForm
|
from ChatServiceApp.forms import TicketForm
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ function attachFileCreateTicket () {
|
|||||||
let data = file
|
let data = file
|
||||||
$.ajax({
|
$.ajax({
|
||||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||||
url: '/ru/user_account/support_create_ticket_ajax/',
|
url: '/ru/user_account/support_tickets/',
|
||||||
type: "POST",
|
type: "POST",
|
||||||
// async: true,
|
// async: true,
|
||||||
cache: false,
|
cache: false,
|
||||||
@@ -82,7 +82,7 @@ function attachFilemeassge () {
|
|||||||
let data = file
|
let data = file
|
||||||
$.ajax({
|
$.ajax({
|
||||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||||
url: '/ru/user_account/support_create_ticket_ajax/',
|
url: '/ru/user_account/support_tickets/',
|
||||||
type: "POST",
|
type: "POST",
|
||||||
// async: true,
|
// async: true,
|
||||||
cache: false,
|
cache: false,
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ function writeMessage(){
|
|||||||
function technicalSupport(){
|
function technicalSupport(){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||||
url: '/ru/user_account/new_msg_to_support/',
|
url: '/ru/user_account/support_tickets/',
|
||||||
type: "POST",
|
type: "POST",
|
||||||
// async: true,
|
// async: true,
|
||||||
cache: false,
|
cache: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user