Sha256: 88e1b20291ae59181dfdef330f761e76b596ea8f27ce86b35668949cd6f3414c

Contents?: true

Size: 1.23 KB

Versions: 4

Compression:

Stored size: 1.23 KB

Contents

<%= form_for(subscription, url: url) 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 %>

  <div class="form-group">
    <%= f.label :plan_id, 'Plan' %>
    <%= f.collection_select :plan_id, Tang::Plan.all, :id, :name, {}, { class: 'form-control' } %>
  </div>

  <div class="form-group">
    <%= f.label :quantity %>
    <%= f.number_field :quantity, min: 1, step: 1, class: 'form-control' %>
  </div>

  <div class="form-group">
    <%= f.label :trial_end %>
    <%= f.date_select :trial_end, { include_blank: true, default: nil } %>
  </div>

  <div class="form-check">
    <%= f.label :end_trial_now, class: 'form-check-label' do %>
      <%= f.check_box :end_trial_now, class: 'form-check-input' %> End trial now
    <% end %>
  </div>

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

Version data entries

4 entries across 4 versions & 1 rubygems

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