diff --git a/src/app/Http/Controllers/Admin/PageBuilderCrudController.php b/src/app/Http/Controllers/Admin/PageBuilderCrudController.php index 8770232..1c51d8b 100644 --- a/src/app/Http/Controllers/Admin/PageBuilderCrudController.php +++ b/src/app/Http/Controllers/Admin/PageBuilderCrudController.php @@ -200,15 +200,13 @@ protected function setupUpdateOperation() ->allows_null(false) ->tab('Page Settings'); - // $this->crud->removeAllSaveActions() uses the wrong method and is bugged - $this->crud->setOperationSetting('save_actions', []); + $this->crud->removeAllSaveActions(); +// $this->crud->setOperationSetting('save_actions', []); // Save Actions $this->crud->addSaveAction([ 'name' => 'save_and_edit_content', - 'redirect' => function($crud, $request, $itemId) { - return backpack_url('pages/' . $itemId . '/edit#page-content'); - }, + 'redirect' => fn($crud, $request, $itemId) => backpack_url('pages/' . $itemId . '/edit#page-content'), 'button_text' => 'Save and Edit Content', 'order' => 0, ]); diff --git a/src/resources/views/crud/form/form_content.blade.php b/src/resources/views/crud/form/form_content.blade.php index 4fc684c..ca2a66e 100644 --- a/src/resources/views/crud/form/form_content.blade.php +++ b/src/resources/views/crud/form/form_content.blade.php @@ -2,31 +2,32 @@ {{-- See if we're using tabs --}} @if ($crud->tabsEnabled() && count($crud->getTabs())) - @include('pagebuilder::crud.form.show_tabbed_fields') - + @include('pagebuilder::crud.form.show_tabbed_fields') + +@else +
+
+ @include('crud::inc.show_fields', ['fields' => $crud->fields()]) +
+
@endif {{-- Define blade stacks so css and js can be pushed from the fields to these sections. --}} @section('after_styles') - - - - - @stack('crud_fields_styles') + {{-- CRUD FORM CONTENT - crud_fields_styles stack --}} + @stack('crud_fields_styles') + @endsection @section('after_scripts') - - - - - @stack('crud_fields_scripts') + {{-- CRUD FORM CONTENT - crud_fields_scripts stack --}} + @stack('crud_fields_scripts') - - }); - - - @include('crud::inc.form_fields_script') + @include('crud::inc.form_fields_script') @endsection diff --git a/src/resources/views/crud/pages/edit.blade.php b/src/resources/views/crud/pages/edit.blade.php index d99d878..a94125a 100644 --- a/src/resources/views/crud/pages/edit.blade.php +++ b/src/resources/views/crud/pages/edit.blade.php @@ -109,7 +109,7 @@ class="form-control"

- Select the date you want this page to be published, pressing delete will remove it. + Select the date you want this page to be published, pressing delete will remove it.