@@ -0,0 +1,9 @@
+<% if @subscription_coupon.valid? %>
+  $(".totalprice").html('<%= t("subscriptions.discount.#{@subscription_coupon.duration}", final_price: @subscription_coupon.apply(@purchase.price), full_price: @purchase.price, duration_in_months: @subscription_coupon.duration_in_months) %>');
+  $(".coupon .error").hide();
+  $("#total a").hide();
+  $(".coupon").hide();
+  $("#purchase_stripe_coupon_id").val("<%= @subscription_coupon.code %>");
+<% else %>
+  $(".coupon .error").show();
+<% end %>
I'd vote that new js be written in coffeescript instead, with us converting the old stuff when we happen to touch it.