From a238805ae076b16dced3a7bddc47f2262c3f9f0b Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 24 Jun 2019 18:15:34 +0200 Subject: [PATCH] #2843 --- src/app/Magic/Fields/BunchOfFields.php | 2 +- src/resources/views/fields/bunch.blade.php | 50 +++++++++++++++------ src/resources/views/fields/button.blade.php | 3 ++ 3 files changed, 41 insertions(+), 14 deletions(-) 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')