0.0.12 form poster
This commit is contained in:
@@ -60,6 +60,8 @@ function select_tab_profile (el,url,owner_type=null, check_orders_required) {
|
||||
}
|
||||
document.querySelector("#ru_lang").href = confirm_url_f_lang_ru
|
||||
document.querySelector("#en_lang").href = confirm_url_f_lang_en
|
||||
|
||||
daterangepickerInit($('.w_daterangepicker'), daterangepickerInit)
|
||||
// let header = document.querySelector("header")
|
||||
// header.scrollIntoView({
|
||||
// behavior: "smooth",
|
||||
|
||||
@@ -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