From 950b61507f74c6063f45b00bb011fb456707b189 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 24 May 2023 11:33:29 +0200 Subject: [PATCH] wip #5944 @0.5 --- src/app/Magic/Fields/Field.php | 10 +++++---- .../views/fields/noteditable.blade.php | 21 +++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/app/Magic/Fields/Field.php b/src/app/Magic/Fields/Field.php index b46ef69..e9d5019 100644 --- a/src/app/Magic/Fields/Field.php +++ b/src/app/Magic/Fields/Field.php @@ -418,8 +418,9 @@ class Field implements \ArrayAccess $this->setAttribute('auth', false); $this->setAttribute('type', 'noteditable'); $this->setAttribute('view_namespace', CubistBackpackServiceProvider::NAMESPACE . '::fields'); - $this->setAttribute('tab',null); - $this->setAttribute('label',''); + $this->setAttribute('tab', null); + $this->setAttribute('label', ''); + $this->setAttribute('read_only', false); } } else if (null !== $this->getAttribute('can_hidden', null)) { if (!self::can($this->getAttribute('can_hidden'))) { @@ -429,8 +430,9 @@ class Field implements \ArrayAccess $this->setAttribute('auth', false); $this->setAttribute('type', 'authhidden'); $this->setAttribute('view_namespace', CubistBackpackServiceProvider::NAMESPACE . '::fields'); - $this->setAttribute('tab',null); - $this->setAttribute('label',''); + $this->setAttribute('tab', null); + $this->setAttribute('label', ''); + $this->setAttribute('read_only', false); } } diff --git a/src/resources/views/fields/noteditable.blade.php b/src/resources/views/fields/noteditable.blade.php index e69de29..059e528 100644 --- a/src/resources/views/fields/noteditable.blade.php +++ b/src/resources/views/fields/noteditable.blade.php @@ -0,0 +1,21 @@ +@push('crud_fields_scripts') + @loadOnce('bpFieldInitNotEditable') + + @endLoadOnce +@endpush -- 2.39.5