mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
add lang
This commit is contained in:
1 parent
e22a3d9ef3
commit
2af09afc66
5 files changed
+16
-4
No files matched your search
@@ -99,10 +99,6 @@ class ApplicationController < ActionController::Base
|
||||
I18n.with_locale(locale, &)
|
||||
end
|
||||
|
||||
def lang
|
||||
params[:lang].presence
|
||||
end
|
||||
|
||||
def with_browser_locale(&)
|
||||
return yield if I18n.locale != :'en-US' && I18n.locale != :en
|
||||
|
||||
|
||||
@@ -173,4 +173,8 @@ class StartFormController < ApplicationController
|
||||
redirect_to start_form_path(template.slug, lang:, params: submitter_params.merge(email_verification: true)),
|
||||
alert: I18n.t(:too_many_attempts)
|
||||
end
|
||||
|
||||
def lang
|
||||
params[:lang].presence
|
||||
end
|
||||
end
|
||||
@@ -66,4 +66,8 @@ class StartFormEmail2faSendController < ApplicationController
|
||||
attrs[:email] = Submissions.normalize_email(attrs[:email])
|
||||
end
|
||||
end
|
||||
|
||||
def lang
|
||||
params[:lang].presence
|
||||
end
|
||||
end
|
||||
@@ -144,4 +144,8 @@ class SubmitFormController < ApplicationController
|
||||
ActiveStorage::Attachment.where(record: submission.submitters, name: :attachments)
|
||||
.preload(:blob).index_by(&:uuid)
|
||||
end
|
||||
|
||||
def lang
|
||||
params[:lang].presence
|
||||
end
|
||||
end
|
||||
@@ -54,4 +54,8 @@ class SubmitFormEmail2fasController < ApplicationController
|
||||
def load_submitter
|
||||
@submitter = Submitter.find_by!(slug: params[:submitter_slug])
|
||||
end
|
||||
|
||||
def lang
|
||||
params[:lang].presence
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user