From: Vincent Vanwaelscappel Date: Thu, 26 Nov 2020 08:09:07 +0000 (+0100) Subject: wip #3753 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=13f6dcc2a9b77b14e2614f671f961719da607f88;p=cubist_cms-back.git wip #3753 @0.25 --- diff --git a/src/app/Magic/Fields/ModelAttribute.php b/src/app/Magic/Fields/ModelAttribute.php new file mode 100644 index 0000000..c459e3a --- /dev/null +++ b/src/app/Magic/Fields/ModelAttribute.php @@ -0,0 +1,13 @@ +getAttribute('attributes'); + } +} diff --git a/src/app/Magic/Fields/StaticValue.php b/src/app/Magic/Fields/StaticValue.php index 3b1375f..372367b 100644 --- a/src/app/Magic/Fields/StaticValue.php +++ b/src/app/Magic/Fields/StaticValue.php @@ -12,4 +12,8 @@ class StaticValue extends Field protected $_translatable = false; protected $_viewNamespace = CubistBackpackServiceProvider::NAMESPACE . '::fields'; + public function filterValue($value) + { + return $this->getAttribute('value'); + } } diff --git a/src/resources/views/fields/static_value.blade.php b/src/resources/views/fields/static_value.blade.php index 6c02776..ef9b4c4 100644 --- a/src/resources/views/fields/static_value.blade.php +++ b/src/resources/views/fields/static_value.blade.php @@ -2,9 +2,7 @@ @include('crud::fields.inc.wrapper_start') @include('crud::fields.inc.translatable_icon') - -@if(isset($field['prefix']) || isset($field['suffix']))
@endif - {{ old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? $field['default'] ?? '' }}" +
{{ old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? $field['default'] ?? '' }}
{{-- HINT --}} @if (isset($field['hint']))

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