= semantic_form_for [:admin,@event], :remote => true do |form| 
  .content
    = form.inputs do 
      = form.input :image_file_id, :label => "Image :", :as => :qi_image_select
      = form.input :title, :label => "Titre :" 
      = form.hidden_field :event_id
    
    .event_date_form
      -if form.object.errors.messages[:start_at_date] or form.object.errors.messages[:start_at_time] or form.object.errors.messages[:stop_at_date] or form.object.errors.messages[:stop_at_time]
        %p.errors
          Tout les champs doivent être remplis. Les dates doivent être au format jj/mm/yyyy et les heures au format hh:mm.
      %p
        =form.label :start_at_date, "Début :", :style=>"display:inline-block;width:50px"
        =form.text_field :start_at_date, :id => "event_start_at_date", :class => "datepicker"
        %span.event_time
          =form.label :start_at_time, "heure :"
          =form.text_field :start_at_time, :id => "event_start_at_time", :class => "timepicker", :style => "width:50px"
        =form.check_box :entire_day, :id => "event_entire_day"
        =form.label :entire_day, "jour entier ?"
      %p
        %span.stop_at
          =form.label :stop_at_date, "Fin :", :style=>"display:inline-block;width:50px"
          =form.text_field :stop_at_date, :id => "event_stop_at_date", :class => "datepicker"
          %span.event_time
            =form.label :stop_at_time, "heure :"
            =form.text_field :stop_at_time, :id => "event_stop_at_time", :class => "timepicker", :style => "width:50px"
        =form.check_box :stop_date, :id => "event_stop_date"
        =form.label :stop_date, "fin précisée ?"

    
    = form.inputs do 
      = form.input :description, :label => "Description courte :", :as => :text


  
    
  .actions
    = form.submit "Sauvegarder"
  
  :javascript
    update_event_form();