<% content_for :before_content do %> <% title = "Tell us if your organisation is merging" %> <% content_for :title, title %> <%= govuk_back_link href: organisations_path(anchor: "merge-requests") %> <% end %> <%= form_with model: @merge_request, url: merge_request_path, method: :patch do |f| %> <%= f.govuk_error_summary %>

Which organisation is absorbing the others?

If organisations are merging into a new organisation, <%= govuk_link_to "create the new organisation", new_organisation_path %> first and then select it here.

<%= f.govuk_select(:absorbing_organisation_id, label: { text: "Select organisation name", class: "govuk-label--m" }, "data-controller": "accessible-autocomplete") do %> <% @answer_options.map { |id, name| OpenStruct.new(id:, name:) }.each do |answer| %> <% end %> <% end %> <%= f.hidden_field :page, value: "absorbing_organisation" %> <%= f.govuk_submit %> <% end %>