<% if f.object.new_record? %>
<%= f.label :user_id, I18n.t('spree.user'), class: "required" %>
<%= f.collection_select :user_id, Spree.user_class.all, :id, :email, {}, class: "select2 fullwidth" %>
<% end %>
<%= f.label :actionable_date %>
<%= f.text_field :actionable_date, class: "form-control fullwidth datepicker" %>
<%= f.label :interval_length %>
<%= f.number_field :interval_length, class: "form-control fullwidth" %>
<%
unit_values = SolidusSubscriptions::LineItem.interval_units.keys
units = unit_values.map do |unit|
[
SolidusSubscriptions::LineItem.human_attribute_name("interval_units.#{unit}"),
unit,
]
end
%>
<%= f.label :interval_units %>
<%= f.select(:interval_units, units, {}, class: 'fullwidth select2') %>
<%= f.label :end_date %>
<%= f.text_field :end_date, class: "fullwidth datepicker" %>
<%= f.label :store_id %>
<%= f.collection_select :store_id, Spree::Store.all, :id, :name, {}, class: 'fullwidth select2' %>