From 94e60f093dd0f23f28e90229e9965a1cd0bcf80e Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Thu, 28 Mar 2024 01:58:26 +0300 Subject: [PATCH] add sticky form actions --- .phpunit.cache/test-results | 2 +- composer.lock | 156 +++++++++--------- docs/getting-started/configuration.md | 3 + src/Configuration.php | 14 ++ .../FormResource/Pages/CreateForm.php | 6 + .../Resources/FormResource/Pages/EditForm.php | 6 + 6 files changed, 110 insertions(+), 77 deletions(-) diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results index d70f5c56..9b4c43fa 100644 --- a/.phpunit.cache/test-results +++ b/.phpunit.cache/test-results @@ -1 +1 @@ -{"version":"pest_2.34.5","defects":[],"times":{"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.236,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_test":0.004,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_collection_list":0.205,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_form_list":0.076,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_category_list":0.082,"P\\Tests\\FormsTest::__pest_evaluable_it_can_retrieve_data":0.112,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_logged_in_user":0.015,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_Form_List":0.05,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login_for_guest":0.009,"P\\Tests\\FormsTest::__pest_evaluable_it_can_save":1.285,"P\\Tests\\FormsTest::__pest_evaluable_it_the_form_can_be_rendered":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_not_edit":0.047,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_guest_user":0.01,"P\\Tests\\FormsTest::__pest_evaluable_it_can_create":0.006,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_date_is_valid":0.013,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_list_Forms":0.014,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_create_form_page":0.089,"P\\Tests\\FormsTest::__pest_evaluable_it_see_ended_form_date":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_list_Form":0.006,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_show_Form":0.011}} \ No newline at end of file +{"version":"pest_2.34.5","defects":[],"times":{"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.195,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_test":0.003,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_collection_list":0.06,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_form_list":0.046,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_category_list":0.073,"P\\Tests\\FormsTest::__pest_evaluable_it_can_retrieve_data":0.049,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_logged_in_user":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_Form_List":0.118,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login_for_guest":0.014,"P\\Tests\\FormsTest::__pest_evaluable_it_can_save":1.339,"P\\Tests\\FormsTest::__pest_evaluable_it_the_form_can_be_rendered":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_not_edit":0.045,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_guest_user":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_create":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_date_is_valid":0.059,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_list_Forms":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_create_form_page":0.128,"P\\Tests\\FormsTest::__pest_evaluable_it_see_ended_form_date":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_list_Form":0.006,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_show_Form":0.01}} \ No newline at end of file diff --git a/composer.lock b/composer.lock index 9fe97e6f..f7a80619 100644 --- a/composer.lock +++ b/composer.lock @@ -1422,16 +1422,16 @@ }, { "name": "filament/actions", - "version": "v3.2.60", + "version": "v3.2.61", "source": { "type": "git", "url": "https://github.com/filamentphp/actions.git", - "reference": "8523fabf8d48301d80023d3955bc2d21e52b1e2f" + "reference": "95c8842023399cdf2508a86c2af3db579b125cc7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/actions/zipball/8523fabf8d48301d80023d3955bc2d21e52b1e2f", - "reference": "8523fabf8d48301d80023d3955bc2d21e52b1e2f", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/95c8842023399cdf2508a86c2af3db579b125cc7", + "reference": "95c8842023399cdf2508a86c2af3db579b125cc7", "shasum": "" }, "require": { @@ -1471,20 +1471,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-21T22:43:16+00:00" + "time": "2024-03-27T12:36:15+00:00" }, { "name": "filament/filament", - "version": "v3.2.60", + "version": "v3.2.61", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "08673dba066dcb54cf9019596ffea3d79997496c" + "reference": "6aa99147005785e0528e9eca77ee029c7c57d620" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/08673dba066dcb54cf9019596ffea3d79997496c", - "reference": "08673dba066dcb54cf9019596ffea3d79997496c", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/6aa99147005785e0528e9eca77ee029c7c57d620", + "reference": "6aa99147005785e0528e9eca77ee029c7c57d620", "shasum": "" }, "require": { @@ -1536,20 +1536,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-23T20:58:51+00:00" + "time": "2024-03-27T12:36:01+00:00" }, { "name": "filament/forms", - "version": "v3.2.60", + "version": "v3.2.61", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "c864c8ac34e1372964d2d4e9595d10ddaabf88c8" + "reference": "1237e83354fd28a1a4cf5d6585f57adc56954e6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/c864c8ac34e1372964d2d4e9595d10ddaabf88c8", - "reference": "c864c8ac34e1372964d2d4e9595d10ddaabf88c8", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/1237e83354fd28a1a4cf5d6585f57adc56954e6c", + "reference": "1237e83354fd28a1a4cf5d6585f57adc56954e6c", "shasum": "" }, "require": { @@ -1592,20 +1592,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-23T23:27:26+00:00" + "time": "2024-03-27T12:35:57+00:00" }, { "name": "filament/infolists", - "version": "v3.2.60", + "version": "v3.2.61", "source": { "type": "git", "url": "https://github.com/filamentphp/infolists.git", - "reference": "64d1ed73e05eebb688e343348e126a038169c7d0" + "reference": "aa2f266ce113b13cf24e8752970bed9d2fb62b4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/infolists/zipball/64d1ed73e05eebb688e343348e126a038169c7d0", - "reference": "64d1ed73e05eebb688e343348e126a038169c7d0", + "url": "https://api.github.com/repos/filamentphp/infolists/zipball/aa2f266ce113b13cf24e8752970bed9d2fb62b4f", + "reference": "aa2f266ce113b13cf24e8752970bed9d2fb62b4f", "shasum": "" }, "require": { @@ -1643,20 +1643,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-23T23:27:28+00:00" + "time": "2024-03-27T12:36:20+00:00" }, { "name": "filament/notifications", - "version": "v3.2.60", + "version": "v3.2.61", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", - "reference": "f9a790ee2d5103ea87c88e6d545ea6ceb770cbe5" + "reference": "069a37c9f260918741fd80167859d7578ea18887" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/notifications/zipball/f9a790ee2d5103ea87c88e6d545ea6ceb770cbe5", - "reference": "f9a790ee2d5103ea87c88e6d545ea6ceb770cbe5", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/069a37c9f260918741fd80167859d7578ea18887", + "reference": "069a37c9f260918741fd80167859d7578ea18887", "shasum": "" }, "require": { @@ -1695,11 +1695,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-19T00:28:12+00:00" + "time": "2024-03-27T12:36:01+00:00" }, { "name": "filament/spatie-laravel-translatable-plugin", - "version": "v3.2.60", + "version": "v3.2.61", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-translatable-plugin.git", @@ -1744,16 +1744,16 @@ }, { "name": "filament/support", - "version": "v3.2.60", + "version": "v3.2.61", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "05c0c56bdb66226dc8d239ac91bc973a0dd33edb" + "reference": "6f7f6fe72f8c206bd28297fbf41f863358c95c07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/05c0c56bdb66226dc8d239ac91bc973a0dd33edb", - "reference": "05c0c56bdb66226dc8d239ac91bc973a0dd33edb", + "url": "https://api.github.com/repos/filamentphp/support/zipball/6f7f6fe72f8c206bd28297fbf41f863358c95c07", + "reference": "6f7f6fe72f8c206bd28297fbf41f863358c95c07", "shasum": "" }, "require": { @@ -1797,20 +1797,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-23T20:59:06+00:00" + "time": "2024-03-27T12:36:25+00:00" }, { "name": "filament/tables", - "version": "v3.2.60", + "version": "v3.2.61", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "b58dbfd4b3f4da6708e67a4ca0512bc914faa991" + "reference": "38e01c5d5e841d36365d2acf581ed60095b0f768" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/b58dbfd4b3f4da6708e67a4ca0512bc914faa991", - "reference": "b58dbfd4b3f4da6708e67a4ca0512bc914faa991", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/38e01c5d5e841d36365d2acf581ed60095b0f768", + "reference": "38e01c5d5e841d36365d2acf581ed60095b0f768", "shasum": "" }, "require": { @@ -1850,11 +1850,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-23T20:59:09+00:00" + "time": "2024-03-27T12:36:41+00:00" }, { "name": "filament/widgets", - "version": "v3.2.60", + "version": "v3.2.61", "source": { "type": "git", "url": "https://github.com/filamentphp/widgets.git", @@ -2249,16 +2249,16 @@ }, { "name": "kirschbaum-development/eloquent-power-joins", - "version": "3.5.2", + "version": "3.5.5", "source": { "type": "git", "url": "https://github.com/kirschbaum-development/eloquent-power-joins.git", - "reference": "2fae3aca9eefd4591603a7e53406ab9f56b69fad" + "reference": "ed5af4788f0dad3ce35bb883cecac4293496139a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kirschbaum-development/eloquent-power-joins/zipball/2fae3aca9eefd4591603a7e53406ab9f56b69fad", - "reference": "2fae3aca9eefd4591603a7e53406ab9f56b69fad", + "url": "https://api.github.com/repos/kirschbaum-development/eloquent-power-joins/zipball/ed5af4788f0dad3ce35bb883cecac4293496139a", + "reference": "ed5af4788f0dad3ce35bb883cecac4293496139a", "shasum": "" }, "require": { @@ -2305,9 +2305,9 @@ ], "support": { "issues": "https://github.com/kirschbaum-development/eloquent-power-joins/issues", - "source": "https://github.com/kirschbaum-development/eloquent-power-joins/tree/3.5.2" + "source": "https://github.com/kirschbaum-development/eloquent-power-joins/tree/3.5.5" }, - "time": "2024-03-20T10:23:27+00:00" + "time": "2024-03-27T11:14:14+00:00" }, { "name": "lara-zeus/accordion", @@ -2776,16 +2776,16 @@ }, { "name": "laravel/prompts", - "version": "v0.1.16", + "version": "v0.1.17", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "ca6872ab6aec3ab61db3a61f83a6caf764ec7781" + "reference": "8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/ca6872ab6aec3ab61db3a61f83a6caf764ec7781", - "reference": "ca6872ab6aec3ab61db3a61f83a6caf764ec7781", + "url": "https://api.github.com/repos/laravel/prompts/zipball/8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5", + "reference": "8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5", "shasum": "" }, "require": { @@ -2827,9 +2827,9 @@ ], "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.16" + "source": "https://github.com/laravel/prompts/tree/v0.1.17" }, - "time": "2024-02-21T19:25:27+00:00" + "time": "2024-03-13T16:05:43+00:00" }, { "name": "laravel/serializable-closure", @@ -8172,16 +8172,16 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" + "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", "shasum": "" }, "require": { @@ -8192,7 +8192,7 @@ "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { @@ -8216,9 +8216,9 @@ "performance" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" }, "funding": [ { @@ -8234,7 +8234,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T21:32:43+00:00" + "time": "2024-03-26T18:29:49+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -8899,16 +8899,16 @@ }, { "name": "laravel/pint", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "6b127276e3f263f7bb17d5077e9e0269e61b2a0e" + "reference": "c52de679b3ac01207016c179d7ce173e4be128c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/6b127276e3f263f7bb17d5077e9e0269e61b2a0e", - "reference": "6b127276e3f263f7bb17d5077e9e0269e61b2a0e", + "url": "https://api.github.com/repos/laravel/pint/zipball/c52de679b3ac01207016c179d7ce173e4be128c4", + "reference": "c52de679b3ac01207016c179d7ce173e4be128c4", "shasum": "" }, "require": { @@ -8961,7 +8961,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-02-20T17:38:05+00:00" + "time": "2024-03-26T16:40:24+00:00" }, { "name": "laravel/tinker", @@ -9765,16 +9765,16 @@ }, { "name": "orchestra/testbench", - "version": "v8.22.1", + "version": "v8.22.2", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "2ab5afb6b4dbcc8ad132e60db4e6eb5f1069cb6d" + "reference": "d08b40877714370c8788ff1d9813d9fc9c6c55b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/2ab5afb6b4dbcc8ad132e60db4e6eb5f1069cb6d", - "reference": "2ab5afb6b4dbcc8ad132e60db4e6eb5f1069cb6d", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/d08b40877714370c8788ff1d9813d9fc9c6c55b2", + "reference": "d08b40877714370c8788ff1d9813d9fc9c6c55b2", "shasum": "" }, "require": { @@ -9782,7 +9782,7 @@ "fakerphp/faker": "^1.21", "laravel/framework": "^10.40", "mockery/mockery": "^1.5.1", - "orchestra/testbench-core": "^8.23.4", + "orchestra/testbench-core": "^8.23.5", "orchestra/workbench": "^1.4 || ^8.4", "php": "^8.1", "phpunit/phpunit": "^9.6 || ^10.1", @@ -9814,9 +9814,9 @@ ], "support": { "issues": "https://github.com/orchestral/testbench/issues", - "source": "https://github.com/orchestral/testbench/tree/v8.22.1" + "source": "https://github.com/orchestral/testbench/tree/v8.22.2" }, - "time": "2024-03-19T12:59:06+00:00" + "time": "2024-03-25T10:09:14+00:00" }, { "name": "orchestra/testbench-core", @@ -10489,16 +10489,16 @@ }, { "name": "php-parallel-lint/php-parallel-lint", - "version": "v1.3.2", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", - "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de" + "reference": "6db563514f27e19595a19f45a4bf757b6401194e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6483c9832e71973ed29cf71bd6b3f4fde438a9de", - "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6db563514f27e19595a19f45a4bf757b6401194e", + "reference": "6db563514f27e19595a19f45a4bf757b6401194e", "shasum": "" }, "require": { @@ -10536,13 +10536,17 @@ "email": "ahoj@jakubonderka.cz" } ], - "description": "This tool check syntax of PHP files about 20x faster than serial check.", + "description": "This tool checks the syntax of PHP files about 20x faster than serial check.", "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint", + "keywords": [ + "lint", + "static analysis" + ], "support": { "issues": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/issues", - "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.3.2" + "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.4.0" }, - "time": "2022-02-21T12:50:22+00:00" + "time": "2024-03-27T12:14:49+00:00" }, { "name": "phpdocumentor/reflection-common", diff --git a/docs/getting-started/configuration.md b/docs/getting-started/configuration.md index 5f679c29..2788fed7 100644 --- a/docs/getting-started/configuration.md +++ b/docs/getting-started/configuration.md @@ -32,6 +32,9 @@ BoltPlugin::make() 'Section' => \App\Models\Bolt\Section::class, ]) + // make the actions floating in create and edit forms + ->formActionsAreSticky(true) + ->hideResources([ FormResource::class ]) diff --git a/src/Configuration.php b/src/Configuration.php index c70f1728..c2fd92fa 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -33,6 +33,8 @@ trait Configuration */ protected Closure | string $navigationGroupLabel = 'Bolt'; + protected bool $formActionsAreSticky = false; + protected Closure | bool $showNavigationBadges = true; protected array $showNavigationBadgesArray = []; @@ -69,6 +71,18 @@ public function getNavigationGroupLabel(): Closure | string return $this->evaluate($this->navigationGroupLabel); } + public function formActionsAreSticky(bool $condition = false): static + { + $this->formActionsAreSticky = $condition; + + return $this; + } + + public function isFormActionsAreSticky(): bool + { + return $this->evaluate($this->formActionsAreSticky); + } + public function extensions(?array $extensions): static { $this->extensions = $extensions; diff --git a/src/Filament/Resources/FormResource/Pages/CreateForm.php b/src/Filament/Resources/FormResource/Pages/CreateForm.php index ee118c33..3316d5be 100644 --- a/src/Filament/Resources/FormResource/Pages/CreateForm.php +++ b/src/Filament/Resources/FormResource/Pages/CreateForm.php @@ -4,6 +4,7 @@ use Filament\Actions; use Filament\Resources\Pages\CreateRecord; +use LaraZeus\Bolt\BoltPlugin; use LaraZeus\Bolt\Filament\Resources\FormResource; class CreateForm extends CreateRecord @@ -12,6 +13,11 @@ class CreateForm extends CreateRecord protected static string $resource = FormResource::class; + public function areFormActionsSticky(): bool + { + return BoltPlugin::get()->isFormActionsAreSticky(); + } + protected function getHeaderActions(): array { return [ diff --git a/src/Filament/Resources/FormResource/Pages/EditForm.php b/src/Filament/Resources/FormResource/Pages/EditForm.php index 2bf67087..7318d186 100644 --- a/src/Filament/Resources/FormResource/Pages/EditForm.php +++ b/src/Filament/Resources/FormResource/Pages/EditForm.php @@ -6,6 +6,7 @@ use Filament\Actions\LocaleSwitcher; use Filament\Resources\Pages\EditRecord; use Illuminate\Contracts\Support\Htmlable; +use LaraZeus\Bolt\BoltPlugin; use LaraZeus\Bolt\Filament\Resources\FormResource; use LaraZeus\Bolt\Models\Form; @@ -18,6 +19,11 @@ class EditForm extends EditRecord protected static string $resource = FormResource::class; + public function areFormActionsSticky(): bool + { + return BoltPlugin::get()->isFormActionsAreSticky(); + } + public function getTitle(): string | Htmlable { return __('Edit Form');