This commit is contained in:
2023-08-11 18:05:53 +03:00
parent 724d5394d7
commit b7ff089cca
4 changed files with 56 additions and 15 deletions

View File

@@ -106,6 +106,16 @@ html, body{
height: 100%;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type='number'] {
-moz-appearance: textfield;
}
@@ -925,6 +935,7 @@ select {
line-height: 22px;
appearance: none;
background: white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center;
margin-top: 10px;
}
@@ -947,6 +958,13 @@ select#id_type_transport{
font-weight: 400;
line-height: 22px;
appearance: none;
margin-top: 10px;
}
select#id_type_transport>option{
font-size: 16px;
font-family: Inter;
}
@@ -1010,6 +1028,7 @@ div.from_to_country>div>input:nth-child(3){
background: white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center;
width: 392px;
height: 60px;
margin-top: 10px;
}
@@ -1028,7 +1047,8 @@ div.departure_arrival>div>input{
width: 392px;
height: 60px;
padding-left: 2px;
/*background: white url("/static/img/svg/Calendar.svg") no-repeat calc(100% - 3px) center;*/
margin-top: 10px;
}
@@ -1138,6 +1158,7 @@ div.from_to_place>div>select{
font-weight: 400;
line-height: 22px;
appearance: none;
margin-top: 20px;
}
@@ -1157,6 +1178,7 @@ input#id_extra_phone
font-weight: 400;
line-height: 22px;
appearance: none;
margin-top: 10px;
}

View File

@@ -370,6 +370,13 @@ function sendRoute(el, routeID = null){
});
}
// function maxLength(el) {
// if (el.value.length > el.maxLength){
// el.value = el.value.slice(0, el.maxLength);
// }
//
// }
@@ -528,3 +535,5 @@ function getRoute(el){

View File

@@ -13,7 +13,7 @@
<a
href="{% url "user_profile" %}">
Профиль
{{ user.username }}
</a>
{% endif %}

View File

@@ -6,24 +6,28 @@
<form class = "new_route" name="new_route" method="post">
{% csrf_token %}
<h2 class="title_new_route">Разместить объявление о перевозке посылки</h2>
<div>
<label for="id_type_transport">{{ form.fields.type_transport.label }}</label>
</div>
<div>
<label for="id_type_transport">{{ form.fields.type_transport.label }}</label>
<select
onchange="OnSelectionChange(this)"
name="type_transport"
id="id_type_transport">
{% for item in form.fields.type_transport.choices %}
<option
value="{{ item.0 }}"
{% if form.initial.type_transport == item.0 %}
selected="selected"
{% endif %}>
{{ item.1 }}
</option>
{% endfor %}
{% for item in form.fields.type_transport.choices %}
<option
value="{{ item.0 }}"
{% if form.initial.type_transport == item.0 %}
selected="selected"
{% endif %}>
{{ item.1 }}
</option>
{% endfor %}
</select>
{% if not errors_off and form.errors and form.errors.type_transport %}
<span>{{ form.errors.type_transport }}</span>
@@ -217,7 +221,13 @@
<div class="extra-controls">
<label for="id_weight">{{ form.fields.weight.label }}</label>
<input type="text" maxlength="3" class="js-input" placeholder="Укажите вес" value="" />
<input
type="number"
maxLength="1000"
class="js-input"
placeholder="Укажите вес"
{# onchange="maxLength(this)"#}
/>
</div>
<div class="range-slider">