Commit 9c54f5a0e561c87789b813444c56201c2e47d3d9
Merge branch 'master' of gitlab.artweb.com.ua:Alexey/kristal-estet
Showing
2 changed files
with
6 additions
and
2 deletions
 
Show diff stats
frontend/controllers/SiteController.php
frontend/web/js/modal.js
| ... | ... | @@ -59,6 +59,10 @@ $( | 
| 59 | 59 | data: formData, | 
| 60 | 60 | success: function(data) { | 
| 61 | 61 | f.reset(); | 
| 62 | + if (data.type == 'appointment') { | |
| 63 | + console.log('appointment submitted'); | |
| 64 | + dataLayer.push({'event': 'mainFormSub'}); | |
| 65 | + } | |
| 62 | 66 | // form.replaceWith(data.alert) | 
| 63 | 67 | // $(".modal-dialog").append(data.alert); | 
| 64 | 68 | // setTimeout(function(){location.reload()}, 5000); | 
| ... | ... | @@ -66,8 +70,7 @@ $( | 
| 66 | 70 | $(".success_").animate({opacity: 1, top: '40'}, 200).addClass("done_"); | 
| 67 | 71 | setTimeout(function(){$(".success_").animate({opacity: 0, top: '0'}, 200,function(){ | 
| 68 | 72 | $(this).removeClass("done_"); | 
| 69 | - })}, 4000); | |
| 70 | - | |
| 73 | + })}, 4000) | |
| 71 | 74 | }, | 
| 72 | 75 | error: function() { | 
| 73 | 76 | ... | ... | 
 
