From 3cbabfd839e1ee1449dfe53050e2f5537d0dd7fd Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 15 Feb 2023 10:41:45 +0100 Subject: [PATCH] wip #5734 @0.5 --- src/app/Magic/Fields/CheckboxBasic.php | 11 +++++ .../views/fields/checkboxbasic.blade.php | 44 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 src/app/Magic/Fields/CheckboxBasic.php create mode 100644 src/resources/views/fields/checkboxbasic.blade.php diff --git a/src/app/Magic/Fields/CheckboxBasic.php b/src/app/Magic/Fields/CheckboxBasic.php new file mode 100644 index 0000000..f707364 --- /dev/null +++ b/src/app/Magic/Fields/CheckboxBasic.php @@ -0,0 +1,11 @@ + + +@include('crud::fields.inc.wrapper_start') +@include('crud::fields.inc.translatable_icon') +
+ @php $id='cb_'.rand(100,1000000000); @endphp + + $value) + @if($attribute==='name' || $attribute==='value') + @continue + @endif + {{ $attribute }}="{{ $value }}" + @endforeach + @endif + > + + + {{-- 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->fieldTypeNotLoaded($field)) + @php + $crud->markFieldTypeAsLoaded($field); + @endphp + {{-- FIELD JS - will be loaded in the after_scripts section --}} + @push('crud_fields_scripts') + @endpush + +@endif +{{-- End of Extra CSS and JS --}} +{{-- ########################################## --}} -- 2.39.5