0.0.64 error 500 w_route_info.html

This commit is contained in:
2023-07-31 19:24:48 +03:00
parent 47ceecdb59
commit 2e9200953e
3 changed files with 37 additions and 5 deletions

View File

@@ -1173,11 +1173,18 @@ input#id_cargo_type{
border-radius: 10px;
background: #F8F8F8;
margin: 10px;
text-align: center;
}
.route_info_point>span{
top:20%;
position: relative;
font-family: Inter, serif;
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: 22px;
}
.route_info_point>div{
border: 2px solid #FF613A;
width: 20px;
}

View File

@@ -372,6 +372,30 @@ function getRoute(){
}
});
}function editRoute(id) {
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: '/ru/routes/edit_route/',
type: "POST",
// async: true,
cache: false,
processData: false,
contentType: false,
// enctype: 'json',
data: id,
success: function(data){
console.log('data received')
// location.href = '/profile'
document.querySelector(".info_profile").innerHTML = data.html;
},
error: function (data, exception){
console.log(101)
}
});
}
@@ -379,4 +403,3 @@ function getRoute(){

View File

@@ -22,6 +22,8 @@
{{ route.from_country.name }}/{{ route.from_city.name }}
</span>
<div></div>
<span>
{{ route.to_country.name }}/{{ route.to_city.name }}
</span>
@@ -57,7 +59,7 @@
{{ route.owner.email }}
</div>
<div class="button_edit_route">
<button
<button onclick="editRoute({{ route.id }})"
id="edit_route">
Редактировать
</button>