0.0.133 add counter for feedback
This commit is contained in:
@@ -757,10 +757,10 @@ function RequestCommercialOffer (el){
|
|||||||
|
|
||||||
|
|
||||||
function counterText(evt) {
|
function counterText(evt) {
|
||||||
const ta = document.querySelector('.feedback_form_message')
|
const counter = document.querySelector('.counter-text__current');
|
||||||
const counter = document.querySelector('.counter-text__current')
|
const maxlength = 360;
|
||||||
const text_l = evt.target.value.length
|
counter.textContent = evt.value.length;
|
||||||
counter.innerText = text_l
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,14 +102,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="right_inputs_form">
|
<div class="right_inputs_form">
|
||||||
<div class="counter-box">
|
<div class="counter-box">
|
||||||
|
<label for="id_text"></label>
|
||||||
<textarea
|
<textarea
|
||||||
name="text"
|
name="text"
|
||||||
oninput="counterText(this)"
|
onFocus="this.select()"
|
||||||
id="id_text"
|
oninput="counterText(this)"
|
||||||
class="feedback_form_message"
|
id="id_text" class="feedback_form_message"
|
||||||
placeholder= {% translate "Сообщение" %}
|
placeholder= {% translate "Сообщение" %}
|
||||||
value="{% if form.adding_machine.text %}{{ form.initial.text }}{% endif %}"
|
value="{% if form.adding_machine.text %}{{ form.initial.text }}{% endif %}"
|
||||||
maxlength="100">
|
maxlength="100"
|
||||||
|
>
|
||||||
</textarea>
|
</textarea>
|
||||||
<span class="counter-text">
|
<span class="counter-text">
|
||||||
<span class="counter-text__current">0</span>
|
<span class="counter-text__current">0</span>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<label for="id_cargo_type_car_{{ forloop.counter }}" >
|
<label for="id_cargo_type_car_{{ forloop.counter }}" >
|
||||||
<img style="display: inline-block;padding-top: 11px;" src="{% static "img/svg/Car.svg" %}">
|
<img style="display: inline-block;padding-top: 11px;" src="{% static "img/svg/Car.svg" %}">
|
||||||
<span style="display: inline-block;width: 80%;">{{ item.1 }}</span>
|
<span style="ыdisplay: inline-block;width: 80%;">{{ item.1 }}</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user