0.0.12 form poster
This commit is contained in:
@@ -9,7 +9,26 @@ function makePosterOrder(form) {
|
||||
data: formData,
|
||||
data_type: 'formData',
|
||||
success: function (res) {
|
||||
if (!res) return;
|
||||
let created_route_id = res.route_id;
|
||||
if (!created_route_id) return;
|
||||
|
||||
let profile_root = document.querySelector(".info_profile")
|
||||
if (!profile_root) return;
|
||||
profile_root.innerHTML = res.html
|
||||
|
||||
let created_route = document.querySelector(`[data-number-of-route="${created_route_id}"]`);
|
||||
created_route.scrollIntoView({
|
||||
behavior:"smooth",
|
||||
block:'start',
|
||||
inline:'start'
|
||||
});
|
||||
|
||||
let new_url = window.location.pathname
|
||||
new_url.replace('/create_route_for_customer', '/my_routes');
|
||||
new_url.replace('/create_route_for_mover', '/my_routes');
|
||||
|
||||
window.location.pathname.replace(new_url, '')
|
||||
|
||||
}, error: function (res) {
|
||||
if (!res.responseJSON) return;
|
||||
|
||||
Reference in New Issue
Block a user