
  <%= bootstrap_form_with(model: success_criterion.persisted? ? success_criterion : [:element, success_criterion], data: { controller: "unsaved-changes" }) do |form| %>
    <%= form.text_field :title %>
    <%= form.collection_select :result, SuccessCriterion.results.keys.map { [_1, t("activerecord.attributes.success_criterion.results/#{_1}")] }, :first, :second, include_blank: success_criterion.result ? "(Resultat zurücksetzen)" : "(unbeantwortet)" %>
    <%= form.rich_text_area :quick_criterion %>
    <%= form.rich_text_area :quick_fail %>
    <%= form.rich_text_area :quick_fix %>
    <%= form.rich_text_area :test_comment %>
    <%= form.submit class: "btn btn-primary" %>
    <%= link_to "Abbrechen", success_criterion.persisted? ? success_criterion : success_criterion.element, class: "btn btn-outline-secondary" %>
  <% end %>
