Skip to content

Commit

Permalink
Make Asterisks & Required Text Display Configurable on Questionnaires (
Browse files Browse the repository at this point in the history
…#2893)

* Make questionnaire required field asterisk and text configurable

* Move questionnaire required text configs to QuestionnaireConfig

* Code cleanup

* Rename config params
  • Loading branch information
qiarie authored Nov 30, 2023
1 parent 5a80928 commit 6ba5153
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ data class QuestionnaireConfig(
val generateCarePlanWithWorkflowApi: Boolean = false,
val cqlInputResources: List<String>? = emptyList(),
val showClearAll: Boolean = false,
val showRequiredTextAsterisk: Boolean = true,
val showRequiredText: Boolean = false,
) : java.io.Serializable, Parcelable {

fun interpolate(computedValuesMap: Map<String, Any>) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ class QuestionnaireActivity : BaseMultiLanguageActivity() {
finish()
}
val questionnaireFragmentBuilder =
QuestionnaireFragment.builder().setQuestionnaire(questionnaire.json())
QuestionnaireFragment.builder()
.setQuestionnaire(questionnaire.json())
.showAsterisk(questionnaireConfig.showRequiredTextAsterisk)
.showRequiredText(questionnaireConfig.showRequiredText)

val questionnaireSubjectType = questionnaire.subjectType.firstOrNull()?.code
val resourceType =
Expand Down

0 comments on commit 6ba5153

Please sign in to comment.