mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-19 22:14:45 +02:00

* Init * Health Page * Admin API Keys * Update API Keys * Database Hosts * Mounts * remove `s` * Users * Webhooks * Server never again... * Fix Server * Settings * Update Mounts * Update Databasehost * Update Server * Oops, Update Server * Nodes * Update User * Dashboard * Update Server * Profile * Egg * Role & Update Egg * Add base Laravel lang files * update apikey * remove html back to settings, remove comment * add `:resource` to create_action * Update Egg * Update Egg v2 * Update 1 * trans cf info label * Update charts * more trans * Update Webhook * update Health * Update Server * Update Role * Fixes * Bulk Update * AnotherOne * Fix relation button label * rename `admin1` to `admin` Leftover from testing... oops * More Translations * Updates * `pint` + Relation Manager Titles
54 lines
1.6 KiB
PHP
54 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Admin\Resources\WebhookResource\Pages;
|
|
|
|
use App\Models\WebhookConfiguration;
|
|
use App\Filament\Admin\Resources\WebhookResource;
|
|
use Filament\Actions;
|
|
use Filament\Forms\Components\CheckboxList;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Form;
|
|
use Filament\Resources\Pages\EditRecord;
|
|
|
|
class EditWebhookConfiguration extends EditRecord
|
|
{
|
|
protected static string $resource = WebhookResource::class;
|
|
|
|
public function form(Form $form): Form
|
|
{
|
|
return $form
|
|
->schema([
|
|
TextInput::make('endpoint')
|
|
->label(trans('admin/webhook.endpoint'))
|
|
->activeUrl()
|
|
->required(),
|
|
TextInput::make('description')
|
|
->label(trans('admin/webhook.description'))
|
|
->required(),
|
|
CheckboxList::make('events')
|
|
->label(trans('admin/webhook.events'))
|
|
->lazy()
|
|
->options(fn () => WebhookConfiguration::filamentCheckboxList())
|
|
->searchable()
|
|
->bulkToggleable()
|
|
->columns(3)
|
|
->columnSpanFull()
|
|
->gridDirection('row')
|
|
->required(),
|
|
]);
|
|
}
|
|
|
|
protected function getFormActions(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
return [
|
|
Actions\DeleteAction::make(),
|
|
$this->getSaveFormAction()->formId('form'),
|
|
];
|
|
}
|
|
}
|