From: Vincent Vanwaelscappel Date: Mon, 24 Jun 2019 16:15:34 +0000 (+0200) Subject: #2843 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a238805ae076b16dced3a7bddc47f2262c3f9f0b;p=cubist_cms-back.git #2843 --- diff --git a/src/app/Magic/Fields/BunchOfFields.php b/src/app/Magic/Fields/BunchOfFields.php index 68054b4..8c0128b 100644 --- a/src/app/Magic/Fields/BunchOfFields.php +++ b/src/app/Magic/Fields/BunchOfFields.php @@ -56,7 +56,7 @@ class BunchOfFields extends Field $name .= '-_-' . $item; } $field->setAttribute('name', $name); - $crudfields[] = $field->getDefinition(); + $crudfields[$name] = $field->getDefinition(); } $this->setAttribute('bunchfields', $crudfields); } diff --git a/src/resources/views/fields/bunch.blade.php b/src/resources/views/fields/bunch.blade.php index cf4c688..4bd23aa 100644 --- a/src/resources/views/fields/bunch.blade.php +++ b/src/resources/views/fields/bunch.blade.php @@ -1,23 +1,41 @@ $v) { + $ik=$field['name'].'___'.$k; + if (isset($field['bunchfields'][$ik])) { + $field['bunchfields'][$ik]['value'] = $v; + } +} ?> -
-
- - @include('crud::inc.field_translatable_icon') -
+
+
+
+ + @include('crud::inc.field_translatable_icon') +
- @include('cubist_back::inc.show_bunch_fields', array('bunchfields'=>$field['bunchfields'])) + @include('cubist_back::inc.show_bunch_fields', array('bunchfields'=>$field['bunchfields'])) -
+
- {{-- HINT --}} - @if (isset($field['hint'])) -

{!! $field['hint'] !!}

- @endif + {{-- HINT --}} + @if (isset($field['hint'])) +

{!! $field['hint'] !!}

+ @endif +
@@ -30,17 +48,23 @@ {{-- FIELD CSS - will be loaded in the after_styles section --}} @push('crud_fields_styles')