app/views/e9_crm/leads/create.js.erb in e9_crm-0.1.18 vs app/views/e9_crm/leads/create.js.erb in e9_crm-0.1.19
- old
+ new
@@ -1,11 +1,6 @@
var $offer = $('#offer_<%= @offer.id %>_body');
<% if resource.errors.any? %>
$('form .errors', $offer).html("<%= escape_javascript(resource_error_messages!) %>");
<% else %>
- <% if @offer.kind_of?(SubscriptionOffer) %>
-$('form .errors', $offer).html("");
-$('form .notice', $offer).html("<%= escape_javascript(@offer.success_alert_text) %>");
- <% else %>
-window.location = "<%= public_offer_path(@offer) %>";
- <% end %>
+setTimeout(function(){ location.href="<%= public_offer_path(@offer) %>"; },0)
<% end %>