Skip to content

Commit

Permalink
Merge branch 'dev' into feat/monitoring-check-list-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesvedder authored Jul 10, 2024
2 parents 46ad2d1 + 61b80c4 commit 1b6be33
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ class StudyDesignEnrollmentFormView extends StudyDesignPageWidget {
(option) => RadioListTile<Participation>(
groupValue:
formViewModel.enrollmentTypeControl.value,
onChanged: (value) => formViewModel
.enrollmentTypeControl.value = option.value,
onChanged: formViewModel.isReadonly
? null
: (value) => formViewModel
.enrollmentTypeControl
.value = option.value,
value: option.value,
title: Column(
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:reactive_forms/reactive_forms.dart';
import 'package:studyu_core/core.dart';
import 'package:studyu_designer_v2/common_views/form_consumer_widget.dart';
import 'package:studyu_designer_v2/common_views/form_control_label.dart';
import 'package:studyu_designer_v2/common_views/form_table_layout.dart';
Expand Down Expand Up @@ -57,8 +58,10 @@ class StudyScheduleFormView extends FormConsumerWidget {
labelHelpText: tr.form_field_crossover_schedule_sequence_tooltip,
input: DropdownButtonFormField(
//formControl: formViewModel.sequenceTypeControl,
onChanged: (value) =>
formViewModel.sequenceTypeControl.value = value,
onChanged: formViewModel.sequenceTypeControl.disabled
? null
: (PhaseSequence? value) =>
formViewModel.sequenceTypeControl.value = value,
value: formViewModel.sequenceTypeControl.value,
decoration: InputDecoration(
helperText:
Expand Down Expand Up @@ -87,6 +90,7 @@ class StudyScheduleFormView extends FormConsumerWidget {
Container(
constraints: const BoxConstraints(maxWidth: 70),
child: TextField(
readOnly: formViewModel.phaseDurationControl.disabled,
controller: TextEditingController()
..value = TextEditingValue(
text: formViewModel.phaseDurationControl.value
Expand Down Expand Up @@ -130,6 +134,7 @@ class StudyScheduleFormView extends FormConsumerWidget {
Container(
constraints: const BoxConstraints(maxWidth: 70),
child: TextField(
readOnly: formViewModel.numCyclesControl.disabled,
//formControl: formViewModel.numCyclesControl,
onChanged: (value) => formViewModel
.numCyclesControl.value = int.parse(value),
Expand Down Expand Up @@ -173,8 +178,10 @@ class StudyScheduleFormView extends FormConsumerWidget {
constraints: const BoxConstraints(maxWidth: 70),
child: Checkbox(
value: formViewModel.includeBaselineControl.value,
onChanged: (value) =>
formViewModel.includeBaselineControl.value = value,
onChanged: formViewModel.includeBaselineControl.disabled
? null
: (value) => formViewModel
.includeBaselineControl.value = value,
//formControl: formViewModel.includeBaselineControl,
),
),
Expand Down

0 comments on commit 1b6be33

Please sign in to comment.