h1
  = t("scaffold.pagetitle_new", model: SuccessCriterion.model_name.human)
= turbo_frame_tag dom_id(@success_criterion.element, "new_success_criterion_frame") do
  .border.p-3
    = bootstrap_form_with(model: @success_criterion.persisted? ? @success_criterion : [:element, @success_criterion]) do |form|
      = form.collection_select :check_id, Check.all.order(:external_number_1, :external_number_2, :external_number_3), :id, :display_label, hide_label: true
      = form.submit "Hinzufügen", class: "btn btn-primary"
      = link_to "Abbrechen", @success_criterion.persisted? ? @success_criterion : @success_criterion.element, class: "btn btn-outline-secondary"

.action-row
  = link_to t("scaffold.link_index", model: SuccessCriterion.model_name.human(count: 2)), element_success_criteria_path(@element)