<% content_for :title, "Should this user’s logs move to their new organisation?" %> <% content_for :before_content do %> <%= govuk_back_link(href: aliased_user_edit(@user, current_user)) %> <% end %> <%= form_with model: @user, method: :patch, url: user_log_reassignment_path(@user) do |f| %>
<%= f.govuk_error_summary %>

<%= content_for(:title) %>

<%= govuk_warning_text do %> <%= organisation_change_warning(@user, @new_organisation) %> <% end %> <% log_reassignment = User::LOG_REASSIGNMENT.map { |key, value| OpenStruct.new(id: key, name: value) } %> <%= f.govuk_collection_radio_buttons :log_reassignment, log_reassignment, :id, :name, legend: { text: "Log reassignment", hidden: true } %> <%= f.hidden_field :organisation_id, value: @new_organisation.id %>
<%= f.govuk_submit "Continue" %> <%= govuk_button_link_to "Cancel", aliased_user_edit(@user, current_user), secondary: true %>
<% end %>