%= javascript_include_tag 'jquery.base64' %>
<% 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 t("title"), :class=>"control-label" %>
<%= f.hidden_field :title %>
<%= f.label t("calendar.note"), :class=>"control-label" %>
<%= f.hidden_field :note %>
<%= f.label t("url"), :class=>"control-label" %>
<%= f.text_field :url %>
<% data_format = (@event.all_day || @event.new_record?) ? 'yyyy/MM/dd' : 'yyyy/MM/dd hh:mm' %>
<%= f.label t("start_date"), :class=>"control-label" %>
<%#= f.datetime_select :start %>
<%= f.datetime_picker :start, :class => "input-large", data: {"fv-validation" => "required;","fv-messages" => "Cannot be empty;"}, :placeholder => data_format, :new_record => false, :format => data_format %>
<%= f.label t("end_date"), :class=>"control-label" %>
<%#= f.datetime_select :end %>
<%= f.datetime_picker :end, :class => "input-large", :placeholder => data_format, :new_record => false, :format=> data_format %>
<%= f.label t("calendar.calendar"), :class=>"control-label" %>
<%= f.select :calendar_type_id, @categories.collect{|t| [ t.title, t.id ]} %>
<%= select_tags(f, @module_app) %>
>
<%=f.label :period, t("calendar.repeats"),:class=>"control-label" %>
<%=f.select :period, Event::REPEATS.map{|v| [t("calendar.#{v.downcase}"),v]},{},:class=>"span5" %>
<%=f.label :frequency, "Every",:class=>"control-label" %>
<%=f.select :frequency, (1..30).to_a,{},:class=>"span2" %>
<% if action_name == "edit" %>
<%= f.button t("calendar.save"),:type=> 'button', :class=>"btn btn-primary", :onclick => 'before_submit(this)' %>
<% else %>
<%= f.button t(:create_),:type=> 'button', :class=>"btn btn-primary", :onclick => 'before_submit(this)' %>
<% end %>
Cancel