<%= f.field_container :start_date do %>
<%= f.label :start_date, t('spree.active_sale.event.active_record.start_date') %>
<%= f.error_message_on :start_date %>
<% if @active_sale_event.start_date? %>
<% start_date = l(@active_sale_event.start_date, :format => t('spree.active_sale.event.datetimepicker.format')) %>
<% else %>
<% start_date = l(Time.zone.now, :format => t('spree.active_sale.event.datetimepicker.format')) %>
<% end %>
<%= f.text_field :start_date, :value => start_date, :class => 'timepicker' %>
<% end %>
<%= f.field_container :end_date do %>
<%= f.label :end_date, t('spree.active_sale.event.active_record.end_date') %>
<%= f.error_message_on :end_date %>
<% end_date = l((@active_sale_event.end_date? ? @active_sale_event.end_date : Time.zone.now+1.day), :format => t('spree.active_sale.event.datetimepicker.format')) %>
<%= f.text_field :end_date, :value => end_date, :class => 'timepicker' %>
<% end %>
<%= f.label :eventable, t('spree.active_sale.event.active_record.eventable_type', :default => :evenetable) %>
<%= t('spree.active_sale.event.eventable_hint') %>
<%= f.select :eventable_type, [["Product","Spree::Product"], ["Taxon","Spree::Taxon"]], { :include_blank => false }, { :class => 'select2' } %>
<%= f.error_message_on :eventable %>
<%= f.label :eventable_name, t('spree.active_sale.event.active_record.eventable_name', :default => :eventable_name) %>
<%= t('spree.active_sale.event.eventable_name_hint') %>
<%= f.error_message_on :eventable_name %>
<%= f.text_field :eventable_name, :class => 'autocomplete', :data => { :auto_complete_url => eventables_admin_active_sale_active_sale_events_url(:active_sale_id => @active_sale.id) } %>
<%= f.field_container :is_active, :class => ['checkbox'] do %>
<% end %>
<%= f.field_container :is_hidden, :class => ['checkbox'] do %>
<% end %>
<%= f.field_container :is_permanent, :class => ['checkbox'] do %>
<% end %>
<%= f.field_container :discount do %>
<%= f.label :discount, t('spree.active_sale.event.active_record.discount', :default => :discount) %>
<%= t('spree.active_sale.event.discount_hint') %>
<%= f.error_message_on :discount %>
<%= f.text_field :discount, :size => 2, :maxlength => 2 %>
<% end %>