Browse Source

Merge branch 'main' into CLDC-4166-how-many-live-in-property-updates

pull/3194/head
Nat Dean-Lewis 2 weeks ago
parent
commit
0f92ab8a90
  1. 2
      app/models/validations/financial_validations.rb
  2. 2
      app/views/form/page.html.erb

2
app/models/validations/financial_validations.rb

@ -228,7 +228,7 @@ private
end
if record.weekly_value(record["brent"]) > rent_range.hard_max
record.errors.add :brent, :over_hard_max, message: I18n.t("validations.lettings.financial.brent.above_hard_max")
record.errors.add :brent, :above_hard_max, message: I18n.t("validations.lettings.financial.brent.above_hard_max")
record.errors.add :beds, I18n.t("validations.lettings.financial.beds.rent_above_hard_max")
record.errors.add :uprn, I18n.t("validations.lettings.financial.uprn.rent_above_hard_max")
record.errors.add :la, I18n.t("validations.lettings.financial.la.rent_above_hard_max")

2
app/views/form/page.html.erb

@ -76,6 +76,8 @@
<% end %>
<% if @pages_with_errors_count > 1 %>
<%# Hidden form submit ensures pressing Enter triggers "Save and continue" as the user would expect rather than "See all related answers"%>
<%= f.submit submit_button_text(@page, request.query_parameters["referrer"]), class: "govuk-visually-hidden", tabindex: -1, "aria-hidden": true %>
<div class="govuk-button-group">
<%= f.submit "See all related answers", name: "check_errors", class: "govuk-body govuk-link submit-button-link" %>
</div>

Loading…
Cancel
Save