Sha256: 2d4df370e14854e56e441e0c7465b1b604a2ed615e945dac598742239da3e3c0

Contents?: true

Size: 1.09 KB

Versions: 6

Compression:

Stored size: 1.09 KB

Contents

<%= form_for(subscription, url: url, html: { id: 'payment-form' }) do |f| %>
  <% if subscription.errors.any? %>
    <div id="error_explanation" class="alert alert-danger">
      <h4 class="alert-heading"><%= pluralize(subscription.errors.count, "error") %> prohibited this subscription from being saved:</h4>
      <ul class="mb-0">
        <% subscription.errors.full_messages.each do |message| %>
          <li><%= message %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <%= f.hidden_field :plan, value: subscription.plan.id %>

  <h3><%= subscription.plan.name %></h3>
  <h4><%= plan_cost(subscription.plan) %></h4>

  <% if current_user.subscription_coupon.present? %>
    <hr>
    <h5>Discount</h5>
    <p><%= "#{current_customer.subscription_coupon.stripe_id} - #{coupon_off(current_customer.subscription_coupon)} #{current_customer.subscription_coupon.formatted_duration}" %></p>
  <% end %>

  <%= render 'tang/account/cards/payment' %>

  <%= link_to 'Cancel', account_subscription_path, class: 'btn btn-secondary' %>
  <%= f.submit 'Submit Payment', class: 'btn btn-primary' %>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tang-0.2.2 app/views/tang/account/subscriptions/_form.html.erb
tang-0.2.1 app/views/tang/account/subscriptions/_form.html.erb
tang-0.2.0 app/views/tang/account/subscriptions/_form.html.erb
tang-0.1.0 app/views/tang/account/subscriptions/_form.html.erb
tang-0.0.9 app/views/tang/account/subscriptions/_form.html.erb
tang-0.0.8 app/views/tang/account/subscriptions/_form.html.erb