diff --git a/static/js/user_profile.js b/static/js/user_profile.js
index 296102c..590b8aa 100644
--- a/static/js/user_profile.js
+++ b/static/js/user_profile.js
@@ -804,6 +804,14 @@ function checkDate() {
}
+
+// const form = document.querySelector('form');
+// document.querySelector('[type="button"]').addEventListener('click', e => {
+// if (!form.checkValidity()) {
+// alert('Хьюстон, у нас проблемы!');
+// }
+// });
+
function RequestCommercialOffer (el){
event.preventDefault()
@@ -819,7 +827,7 @@ function RequestCommercialOffer (el){
formData.set('form_name',form_name)
- $.ajax({
+ $.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: '/user_account/send_message/',
type: "POST",
@@ -844,6 +852,10 @@ function RequestCommercialOffer (el){
// document.querySelector(".login").innerHTML = data.responseJSON.html
}
});
+
+
+
+
}
// function SendFeedbackForm (el){
diff --git a/templates/blocks/static_pages_blocks/b_about_service.html b/templates/blocks/static_pages_blocks/b_about_service.html
index ac17bc5..2d23458 100644
--- a/templates/blocks/static_pages_blocks/b_about_service.html
+++ b/templates/blocks/static_pages_blocks/b_about_service.html
@@ -60,7 +60,7 @@
- {% include "blocks/static_pages_blocks/b_feedback_form.html" %}
+ {% include "blocks/static_pages_blocks/../../widgets/w_feedback_form.html" %}
diff --git a/templates/blocks/static_pages_blocks/b_contacts.html b/templates/blocks/static_pages_blocks/b_contacts.html
index faad716..8053240 100644
--- a/templates/blocks/static_pages_blocks/b_contacts.html
+++ b/templates/blocks/static_pages_blocks/b_contacts.html
@@ -1,6 +1,6 @@
{% load i18n %}
- {% include "blocks/static_pages_blocks/b_feedback_form.html" %}
+ {% include "blocks/static_pages_blocks/../../widgets/w_feedback_form.html" %}
diff --git a/templates/blocks/static_pages_blocks/b_customer_service.html b/templates/blocks/static_pages_blocks/b_customer_service.html
index ca126a9..4625e9f 100644
--- a/templates/blocks/static_pages_blocks/b_customer_service.html
+++ b/templates/blocks/static_pages_blocks/b_customer_service.html
@@ -1,7 +1,7 @@
{% load i18n %}
- {% include "blocks/static_pages_blocks/b_feedback_form.html" %}
+ {% include "blocks/static_pages_blocks/../../widgets/w_feedback_form.html" %}
diff --git a/templates/blocks/static_pages_blocks/b_feedback_form.html b/templates/widgets/w_feedback_form.html
similarity index 88%
rename from templates/blocks/static_pages_blocks/b_feedback_form.html
rename to templates/widgets/w_feedback_form.html
index 8e2e0b6..ca731ab 100644
--- a/templates/blocks/static_pages_blocks/b_feedback_form.html
+++ b/templates/widgets/w_feedback_form.html
@@ -24,7 +24,7 @@
{% if form.username and form.errors.username %}
{{ form.errors.name }}
@@ -32,14 +32,21 @@
-
+
{% if form.email and form.errors.email %}
{{ form.errors.email }}
{% endif %}
-
+
{% if form.tel and form.errors.tel %}
{{ form.errors.tel }}
{% endif %}
@@ -51,7 +58,7 @@