Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -633,22 +633,22 @@ input.deactive {
|
||||
border-color: #b3d7ff;
|
||||
}
|
||||
|
||||
.custom-checkbox:focus+label::before {
|
||||
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
|
||||
.custom-checkbox:hover+label::before {
|
||||
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.custom-checkbox:focus:not(:checked)+label::before {
|
||||
border-color: #80bdff;
|
||||
}
|
||||
|
||||
|
||||
.custom-checkbox:checked+label::before {
|
||||
border-color: #0b76ef;
|
||||
background-color: #0b76ef;
|
||||
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
|
||||
|
||||
background-color:#FF613A;
|
||||
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.custom-checkbox:disabled+label::before {
|
||||
background-color: #e9ecef;
|
||||
|
||||
|
||||
.custom-checkbox:disabled+label::before:hover {
|
||||
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
section.login {
|
||||
@@ -1139,17 +1139,51 @@ input#id_extra_phone
|
||||
/* font-weight: 500;*/
|
||||
/* line-height: 22px;*/
|
||||
/*}*/
|
||||
.checkbox_cargo_type{
|
||||
display: block;
|
||||
/*flex-wrap: wrap;*/
|
||||
/*.checkbox_cargo_type{*/
|
||||
/* display: block;*/
|
||||
/* !*flex-wrap: wrap;*!*/
|
||||
/*}*/
|
||||
/*.checkbox_cargo_type>div{*/
|
||||
/* column-count: 2;*/
|
||||
/* max-width: 330px;*/
|
||||
/* width: 100%;*/
|
||||
/* margin-bottom: 10px;*/
|
||||
/*}*/
|
||||
/*.checkbox_cargo_type>div>input{*/
|
||||
/* display: block;*/
|
||||
/*}*/
|
||||
/*.checkbox_cargo_type>div>label{*/
|
||||
/* display: block;*/
|
||||
/*}*/
|
||||
|
||||
.real-checkbox{
|
||||
|
||||
}
|
||||
.checkbox_cargo_type>input{
|
||||
display: block;
|
||||
|
||||
.custom-checkbox-w{
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
/*background: white;*/
|
||||
border-radius: 10px;
|
||||
border: 1px solid #E6E6E6;
|
||||
vertical-align: sub;
|
||||
}
|
||||
.checkbox_cargo_type>label{
|
||||
display: block;
|
||||
|
||||
.custom-checkbox-w::before{
|
||||
/*content: '';*/
|
||||
background: #FF613A;
|
||||
transition: 0.2s ease-in;
|
||||
|
||||
}
|
||||
|
||||
.real-checkbox:checked + .custom-checkbox-w::before{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*input#id_cargo_type{*/
|
||||
/* width: 50%;*/
|
||||
/*}*/
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
function SendLoginForm(el){
|
||||
|
||||
event.preventDefault()
|
||||
let form = el.form;
|
||||
let formData = new FormData(form);
|
||||
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/login/',
|
||||
@@ -16,6 +20,13 @@ function SendLoginForm(el){
|
||||
success: function(data){
|
||||
|
||||
location.href = '/profile'
|
||||
// let profile_btn = document.createElement("a");
|
||||
// profile_btn.classList.add("profile_button");
|
||||
// profile_btn.innerText = "Профиль";
|
||||
// let reg_btn = document.querySelector(".registration_button");
|
||||
// let replace_btn = reg_btn.parentNode;
|
||||
// replace_btn.replaceChild(profile_btn, reg_btn);
|
||||
|
||||
},
|
||||
error: function (data, exception){
|
||||
document.querySelector(".login").innerHTML = data.responseJSON.html
|
||||
|
||||
@@ -9,7 +9,29 @@
|
||||
<div>
|
||||
<div><a href="#"><img src="/static/img/png/ru.png" alt=""></a></div>
|
||||
<div><img class="svg" src="/static/img/svg/Helpdesk_%20Icon.svg"><a href="#">Служба поддержки</a></div>
|
||||
<a href="{% url "registration_page" %}">Регистрация</a>
|
||||
<a href="{% url "login_profile" %}">Войти</a>
|
||||
{% if user.is_authenticated %}
|
||||
<a
|
||||
|
||||
href="{% url "user_profile" %}">
|
||||
Профиль
|
||||
</a>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if not user.is_authenticated %}
|
||||
<a
|
||||
class="registration_button"
|
||||
href="{% url "registration_page" %}">
|
||||
Регистрация
|
||||
</a>
|
||||
|
||||
<a
|
||||
class="enter_button"
|
||||
href="{% url "login_profile" %}">
|
||||
Войти
|
||||
</a>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</header>
|
||||
@@ -182,8 +182,11 @@
|
||||
</div>
|
||||
|
||||
<div class="checkbox_cargo_type">
|
||||
|
||||
{% for item in form.fields.cargo_type.choices %}
|
||||
<input
|
||||
<div>
|
||||
<input
|
||||
class="custom-checkbox"
|
||||
type="checkbox"
|
||||
name="cargo_type"
|
||||
id="id_cargo_type_{{ forloop.counter }}"
|
||||
@@ -191,12 +194,16 @@
|
||||
value="{{ item.0 }}"
|
||||
{% if form.initial.cargo_type == item.0 %}
|
||||
checked="checked"
|
||||
{% endif %}/>
|
||||
<label for="id_cargo_type_{{ forloop.counter }}" >
|
||||
{{ item.1 }}
|
||||
</label>
|
||||
{% endif %}
|
||||
/>
|
||||
|
||||
<label for="id_cargo_type_{{ forloop.counter }}" >
|
||||
{{ item.1 }}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{# <lable for="">#}
|
||||
{##}
|
||||
{# </lable>#}
|
||||
|
||||
Reference in New Issue
Block a user