0.0.07 form poster

This commit is contained in:
SBD
2025-01-10 21:32:17 +03:00
parent 66e00af171
commit 4c96c94549
5 changed files with 15 additions and 19 deletions

View File

@@ -498,7 +498,7 @@ footer>div {
}
.wrapper_header_content{
max-width: 1280px;
max-width: 1720px;
margin: 0 auto;
position: relative;
}

View File

@@ -52,19 +52,11 @@ function select_tab_profile (el,url,owner_type=null, check_orders_required) {
let confirm_url_f_lang_ru = ''
let confirm_url_f_lang_en = ''
if (owner_type){
window.history.pushState({ prevUrl: window.location.href }, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}`)
confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`
confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`
if(!window.history.state.prevUrl.match(/create/)) {
window.location.reload()
}
} else {
window.history.pushState({ prevUrl: window.location.href }, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(url)}/`)
confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(url)}/`
confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(url)}/`
if(window.history.state.prevUrl.match(/create/)) {
window.location.reload()
}
}
document.querySelector("#ru_lang").href = confirm_url_f_lang_ru
document.querySelector("#en_lang").href = confirm_url_f_lang_en

View File

@@ -12,12 +12,16 @@ function makePosterOrder(form) {
}, error: function (res) {
if (res.JSON) return;
if (!res.responseJSON) return;
let $parent = form.closest('.b_make_poster_order')
let $title = $parent.querySelector(".make_poster_order_title")
let $form = $parent.querySelector(".f_make_poster_order")
$form.remove()
$('body')[0].scrollIntoView({behavior: 'smooth', top: 0});
$(res.responseJSON.html).insertAfter($($title))
}
})

View File

@@ -5,7 +5,7 @@ class api {
this.data_type = props.data_type;
this.type = props.type || 'POST';
this.success_callback = props.success;
this.error_callback = props.error_callback;
this.error_callback = props.error;
}
ajaxRequest (){