Skip to content

Commit

Permalink
refactor: move registrations controller to kiqr gem
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellberg committed Apr 13, 2024
1 parent 1d3c4ad commit 9336fb2
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 42 deletions.
File renamed without changes.
File renamed without changes.
40 changes: 0 additions & 40 deletions config/locales/kiqr.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,46 +87,6 @@ en:
label: "One-time password"
placeholder: "Enter the code"
submit_button: "Verify"
registrations:
new:
heading:
title: "Create a new %{app_name} account"
description: "Enter your email address and password to create a new account."
form:
email:
placeholder: "Enter a valid email address"
password:
placeholder: "Create a secure password"
password_confirmation:
placeholder: "Confirm your password"
submit_button: "Create your account"
already_have_account: Already have an account?
sign_in: Sign in!
edit:
title: "Login credentials"
description: "Change user email or password."
form:
email:
placeholder: "Enter a valid email address"
password:
placeholder: "Create a secure password"
password_confirmation:
placeholder: "Confirm your password"
current_password:
placeholder: "Enter your current password"
hint: "we need your current password to confirm your changes"
submit_button: "Save changes"
destroy:
owner_of_team: "Can't delete account when owner of a team."
cancel:
title: "Delete account"
description: "Delete your user account and all of your data."
box_title: "Delete your user account"
content: "Need to cancel your account? No worries. We're sad to see you go but understand that sometimes things change. If you have any feedback or if there's anything we can do to improve your experience, please let us know. Your input is invaluable to us. Remember, you're always welcome back!"
remove_team_accounts_first: "Before you can cancel your account, there's one important step you need to take. If you're currently the owner of any team accounts, you'll need to either transfer ownership to another team member or dissolve the team accounts first. This ensures all your team's data and operations remain uninterrupted and secure. If you need help with transferring ownership or have any questions, our support team is here to assist. Thank you for your understanding and cooperation!"
owned_team_accounts: "Team accounts you are the owner of:"
submit: "Delete my account"
confirmation_message: "Are you sure? This will DELETE all of your data."
two_factor:
show:
title: "Two-factor authentication"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Users::RegistrationsController < Devise::RegistrationsController
class Kiqr::RegistrationsController < Devise::RegistrationsController
skip_before_action :require_no_authentication, only: [:cancel]
before_action :authenticate_user!, only: [:cancel]

Expand Down
40 changes: 40 additions & 0 deletions gems/kiqr/config/locales/kiqr/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,43 @@ en:
new:
title: "Setup your personal account"
description: "Finish the registration by setting up your user profile."
registrations:
new:
heading:
title: "Create a new %{app_name} account"
description: "Enter your email address and password to create a new account."
form:
email:
placeholder: "Enter a valid email address"
password:
placeholder: "Create a secure password"
password_confirmation:
placeholder: "Confirm your password"
submit_button: "Create your account"
already_have_account: Already have an account?
sign_in: Sign in!
edit:
title: "Login credentials"
description: "Change user email or password."
form:
email:
placeholder: "Enter a valid email address"
password:
placeholder: "Create a secure password"
password_confirmation:
placeholder: "Confirm your password"
current_password:
placeholder: "Enter your current password"
hint: "we need your current password to confirm your changes"
submit_button: "Save changes"
destroy:
owner_of_team: "Can't delete account when owner of a team."
cancel:
title: "Delete account"
description: "Delete your user account and all of your data."
box_title: "Delete your user account"
content: "Need to cancel your account? No worries. We're sad to see you go but understand that sometimes things change. If you have any feedback or if there's anything we can do to improve your experience, please let us know. Your input is invaluable to us. Remember, you're always welcome back!"
remove_team_accounts_first: "Before you can cancel your account, there's one important step you need to take. If you're currently the owner of any team accounts, you'll need to either transfer ownership to another team member or dissolve the team accounts first. This ensures all your team's data and operations remain uninterrupted and secure. If you need help with transferring ownership or have any questions, our support team is here to assist. Thank you for your understanding and cooperation!"
owned_team_accounts: "Team accounts you are the owner of:"
submit: "Delete my account"
confirmation_message: "Are you sure? This will DELETE all of your data."
2 changes: 1 addition & 1 deletion gems/kiqr/lib/kiqr/rails/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def default_controllers(options)
options[:controllers][:accounts] ||= "kiqr/accounts"
options[:controllers][:invitations] ||= "kiqr/invitations"
options[:controllers][:onboarding] ||= "kiqr/onboarding"
options[:controllers][:registrations] ||= "kiqr/registrations"
options[:controllers][:sessions] ||= "users/sessions"
options[:controllers][:registrations] ||= "users/registrations"
options
end

Expand Down

0 comments on commit 9336fb2

Please sign in to comment.