Skip to content

Commit

Permalink
Added new placeholder field
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryMoustache committed Jul 28, 2023
1 parent fd902cc commit a1628f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"illuminate/contracts": "^10.0",
"awcodes/filament-tiptap-editor": "dev-livewire-v3 as 3.0.0",
"codedor/filament-link-picker": "dev-filament-v3",
"codedor/filament-placeholder-input": "dev-master as 1.0.0",
"codedor/filament-translatable-tabs": "dev-filament-v3",
"codedor/laravel-locale-collection": "^0.0.3",
"spatie/laravel-package-tools": "^1.12",
Expand Down
18 changes: 9 additions & 9 deletions src/Filament/Resources/MailTemplateResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Codedor\FilamentMailTemplates\Filament\Resources;

// use App\Filament\Forms\Components\PlaceholderInput;
use Codedor\FilamentMailTemplates\Filament\Resources\MailTemplateResource\Pages;
use Codedor\FilamentMailTemplates\Models\MailTemplate;
use Codedor\FilamentPlaceholderInput\Filament\Forms\Components\PlaceholderInput;
use Codedor\TranslatableTabs\Forms\TranslatableTabs;
use Codedor\TranslatableTabs\Tables\LocalesColumn;
use Filament\Forms\Components\Grid;
Expand Down Expand Up @@ -87,14 +87,14 @@ public static function form(Form $form): Form
TiptapEditor::make('body')
->columnSpan(['lg' => 2]),

// PlaceholderInput::make('variables')
// ->variables(fn (MailTemplate $record): array => $record->getMailVariables())
// ->labels(fn (MailTemplate $record): array => $record->getMailVariablesLabels())
// ->canCopy()
// ->linksWith([
// "{$locale}.subject" => 'Subject',
// "{$locale}.body" => 'Body',
// ]),
PlaceholderInput::make('variables')
->variables(fn (MailTemplate $record): array => $record->getMailVariables())
->labels(fn (MailTemplate $record): array => $record->getMailVariablesLabels())
->canCopy()
->linksWith([
"{$locale}.subject" => 'Subject',
"{$locale}.body" => 'Body',
]),
]),
]),
]);
Expand Down

0 comments on commit a1628f7

Please sign in to comment.