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