|
|
|
@ -4,7 +4,7 @@ |
|
|
|
<% content_for :before_content do %> |
|
|
|
<% content_for :before_content do %> |
|
|
|
<%= govuk_back_link( |
|
|
|
<%= govuk_back_link( |
|
|
|
text: "Back", |
|
|
|
text: "Back", |
|
|
|
href: scheme_location_availability_path(@scheme, @location), |
|
|
|
href: :back, |
|
|
|
) %> |
|
|
|
) %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
|
|
@ -22,7 +22,7 @@ |
|
|
|
if attr[:attribute].eql?("status") |
|
|
|
if attr[:attribute].eql?("status") |
|
|
|
status_tag(attr[:value]) |
|
|
|
status_tag(attr[:value]) |
|
|
|
elsif attr[:attribute].eql?("availability") |
|
|
|
elsif attr[:attribute].eql?("availability") |
|
|
|
details_html(name: "Availability", value: @location.startdate.to_formatted_s(:govuk_date), attribute: "startdate") |
|
|
|
details_html(name: "Availability", value: @location.startdate.present? ? @location.startdate.to_formatted_s(:govuk_date) : nil, attribute: "startdate") |
|
|
|
else |
|
|
|
else |
|
|
|
details_html(attr) |
|
|
|
details_html(attr) |
|
|
|
end } %> |
|
|
|
end } %> |
|
|
|
@ -34,7 +34,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<%= f.hidden_field :confirmed %> |
|
|
|
<%= f.hidden_field :confirmed %> |
|
|
|
<div class="govuk-button-group"> |
|
|
|
<div class="govuk-button-group"> |
|
|
|
<%= f.govuk_submit "Add this location", disabled: [@location.postcode, @location.name, @location.location_admin_district, @location.units, @location.type_of_unit, @location.mobility_type, @location.startdate].any?(&:blank?) %> |
|
|
|
<%= f.govuk_submit "Add this location", disabled: @location.incomplete? %> |
|
|
|
<%= 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 %> |
|
|
|
|