0.0.112
This commit is contained in:
@@ -1224,6 +1224,7 @@ form.new_route{
|
|||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
|
padding-left: 10px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -345,9 +345,28 @@ function sliderInit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sendRoute(el, routeID = null){
|
function sendRoute(el, routeID = null){
|
||||||
|
let obj ={}
|
||||||
|
let selected_owner_type = document.querySelectorAll("#customer, #mover")
|
||||||
|
|
||||||
|
selected_owner_type.forEach(function(item) {
|
||||||
|
if (item.classList.contains('selected')) {
|
||||||
|
let { id, innerText } = item
|
||||||
|
obj['owner_type'] = id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (selected_owner_type[0].classList.contains('selected')){
|
||||||
|
|
||||||
|
}else
|
||||||
|
|
||||||
|
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
let form = el.form;
|
let form = el.form;
|
||||||
let formData = new FormData(form);
|
let formData = new FormData(form);
|
||||||
|
let data = {
|
||||||
|
formData,
|
||||||
|
obj
|
||||||
|
}
|
||||||
let url = '/ru/routes/create_or_change_route/'
|
let url = '/ru/routes/create_or_change_route/'
|
||||||
if (routeID !== null){
|
if (routeID !== null){
|
||||||
url = '/ru/routes/change_route/' + routeID + '/'
|
url = '/ru/routes/change_route/' + routeID + '/'
|
||||||
@@ -362,7 +381,7 @@ function sendRoute(el, routeID = null){
|
|||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
// enctype: 'json',
|
// enctype: 'json',
|
||||||
data: formData,
|
data: JSON.stringify(data),
|
||||||
success: function(data){
|
success: function(data){
|
||||||
if (data.user_alerts) {
|
if (data.user_alerts) {
|
||||||
getNewMessageSession()
|
getNewMessageSession()
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<section class="profile" >
|
<section class="profile" >
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div
|
<div
|
||||||
@@ -7,11 +9,11 @@
|
|||||||
<img class="svg" src="/static/img/svg/MagnifyingGlass.svg">
|
<img class="svg" src="/static/img/svg/MagnifyingGlass.svg">
|
||||||
<a href="#">Поиск посылки</a>
|
<a href="#">Поиск посылки</a>
|
||||||
</div>
|
</div>
|
||||||
<div onclick="createRoute(this, 'customer')">
|
<div id="customer" onclick="createRoute(this)">
|
||||||
<img class="svg" src="/static/img/svg/PushPin.svg">
|
<img class="svg" src="/static/img/svg/PushPin.svg">
|
||||||
<a href="#">Разместить объявление как отправитель</a>
|
<a href="#">Разместить объявление как отправитель</a>
|
||||||
</div>
|
</div>
|
||||||
<div onclick="createRoute(this, 'mover' )">
|
<div id="mover" onclick="createRoute(this)">
|
||||||
<img class="svg" src="/static/img/svg/PushPin.svg">
|
<img class="svg" src="/static/img/svg/PushPin.svg">
|
||||||
<a href="#">Разместить объявление как перевозчик</a>
|
<a href="#">Разместить объявление как перевозчик</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user