Browse Source

Move delete button into the button group

pull/2285/head
Kat 2 years ago
parent
commit
631cd5ce93
  1. 7
      app/views/locations/check_answers.html.erb

7
app/views/locations/check_answers.html.erb

@ -42,10 +42,9 @@
<% if LocationPolicy.new(current_user, @location).create? %> <% if LocationPolicy.new(current_user, @location).create? %>
<div class="govuk-button-group"> <div class="govuk-button-group">
<%= govuk_button_to "Save and return to locations", scheme_location_confirm_path(@scheme, @location, route: params[:route]), method: :patch %> <%= govuk_button_to "Save and return to locations", scheme_location_confirm_path(@scheme, @location, route: params[:route]), method: :patch %>
<% if LocationPolicy.new(current_user, @location).delete? %>
<%= delete_location_link(@location) %>
<% end %>
<%= govuk_button_link_to "Cancel", scheme_locations_path(@scheme), secondary: true %> <%= govuk_button_link_to "Cancel", scheme_locations_path(@scheme), secondary: true %>
</div> </div>
<% end %> <% end %>
<% if LocationPolicy.new(current_user, @location).delete? %>
<%= delete_location_link(@location) %>
<% end %>

Loading…
Cancel
Save