From b4ad70d7677927a5015e2856d45ae13793133214 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 23 Jul 2014 12:32:06 -0400 Subject: [PATCH] FEATURE: Continue to Discourse links are now buttons, and those pages will redirect automatically after 5 seconds --- app/views/users/_auto_redirect_home.html.erb | 7 +++++++ app/views/users/authorize_email.html.erb | 8 ++++---- app/views/users/password_reset.html.erb | 5 ++++- app/views/users/perform_account_activation.html.erb | 13 ++++++------- config/locales/server.en.yml | 5 +++-- 5 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 app/views/users/_auto_redirect_home.html.erb diff --git a/app/views/users/_auto_redirect_home.html.erb b/app/views/users/_auto_redirect_home.html.erb new file mode 100644 index 00000000000..5b91befd432 --- /dev/null +++ b/app/views/users/_auto_redirect_home.html.erb @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/app/views/users/authorize_email.html.erb b/app/views/users/authorize_email.html.erb index a7a6cd2d359..8eef69bc663 100644 --- a/app/views/users/authorize_email.html.erb +++ b/app/views/users/authorize_email.html.erb @@ -5,8 +5,8 @@ <%else%>

<%= t 'change_email.confirmed' %>

-

- <%= raw t('change_email.please_continue', link: link_to(SiteSetting.title, '/')) %> -

+
+ <%= t('change_email.please_continue', site_name: SiteSetting.title) %> + <%= render partial: 'auto_redirect_home' %> <%end%> - + \ No newline at end of file diff --git a/app/views/users/password_reset.html.erb b/app/views/users/password_reset.html.erb index 89d56585393..928bdaa0951 100644 --- a/app/views/users/password_reset.html.erb +++ b/app/views/users/password_reset.html.erb @@ -18,7 +18,10 @@ <%- if @requires_approval %> <%= t 'login.not_approved' %> <% else %> - <%= link_to( t('password_reset.continue', site_name: SiteSetting.title), '/' ) %> +
+
+ <%= t('password_reset.continue', site_name: SiteSetting.title) %> + <%= render partial: 'auto_redirect_home' %> <% end %>

<% else %> diff --git a/app/views/users/perform_account_activation.html.erb b/app/views/users/perform_account_activation.html.erb index 34cd40442ce..7424cf6243a 100644 --- a/app/views/users/perform_account_activation.html.erb +++ b/app/views/users/perform_account_activation.html.erb @@ -6,15 +6,14 @@ <%else%>

<%= t 'activation.welcome_to', site_name: SiteSetting.title %>

-

+
+ <% if @needs_approval %> - <%= t 'activation.approval_required' %> +

<%= t 'activation.approval_required' %>

<% else %> -
- <%= raw t('activation.please_continue', link: link_to(SiteSetting.title, '/')) %>. +

<%= t('activation.please_continue') %>

+

<%= t('activation.continue_button', site_name: SiteSetting.title) -%>

+ <%= render partial: 'auto_redirect_home' %> <% end %> -

- <%end%> - diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 7a12f4198b6..a649993eb29 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -389,13 +389,14 @@ en: change_email: confirmed: "Your email has been updated." - please_continue: "Please continue to %{link}" + please_continue: "Continue to %{site_name}" error: "There was an error changing your email address. Perhaps the address is already in use?" activation: action: "Activate your account" already_done: "Sorry, this account confirmation link is no longer valid. Perhaps your account is already active?" - please_continue: "Your new account is confirmed, and you are now logged in. Continue to %{link}" + please_continue: "Your new account is confirmed, and you are now logged in." + continue_button: "Continue to %{site_name}" welcome_to: "Welcome to %{site_name}!" approval_required: "A moderator must manually approve your new account before you can access this forum. You'll get an email when your account is approved!"