 
  <% if @event.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@event.errors.count, "error") %> prohibited this event from being saved:</h2>

      <ul>
      <% @event.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
  <div class="row-fluid">
    <%= f.label :title, :class=>"control-label span3" %>
    <%= f.text_field :title %>
  </div>
  <div class="row-fluid">
    <%= f.label :note, :class=>"control-label span3" %>
    <%= f.text_area :note, :rows => 3 %>
  </div>
  <div class="row-fluid">
     <label class="checkbox inline"><%= f.check_box :all_day,:id=>"all_day_check", :checked => @all_day %> All Day</label>
  </div>

  <div class="row-fluid">
    <%= f.label :start, :class=>"control-label span3" %>
    <%#= f.datetime_select :start %>
    <div data-date-format="yyyy/MM/dd hh:mm" data-language="en" data-picktime="true" class="input-append datetimepick">
      <%= f.text_field :start, :class => "input-large", :placeholder => 'YYYY/MM/DD',:value => @start_d_t %>
      <span class="add-on clearDate">
          <i class="icons-cross-3"></i>
      </span>
      <span class="add-on iconbtn">
          <i data-time-icon="icons-clock" data-date-icon="icons-calendar"></i>
      </span>
    </div>
  </div>
  <div class="row-fluid">
    <%= f.label :end, :class=>"control-label span3" %>
    <%#= f.datetime_select :end %>
    <div data-date-format="yyyy/MM/dd hh:mm" data-language="en" data-picktime="true" class="input-append datetimepick">
     <%= f.text_field :end, :class => "input-large", :placeholder => 'YYYY/MM/DD', :value => @end_d_t %>
     <!-- <input type="text" placeholder="YYYY/MM/DD" class="input-large" name="event[end]"></input> -->

      <span class="add-on clearDate">
          <i class="icons-cross-3"></i>
      </span>
      <span class="add-on iconbtn">
          <i data-time-icon="icons-clock" data-date-icon="icons-calendar"></i>
      </span>
    </div>
  </div>
  <div class="row-fluid">
    <%= f.label "Calendar", :class=>"control-label span3" %>
    <%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %>
  </div>
  <div class="row-fluid">
     <label class="checkbox inline"><%= f.check_box :recurring,:id=>"recurring_checkbox", :checked => @recurring %> Recurring</label>
  </div>
  <div id="recurring_panel" <%= (@recurring ? '' : "style=display:none;") %> >
    <div class="row-fluid">
      <%=f.label :period, "Repeats",:class=>"control-label span3" %>
      <%=f.select :period, Event::REPEATS,{},:class=>"span5" %>
    </div>
    <div class="row-fluid">
      <%=f.label :frequency, "Every",:class=>"control-label span3" %>
      <%=f.select :frequency, (1..30).to_a,{},:class=>"span2" %>
    </div>
  </div>

  <div class="row-fluid">
    <div class="span9 offset3">
      <% if action_name == "edit" %>
       <%= f.submit t("calendar.save"), :class=>"btn btn-primary" %>
       <% else %>
       <%= f.submit t(:create_), :class=>"btn btn-primary" %>
       <% end %>
      <a href="" class="btn btn-close">Cancel</a>
    </div>
  </div>
