0.0.104
This commit is contained in:
@@ -480,6 +480,10 @@ body.n_scroll{
|
|||||||
flex-direction: row-reverse;
|
flex-direction: row-reverse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container_input{
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
.input_form_feedback{
|
.input_form_feedback{
|
||||||
border: none;
|
border: none;
|
||||||
border-bottom: 1px solid #E3E3E3;
|
border-bottom: 1px solid #E3E3E3;
|
||||||
@@ -491,7 +495,6 @@ body.n_scroll{
|
|||||||
outline: none;
|
outline: none;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
margin-bottom: 25px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.input_form_feedback.error{
|
.input_form_feedback.error{
|
||||||
@@ -571,7 +574,7 @@ body.n_scroll{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.check_box_form_feedback{
|
.check_box_form_feedback{
|
||||||
border: 1px solid #9a9a9a;
|
border: 1px solid #000000;
|
||||||
background: none;
|
background: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 15px;
|
width: 15px;
|
||||||
@@ -579,6 +582,9 @@ body.n_scroll{
|
|||||||
outline: none;
|
outline: none;
|
||||||
margin: 6px 0;
|
margin: 6px 0;
|
||||||
}
|
}
|
||||||
|
.check_box_form_feedback.error{
|
||||||
|
border: 1px solid #FF3F20;
|
||||||
|
}
|
||||||
|
|
||||||
.label_feedback_form_checkbox{
|
.label_feedback_form_checkbox{
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@@ -587,6 +593,9 @@ body.n_scroll{
|
|||||||
width: 90%;
|
width: 90%;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
.label_feedback_form_checkbox.error{
|
||||||
|
color: #FF3F20;
|
||||||
|
}
|
||||||
|
|
||||||
/* block plugin*/
|
/* block plugin*/
|
||||||
|
|
||||||
@@ -1221,4 +1230,16 @@ body.n_scroll{
|
|||||||
border: 1px solid #E3E3E3;
|
border: 1px solid #E3E3E3;
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
box-shadow: 1px 1px 2px 0 rgba(151, 167, 176, 0.20);
|
box-shadow: 1px 1px 2px 0 rgba(151, 167, 176, 0.20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* errors */
|
||||||
|
.error_input_html{
|
||||||
|
color: #FF3F20;
|
||||||
|
padding: 10px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error_input_html ul,li{
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|||||||
@@ -253,7 +253,29 @@ function sendFormfeedback (el){
|
|||||||
document.querySelector(".container_content_form_feedback").innerHTML = data.html
|
document.querySelector(".container_content_form_feedback").innerHTML = data.html
|
||||||
},
|
},
|
||||||
error: function (data){
|
error: function (data){
|
||||||
document.querySelector(".container_content_form_feedback").innerHTML = data.responseJSON.html
|
document.querySelector(".form_feedback_content").innerHTML = data.responseJSON.left_form_html
|
||||||
|
document.querySelector(".checkbox_container").innerHTML = data.responseJSON.right_form_html
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteErrorsInput (el) {
|
||||||
|
let parent = el.parentNode
|
||||||
|
let errors_container = parent.querySelector(".error_input_html")
|
||||||
|
if (errors_container){
|
||||||
|
let input = parent.querySelector(".input_form_feedback")
|
||||||
|
let checkbox_label = parent.querySelector(".label_feedback_form_checkbox")
|
||||||
|
if (input){
|
||||||
|
input.classList.remove('error')
|
||||||
|
} else if (checkbox_label){
|
||||||
|
checkbox_label.classList.remove("error")
|
||||||
|
} else {
|
||||||
|
let textarea = document.querySelector(".textarea_form_feedback")
|
||||||
|
textarea.classList.remove("error")
|
||||||
|
}
|
||||||
|
|
||||||
|
let str = errors_container.outerHTML
|
||||||
|
str = str.replace(str,'')
|
||||||
|
errors_container.outerHTML = str
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,19 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
<input hidden="hidden" class="input_form_feedback" id="id_form_name" name="form_name" value="{{ feedback_form.initial.form_name }}">
|
<input hidden="hidden" class="input_form_feedback" id="id_form_name" name="form_name" value="{{ feedback_form.initial.form_name }}">
|
||||||
<input class="input_form_feedback{% if feedback_form.errors.name %} error{% endif %}" id="id_name" name="name" placeholder="{{ feedback_form.name.label }}">
|
<div class="container_input">
|
||||||
<div class="error"></div>
|
<input oninput="deleteErrorsInput(this)" class="input_form_feedback{% if feedback_form.errors.name %} error{% endif %}" id="id_name" name="name" placeholder="{{ feedback_form.name.label }}"{% if feedback_form.initial.name %} value="{{ feedback_form.initial.name }}"{% endif %}>
|
||||||
<input class="input_form_feedback{% if feedback_form.errors.company %} error{% endif %}{% if feedback_form.errors.name %} error{% endif %}" id="id_company" name="company" placeholder="{{ feedback_form.company.label }}">
|
{% if feedback_form.errors.name %}<div class="error_input_html">{{ feedback_form.errors.name }}</div>{% endif %}
|
||||||
<input class="input_form_feedback{% if feedback_form.errors.contacts %} error{% endif %}" id="id_contacts" name="contacts" placeholder="{{ feedback_form.contacts.label }}">
|
</div>
|
||||||
<label class="label_feedback_form standart_txt" for="id_description">{{ feedback_form.description.label }}</label>
|
<div class="container_input">
|
||||||
<textarea class="textarea_form_feedback{% if feedback_form.errors.description %} error{% endif %}" id="id_description" name="description"></textarea>
|
<input oninput="deleteErrorsInput(this)" class="input_form_feedback{% if feedback_form.errors.company %} error{% endif %}{% if feedback_form.errors.company %} error{% endif %}" id="id_company" name="company" placeholder="{{ feedback_form.company.label }}" {% if feedback_form.initial.company %} value="{{ feedback_form.initial.company }}"{% endif %}>
|
||||||
|
{% if feedback_form.errors.company %}<div class="error_input_html">{{ feedback_form.errors.company }}</div>{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="container_input">
|
||||||
|
<input oninput="deleteErrorsInput(this)" class="input_form_feedback{% if feedback_form.errors.contacts %} error{% endif %}" id="id_contacts" name="contacts" placeholder="{{ feedback_form.contacts.label }}"{% if feedback_form.initial.contacts %} value="{{ feedback_form.initial.contacts }}"{% endif %}>
|
||||||
|
{% if feedback_form.errors.contacts %}<div class="error_input_html">{{ feedback_form.errors.contacts }}</div>{% endif %}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label class="label_feedback_form standart_txt" for="id_description">{{ feedback_form.description.label }}</label>
|
||||||
|
<textarea oninput="deleteErrorsInput(this)" class="textarea_form_feedback{% if feedback_form.errors.description %} error{% endif %}" id="id_description" name="description">{% if feedback_form.initial.description %}{{ feedback_form.initial.description }}{% endif %}</textarea>
|
||||||
|
{% if feedback_form.errors.description %}<div class="error_input_html">{{ feedback_form.errors.description }}</div>{% endif %}
|
||||||
|
</div>
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
<input type="checkbox" class="check_box_form_feedback" id="id_agreement" name="agreement" />
|
<input type="checkbox" onclick="deleteErrorsInput(this)" class="check_box_form_feedback{% if feedback_form.errors.agreement %} error{% endif %}" id="id_agreement" name="agreement" {% if feedback_form.initial.agreement %}checked{% endif %} />
|
||||||
<label class="label_feedback_form_checkbox standart_txt" for="id_agreement">{{ feedback_form.agreement.label }}</label>
|
<label class="label_feedback_form_checkbox{% if feedback_form.errors.agreement %} error{% endif %} standart_txt" for="id_agreement">{{ feedback_form.agreement.label }}</label>
|
||||||
|
{% if feedback_form.errors.company %}<div class="error_input_html"></div>{% endif %}
|
||||||
<div class="clear_both"></div>
|
<div class="clear_both"></div>
|
||||||
Reference in New Issue
Block a user