= form_for @log, :html => { :class => 'form-horizontal' }, :url => @log.loggable_path  do |f|
  - if @log.loggable_type or @log.loggable_id
    = f.hidden_field :loggable_id, :class => 'number_field'
    = f.hidden_field :loggable_type, :class => 'text_field'
    = f.hidden_field :logger_id, :class => 'number_field'
    = f.hidden_field :logger_type, :class => 'text_field'
    = f.hidden_field :context, :class => 'text_field'
  - else
    .control-group
      = f.label :loggable_id, :class => 'control-label'
      .controls
        = f.number_field :loggable_id, :class => 'number_field'
    .control-group
      = f.label :loggable_type, :class => 'control-label'
      .controls
        = f.text_field :loggable_type, :class => 'text_field'
    .control-group
      = f.label :logger_id, :class => 'control-label'
      .controls
        = f.number_field :logger_id, :class => 'number_field'
    .control-group
      = f.label :logger_type, :class => 'control-label'
      .controls
        = f.text_field :logger_type, :class => 'text_field'
    .control-group
      = f.label :context, :class => 'control-label'
      .controls
        = f.text_field :context, :class => 'text_field'
  .control-group
    = f.label :start_date, :class => 'control-label'
    .controls
      = f.datetime_select :start_date, :class => 'datetime_select'
  .control-group
    = f.label :end_date, :class => 'control-label'
    .controls
      = f.datetime_select :end_date, :class => 'datetime_select'
  .control-group
    = f.label :description, :class => 'control-label'
    .controls
      = f.text_area :description, :class => 'text_area'
  .control-group
    = f.label :action_id, :class => 'control-label'
    .controls
      = f.number_field :action_id, :class => 'number_field'
  .form-actions
    = f.submit nil, :class => 'btn btn-primary'
    = link_to t('.cancel', :default => t("helpers.links.cancel")), @log.loggable_path, :class => 'btn'