0.0.284 add send form from footer
This commit is contained in:
@@ -458,6 +458,9 @@ footer>div {
|
|||||||
.fifth-column-first {
|
.fifth-column-first {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
.wrapper_footer_form{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
#footer_input_button {
|
#footer_input_button {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -1909,6 +1912,7 @@ button#edit_route {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
button.confirm_remove{
|
button.confirm_remove{
|
||||||
width: 48.5%;
|
width: 48.5%;
|
||||||
border: 1px solid #ff0000a8;
|
border: 1px solid #ff0000a8;
|
||||||
@@ -1924,7 +1928,7 @@ button.confirm_remove{
|
|||||||
}
|
}
|
||||||
|
|
||||||
button.cancel_remove{
|
button.cancel_remove{
|
||||||
width: 49.5%;
|
width: 48.5%;
|
||||||
border: 1px solid #808080cc;
|
border: 1px solid #808080cc;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
color: #808080cc;
|
color: #808080cc;
|
||||||
|
|||||||
@@ -205,6 +205,12 @@ function hideBlock(el) {
|
|||||||
let clear_form = document.getElementsByClassName('clear_form');
|
let clear_form = document.getElementsByClassName('clear_form');
|
||||||
clear_form[0].reset();
|
clear_form[0].reset();
|
||||||
|
|
||||||
|
let disable_btn = document.getElementById('send_feedback_form');
|
||||||
|
let disable_btn_f = document.getElementById('send_feedback_form');
|
||||||
|
|
||||||
|
disable_btn.removeAttribute('disabled');
|
||||||
|
disable_btn_f.removeAttribute('disabled');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -803,7 +809,9 @@ function RequestCommercialOffer (el){
|
|||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
let disable_btn = document.getElementById('send_feedback_form');
|
let disable_btn = document.getElementById('send_feedback_form');
|
||||||
|
let disable_btn_f = document.getElementById('footer_input_button');
|
||||||
disable_btn.setAttribute('disabled', true);
|
disable_btn.setAttribute('disabled', true);
|
||||||
|
disable_btn_f.setAttribute('disabled', true);
|
||||||
|
|
||||||
let form = el.form;
|
let form = el.form;
|
||||||
let formData = new FormData(form);
|
let formData = new FormData(form);
|
||||||
@@ -823,9 +831,12 @@ function RequestCommercialOffer (el){
|
|||||||
data: formData,
|
data: formData,
|
||||||
success: function(data){
|
success: function(data){
|
||||||
|
|
||||||
$(data.html).insertBefore(document.querySelector(".feedback_form"))
|
if(el.id !== 'footer_input_button'){
|
||||||
let disable_btn = document.getElementById('send_feedback_form');
|
let insert_text = document.querySelector(".feedback_form")
|
||||||
disable_btn.removeAttribute('disabled');
|
$(data.html).insertBefore(insert_text)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -7,11 +7,21 @@
|
|||||||
<div class="footer_logo"><img class="svg" src="/static/img/svg/LogoWhite.svg"></div>
|
<div class="footer_logo"><img class="svg" src="/static/img/svg/LogoWhite.svg"></div>
|
||||||
<div>
|
<div>
|
||||||
<div class="footer_text_sub">{% trans "Подпишись и будь в курсе всех событий, а также получай подарки и бонусы от Trip With Bonus" %}</div>
|
<div class="footer_text_sub">{% trans "Подпишись и будь в курсе всех событий, а также получай подарки и бонусы от Trip With Bonus" %}</div>
|
||||||
<div class="footer_input_wrap">
|
|
||||||
|
|
||||||
<input class="footer_input" type="text" placeholder="{% trans "Введите ваш e-mail" %}">
|
<form class="clear_form" data-name="msg_from_footer">
|
||||||
<div id="footer_input_button"><img class="svg" src="/static/img/svg/CaretCircleRight.svg"></div>
|
<div class="footer_input_wrap">
|
||||||
</div>
|
<input class="footer_input" name="email" type="email" placeholder="{% trans "Введите ваш e-mail" %}">
|
||||||
|
<button onclick="RequestCommercialOffer(this)" id="footer_input_button">
|
||||||
|
<img class="svg" src="/static/img/svg/CaretCircleRight.svg">
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="social_media_footer">
|
<div class="social_media_footer">
|
||||||
<a href=""><img class="svg" src="/static/img/svg/Instagram.svg"></a>
|
<a href=""><img class="svg" src="/static/img/svg/Instagram.svg"></a>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="button_feedback_form">
|
<div class="button_feedback_form">
|
||||||
<button onclick="RequestCommercialOffer(this, {once: true})" id="send_feedback_form">{% translate 'Отправить сообщение' %}</button>
|
<button onclick="RequestCommercialOffer(this)" id="send_feedback_form">{% translate 'Отправить сообщение' %}</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user