0.0.283 add success_msg for forms, clear forms

This commit is contained in:
2023-12-01 00:34:42 +03:00
parent fd1f4ff9b1
commit fde640e997
6 changed files with 75 additions and 42 deletions

View File

@@ -53,14 +53,16 @@
</div>
<img src="/static/img/png/Box5.png" alt="">
<img src="/static/img/png/Box4.png" alt="">
<img src="/static/img/png/Box4.png" alt="">
<img src="/static/img/png/Box6.png" alt="">
<img id="box1" src="/static/img/png/Box5.png" alt="">
<img id="box2" src="/static/img/png/Box4.png" alt="">
<img id="box3" src="/static/img/png/Box4.png" alt="">
<img id="box4" src="/static/img/png/Box6.png" alt="">
</div>
<div class="form_wrapper">
{% include "blocks/static_pages_blocks/b_feedback_form.html" %}
{% include "blocks/static_pages_blocks/b_feedback_form.html" %}
</div>

View File

@@ -14,13 +14,17 @@
{% endif %}
<form
class="clear_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 %}
>
<div class="left_inputs_form">
<div class="inputs_l">
<input name="name" type="text" placeholder="{% translate 'Имя' %}" {% if form.data.username %} value="{{ form.data.username }}"{% endif %}>
<input name="name"
type="text"
required
placeholder="{% translate 'Имя' %}" {% if form.data.username %} value="{{ form.data.username }}"{% endif %}>
{% if form.username and form.errors.username %}
<span>{{ form.errors.username }}</span>
{% endif %}
@@ -60,7 +64,7 @@
</div>
<div class="button_feedback_form">
<button onclick="RequestCommercialOffer(this)" id="send_feedback_form">{% translate 'Отправить сообщение' %}</button>
<button onclick="RequestCommercialOffer(this, {once: true})" id="send_feedback_form">{% translate 'Отправить сообщение' %}</button>
</div>