|
| 1 | +<% content_for :page_title, @article_title %> |
| 2 | +<% content_for :title_context, @article_title %> |
| 3 | +<% content_for :back_link, "_blank" %> |
| 4 | +<% content_for :title, t("fact_check_response.heading") %> |
| 5 | +<% if @errors.any? %> |
| 6 | + <% content_for :error_summary, render(partial: "application/confirmations/response_error_summary") %> |
| 7 | +<% end %> |
| 8 | +<div class="govuk-grid-row"> |
| 9 | + <div class="govuk-grid-column-two-thirds"> |
| 10 | + <%= form_with url: respond_path, |
| 11 | + method: :post, |
| 12 | + scope: :fact_check_response do |f| %> |
| 13 | + <%= f.hidden_field :page_title, :value => @article_title %> |
| 14 | + <%= f.hidden_field :page_id, :value => "id" %> |
| 15 | + <%= render "govuk_publishing_components/components/radio", { |
| 16 | + name: "fact_check_response[status]", |
| 17 | + heading: t("fact_check_response.form_heading"), |
| 18 | + id: "selection_radio_buttons", |
| 19 | + visually_hidden_heading: true, |
| 20 | + error_message: (@errors[:status].presence), |
| 21 | + items: [ |
| 22 | + { |
| 23 | + value: "correct", |
| 24 | + text: t("fact_check_response.correct"), |
| 25 | + id: "correct", |
| 26 | + checked: @form_data.present? && @form_data["status"] == "correct", |
| 27 | + }, |
| 28 | + { |
| 29 | + value: "incorrect", |
| 30 | + text: t("fact_check_response.incorrect"), |
| 31 | + id: "incorrect", |
| 32 | + checked: @errors[:details].present? || @form_data.present? && @form_data["status"] == "incorrect", |
| 33 | + conditional: render(partial: "application/confirmations/factual_error_textarea"), |
| 34 | + }, |
| 35 | + ], |
| 36 | + } %> |
| 37 | + |
| 38 | + <%= render "govuk_publishing_components/components/button", { |
| 39 | + text: t("fact_check_response.continue_button"), |
| 40 | + margin_bottom: 6, |
| 41 | + } %> |
| 42 | + <% end %> |
| 43 | + </div> |
| 44 | +</div> |
0 commit comments