You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.4 KiB
38 lines
1.4 KiB
2 years ago
|
<% content_for :before_content do %>
|
||
|
<% title = "Tell us if your organisation is merging" %>
|
||
|
<% content_for :title, title %>
|
||
|
<%= govuk_back_link href: organisations_merge_request_path(id: @merge_request) %>
|
||
|
<% end %>
|
||
|
|
||
|
<h2 class="govuk-heading-l">Which organisation is absorbing the others?</h2>
|
||
|
|
||
|
<div class="govuk-grid-row">
|
||
|
<div class="govuk-grid-column-two-thirds-from-desktop">
|
||
|
<p class="govuk-body">Select the organisation that the other organisations are merging into.</p>
|
||
|
|
||
|
<%= form_with model: @merge_request, url: merge_request_path, method: :patch do |f| %>
|
||
|
<%= f.govuk_error_summary %>
|
||
|
|
||
|
<%= f.govuk_radio_buttons_fieldset(
|
||
|
:absorbing_organisation_id,
|
||
|
hint: { text: "For example, if Skype and Yammer merged into Microsoft, you would select Microsoft." },
|
||
|
legend: nil,
|
||
|
) do %>
|
||
|
<% @merge_request.merging_organisations.order(:name).each do |org| %>
|
||
|
<%= f.govuk_radio_button(
|
||
|
:absorbing_organisation_id,
|
||
|
org.id,
|
||
|
label: { text: org.name },
|
||
|
) %>
|
||
|
<% end %>
|
||
|
<%= f.govuk_radio_divider %>
|
||
|
<%= f.govuk_radio_button :absorbing_organisation_id, "other", checked: @merge_request.new_absorbing_organisation?, label: { text: "These organisations are merging into a new one" } %>
|
||
|
<% end %>
|
||
|
|
||
|
<%= f.hidden_field :page, value: "absorbing_organisation" %>
|
||
|
|
||
|
<%= f.govuk_submit %>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
</div>
|