faq.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {% extends 'landing/index.html' %} {% load static %} {% block container %}
  2. <style>
  3. .accordion-button:not(.collapsed) {
  4. color: #000000;
  5. background-color: #ffffff;
  6. box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
  7. }
  8. .accordion-button:focus {
  9. z-index: 3;
  10. border-color: #ffffff;
  11. outline: 0;
  12. box-shadow: 0 0 0 0.25rem transparent;
  13. }
  14. </style>
  15. <div class="row" style="min-height: 500px">
  16. <div class="container-fluid">
  17. <div class="row mt-5">
  18. <h2>ЧАСТО ЗАДАВАЕМЫЕ ВОПРОСЫ</h2>
  19. <div class="accordion accordion-flush" id="accordionFlushExample">
  20. {% for item in faq %}
  21. <div class="accordion-item">
  22. <h2 class="accordion-header" id="flush-headingOne">
  23. <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapse{{item.id}}" aria-expanded="false" aria-controls="flush-collapse{{item.id}}">
  24. <h5>{{ item.question }}</h5>
  25. </button>
  26. </h2>
  27. <div id="flush-collapse{{item.id}}" class="accordion-collapse collapse" aria-labelledby="flush-heading{{item.id}}" data-bs-parent="#accordionFlushExample">
  28. <div class="accordion-body" style="font-size: 18px">
  29. {{ item.answer }}
  30. </div>
  31. </div>
  32. </div>
  33. {% endfor %}
  34. </div>
  35. </div>
  36. <div class="row">
  37. <hr />
  38. <h2>ЗАДАТЬ СВОЙ ВОПРОС</h2>
  39. </div>
  40. <form method="post" style="font-family: Forum" class="row g-2">
  41. {% csrf_token %}
  42. <div class="row">
  43. {% if form.captcha.errors %}
  44. <div
  45. class="alert alert-danger mt-3 w-100"
  46. role="alert"
  47. >
  48. Неверный ответ на CAPTCHA
  49. </div>
  50. {% endif %}
  51. <div class="col-12 col-md-6 row g-2">
  52. {{ form.name }} {{ form.email }} {{ form.message }}
  53. </div>
  54. <div class="col-12 col-md-6 mt-3">
  55. <span class="my-3">{{ form.captcha}} </span>
  56. <button
  57. class="btn btn-light mt-3 w-100"
  58. id="btnsend"
  59. type="submit"
  60. style="color: #060936; margin: 0px; box-shadow: 1px 1px 2px gray"
  61. >
  62. Отправить
  63. </button>
  64. </div>
  65. </div>
  66. </form>
  67. <script>
  68. //Скрипт для отображения капчи после заполнения всех полей
  69. var captchaImage = document.getElementsByClassName("captcha")[0];
  70. var captcha = document.getElementById("id_captcha_1");
  71. captchaImage.style.height = "80px";
  72. captchaImage.style.marginBottom = "20px";
  73. captcha.className += " form-control";
  74. captcha.placeholder = "Ответ на капчу";
  75. </script>
  76. </div>
  77. </div>
  78. {% endblock %}