From 1adb4f6b0e9251ad85c0c789fe97c54e4e30aee6 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 18 Jun 2019 16:17:46 +0200 Subject: [PATCH] #2843 --- src/app/Magic/Fields/Button.php | 19 +++ src/app/Magic/SubForm.php | 5 + src/resources/views/fields/button.blade.php | 154 ++++++++++++++++++++ 3 files changed, 178 insertions(+) create mode 100644 src/app/Magic/Fields/Button.php create mode 100644 src/resources/views/fields/button.blade.php diff --git a/src/app/Magic/Fields/Button.php b/src/app/Magic/Fields/Button.php new file mode 100644 index 0000000..40fb063 --- /dev/null +++ b/src/app/Magic/Fields/Button.php @@ -0,0 +1,19 @@ + $this->_pageModel]); + } +} diff --git a/src/app/Magic/SubForm.php b/src/app/Magic/SubForm.php index 5161993..0c5cb4d 100644 --- a/src/app/Magic/SubForm.php +++ b/src/app/Magic/SubForm.php @@ -10,5 +10,10 @@ class SubForm public function __construct() { + $this->init(); + } + + public function init(){ + } } diff --git a/src/resources/views/fields/button.blade.php b/src/resources/views/fields/button.blade.php new file mode 100644 index 0000000..e041b4b --- /dev/null +++ b/src/resources/views/fields/button.blade.php @@ -0,0 +1,154 @@ + + + trans('backpack::crud.page_link'), 'internal_link' => trans('backpack::crud.internal_link'), 'external_link' => trans('backpack::crud.external_link')]; +$field['allows_null'] = false; +$page_model = $field['page_model']; +$active_pages = $page_model::all(); +?> + +
+ + @include('crud::inc.field_translatable_icon') +
+
+ +
+
+ +
+
+ + + + + + +
+
+ + {{-- 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 --}} +{{-- ########################################## --}} -- 2.39.5