From: Vincent Vanwaelscappel Date: Thu, 8 Oct 2020 17:19:06 +0000 (+0200) Subject: wip #3939 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7396f366e83922e61f968d9613493e685e51fa31;p=cubist_cms-back.git wip #3939 @1 --- diff --git a/src/app/Magic/Fields/Code.php b/src/app/Magic/Fields/Code.php new file mode 100644 index 0000000..0a64ef3 --- /dev/null +++ b/src/app/Magic/Fields/Code.php @@ -0,0 +1,21 @@ + $this->_language]); + } +} diff --git a/src/resources/views/fields/code.blade.php b/src/resources/views/fields/code.blade.php new file mode 100644 index 0000000..71a003a --- /dev/null +++ b/src/resources/views/fields/code.blade.php @@ -0,0 +1,25 @@ + +@include('crud::fields.inc.wrapper_start') + +@include('crud::fields.inc.translatable_icon') + + +{{-- HINT --}} +@if (isset($field['hint'])) +

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

+@endif +@include('crud::fields.inc.wrapper_end') + +{{-- ########################################## --}} +{{-- 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)) +textarea.code{ + font-family: Courier, monospace; +} +@endif