Skip to content

Commit

Permalink
print surveys in selected language
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewBemis committed Feb 27, 2025
1 parent 6f5d29c commit c5ec416
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui-participant/src/hub/survey/PrintSurveyView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
EnvironmentName,
makeSurveyJsData,
surveyJSModelFromForm,
useI18n,
useTaskIdParam,
waitForImages
} from '@juniper/ui-core'
Expand All @@ -41,6 +42,7 @@ const usePrintableSurvey = (args: UsePrintableConsentArgs) => {
const { studyShortcode, enrollee, stableId, version } = args

const { portalEnv, portal } = usePortalEnv()
const { selectedLanguage } = useI18n()

const {
user,
Expand Down Expand Up @@ -72,6 +74,7 @@ const usePrintableSurvey = (args: UsePrintableConsentArgs) => {
const surveyModel = surveyJSModelFromForm(form)
surveyModel.title = form.name
surveyModel.data = resumableData?.data
surveyModel.locale = selectedLanguage
configureModelForPrint(surveyModel)

const proxyProfile = ppUser?.participantUserId != user?.id ? allEnrollees
Expand Down

0 comments on commit c5ec416

Please sign in to comment.