Merge remote-tracking branch 'origin/main'

This commit is contained in:
2023-12-03 17:15:32 +03:00
7 changed files with 22 additions and 12 deletions

View File

@@ -61,8 +61,8 @@ class Admin_Airport(Admin_Trans_BaseModel):
'order', 'modifiedDT', 'createDT']
search_fields = ['id', 'name_en', 'name_ru', 'city__name', 'city__country__name', 'iata_code', 'icao_code', 'international_name']
list_filter = ['city__country']
raw_id_fields = [
'city'
]
# raw_id_fields = [
# 'city'
# ]
admin.site.register(Airport, Admin_Airport)

View File

@@ -36,7 +36,6 @@ def get_profile_new_route_page_html(request, data):
)
cargo_type_choices = (
('passenger', _('Пассажир')),
('cargo', _('Груз')),
('parcel', _('Бандероль')),
('package', _('Посылка')),
@@ -51,6 +50,7 @@ def get_profile_new_route_page_html(request, data):
)
cargo_type_choices = (
('passenger', _('Пассажир')),
('cargo', _('Груз')),
('parcel', _('Бандероль')),
('package', _('Посылка')),

View File

@@ -2875,4 +2875,10 @@
color: #f00;
margin-bottom: 20px;
display: block;
}
/*b_profile_first_page*/
.title_b_first_page{
margin-top: 70px;
}

View File

@@ -92,8 +92,10 @@ function select_tab_profile (el,url,owner_type=null) {
function selectTabProfileIfHisNotSelected (url) {
let el_f_select = document.querySelector(`[data-ajax-url=${url}]`)
el_f_select.classList.add('selected')
if (url !== 'new_route_view') {
let el_f_select = document.querySelector(`[data-ajax-url=${url}]`)
el_f_select.classList.add('selected')
}
}
function clickONTHEAPROfileBTN (el) {

View File

@@ -60,7 +60,7 @@
<hr>
<div class="departure_arrival">
<div class="wrap_left">
<label for="id_departure_DT">{{ form.fields.departure_DT.label }}</label>
<label for="id_departure_DT">{% if form.initial.type_transport == 'road' %}Дата и время выезда{% elif form.initial.type_transport == 'avia' %}Дата и время вылета{% endif %}</label>
{# <input#}
@@ -84,7 +84,7 @@
</div>
<div id="arrival_div">
<label for="id_arrival_DT">{{ form.fields.arrival_DT.label }}</label>
<label for="id_arrival_DT">Дата и время прибытия</label>
{# <input#}
{# type="datetime-local"#}
{# min= {% now "Y-m-d" %}T{% now "H:i" %}#}
@@ -109,7 +109,7 @@
<hr>
<div class="from_to_country">
<div class="from_country_container">
<label for="id_from_address_point_txt">{{ form.fields.from_address_point.label }}</label>
<label for="id_from_address_point_txt">{% if form.initial.type_transport == 'avia' %}Пункт вылета{% elif form.initial.type_transport == 'road' %}Пункт выезда{% endif %}</label>
<input
type="number"
name="from_address_point"
@@ -131,6 +131,7 @@
class="from_address_point_txt post_route el_form_b_new_route"
{% if form.fields.from_address_point.required %} required{% endif %}
id="id_from_address_point_txt"
placeholder="{% translate "Выберите страну и город" %}"
{% if form.initial.from_address_point_txt %}value="{{ form.initial.from_address_point_txt }}"{% endif %}
/>
<datalist id="from_address_point">
@@ -145,7 +146,7 @@
{% endif %}
</div>
<div class="wrap_right">
<label for="id_to_address_point_txt">{{ form.fields.to_address_point.label }}</label>
<label for="id_to_address_point_txt">{% if form.initial.type_transport == 'avia' %}Пункт прилета{% elif form.initial.type_transport == 'road' %}Пункт приезда{% endif %}</label>
<input
type="number"
name="to_address_point"
@@ -166,6 +167,7 @@
{% if form.fields.to_address_point.required %} required{% endif %}
id="id_to_address_point_txt"
class="to_address_point_txt post_route el_form_b_new_route"
placeholder="{% translate "Выберите страну и город" %}"
{% if form.initial.to_address_point_txt %}value="{{ form.initial.to_address_point_txt}}"{% endif %}
/>

View File

@@ -41,7 +41,7 @@
</div>
<div class="container_el_form_profile">
<label class="label_f_profile" for="id_email">{% if profileForm.fields.email.required %}<span class="orange-text">*</span>{% endif %} E-mail</label>
<input class="input_f_profile" type="text" id="id_email" name="email" {% if profileForm.initial.email %}value="{{ profileForm.initial.email }}" {% endif %} {% if profileForm.initial.email %}data-initial-value="{{ profileForm.initial.email }}"{% else %}data-initial-value=""{% endif %}>
<input class="input_f_profile" type="text" id="id_email" name="email" readonly {% if profileForm.initial.email %}value="{{ profileForm.initial.email }}" {% endif %} {% if profileForm.initial.email %}data-initial-value="{{ profileForm.initial.email }}"{% else %}data-initial-value=""{% endif %}>
{% if profileForm.errors.email %}<div class="error_form_profile">{{ profileForm.errors.email }}</div>{% endif %}
</div>
<div class="container_el_form_profile">

View File

@@ -1,7 +1,7 @@
{% load static %}
{% load i18n %}
<h1>{% translate "Добро пожаловать:" %} <span class="user_first_name">{{ user.first_name }} {{ user.last_name }}</span> <span class="user_username" >({{ user.username }})</span></h1>
<h1 class="title_b_first_page">{% translate "Добро пожаловать:" %} <span class="user_first_name">{{ user.first_name }} {{ user.last_name }}</span> <span class="user_username" >({{ user.username }})</span></h1>
<div class="profile_prof"><img class="avatar_user_profile" {% if user.user_profile.avatar %}
src="{{ user.user_profile.avatar.url }}"
{% else %}src="{% static "img/svg/user_icon_standart.png" %}"{% endif %} alt="">