From: Tom Hughes Date: Mon, 30 Nov 2015 08:56:26 +0000 (+0000) Subject: Fix display of raw HTML in flash message X-Git-Tag: live~3985 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/d218d5bf7d5e980635f8d9a773ab675786f8cea4?hp=33b5af5c858357ee5336484b3a5a975aa256d90d Fix display of raw HTML in flash message Fixes #1095 --- diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index f22450cea..83ae35680 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1820,6 +1820,19 @@ tr.turn:hover { display: inline-block; margin-left: $lineheight / 2; vertical-align: middle; + + p { + margin-top: $lineheight * 0.5; + margin-bottom: $lineheight * 0.5; + + &:first-child { + margin-top: 0px; + } + + &:last-child { + margin-bottom: 0px; + } + } } } diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 37f9cd7c2..fca0e3be7 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -213,7 +213,7 @@ class UserController < ApplicationController :auth_provider => params[:auth_provider], :auth_uid => params[:auth_uid]) - flash.now[:notice] = t "user.new.auth association" + flash.now[:notice] = render_to_string :partial => "auth_association" else check_signup_allowed end diff --git a/app/views/user/_auth_association.html.erb b/app/views/user/_auth_association.html.erb new file mode 100644 index 000000000..abddf19d3 --- /dev/null +++ b/app/views/user/_auth_association.html.erb @@ -0,0 +1,3 @@ +

<%= t "user.auth_association.heading" %>

+

<%= t "user.auth_association.option_1" %>

+

<%= t "user.auth_association.option_2" %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 32f4649da..9027252f7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1785,16 +1785,6 @@ en: confirm password: "Confirm Password:" use external auth: "Alternatively, use a third party to login" auth no password: "With third party authentication a password is not required, but some extra tools or server may still need one." - auth association: | -

Your ID is not associated with a OpenStreetMap account yet.

- continue: Sign Up terms accepted: "Thanks for accepting the new contributor terms!" terms declined: "We are sorry that you have decided to not accept the new Contributor Terms. For more information, please see this wiki page." @@ -2009,6 +1999,15 @@ en: no_authorization_code: No authorization code unknown_signature_algorithm: Unknown signature algorithm invalid_scope: Invalid scope + auth_association: + heading: Your ID is not associated with a OpenStreetMap account yet. + option_1: | + If you are new to OpenStreetMap, please create a new account + using the form below. + option_2: | + If you already have an account, you can login to your account + using your username and password and then associate the account + with your ID in your user settings. user_role: filter: not_an_administrator: "Only administrators can perform user role management, and you are not an administrator."