5 changed files with 62 additions and 1 deletions
@ -0,0 +1,23 @@ |
|||||||
|
<% @organisation_to_remove_id = params['organisation_to_remove_id'] %> |
||||||
|
<%= form_with url: housing_providers_organisation_path(organisation_to_remove_id: @organisation_to_remove_id), method: "delete", local: true do |f| %> |
||||||
|
<% if current_user.support? %> |
||||||
|
<%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %> |
||||||
|
<%= render SubNavigationComponent.new(items: secondary_items(request.path, @organisation.id)) %> |
||||||
|
<h2 class="govuk-visually-hidden">Remove Housing Provider</h2> |
||||||
|
<% end %> |
||||||
|
<% @housing_provider = Organisation.find(@organisation_to_remove_id) %> |
||||||
|
<% if current_user.support? %> |
||||||
|
<%= govuk_back_link(href: :back) %> |
||||||
|
<%= render partial: "organisations/headings", locals: { main: "You are removing '#{@housing_provider.name}' from this organisation's housing providers", sub: nil } %> |
||||||
|
<% else %> |
||||||
|
<% content_for :before_content do %> |
||||||
|
<%= govuk_back_link(href: :back) %> |
||||||
|
<% end %> |
||||||
|
<%= render partial: "organisations/headings", locals: { main: "You are removing #{@housing_provider.name} from your organisation's housing providers", sub: nil } %> |
||||||
|
<% end %> |
||||||
|
<%= govuk_warning_text text: "You will no longer be able to submit logs for #{@housing_provider.name}" %> |
||||||
|
<div class="govuk-button-group"> |
||||||
|
<%= f.govuk_submit "Confirm" %> |
||||||
|
<%= govuk_button_link_to "Cancel", housing_providers_organisation_path(current_user.organisation), html: { method: :get }, secondary: true %> |
||||||
|
</div> |
||||||
|
<% end %> |
Loading…
Reference in new issue