diff --git a/app/views/users/registrations/cancel.html.erb b/app/views/kiqr/registrations/cancel.html.erb similarity index 100% rename from app/views/users/registrations/cancel.html.erb rename to app/views/kiqr/registrations/cancel.html.erb diff --git a/app/views/users/registrations/edit.html.erb b/app/views/kiqr/registrations/edit.html.erb similarity index 100% rename from app/views/users/registrations/edit.html.erb rename to app/views/kiqr/registrations/edit.html.erb diff --git a/app/views/users/registrations/new.html.erb b/app/views/kiqr/registrations/new.html.erb similarity index 100% rename from app/views/users/registrations/new.html.erb rename to app/views/kiqr/registrations/new.html.erb diff --git a/config/locales/kiqr.en.yml b/config/locales/kiqr.en.yml index f582cbb..96aca92 100644 --- a/config/locales/kiqr.en.yml +++ b/config/locales/kiqr.en.yml @@ -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" diff --git a/app/controllers/users/registrations_controller.rb b/gems/kiqr/app/controllers/kiqr/registrations_controller.rb similarity index 88% rename from app/controllers/users/registrations_controller.rb rename to gems/kiqr/app/controllers/kiqr/registrations_controller.rb index e7dc85c..2a1c9ff 100644 --- a/app/controllers/users/registrations_controller.rb +++ b/gems/kiqr/app/controllers/kiqr/registrations_controller.rb @@ -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] diff --git a/gems/kiqr/config/locales/kiqr/en.yml b/gems/kiqr/config/locales/kiqr/en.yml index 13ccc38..78f7b4f 100644 --- a/gems/kiqr/config/locales/kiqr/en.yml +++ b/gems/kiqr/config/locales/kiqr/en.yml @@ -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." diff --git a/gems/kiqr/lib/kiqr/rails/routes.rb b/gems/kiqr/lib/kiqr/rails/routes.rb index ec0e67b..d1cf64d 100644 --- a/gems/kiqr/lib/kiqr/rails/routes.rb +++ b/gems/kiqr/lib/kiqr/rails/routes.rb @@ -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