]> _ Git - cubist_cms-back.git/commitdiff
wip #3753 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 26 Nov 2020 08:09:07 +0000 (09:09 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 26 Nov 2020 08:09:07 +0000 (09:09 +0100)
src/app/Magic/Fields/ModelAttribute.php [new file with mode: 0644]
src/app/Magic/Fields/StaticValue.php
src/resources/views/fields/static_value.blade.php

diff --git a/src/app/Magic/Fields/ModelAttribute.php b/src/app/Magic/Fields/ModelAttribute.php
new file mode 100644 (file)
index 0000000..c459e3a
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+
+namespace Cubist\Backpack\app\Magic\Fields;
+
+
+class ModelAttribute extends StaticValue
+{
+    public function filterValue($value)
+    {
+        $a = $this->getAttribute('attributes');
+    }
+}
index 3b1375fa88d51af12a40e8a8a41149454a6e56e3..372367b40362ad4cd8cf77ac3f22ef1777d835ca 100644 (file)
@@ -12,4 +12,8 @@ class StaticValue extends Field
     protected $_translatable = false;
     protected $_viewNamespace = CubistBackpackServiceProvider::NAMESPACE . '::fields';
 
+    public function filterValue($value)
+    {
+        return $this->getAttribute('value');
+    }
 }
index 6c0277611499f2443848c8a628555e81cd125b9c..ef9b4c4398ac69358f5717c2bb62d64a77af62c7 100644 (file)
@@ -2,9 +2,7 @@
 @include('crud::fields.inc.wrapper_start')
 <label>{!! $field['label'] !!}</label>
 @include('crud::fields.inc.translatable_icon')
-
-@if(isset($field['prefix']) || isset($field['suffix'])) <div class="input-group"> @endif
-    {{ old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? $field['default'] ?? '' }}"
+<div>{{ old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? $field['default'] ?? '' }}</div>
 {{-- HINT --}}
 @if (isset($field['hint']))
 <p class="help-block">{!! $field['hint'] !!}</p>