From 6dc28bcb62479880db95faf11f9e848183d5320d Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Wed, 18 May 2022 13:03:23 +0100 Subject: [PATCH] Update heading, label and hint text for user details --- app/views/users/edit.html.erb | 16 ++++++++-------- app/views/users/new.html.erb | 15 +++++++-------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 6cbfea0e1..da3cb51b0 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -1,4 +1,4 @@ -<% content_for :title, current_user == @user ? "Change your personal details" : "Change #{@user.name}’s personal details" %> +<% content_for :title, current_user == @user ? "Change your personal details" : "Change #{@user.name.presence || 'this user'}’s personal details" %> <% content_for :before_content do %> <%= govuk_back_link( @@ -17,10 +17,11 @@ <%= f.govuk_text_field :name, + label: { text: "Name", size: "m" }, autocomplete: "name" %> <%= f.govuk_email_field :email, - label: { text: "Email address" }, + label: { text: "Email address", size: "m" }, autocomplete: "email", spellcheck: "false" %> @@ -34,18 +35,17 @@ legend: { text: "Role", size: "m" } %> <%= f.govuk_collection_radio_buttons :is_dpo, - [OpenStruct.new(id: false, name: "No"), OpenStruct.new(id: true, name: "Yes")], + [OpenStruct.new(id: true, name: "Yes"), OpenStruct.new(id: false, name: "No")], :id, :name, - inline: true, - legend: { text: "Are #{pronoun(@user, current_user)} a data protection officer?", size: "m" } %> + legend: { text: "Are #{pronoun(@user, current_user)} the organisation’s data protection officer?", size: "m" } %> <%= f.govuk_collection_radio_buttons :is_key_contact, - [OpenStruct.new(id: false, name: "No"), OpenStruct.new(id: true, name: "Yes")], + [OpenStruct.new(id: true, name: "Yes"), OpenStruct.new(id: false, name: "No")], :id, :name, - inline: true, - legend: { text: "Are #{pronoun(@user, current_user)} a key contact?", size: "m" } %> + legend: { text: "Are #{pronoun(@user, current_user)} a key contact for this service?", size: "m" }, + hint: { text: "This is a person responsible for sharing information about social housing lettings and sales data within the organisation." } %> <% end %> <%= f.govuk_submit "Save changes" %> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 980281f11..642337fc4 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -18,10 +18,10 @@ <%= f.govuk_text_field :name, autocomplete: "name", - label: { text: "Name (optional)" } %> + label: { text: "Name (optional)", size: "m" } %> <%= f.govuk_email_field :email, - label: { text: "Email address" }, + label: { text: "Email address", size: "m" }, autocomplete: "email", spellcheck: "false", value: @resource.email %> @@ -48,18 +48,17 @@ legend: { text: "Role", size: "m" } %> <%= f.govuk_collection_radio_buttons :is_dpo, - [OpenStruct.new(id: false, name: "No"), OpenStruct.new(id: true, name: "Yes")], + [OpenStruct.new(id: true, name: "Yes"), OpenStruct.new(id: false, name: "No")], :id, :name, - inline: true, - legend: { text: "Are #{pronoun(@user, current_user)} a data protection officer?", size: "m" } %> + legend: { text: "Are #{pronoun(@user, current_user)} the organisation’s data protection officer?", size: "m" } %> <%= f.govuk_collection_radio_buttons :is_key_contact, - [OpenStruct.new(id: false, name: "No"), OpenStruct.new(id: true, name: "Yes")], + [OpenStruct.new(id: true, name: "Yes"), OpenStruct.new(id: false, name: "No")], :id, :name, - inline: true, - legend: { text: "Are #{pronoun(@user, current_user)} a key contact?", size: "m" } %> + legend: { text: "Is this user a key contact for this service?", size: "m" }, + hint: { text: "This is a person responsible for sharing information about social housing lettings and sales data within the organisation." } %> <%= f.govuk_submit "Continue" %>