diff --git a/static/css/styles.css b/static/css/styles.css index 3fbf68e..b446532 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1504,6 +1504,9 @@ input#id_extra_phone height: 280px; display: inline-block; } +.route_info_about{ + margin-bottom: 30px; +} .route_info_point { width: 96%; @@ -1578,7 +1581,7 @@ input#id_extra_phone button#edit_route { display: block; height: 44px; - width: 76%; + width: 98%; background: #FF613A; color: #FFF; font-family: Inter; @@ -1602,24 +1605,26 @@ button#remove_route { width: 285px; } button.confirm_remove{ - width: 46% !important; + width: 49% !important; background: #ff0000a8; border-radius: 10px; color: white; font-style: normal; font-weight: 600; margin-right: 3px; + padding: 5px 0px 5px 0px; } button.cancel_remove{ - width: 46%; + width: 48%; background: #808080cc; border-radius: 10px; color: white; font-style: normal; font-weight: 600; + padding: 5px 0px 5px 0px; } diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 3c175ba..7c2872e 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -364,12 +364,35 @@ function sendRoute(el, routeID = null){ let list_of_elements_form = document.querySelectorAll(".el_form_b_new_route"); + let checked_cargo_type = document.querySelectorAll('.cargo_check'); + + + let obj_w_el_form = {} - for (let i = 0;i < list_of_elements_form.length;i++) { + + + for (let n = 0;n < checked_cargo_type.length; n++){ + let checked_cargo = checked_cargo_type[n] + if(checked_cargo.checked === true){ + let name_cargo = checked_cargo.name + let value_cargo = checked_cargo_type[n].value + obj_w_el_form[name_cargo] = value_cargo + + + } + } + + + + + for (let i = 0; i < list_of_elements_form.length ;i++) { // let id_el = list_of_elements_form[i].id // if (id_el){ // if (id_el === "") // } + + + let name_attr = list_of_elements_form[i].attributes["name"] if (name_attr) { let name_el = name_attr.value @@ -377,6 +400,9 @@ function sendRoute(el, routeID = null){ obj_w_el_form[name_el] = value_el } } + + + let selected_owner_type = document.querySelectorAll("#customer, #mover") selected_owner_type.forEach(function(item) { @@ -434,6 +460,14 @@ function sendRoute(el, routeID = null){ +function validate(el) { + if (el.checked) { + console.log('cheked', el.id); + } else { + console.log("You didn't check it! Let me check it for you.", el.id); + } +} + diff --git a/templates/blocks/profile/b_new_route.html b/templates/blocks/profile/b_new_route.html index 44b0799..e4849d6 100644 --- a/templates/blocks/profile/b_new_route.html +++ b/templates/blocks/profile/b_new_route.html @@ -228,7 +228,8 @@ {% for item in form.fields.cargo_type.choices %}