From 9ef2b6bc3b2eca5f31ec518939b6e11f743d0c6c Mon Sep 17 00:00:00 2001 From: JG Date: Wed, 13 Jul 2022 13:04:18 +0100 Subject: [PATCH] fixed edit name --- app/models/location.rb | 2 +- app/views/schemes/edit_name.html.erb | 4 +--- config/locales/en.yml | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/models/location.rb b/app/models/location.rb index bff372ac9..f8139a84c 100644 --- a/app/models/location.rb +++ b/app/models/location.rb @@ -1,6 +1,6 @@ class Location < ApplicationRecord validate :validate_postcode - validates :type_of_unit, :wheelchair_adaptation, presence: true + validates :units, :type_of_unit, :wheelchair_adaptation, presence: true belongs_to :scheme attr_accessor :add_another_location diff --git a/app/views/schemes/edit_name.html.erb b/app/views/schemes/edit_name.html.erb index bfccd8ba9..8ce38c9d6 100644 --- a/app/views/schemes/edit_name.html.erb +++ b/app/views/schemes/edit_name.html.erb @@ -28,13 +28,11 @@ label: { text: "This scheme contains confidential information" } %> <% end %> - <% null_option = [OpenStruct.new(id: "", name: "Select an option")] %> <% organisations = Organisation.all.map { |org| OpenStruct.new(id: org.id, name: org.name) } %> - <% answer_options = null_option + organisations %> <% if current_user.support? %> <%= f.govuk_collection_select :owning_organisation_id, - answer_options, + organisations, :id, :name, label: { text: "Which organisation owns the housing stock for this scheme?", size: "m" }, diff --git a/config/locales/en.yml b/config/locales/en.yml index f5d55806e..5046a05aa 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -71,11 +71,11 @@ en: location: attributes: wheelchair_adaptation: - blank: "Enter the existing organisation’s name" - total_units: - blank: "Enter the existing organisation’s name" + blank: "Select if majority of units in this location built or adapted to wheelchair-user standards" + units: + blank: "Enter total number of units at this location" type_of_unit: - blank: "Enter the existing organisation’s name" + blank: "Select the most common type of unit at this location" validations: