From 47171ee4c25f552fb7bac80c1666775c24bcaac0 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Tue, 15 Aug 2023 10:45:42 +1200 Subject: [PATCH 1/2] FIX Allow editing extra fields from ManyManyThroughList. --- src/GridFieldEditableColumns.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GridFieldEditableColumns.php b/src/GridFieldEditableColumns.php index c48eb16..e42be98 100644 --- a/src/GridFieldEditableColumns.php +++ b/src/GridFieldEditableColumns.php @@ -24,6 +24,7 @@ use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataObjectInterface; use SilverStripe\ORM\ManyManyList; +use SilverStripe\ORM\ManyManyThroughList; /** * Allows inline editing of grid field records without having to load a separate @@ -165,7 +166,7 @@ public function handleSave(GridField $grid, DataObjectInterface $record) } } - if ($list instanceof ManyManyList) { + if ($list instanceof ManyManyList || $list instanceof ManyManyThroughList) { $extra = array_intersect_key($form->getData() ?? [], (array) $list->getExtraFields()); } @@ -250,7 +251,7 @@ public function getFields(GridField $grid, DataObjectInterface $record) } } - if (!$field && $list instanceof ManyManyList) { + if (!$field && ($list instanceof ManyManyList || $list instanceof ManyManyThroughList)) { $extra = $list->getExtraFields(); if ($extra && array_key_exists($col, $extra ?? [])) { From 1e5a1e8056a7f82bb3d3c7442e5036c83d7103a8 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Mon, 21 Aug 2023 13:21:15 +1200 Subject: [PATCH 2/2] ENH Update translations (#373) --- client/lang/en.js | 2 +- client/lang/eo.js | 2 +- client/lang/nl_NL.js | 2 +- client/lang/sl.js | 2 +- client/lang/src/en.json | 2 +- client/lang/src/eo.json | 2 +- client/lang/src/nl_NL.json | 2 +- client/lang/src/sl.json | 2 +- lang/nl_NL.yml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/client/lang/en.js b/client/lang/en.js index 7bbdfa1..a1379ac 100644 --- a/client/lang/en.js +++ b/client/lang/en.js @@ -6,8 +6,8 @@ if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') { } } else { ss.i18n.addDictionary('en', { - "GridFieldExtensions.CONFIRMDEL": "Are you sure you want to delete this?", "GridFieldExtensions.ADD_CLASS": "Add: {classname}", + "GridFieldExtensions.CONFIRMDEL": "Are you sure you want to delete this?", "GridFieldExtensions.OPEN_SEARCH_FILTER": "Open search and filter", "GridFieldExtensions.SAVE_PUBLISH": "Save & publish" }); diff --git a/client/lang/eo.js b/client/lang/eo.js index 8ddabf3..0f364bb 100644 --- a/client/lang/eo.js +++ b/client/lang/eo.js @@ -6,8 +6,8 @@ if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') { } } else { ss.i18n.addDictionary('eo', { - "GridFieldExtensions.CONFIRMDEL": "Ĉu vi certas ke vi volas forigi tion?", "GridFieldExtensions.ADD_CLASS": "Aldoni: {classname}", + "GridFieldExtensions.CONFIRMDEL": "Ĉu vi certas ke vi volas forigi tion?", "GridFieldExtensions.OPEN_SEARCH_FILTER": "Malfermi serĉon kaj filtrilon", "GridFieldExtensions.SAVE_PUBLISH": "Konservi kaj publikigi" }); diff --git a/client/lang/nl_NL.js b/client/lang/nl_NL.js index 340e552..11c7e52 100644 --- a/client/lang/nl_NL.js +++ b/client/lang/nl_NL.js @@ -6,8 +6,8 @@ if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') { } } else { ss.i18n.addDictionary('nl_NL', { - "GridFieldExtensions.CONFIRMDEL": "Weet je zeker dat je dit wil verwijderen?", "GridFieldExtensions.ADD_CLASS": "Toevoegen: {classname}", + "GridFieldExtensions.CONFIRMDEL": "Weet je zeker dat je dit wil verwijderen?", "GridFieldExtensions.OPEN_SEARCH_FILTER": "Open zoeken en filteren", "GridFieldExtensions.SAVE_PUBLISH": "Opslaan & Publiceren" }); diff --git a/client/lang/sl.js b/client/lang/sl.js index 65b6463..06cddaa 100644 --- a/client/lang/sl.js +++ b/client/lang/sl.js @@ -6,8 +6,8 @@ if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') { } } else { ss.i18n.addDictionary('sl', { - "GridFieldExtensions.CONFIRMDEL": "Res želite to izbrisati?", "GridFieldExtensions.ADD_CLASS": "Dodaj: {classname}", + "GridFieldExtensions.CONFIRMDEL": "Res želite to izbrisati?", "GridFieldExtensions.OPEN_SEARCH_FILTER": "Prikaži iskalnik in filtre", "GridFieldExtensions.SAVE_PUBLISH": "Shrani in objavi" }); diff --git a/client/lang/src/en.json b/client/lang/src/en.json index 2a56943..e842356 100644 --- a/client/lang/src/en.json +++ b/client/lang/src/en.json @@ -1,6 +1,6 @@ { - "GridFieldExtensions.CONFIRMDEL": "Are you sure you want to delete this?", "GridFieldExtensions.ADD_CLASS": "Add: {classname}", + "GridFieldExtensions.CONFIRMDEL": "Are you sure you want to delete this?", "GridFieldExtensions.OPEN_SEARCH_FILTER": "Open search and filter", "GridFieldExtensions.SAVE_PUBLISH": "Save & publish" } \ No newline at end of file diff --git a/client/lang/src/eo.json b/client/lang/src/eo.json index 5d1d042..c81a94b 100644 --- a/client/lang/src/eo.json +++ b/client/lang/src/eo.json @@ -1,6 +1,6 @@ { - "GridFieldExtensions.CONFIRMDEL": "Ĉu vi certas ke vi volas forigi tion?", "GridFieldExtensions.ADD_CLASS": "Aldoni: {classname}", + "GridFieldExtensions.CONFIRMDEL": "Ĉu vi certas ke vi volas forigi tion?", "GridFieldExtensions.OPEN_SEARCH_FILTER": "Malfermi serĉon kaj filtrilon", "GridFieldExtensions.SAVE_PUBLISH": "Konservi kaj publikigi" } \ No newline at end of file diff --git a/client/lang/src/nl_NL.json b/client/lang/src/nl_NL.json index f23cdf4..831bd93 100644 --- a/client/lang/src/nl_NL.json +++ b/client/lang/src/nl_NL.json @@ -1,6 +1,6 @@ { - "GridFieldExtensions.CONFIRMDEL": "Weet je zeker dat je dit wil verwijderen?", "GridFieldExtensions.ADD_CLASS": "Toevoegen: {classname}", + "GridFieldExtensions.CONFIRMDEL": "Weet je zeker dat je dit wil verwijderen?", "GridFieldExtensions.OPEN_SEARCH_FILTER": "Open zoeken en filteren", "GridFieldExtensions.SAVE_PUBLISH": "Opslaan & Publiceren" } \ No newline at end of file diff --git a/client/lang/src/sl.json b/client/lang/src/sl.json index f739552..b10d6c8 100644 --- a/client/lang/src/sl.json +++ b/client/lang/src/sl.json @@ -1,6 +1,6 @@ { - "GridFieldExtensions.CONFIRMDEL": "Res želite to izbrisati?", "GridFieldExtensions.ADD_CLASS": "Dodaj: {classname}", + "GridFieldExtensions.CONFIRMDEL": "Res želite to izbrisati?", "GridFieldExtensions.OPEN_SEARCH_FILTER": "Prikaži iskalnik in filtre", "GridFieldExtensions.SAVE_PUBLISH": "Shrani in objavi" } \ No newline at end of file diff --git a/lang/nl_NL.yml b/lang/nl_NL.yml index cb4f91e..fd2dc3a 100644 --- a/lang/nl_NL.yml +++ b/lang/nl_NL.yml @@ -5,14 +5,14 @@ nl_NL: GridFieldExtensions: ADD: Toevoegen ADDEXISTING: 'Bestaande toevoegen' - SEARCH: Zoeken - SELECTTYPETOCREATE: '(Selecteer type om te creeën)' BACK: Terug CURRENT: (huidige) NOITEMS: 'Er zijn geen items.' Next: Volgende PREVIOUS: Vorige RESULTS: Resultaten + SEARCH: Zoeken + SELECTTYPETOCREATE: '(Selecteer type om te creeën)' Symbiote\GridFieldExtensions\Extensions\GridFieldDetailFormItemRequestExtension: NEW: 'Nieuw item maken' Symbiote\GridFieldExtensions\GridFieldConfigurablePaginator: