Skip to content

Commit 963f36e

Browse files
committed
Fixed test result field not being accessible when switching test type
1 parent cbc5b7d commit 963f36e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,12 +1162,13 @@ protected void addFields() {
11621162
});
11631163

11641164
BiConsumer<Disease, PathogenTestType> resultField = (disease, testType) -> {
1165-
if (testResultField.isReadOnly()) {
1166-
return;
1167-
}
1165+
final boolean testResultFieldReadOnly = testResultField.isReadOnly();
1166+
testResultField.setReadOnly(false);
1167+
11681168
if (RESULT_FIELD_DECISION_MAP.containsKey(disease) && RESULT_FIELD_DECISION_MAP.get(disease).contains(testType)) {
11691169
testResultField.setValue(PathogenTestResultType.POSITIVE);
11701170
testResultField.setEnabled(false);
1171+
testResultField.setReadOnly(testResultFieldReadOnly);
11711172
} else {
11721173
testResultField.clear();
11731174
testResultField.setEnabled(true);

0 commit comments

Comments
 (0)