Add max content width method to template creation and editing pages: Implemented getMaxContentWidth method in Create and Edit classes for Header, Footer, and Section templates to set the maximum content width to Full. Updated HTML content field styling in form schemas to improve usability by adjusting height and overflow properties.

This commit is contained in:
Ümit Tunç
2025-11-01 11:14:45 -03:00
parent d1dc8dfe78
commit bea17d583f
9 changed files with 40 additions and 4 deletions
@@ -4,8 +4,14 @@ namespace App\Filament\Admin\Resources\FooterTemplates\Pages;
use App\Filament\Admin\Resources\FooterTemplates\FooterTemplateResource;
use Filament\Resources\Pages\CreateRecord;
use Filament\Support\Enums\Width;
class CreateFooterTemplate extends CreateRecord
{
protected static string $resource = FooterTemplateResource::class;
public function getMaxContentWidth(): Width | string | null
{
return Width::Full;
}
}
@@ -8,11 +8,17 @@ use Filament\Actions\ForceDeleteAction;
use Filament\Actions\RestoreAction;
use Filament\Actions\ViewAction;
use Filament\Resources\Pages\EditRecord;
use Filament\Support\Enums\Width;
class EditFooterTemplate extends EditRecord
{
protected static string $resource = FooterTemplateResource::class;
public function getMaxContentWidth(): Width | string | null
{
return Width::Full;
}
protected function getHeaderActions(): array
{
return [
@@ -37,7 +37,7 @@ class FooterTemplateForm
->columnSpanFull()
->helperText(__('footer-templates.field_html_content_help'))
->extraAttributes([
'style' => 'min-height: 400px;',
'style' => 'max-height: 400px;overflow-y: auto;',
'data-field-name' => 'html_content',
]),