Files
tripwithbonus/templates/forms/f_feedback_form.html
2023-12-15 15:44:23 +03:00

88 lines
3.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% load i18n %}
{% load static %}
<div class="feedback_form">
<form
class="clear_form"
id="feedback_form"
{% if page.url == 'contacts' %} data-name="msg_from_contacts"{% endif %}
{% if page.url == 'about_service' %} data-name="msg_from_about_service"{% endif %}
{% if page.url == 'customer_service' %} data-name="msg_from_customer_service"{% endif %}
{% if form.form_name %}data-name="{{ form.form_name}}"{% endif %}
>
<div class="left_inputs_form">
<div class="inputs_l">
<input name="name"
type="text"
onkeydown ="hideErrors(this)"
placeholder="{% translate 'Имя' %}"
{% if form.name %} value="{{ form.name }}"{% endif %}>
{% if form.errors.name %}
<span id="error_feedback">{{ form.errors.name }}</span>
{% endif %}
</div>
<div class="inputs_l">
<input
name="email"
type="email"
onkeydown ="hideErrors(this)"
placeholder="Е-mail"{% if form.email %} value="{{ form.email }}"{% endif %}
>
{% if form.errors.email %}
<span id="error_feedback">{{ form.errors.email }}</span>
{% endif %}
</div>
<div class="inputs_l">
<input name="phone"
type="tel"
onkeydown ="hideErrors(this)"
placeholder="{% translate 'Телефон' %}"{% if form.phone %} value="{{ form.phone }}"{% endif %}>
{% if form.errors.phone %}
<span id="error_feedback">{{ form.errors.phone|safe }}</span>
{% endif %}
</div>
</div>
<div class="right_inputs_form">
<div class="counter-box">
<label for="id_text"></label>
<textarea
name="text_msg"
onFocus="this.select()"
onkeydown ="hideErrors(this)"
oninput="counterText(this)"
id="id_text"
class="feedback_form_message"
placeholder= '{% translate "Сообщение" %}'
{# value="{% if form.data.text_msg %}{{ form.initial.text_msg }}{% endif %}"#}
maxlength="100"
>{% if form.text_msg %}{{ form.text_msg }}{% endif %}</textarea>
<span class="counter-text">
<span class="counter-text__current">0</span>
/
<span class="counter-text__total">100</span>
</span>
</div>
{% if form.errors.text_msg %}
<span id="error_feedback_text">{{ form.errors.text_msg }}</span>
{% endif %}
<div class="button_feedback_form">
<button onclick="RequestCommercialOffer(this)" id="send_feedback_form">{% translate 'Отправить сообщение' %}</button>
</div>
</div>
</form>
</div>