mirror of
https://github.com/docusealco/docuseal
synced 2026-11-08 15: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, &)
|
I18n.with_locale(locale, &)
|
||||||
end
|
end
|
||||||
|
|
||||||
def lang
|
|
||||||
params[:lang].presence
|
|
||||||
end
|
|
||||||
|
|
||||||
def with_browser_locale(&)
|
def with_browser_locale(&)
|
||||||
return yield if I18n.locale != :'en-US' && I18n.locale != :en
|
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)),
|
redirect_to start_form_path(template.slug, lang:, params: submitter_params.merge(email_verification: true)),
|
||||||
alert: I18n.t(:too_many_attempts)
|
alert: I18n.t(:too_many_attempts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def lang
|
||||||
|
params[:lang].presence
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -66,4 +66,8 @@ class StartFormEmail2faSendController < ApplicationController
|
|||||||
attrs[:email] = Submissions.normalize_email(attrs[:email])
|
attrs[:email] = Submissions.normalize_email(attrs[:email])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def lang
|
||||||
|
params[:lang].presence
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -144,4 +144,8 @@ class SubmitFormController < ApplicationController
|
|||||||
ActiveStorage::Attachment.where(record: submission.submitters, name: :attachments)
|
ActiveStorage::Attachment.where(record: submission.submitters, name: :attachments)
|
||||||
.preload(:blob).index_by(&:uuid)
|
.preload(:blob).index_by(&:uuid)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def lang
|
||||||
|
params[:lang].presence
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -54,4 +54,8 @@ class SubmitFormEmail2fasController < ApplicationController
|
|||||||
def load_submitter
|
def load_submitter
|
||||||
@submitter = Submitter.find_by!(slug: params[:submitter_slug])
|
@submitter = Submitter.find_by!(slug: params[:submitter_slug])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def lang
|
||||||
|
params[:lang].presence
|
||||||
|
end
|
||||||
end
|
end
|
||||||
Reference in new issue
Block a user