From: Vincent Vanwaelscappel Date: Fri, 14 Jun 2019 13:28:26 +0000 (+0200) Subject: wip #2835 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=3077bd60c384e066dc239824ee5e056f9672294b;p=cubist_cms-back.git wip #2835 @1 --- diff --git a/src/app/Magic/Fields/Field.php b/src/app/Magic/Fields/Field.php index 49e7737..6e9225b 100644 --- a/src/app/Magic/Fields/Field.php +++ b/src/app/Magic/Fields/Field.php @@ -88,7 +88,7 @@ class Field if (class_exists(__NAMESPACE__ . '\\' . $type)) { return __NAMESPACE__ . '\\' . $type; } - return self::class; + throw new Exception('Field ' . $type . ' not available'); } public function getDefaultAttributes() diff --git a/src/app/Magic/Fields/Tags.php b/src/app/Magic/Fields/Tags.php new file mode 100644 index 0000000..0f73d1c --- /dev/null +++ b/src/app/Magic/Fields/Tags.php @@ -0,0 +1,12 @@ + +
+ + @include('crud::inc.field_translatable_icon') + + + @if(isset($field['select_all']) && $field['select_all']) + {{ trans('backpack::crud.select_all') }} + {{ trans('backpack::crud.clear') }} + @endif + + {{-- HINT --}} + @if (isset($field['hint'])) +

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

+ @endif +
+ + +{{-- ########################################## --}} +{{-- Extra CSS and JS for this particular field --}} +{{-- If a field type is shown multiple times on a form, the CSS and JS will only be loaded once --}} +@if ($crud->checkIfFieldIsFirstOfItsType($field)) + + {{-- FIELD CSS - will be loaded in the after_styles section --}} + @push('crud_fields_styles') + + + + @endpush + + {{-- FIELD JS - will be loaded in the after_scripts section --}} + @push('crud_fields_scripts') + + + + @endpush + +@endif +{{-- End of Extra CSS and JS --}} +{{-- ########################################## --}}