mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 07:10:12 +01:00
Fix a few user creation errors to be prettier
This commit is contained in:
parent
7b9a1e322f
commit
2bf2f9476a
2 changed files with 5 additions and 1 deletions
|
|
@ -81,13 +81,15 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
unless params['approve_tos'] == 'on' || SITE_CONFIG['tos_link'].blank?
|
unless params['approve_tos'] == 'on' || SITE_CONFIG['tos_link'].blank?
|
||||||
render_failure "You have to accept the terms of service to sign up!"
|
notify :error, t('users.tos_error')
|
||||||
|
redirect_to signup_path
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
user = User.new(user_params)
|
user = User.new(user_params)
|
||||||
|
|
||||||
unless user.valid?
|
unless user.valid?
|
||||||
|
notify :error, t('users.create_error')
|
||||||
redirect_to signup_path
|
redirect_to signup_path
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1281,6 +1281,7 @@ en:
|
||||||
change_password_title: TRACKS::Change password
|
change_password_title: TRACKS::Change password
|
||||||
choose_password: Choose password
|
choose_password: Choose password
|
||||||
confirm_password: Confirm password
|
confirm_password: Confirm password
|
||||||
|
create_error: User creation failed, maybe you already have an account here?
|
||||||
desired_login: Desired login
|
desired_login: Desired login
|
||||||
destroy_confirmation: 'Warning: this will delete user ''%{login}'', all their
|
destroy_confirmation: 'Warning: this will delete user ''%{login}'', all their
|
||||||
actions, contexts, project and notes. Are you sure that you want to continue?'
|
actions, contexts, project and notes. Are you sure that you want to continue?'
|
||||||
|
|
@ -1315,6 +1316,7 @@ en:
|
||||||
signup_successful: Signup successful for user %{username}.
|
signup_successful: Signup successful for user %{username}.
|
||||||
successfully_deleted_user: Successfully deleted user %{username}
|
successfully_deleted_user: Successfully deleted user %{username}
|
||||||
tos_link: read the Terms of Service
|
tos_link: read the Terms of Service
|
||||||
|
tos_error: You have to accept the terms of service to sign up!
|
||||||
total_actions: Total actions
|
total_actions: Total actions
|
||||||
total_contexts: Total contexts
|
total_contexts: Total contexts
|
||||||
total_notes: Total notes
|
total_notes: Total notes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue