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

62 lines
2.7 KiB
Text
Raw Permalink Normal View History

= bootstrap_form_with(model: check, remote: true, data: { controller: "unsaved-changes" }) do |form|
2024-09-05 22:54:38 +02:00
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-10-26 00:14:26 +02:00
- %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
2024-09-11 20:44:33 +02:00
= form.check_box d, label: t("applicability.#{d}").capitalize
2024-09-11 22:04:55 +02:00
2024-11-03 21:58:25 +01:00
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
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)
2024-10-27 18:25:25 +01:00
= multilang_form_field(form, :annotation, as: :rich_text_area)
2024-09-05 22:54:38 +02:00
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