This commit is contained in:
Oleksandr Turchyn
2024-09-18 19:47:47 +03:00
committed by Oleksandr Turchyn
parent 3c60fb4ee6
commit e9d728fa4a
132 changed files with 1121 additions and 600 deletions
+5 -4
View File
@@ -24,7 +24,7 @@ class AccountsController < ApplicationController
@encrypted_config.assign_attributes(app_url_params)
unless URI.parse(@encrypted_config.value.to_s).class.in?([URI::HTTP, URI::HTTPS])
@encrypted_config.errors.add(:value, 'should be a valid URL')
@encrypted_config.errors.add(:value, I18n.t('should_be_a_valid_url'))
return render :show, status: :unprocessable_entity
end
@@ -33,7 +33,7 @@ class AccountsController < ApplicationController
Docuseal.refresh_default_url_options!
redirect_to settings_account_path, notice: 'Account information has been updated'
redirect_to settings_account_path, notice: I18n.t('account_information_has_been_updated')
rescue ActiveRecord::RecordInvalid
render :show, status: :unprocessable_entity
end
@@ -43,11 +43,12 @@ class AccountsController < ApplicationController
true_user.update!(locked_at: Time.current)
# rubocop:disable Layout/LineLength
render turbo_stream: turbo_stream.replace(
:account_delete_button,
html: helpers.tag.p('Your account removal request will be processed within 2 weeks. ' \
'Please contact us if you want to keep your account.')
html: helpers.tag.p(I18n.t('your_account_removal_request_will_be_processed_within_2_weeks_please_contact_us_if_you_want_to_keep_your_account'))
)
# rubocop:enable Layout/LineLength
end
private