.edit-form
  .errors
    - @dataset_edit.errors.full_messages.each do |message|
      div.error= message

  = form_for @dataset_edit, url: dataset_dataset_edit_path(params[:dataset_id], params[:id]), method: :patch do |f|
    = f.hidden_field :dataset_id, value: @dataset.id
    = f.hidden_field :key, value: params[:id]

    .field
      = f.label params[:id]

      - if is_boolean_field?(params[:id])
      - else
        = f.text_field :value, placeholder: dataset_value_for(params[:id]).to_s

    .field
      = f.label :commit
      = f.text_area :commit

    = f.fields_for(:source) do |s|
      .field
        = s.label :source_file
        = s.file_field :source_file

    = f.submit "Save"
    span.or or
    = link_to "Cancel", dataset_path(@dataset.area), class: "button cancel"

  .history
    = render 'history'

.edit-form
  .errors
    - @dataset_edit.errors.full_messages.each do |message|
      div.error.notice= message

  = form_for @dataset_edit, url: dataset_dataset_edit_path(params[:dataset_id], params[:id]), method: :patch do |f|
    = f.hidden_field :dataset_id, value: @dataset.id
    = f.hidden_field :key, value: params[:id]

    .field
      = f.label params[:id]

      - if is_boolean_field?(params[:id])
        = f.check_box :value, { checked: !!dataset_value_for(params[:id]) }, "true", "false"
      - else
        = f.text_field :value, placeholder: dataset_value_for(params[:id]).to_s

    .field
      = f.label :commit
      = f.text_area :commit

    = f.fields_for(:source) do |s|
      .field
        = s.label :source_file
        = s.file_field :source_file

    = f.submit "Save"
    span.or or
    = link_to "Cancel", dataset_path(@dataset.area), class: "button cancel"

  .history
    = render 'history'

Set checkbox tag if value is of a Boolean type
Set checkbox tag if value is of a Boolean type

quintel/etlocal,quintel/etlocal,quintel/etlocal