From a5b106edfe4e753bad86cecae2233818a3c412c2 Mon Sep 17 00:00:00 2001 From: SBD Date: Tue, 14 Jan 2025 18:39:12 +0300 Subject: [PATCH] 0.0.25 my routes --- RoutesApp/templatetags/routes_tags.py | 4 +++- static/v2/css/widgets/w_radio_inputs.css | 8 ++++++++ static/v2/js/forms.js | 2 +- .../v2/content_widgets/cw_w_radio_inputs_radio_input.html | 3 ++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/RoutesApp/templatetags/routes_tags.py b/RoutesApp/templatetags/routes_tags.py index a3d94b0..c7a122c 100644 --- a/RoutesApp/templatetags/routes_tags.py +++ b/RoutesApp/templatetags/routes_tags.py @@ -14,8 +14,10 @@ def get_splited_cargo_type(value): return value splited_list = value.split('(') + splited_list[1] = splited_list[1].replace(')', '') - s = splited_list[0] + '(' + splited_list[1] + ')' + + s = f'
{splited_list[0]}
({splited_list[1]})
' return mark_safe(s) diff --git a/static/v2/css/widgets/w_radio_inputs.css b/static/v2/css/widgets/w_radio_inputs.css index 5042f13..300a967 100644 --- a/static/v2/css/widgets/w_radio_inputs.css +++ b/static/v2/css/widgets/w_radio_inputs.css @@ -24,6 +24,14 @@ } .radio_label{ font-size: var(--radio-font-size); + &:has(div.annotation){ + display: flex; + align-items: center; + gap: 5px; + } + div.annotation{ + color: #27242499; + } } } } \ No newline at end of file diff --git a/static/v2/js/forms.js b/static/v2/js/forms.js index 4d7d7ca..ad0d87d 100644 --- a/static/v2/js/forms.js +++ b/static/v2/js/forms.js @@ -84,7 +84,7 @@ function getCargoTypesWTypeTransport (data) { let success_callback = data.success_callback; let error_callback = data.error_callback; - if (!type_transport || !owner_type) return; + if (!owner_type) return; let request_data = { type_transport: type_transport, diff --git a/templates/v2/content_widgets/cw_w_radio_inputs_radio_input.html b/templates/v2/content_widgets/cw_w_radio_inputs_radio_input.html index a952d8f..e7b52b8 100644 --- a/templates/v2/content_widgets/cw_w_radio_inputs_radio_input.html +++ b/templates/v2/content_widgets/cw_w_radio_inputs_radio_input.html @@ -1,7 +1,8 @@ {% load static %} {% load i18n %} +{% load routes_tags %}
-
{{ item.1 }}
+
{{ item.1|get_splited_cargo_type|safe }}
\ No newline at end of file