0.0.25 my routes

This commit is contained in:
SBD
2025-01-14 18:39:12 +03:00
parent a40ae5d37d
commit a5b106edfe
4 changed files with 14 additions and 3 deletions

View File

@@ -14,8 +14,10 @@ def get_splited_cargo_type(value):
return value return value
splited_list = value.split('(') splited_list = value.split('(')
splited_list[1] = splited_list[1].replace(')', '')
s = splited_list[0] + '<span>(' + splited_list[1] + ')</span>'
s = f'<div>{splited_list[0]}</div><div class="annotation">({splited_list[1]})</div>'
return mark_safe(s) return mark_safe(s)

View File

@@ -24,6 +24,14 @@
} }
.radio_label{ .radio_label{
font-size: var(--radio-font-size); font-size: var(--radio-font-size);
&:has(div.annotation){
display: flex;
align-items: center;
gap: 5px;
}
div.annotation{
color: #27242499;
}
} }
} }
} }

View File

@@ -84,7 +84,7 @@ function getCargoTypesWTypeTransport (data) {
let success_callback = data.success_callback; let success_callback = data.success_callback;
let error_callback = data.error_callback; let error_callback = data.error_callback;
if (!type_transport || !owner_type) return; if (!owner_type) return;
let request_data = { let request_data = {
type_transport: type_transport, type_transport: type_transport,

View File

@@ -1,7 +1,8 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load routes_tags %}
<div class="cw_w_radio_inputs_radio_input" data-name="{{ item.0 }}"> <div class="cw_w_radio_inputs_radio_input" data-name="{{ item.0 }}">
<div class="radio{% if item.0 == initial %} checked{% endif %}" onclick="chooseRadioInput(this, {{ callback }})"></div> <div class="radio{% if item.0 == initial %} checked{% endif %}" onclick="chooseRadioInput(this, {{ callback }})"></div>
<div class="radio_label" onclick="chooseRadioInput(this, {{ callback }})">{{ item.1 }}</div> <div class="radio_label" onclick="chooseRadioInput(this, {{ callback }})">{{ item.1|get_splited_cargo_type|safe }}</div>
</div> </div>