From f737d2d34ae44fced448be1d44ba2451eaee63a6 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 27 Jan 2021 12:36:21 +0000 Subject: [PATCH] Use model attributes and attribute help for the registration fields The disply name keeps its specific help, since it is different on the account settings page --- app/views/users/new.html.erb | 6 +++--- config/locales/en.yml | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index f8d3a7e8e..7f640c708 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -18,10 +18,10 @@ <%= bootstrap_form_for current_user, :url => { :action => "create" } do |f| %> <%= hidden_field_tag("referer", h(@referer)) unless @referer.nil? %> - <%= f.email_field :email, :label => t(".email address"), :tabindex => 1 %> - <%= f.email_field :email_confirmation, :label => t(".confirm email address"), :help => t(".not_displayed_publicly_html"), :tabindex => 2 %> + <%= f.email_field :email, :tabindex => 1 %> + <%= f.email_field :email_confirmation, :tabindex => 2 %> - <%= f.text_field :display_name, :label => t(".display name"), :help => t(".display name description"), :tabindex => 3 %> + <%= f.text_field :display_name, :help => t(".display name description"), :tabindex => 3 %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index ea24854c6..c28492a27 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -121,6 +121,7 @@ en: details: Please provide some more details about the problem (required). user: email: "Email" + email_confirmation: "Email Confirmation" active: "Active" display_name: "Display Name" description: "Description" @@ -133,6 +134,8 @@ en: user_block: reason: The reason why the user is being blocked. Please be as calm and as reasonable as possible, giving as much detail as you can about the situation, remembering that the message will be publicly visible. Bear in mind that not all users understand the community jargon, so please try to use laymans terms. needs_view: Does the user need to log in before this block will be cleared? + user: + email_confirmation: 'Your address is not displayed publicly, see our privacy policy for more information.' datetime: distance_in_words_ago: about_x_hours: @@ -2302,7 +2305,6 @@ en:

Sign up to get started contributing. We'll send an email to confirm your account.

email address: "Email Address:" confirm email address: "Confirm Email Address:" - not_displayed_publicly_html: 'Your address is not displayed publicly, see our privacy policy for more information' display name: "Display Name:" display name description: "Your publicly displayed username. You can change this later in the preferences." external auth: "Third Party Authentication:" -- 2.43.2