Sha256: db690a593fa7f242e0b2d687c0a5a09cae1a54c2eba1f8349f93517b02deec81
Contents?: true
Size: 1.71 KB
Versions: 6
Compression:
Stored size: 1.71 KB
Contents
<%= form_for(coupon, url: url) do |f| %> <% if coupon.errors.any? %> <div id="error_explanation" class="alert alert-danger"> <h4 class="alert-heading"><%= pluralize(coupon.errors.count, "error") %> prohibited this coupon from being saved:</h4> <ul class="mb-0"> <% coupon.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> <% end %> <div class="form-group"> <%= f.label :percent_off %> <%= f.number_field :percent_off, class: 'form-control' %> </div> <div class="form-group"> <%= f.label :currency %> <%= f.select :currency, options_for_select(['usd'], coupon.currency), {}, class: 'form-control' %> </div> <div class="form-group"> <%= f.label :amount_off %> <%= f.number_field :amount_off, class: 'form-control' %> </div> <div class="form-group"> <%= f.label :duration %> <%= f.select :duration, options_for_select(Tang::Coupon::DURATIONS, coupon.duration), {}, { class: 'form-control' } %> </div> <div class="form-group"> <%= f.label :duration_in_months %> <%= f.number_field :duration_in_months, class: 'form-control' %> </div> <div class="form-group"> <%= f.label :stripe_id, 'ID (Code)' %> <%= f.text_field :stripe_id, required: true, class: 'form-control' %> </div> <div class="form-group"> <%= f.label :max_redemptions %> <%= f.number_field :max_redemptions, class: 'form-control' %> </div> <div class="form-group"> <%= f.label :redeem_by %> <%= f.date_select :redeem_by, { include_blank: true, default: nil } %> </div> <%= link_to 'Cancel', tang.admin_coupons_path, class: 'btn btn-secondary' %> <%= f.submit class: 'btn btn-primary' %> <% end %>
Version data entries
6 entries across 6 versions & 1 rubygems