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:
@@ -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',
|
||||
]),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user