From 5b345eef8ac4693ceab5f6321b9a76514e766b82 Mon Sep 17 00:00:00 2001 From: edalzell Date: Tue, 6 May 2025 15:37:36 -0700 Subject: [PATCH 1/2] add config to select across sites --- resources/lang/en/fieldtypes.php | 1 + src/Fieldtypes/Bard.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/resources/lang/en/fieldtypes.php b/resources/lang/en/fieldtypes.php index f493e2394d8..8e24f7e3bb5 100644 --- a/resources/lang/en/fieldtypes.php +++ b/resources/lang/en/fieldtypes.php @@ -44,6 +44,7 @@ 'bard.config.section.editor.instructions' => 'Configure the editor\'s appearance and general behavior.', 'bard.config.section.links.instructions' => 'Configure how links are handled in this instance of Bard.', 'bard.config.section.sets.instructions' => 'Configure blocks of fields that can be inserted anywhere in your Bard content.', + 'bard.config.select_across_sites' => 'Allow selecting entries from other sites. This also disables localizing options on the front-end. Learn more in the [documentation](https://statamic.dev/fieldtypes/entries#select-across-sites).', 'bard.config.smart_typography' => 'Convert common text patterns with the proper typographic characters.', 'bard.config.target_blank' => 'Set `target="_blank"` on all links.', 'bard.config.toolbar_mode' => '**Fixed** mode will keep the toolbar visible at all times, while **floating** only appears while selecting text.', diff --git a/src/Fieldtypes/Bard.php b/src/Fieldtypes/Bard.php index d92c3bec0bc..c7466482cfc 100644 --- a/src/Fieldtypes/Bard.php +++ b/src/Fieldtypes/Bard.php @@ -182,6 +182,11 @@ protected function configFieldItems(): array 'type' => 'collections', 'mode' => 'select', ], + 'select_across_sites' => [ + 'display' => __('Select Across Sites'), + 'instructions' => __('statamic::fieldtypes.bard.config.select_across_sites'), + 'type' => 'toggle', + ], 'container' => [ 'display' => __('Container'), 'instructions' => __('statamic::fieldtypes.bard.config.container'), From b3cb1d6f8a00d9edb46ef8fdb72107f14e9d8013 Mon Sep 17 00:00:00 2001 From: edalzell Date: Tue, 6 May 2025 15:56:17 -0700 Subject: [PATCH 2/2] add input config for selecting entries across all sites --- resources/js/components/fieldtypes/bard/LinkToolbar.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/js/components/fieldtypes/bard/LinkToolbar.vue b/resources/js/components/fieldtypes/bard/LinkToolbar.vue index 6d148d47f1d..5337dad8750 100644 --- a/resources/js/components/fieldtypes/bard/LinkToolbar.vue +++ b/resources/js/components/fieldtypes/bard/LinkToolbar.vue @@ -265,6 +265,7 @@ export default { type: 'entries', collections: this.collections, max_items: 1, + select_across_sites: this.config.select_across_sites, }; },