a11yist/app/views/checks/_form.html.slim

52 lines
2.2 KiB
Text
Raw Normal View History

2024-09-05 22:54:38 +02:00
= bootstrap_form_with(model: check, remote: true) do |form|
h2 Details
= multilang_form_field(form, :name)
2024-09-12 01:18:04 +02:00
= form.text_field :number, required: false
2024-09-11 20:44:33 +02:00
.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
2024-09-11 22:04:55 +02:00
2024-10-25 19:25:01 +02:00
h2 Einschränkung/Zugänglichkeit
2024-09-05 22:54:38 +02:00
.row
2024-09-11 20:44:33 +02:00
- %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
2024-09-11 22:04:55 +02:00
2024-09-05 22:54:38 +02:00
h2 Anwendbarkeit
.row
2024-09-11 20:44:33 +02:00
- %w[applicable_to_web applicable_to_app].sort_by { |d| t("applicability.#{d}") }.each do |d|
.col-md-6
= form.check_box d, label: t("applicability.#{d}").capitalize
2024-09-11 22:04:55 +02:00
2024-09-05 22:54:38 +02:00
h2 Richtlinie
= form.text_field :external_number
2024-09-11 20:44:33 +02:00
= form.text_field :external_url
2024-09-05 22:54:38 +02:00
= 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
2024-09-11 22:04:55 +02:00
2024-09-05 22:54:38 +02:00
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)
2024-10-25 19:25:01 +02:00
= multilang_form_field(form, :exemption_details, as: :rich_text_area)
2024-09-05 22:54:38 +02:00
= multilang_form_field(form, :criterion_details, as: :rich_text_area)
= multilang_form_field(form, :example, 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