Files
santeh-ray/templates/home/_fragments/faq.html
Azimkin 4f4a1a55e5
All checks were successful
Build and Push Docker Image / build (push) Successful in 43s
feat: add FAQ question form with email notifications and validations
- Created `FaqQuestionForm` in `forms.py` with custom field validations
- Added FAQ form to the FAQ section with CSRF protection and error handling
- Integrated email notifications to administrator upon FAQ submission
- Updated styles and scripts for form inputs, validation messages, and messages UI
- Adjusted FAQ section layout in `faq.html` and related CSS for responsiveness
- Implemented tests for FAQ form submission and email notifications
2026-04-19 22:51:56 +02:00

97 lines
4.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.
<section class="faq-section container" id="faq-section">
<h2>ОТВЕТЫ НА ВОПРОСЫ</h2>
<div class="faq-grid">
<div class="faq-item">
<div class="faq-icon">?</div>
<div class="faq-body">
<h4>Могу ли я отказаться от заказа при доставке?</h4>
<p>Да, вы можете отказаться приобретать модель. В таком случае, просим уведомить специалиста
магазина о отказе, не нарушать заводскую упаковку товара, чтобы он не утратил товарный вид. Но
вы должны будете оплатить доставку товара, даже в случае отказа.</p>
</div>
</div>
<div class="faq-item">
<div class="faq-icon">?</div>
<div class="faq-body">
<h4>Куда обращаться по гарантии?</h4>
<p>В случае обнаружения недостатка товара при получении либо при его использовании в течении
гарантийного срока, необходимо обратиться с письменной претензией на почту info@santehray.by или
в наш магазин. Далее с вами свяжутся для уточнения подробностей.</p>
</div>
</div>
<div class="faq-item">
<div class="faq-icon">?</div>
<div class="faq-body">
<h4>Можно ли покупать товары в рассрочку?</h4>
<p>Да. У нас есть система кредитования, где вы можете приобрести модель в рассрочку полностью или
частично. Для этого нужно обратиться в наш магазин и узнать подробности.</p>
</div>
</div>
<div class="faq-item">
<div class="faq-icon">?</div>
<div class="faq-body">
<h4>Можно ли где-то лично посмотреть товары?</h4>
<p>У нас есть физический магазин, который находится по адресу: Беларусь, г. Минск, ул. Тимирязева,
д. 123, к.1, пав. 59, там вы сможете ознакомится со всем ассортиментом.</p>
</div>
</div>
</div>
<div id="back-form" style="display: none;" class="back-form">
<h2>НЕ НАШЛИ ОТВЕТ НА ВАШ ВОПРОС?</h2>
<form action="{% url 'home' %}" method="post">
{% csrf_token %}
{{ faq_form.non_field_errors }}
<label class="q-label" for="{{ faq_form.name.id_for_label }}" style="margin-top: 69px;">
{{ faq_form.name }}
</label>
{{ faq_form.name.errors }}
<label class="q-label" for="{{ faq_form.phone.id_for_label }}">
{{ faq_form.phone }}
</label>
{{ faq_form.phone.errors }}
<label class="q-label" for="{{ faq_form.question.id_for_label }}">
{{ faq_form.question }}
</label>
{{ faq_form.question.errors }}
<div class="back-form-accept-checkbox">
{{ faq_form.accept }}
<label for="{{ faq_form.accept.id_for_label }}">{{ faq_form.accept.label }}</label>
</div>
{{ faq_form.accept.errors }}
<button class="back-form-submit" type="submit">ОТПРАВИТЬ ВОПРОС</button>
</form>
</div>
<div class="faq-cta">
<a href="#back-form" data-fancybox>
<div>?</div>
ЗАДАТЬ ВОПРОС
</a>
</div>
</section>
<script>
document.addEventListener('DOMContentLoaded', function () {
Fancybox.bind('[data-fancybox]')
{% if faq_form.is_bound and faq_form.errors %}
const openFaqButton = document.querySelector('.faq-cta a[data-fancybox]')
if (openFaqButton) {
openFaqButton.click()
}
{% endif %}
})
</script>