Commit 23cc5cba40395d66389001f11d16c0298dc25cc4

Authored by alex
2 parents 04e0bbf2 cef18d3a

eMerge branch 'master' of http://gitlab.artweb.com.ua/Alexey/openeurope into new_line

Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
frontend/config/main.php
@@ -123,12 +123,14 @@ @@ -123,12 +123,14 @@
123 'formId' => 'feedback-form', 123 'formId' => 'feedback-form',
124 'ajax' => true, 124 'ajax' => true,
125 'successCallback' => 'function (data) { 125 'successCallback' => 'function (data) {
126 - document.getElementById("feedback-form").reset(); 126 + if (data.status == "success"){
  127 + document.getElementById("feedback-form").reset();
127 $(".close").click(); 128 $(".close").click();
128 $(".success_").animate({opacity: 1, top: \'40\'}, 200).addClass("done_"); 129 $(".success_").animate({opacity: 1, top: \'40\'}, 200).addClass("done_");
129 setTimeout(function(){$(".success_").animate({opacity: 0, top: \'0\'}, 200,function(){ 130 setTimeout(function(){$(".success_").animate({opacity: 0, top: \'0\'}, 200,function(){
130 $(this).removeClass("done_"); 131 $(this).removeClass("done_");
131 })}, 4000); 132 })}, 4000);
  133 + }
132 134
133 }', 135 }',
134 ], 136 ],
@@ -189,12 +191,14 @@ @@ -189,12 +191,14 @@
189 'formId' => 'contact-form', 191 'formId' => 'contact-form',
190 'scenario' => 'default', 192 'scenario' => 'default',
191 'successCallback' => 'function (data) { 193 'successCallback' => 'function (data) {
  194 + if (data.status == "success"){
192 document.getElementById("contact-form").reset(); 195 document.getElementById("contact-form").reset();
193 $(".close").click(); 196 $(".close").click();
194 $(".success_").animate({opacity: 1, top: \'40\'}, 200).addClass("done_"); 197 $(".success_").animate({opacity: 1, top: \'40\'}, 200).addClass("done_");
195 setTimeout(function(){$(".success_").animate({opacity: 0, top: \'0\'}, 200,function(){ 198 setTimeout(function(){$(".success_").animate({opacity: 0, top: \'0\'}, 200,function(){
196 $(this).removeClass("done_"); 199 $(this).removeClass("done_");
197 })}, 4000); 200 })}, 4000);
  201 + }
198 }', 202 }',
199 203
200 ], 204 ],