Refactor form components across multiple pages: enforce required validation on various text inputs and file uploads in HomePageSettings, ManagePortfolio, ManageSite, ManageSiteSocialSettings, ManageSolutions, ManageSuccess, and update the news index view to display dynamic content.
This commit is contained in:
@@ -38,10 +38,12 @@ class ManageSite extends SettingsPage
|
||||
->maxLength(100),
|
||||
Forms\Components\TextInput::make('tagline')
|
||||
->label('Site Tagline')
|
||||
->required()
|
||||
->helperText('A short phrase describing your site')
|
||||
->maxLength(150),
|
||||
Forms\Components\Textarea::make('description')
|
||||
->label('Site Description')
|
||||
->required()
|
||||
->helperText('A detailed description of your website')
|
||||
->rows(3)
|
||||
->maxLength(500),
|
||||
@@ -65,13 +67,16 @@ class ManageSite extends SettingsPage
|
||||
->maxLength(100),
|
||||
Forms\Components\TextInput::make('company_phone')
|
||||
->label('Company Phone')
|
||||
->required()
|
||||
->maxLength(20),
|
||||
Forms\Components\TextInput::make('company_phone_2')
|
||||
->label('Company Additional Phone')
|
||||
->required()
|
||||
->maxLength(20),
|
||||
])->columns(2),
|
||||
Forms\Components\Textarea::make('company_address')
|
||||
->label('Company Address')
|
||||
->required()
|
||||
->rows(2)
|
||||
->maxLength(200),
|
||||
]),
|
||||
@@ -94,17 +99,20 @@ class ManageSite extends SettingsPage
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('copyright_text')
|
||||
->label('Copyright Text')
|
||||
->required()
|
||||
->maxLength(200),
|
||||
|
||||
Forms\Components\Grid::make()->schema([
|
||||
Forms\Components\TextInput::make('terms_url')
|
||||
->label('Terms & Conditions URL')
|
||||
->required()
|
||||
->maxLength(100)
|
||||
->prefix(function (Forms\Get $get) {
|
||||
return url('/');
|
||||
}),
|
||||
Forms\Components\TextInput::make('privacy_url')
|
||||
->label('Privacy Policy URL')
|
||||
->required()
|
||||
->maxLength(100)
|
||||
->prefix(function (Forms\Get $get) {
|
||||
return url('/');
|
||||
@@ -120,10 +128,12 @@ class ManageSite extends SettingsPage
|
||||
Forms\Components\Grid::make()->schema([
|
||||
Forms\Components\Textarea::make('custom_404_message')
|
||||
->label('404 Not Found Message')
|
||||
->required()
|
||||
->rows(2)
|
||||
->maxLength(500),
|
||||
Forms\Components\Textarea::make('custom_500_message')
|
||||
->label('500 Server Error Message')
|
||||
->required()
|
||||
->rows(2)
|
||||
->maxLength(500),
|
||||
])->columns(2),
|
||||
|
||||
Reference in New Issue
Block a user