<%= javascript_include_tag 'jquery.base64' %> <% if @event.errors.any? %>

<%= pluralize(@event.errors.count, "error") %> prohibited this event from being saved:

<% end %> <% locales = Site.first.in_use_locales rescue I18n.available_locales locales = [I18n.locale] + (locales - [I18n.locale]) %>
<%= f.label t("title"), :class=>"control-label" %>
<% locales.each_with_index do |locale, i| %> <%= f.fields_for :title_translations, f.object do |f| %>
" id="title_translations_<%= locale %>"> <% title = f.object.title(locale) %>
<%= title.to_s.html_safe %>
<%= hidden_field_tag "#{f.object_name}[#{locale}]", title %>
<% end %> <% end %>
<% locales.each_with_index do |locale, i| %> " href="#title_translations_<%= locale %>" data-toggle="tab"><%= t(locale.to_s) %> <% end %>
<%= f.label t("calendar.note"), :class=>"control-label" %>
<% locales.each_with_index do |locale, i| %> <%= f.fields_for :note_translations, f.object do |f| %>
" id="note_translations_<%= locale %>"> <% note = f.object.note(locale) %>
<%= note.to_s.html_safe %>
<%= hidden_field_tag "#{f.object_name}[#{locale}]", note %>
<% end %> <% end %>
<% locales.each_with_index do |locale, i| %> " href="#note_translations_<%= locale %>" data-toggle="tab"><%= t(locale.to_s) %> <% end %>
<%= f.label t("url"), :class=>"control-label" %>
<% locales.each_with_index do |locale, i| %> <%= f.fields_for :url_translations, f.object do |f| %>
" id="note_translations_<%= locale %>"> <% url = f.object.url(locale) %> <%= text_field_tag "#{f.object_name}[#{locale}]", url %>
<% end %> <% end %>
<% locales.each_with_index do |locale, i| %> " href="#url_translations_<%= locale %>" data-toggle="tab"><%= t(locale.to_s) %> <% end %>
<% 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