fix: show missing fields' label in flash message
This commit is contained in:
1 parent
0546f223f0
commit
97d98f7f12
2 files changed
+3
-2
No files matched your search
@@ -36,7 +36,7 @@ class AccommodationStep2Type extends AbstractType
|
|||||||
'attr' => ['min' => 0],
|
'attr' => ['min' => 0],
|
||||||
])
|
])
|
||||||
->add('selectedBoardServiceId', ChoiceType::class, [
|
->add('selectedBoardServiceId', ChoiceType::class, [
|
||||||
'label' => false,
|
'label' => 'Verpflegungsleistung',
|
||||||
'choices' => $options['board_service_choices'],
|
'choices' => $options['board_service_choices'],
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
|
|||||||
@@ -226,7 +226,8 @@ class AppRuntime implements RuntimeExtensionInterface
|
|||||||
$labels = array_merge($labels, $this->collectInvalidFieldLabels($child));
|
$labels = array_merge($labels, $this->collectInvalidFieldLabels($child));
|
||||||
} else {
|
} else {
|
||||||
// Leaf field, expanded choice, or compound field with own errors
|
// Leaf field, expanded choice, or compound field with own errors
|
||||||
$labels[] = $child->vars['label'] ?? $child->vars['name'];
|
$label = $child->vars['label'] ?? null;
|
||||||
|
$labels[] = (\is_string($label) && '' !== $label) ? $label : $child->vars['name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user