Sha256: adb686ad0680dfb2560b8b39106154d955fc23fc7a9d2468d29f35e3b9060161

Contents?: true

Size: 891 Bytes

Versions: 6

Compression:

Stored size: 891 Bytes

Contents

<%= render 'header' %>

<h1>Change coupon</h1>

<%= form_for(@subscription, url: tang.admin_subscription_coupon_path(@subscription), method: :put) do |f| %>
  <% if @subscription.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@subscription.errors.count, "error") %> prohibited this subscription from being saved:</h2>

      <ul>
      <% @subscription.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="form-group">
    <%= f.label :coupon_id %><br>
    <%= f.collection_select :coupon_id, Tang::Coupon.all, :id, :stripe_id, { prompt: true }, { class: 'form-control' } %>
  </div>

  <%= link_to 'Cancel', tang.admin_subscription_path(@subscription), class: 'btn btn-secondary' %>
  <%= f.submit 'Change coupon', class: 'btn btn-primary' %>
<% end %>


<%= render 'footer' %>

Version data entries

6 entries across 6 versions & 1 rubygems

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