% if @event.errors.any? %>
<%= pluralize(@event.errors.count, "error") %> prohibited this event from being saved:
<% @event.errors.full_messages.each do |msg| %>
- <%= msg %>
<% end %>
<% end %>
<%= f.label :title, :class=>"control-label" %>
<%= f.text_field :title %>
<%= f.label :note, :class=>"control-label" %>
<%= f.text_area :note, :rows => 3 %>
<%= f.label :start, :class=>"control-label" %>
<%#= f.datetime_select :start %>
<%= f.text_field :start, :class => "input-large", data: {"fv-validation" => "required;","fv-messages" => "Cannot be empty;"}, :placeholder => 'YYYY/MM/DD',:value => @start_d_t %>
<%= f.label :end, :class=>"control-label" %>
<%#= f.datetime_select :end %>
<%= f.text_field :end, :class => "input-large", :placeholder => 'YYYY/MM/DD', :value => @end_d_t %>
<%= f.label "Calendar", :class=>"control-label" %>
<%= f.select :calendar_type_id, @categories.collect{|t| [ t.title, t.id ]} %>
>
<%=f.label :period, "Repeats",:class=>"control-label" %>
<%=f.select :period, Event::REPEATS,{},:class=>"span5" %>
<%=f.label :frequency, "Every",:class=>"control-label" %>
<%=f.select :frequency, (1..30).to_a,{},:class=>"span2" %>
<% if action_name == "edit" %>
<%= f.submit t("calendar.save"), :class=>"btn btn-primary" %>
<% else %>
<%= f.submit t(:create_), :class=>"btn btn-primary" %>
<% end %>
Cancel