Fix localizer warning on the finishing up tab for each author #101

Merged
niat8586 merged 2 commits from reflection_not_submitted into develop 2025-02-07 07:50:03 +01:00

View File

@ -178,7 +178,13 @@ class ReflectionModalBodyPanel extends Panel {
public SupervisorEditReflectionForm(String id, IModel<Reflection> reflectionModel) { public SupervisorEditReflectionForm(String id, IModel<Reflection> reflectionModel) {
super(id, reflectionModel); super(id, reflectionModel);
IModel<String> reflectionTextModel = new Model<>(getReflectionText(reflectionModel.getObject())); IModel<String> reflectionTextModel = new Model<>();
Reflection reflection = reflectionModel.getObject();
if (reflection instanceof Reflection.Submitted submitted) {
reflectionTextModel.setObject(submitted.reflection());
} else if (reflection instanceof Reflection.ImprovementsNeeded improvementsNeeded) {
reflectionTextModel.setObject(improvementsNeeded.oldReflection());
}
TextArea<String> reflectionTextArea = new TextArea<>("reflection", reflectionTextModel); TextArea<String> reflectionTextArea = new TextArea<>("reflection", reflectionTextModel);
reflectionTextArea.setRequired(true); reflectionTextArea.setRequired(true);