= bootstrap_form_with(model: check, remote: true, data: { controller: "unsaved-changes" }) do |form|
  h2 Details
  = multilang_form_field(form, :name)
  = form.text_field :number, required: false
  .row
    = form.collection_radio_buttons(:principle_id, Principle.all.sort_by(&:t_name), :id, :t_name) { |b| b.label(class: "col-md-2") { b.radio_button + b.text } }
  = form.collection_check_boxes :standard_ids, Standard.all.sort_by{ _1.t_name.downcase }, :id, :t_name, include_blank: true 
  
  h2 Einschränkung/Zugänglichkeit
  .row
    - %w[visual auditory physical cognitive].sort_by { |d| t("disability.#{d}") }.each do |d|
      .col-md-3
        = form.check_box d, label: t("disability.#{d}").capitalize
  
  h2 Anwendbarkeit
  .row
    - %w[applicable_to_analogue applicable_to_app applicable_to_document applicable_to_non_web applicable_to_web].sort_by { |d| t("applicability.#{d}") }.each do |d|
      .col-md-2
        = form.check_box d, label: t("applicability.#{d}").capitalize
  
  h2 Erfolgskriterium
  .d-flex.justify-content-start
    div style="width:60px"
      = form.number_field :external_number_1, hide_label: true
    div.px-1.mt-3 style="" = "."
    div style="width:60px"
      = form.number_field :external_number_2, hide_label: true
    div.px-1.mt-3 style="" = "."
    div style="width:60px"
      = form.number_field :external_number_3, hide_label: true

  = form.text_field :external_url
  = form.select :conformity_level, Check.conformity_levels.keys, include_blank: true
  = multilang_form_field(form, :conformity_notice, as: :rich_text_area)
  = form.select :priority, Check.priorities.keys.map{ [t("priority.#{_1}"), _1] }, include_blank: true
  
  h2 Quick Infos
  = multilang_form_field(form, :quick_criterion, as: :rich_text_area)
  = multilang_form_field(form, :quick_fail, as: :rich_text_area)
  = multilang_form_field(form, :quick_fix, as: :rich_text_area)

  h2 Regular-Kriterium 
  = multilang_form_field(form, :criterion, as: :rich_text_area)
  = multilang_form_field(form, :exemption_details, as: :rich_text_area)
  = multilang_form_field(form, :criterion_details, as: :rich_text_area)
  = multilang_form_field(form, :example, as: :rich_text_area)
  = multilang_form_field(form, :annotation, as: :rich_text_area)

  h2 Intern
  = form.rich_text_area :test_instructions
  = multilang_form_field(form, :powerpoint_text, as: :rich_text_area)
  = form.rich_text_area :comment

  h2 Links
  - LinkCategory.all.sort_by(&:t_name).each do |c|
    h3 = c.t_name
    = form.collection_check_boxes(:link_ids, c.links.sort_by(&:t_text), :id, :to_s, hide_label: true)
  / = form.collection_check_boxes :link_ids, Link.all.sort_by(&:text), :id, :to_s

  / = form.rich_text_area :success_criterion_de
  = form.submit
