Blueprints: Fix empty values in admin fields

This commit is contained in:
Matias Griese
2016-02-29 14:17:00 +02:00
parent 7e4619e0a3
commit 16d532bb2e

View File

@@ -325,8 +325,14 @@ abstract class BlueprintForm implements \ArrayAccess, ExportInterface
{
$ordering = '';
$order = [];
$field = end($path) === 'fields';
foreach ($items as $key => &$item) {
// Set name for nested field.
if ($field && isset($item['type'])) {
$item['name'] = $key;
}
// Handle special instructions in the form.
if (!empty($key) && ($key[0] === '@' || $key[strlen($key) - 1] === '@')) {
$name = trim($key, '@');