File tree Expand file tree Collapse file tree 5 files changed +36
-2
lines changed
Expand file tree Collapse file tree 5 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 2121 'components.tree.buttons.deselect_all.label ' => 'Deselect All ' ,
2222 'components.tree.buttons.expand_all.label ' => 'Expand All ' ,
2323 'components.tree.buttons.collapse_all.label ' => 'Collapse All ' ,
24+
25+ /*
26+ |--------------------------------------------------------------------------
27+ | Message
28+ |--------------------------------------------------------------------------
29+ */
30+ 'actions.delete.confirmation.with_children ' => 'Are you sure delete this record and its children? ' ,
2431];
Original file line number Diff line number Diff line change 2121 'components.tree.buttons.deselect_all.label ' => '取消全選 ' ,
2222 'components.tree.buttons.expand_all.label ' => '全部展開 ' ,
2323 'components.tree.buttons.collapse_all.label ' => '全部折叠 ' ,
24+ /*
25+ |--------------------------------------------------------------------------
26+ | Message
27+ |--------------------------------------------------------------------------
28+ */
29+ 'actions.delete.confirmation.with_children ' => '你確定要刪除這條記錄及其子記錄嗎? ' ,
2430];
Original file line number Diff line number Diff line change 2121 'components.tree.buttons.deselect_all.label ' => '取消全選 ' ,
2222 'components.tree.buttons.expand_all.label ' => '全部展開 ' ,
2323 'components.tree.buttons.collapse_all.label ' => '全部折叠 ' ,
24+ /*
25+ |--------------------------------------------------------------------------
26+ | Message
27+ |--------------------------------------------------------------------------
28+ */
29+ 'actions.delete.confirmation.with_children ' => '你確定要刪除這條記錄及其子記錄嗎? ' ,
2430];
Original file line number Diff line number Diff line change 2020 'components.tree.buttons.select_all.label ' => '选择全部 ' ,
2121 'components.tree.buttons.deselect_all.label ' => '取消全选 ' ,
2222 'components.tree.buttons.expand_all.label ' => '全部展开 ' ,
23- 'components.tree.buttons.collapse_all.label ' => '全部折叠 ' ,
23+ 'components.tree.buttons.collapse_all.label ' => '全部折叠 ' ,
24+ /*
25+ |--------------------------------------------------------------------------
26+ | Message
27+ |--------------------------------------------------------------------------
28+ */
29+ 'actions.delete.confirmation.with_children ' => '你确定要删除这条记录及其子记录吗? ' ,
2430];
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ protected function setUp(): void
2222
2323 $ this ->modalHeading (fn (): string => __ ('filament-support::actions/delete.single.modal.heading ' , ['label ' => $ this ->getRecordTitle ()]));
2424
25-
2625 $ this ->successNotificationTitle (__ ('filament-support::actions/delete.single.messages.deleted ' ));
2726
2827 $ this ->color ('danger ' );
@@ -33,6 +32,16 @@ protected function setUp(): void
3332
3433 $ this ->requiresConfirmation ();
3534
35+ $ this ->modalSubheading (function (Model $ record ) {
36+ if (collect ($ record ->children )->isNotEmpty ()) {
37+ return __ ('filament-tree::filament-tree.actions.delete.confirmation.with_children ' );
38+
39+ } else {
40+ return __ ('filament-support::actions/modal.confirmation ' );
41+
42+ }
43+ });
44+
3645 $ this ->hidden (static function (Model $ record ): bool {
3746 if (! method_exists ($ record , 'trashed ' )) {
3847 return false ;
You can’t perform that action at this time.
0 commit comments