Skip to content

Commit

Permalink
Action - labels
Browse files Browse the repository at this point in the history
  • Loading branch information
alexPopaCode4 committed Dec 30, 2024
1 parent f2b2e7d commit 70bafea
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ public function form(Form $form): Form
])
->startOnStep($this->getStartStep())
->cancelAction($this->getCancelFormAction())
->submitAction($this->getSubmitFormAction())
->submitAction(
$this->getSubmitFormAction()
->label(__('general.action.finish'))
)
->skippable($this->hasSkippableSteps()),
])
->columns(null);
Expand Down Expand Up @@ -371,8 +374,8 @@ protected function getSteps(): array
return $roles;
})
->disableOptionWhen(fn (Get $get, string $value) => $value === '-1' ?
array_diff($get('roles'), ['-1']):
in_array('-1', $get('roles')))
array_diff($get('roles'), ['-1']) :
\in_array('-1', $get('roles')))
->live(),
]),
]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use App\Concerns\PreventSubmitFormOnEnter;
use App\Filament\Organizations\Resources\UserResource;
use App\Models\User;
use Filament\Actions\Action;
use Filament\Facades\Filament;
use Filament\Resources\Pages\CreateRecord;
use Illuminate\Contracts\Support\Htmlable;
Expand Down Expand Up @@ -36,6 +37,12 @@ protected function getHeaderActions(): array
];
}

protected function getCreateFormAction(): Action
{
return parent::getCreateFormAction()
->label(__('user.actions.add_specialist'));
}

protected function afterSave(): void
{
/** @var User $user */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class ListUsers extends ListRecords
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Actions\CreateAction::make()
->label(__('user.actions.add_specialist')),
];
}

Expand Down
5 changes: 3 additions & 2 deletions lang/ro/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'delete' => 'Șterge',
'view_observations' => 'Vezi observații',
'change' => 'Modifică',
'finish' => 'Finalizează',
],

'filters' => [
Expand All @@ -35,6 +36,6 @@
],

'placeholders' => [
'date' => 'zz-ll-aaaa'
]
'date' => 'zz-ll-aaaa',
],
];
1 change: 1 addition & 0 deletions lang/ro/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
'reset_password' => 'Resetează parola',
'resend_invitation' => 'Retrimite invitația',
'activate' => 'Reactivează cont',
'add_specialist' => 'Adaugă specialist',
],

'action_resend_invitation_confirm' => [
Expand Down

0 comments on commit 70bafea

Please sign in to comment.