Commit Graph

246 Commits

Author SHA1 Message Date
Guy Sartorelli 873b721b6b
[CVE-2023-48714] Don't show or add records the member isn't allowed to
see
2024-01-23 11:11:36 +13:00
Sabina Talipova d883719c16 FIX ModelAdmin toast elements 2023-11-09 09:39:52 +13:00
Sabina Talipova d24095aba8 FIX Image in summaryfields breaks search 2023-08-03 14:48:55 +12:00
Guy Sartorelli 01808a8316
FIX Don't assume searchableFields() exists in gridfield filter 2023-05-09 10:00:07 +12:00
Guy Sartorelli 908b6f2006
Merge branch '4.12' into 4.13 2023-04-26 11:44:54 +12:00
Guy Sartorelli fd5d8217e8
[CVE-2023-22728] Check canView before printing from GridField 2023-04-26 09:45:34 +12:00
Steve Boyd 0f40cc38ec FIX Respect searchable_fields 2023-03-23 10:57:03 +13:00
Steve Boyd 23efed1802 Merge branch '4.12' into 4 2023-02-02 16:20:00 +13:00
Florian Thoma bb8e3b8386
fix: optional return value for paginator state
`$state->getData()->getData('GridFieldPaginator')' (line 598) returns null by default.
2023-01-02 15:32:16 +11:00
Guy Sartorelli 0d662ba95f
Merge branch '4.12' into 4 2022-12-19 01:38:09 +00:00
Steve Boyd cb76f312a4 Merge branch '4.11' into 4.12-release 2022-11-21 13:44:23 +13:00
Steve Boyd dc98cad48a Merge branch '4.10' into 4.11 2022-11-21 13:43:59 +13:00
Steve Boyd 4308a93cc8 [CVE-2022-38148] Validate SortColumn exists 2022-11-21 13:01:32 +13:00
Steve Boyd 137ebcebec API Stop using deprecated API 2022-11-15 18:20:54 +13:00
Steve Boyd 9c453abf89 API Update deprecations 2022-10-13 14:49:15 +13:00
Steve Boyd 7b87926428 ENH Update deprecation messages 2022-10-13 14:05:49 +13:00
Steve Boyd cc49036616 ENH Standardise deprecation messages 2022-10-13 14:05:49 +13:00
Viktor Szépe 94d1ac8d99
ENH Various changes via static analysis tooling 2022-08-24 12:14:32 +12:00
Sabina Talipova c0b38fc411 ENH Update page number in the state on reaching the first or the last element in a list 2022-08-22 12:44:11 +12:00
Steve Boyd c466ca5ca5
Merge pull request #9341 from unclecheese/pulls/4/come-on-baby-make-it-search-so-good
NEW: Allow search field customisation
2022-08-02 11:59:55 +12:00
Guy Sartorelli c7504aa337
Merge pull request #10331 from creative-commoners/pulls/4/gridfield-keep-state
ENH Restore gridfield state from get vars (POC)
2022-07-29 11:33:19 +12:00
Sabina Talipova 7a9bc7f577 ENH Keep Request in URL 2022-07-28 10:14:43 +12:00
Aaron Carlino 07a6c1191a NEW: Allow search field customisation in GridFieldFilterHeader 2022-07-25 17:33:09 +12:00
Steve Boyd b62c4a9f53 Merge branch '4.11' into 4 2022-07-08 17:13:31 +12:00
Sabina Talipova babc811381 FIX Remove unexpected message 2022-07-04 16:05:57 +12:00
Guy Sartorelli a8652f7cbb ENH Restore gridfield state from get vars 2022-05-23 10:57:13 +12:00
Steve Boyd db5fbcd035 Merge branch '4.11' into 4 2022-05-19 17:25:42 +12:00
Steve Boyd d3252b1645 Merge branch '4.10' into 4.11 2022-05-19 17:25:15 +12:00
Steve Piner e91b7be056 FIX Use DataColumns content when available in CSV export
Fix #9248 broke #9173 by accidentally checking for a string key in a
numerically indexed array. Change the check to search the array instead
(fixes #10308)
2022-05-13 13:53:04 +12:00
Guy Sartorelli 5436df57e4 FIX Add polymorphic class on new records for use in forms. 2022-05-11 14:04:52 +12:00
Steve Boyd 511b3bb060 ENH PHP 8.1 compatibility 2022-04-14 13:12:59 +12:00
Steve Boyd 3202ef7c52 Merge branch '4.10' into 4 2022-04-06 10:42:58 +12:00
Steve Boyd 740d087e97 FIX Default GridField search fields with an index of 0 to use StartWithFilter 2022-03-22 16:17:37 +13:00
Michal Kleiner ba80f4baa9
Merge pull request #9996 from signify-nz/enh/gridfield-readonly-transformation
ENH Provide ways to modify read-only gridfields globally.
2022-02-12 22:10:29 +13:00
GuySartorelli 5c54276b6f
ENH Make all GridField components injectable (using abstract class) (#10204)
* ENH Make all GridField components injectable.

Some components were already injectable, but all GridField components shipped in silverstripe should be injectable.
This makes it a LOT easier to make global project-specific changes to a given component.
The new AbstractGridFieldComponent also makes it easy to make similar wide-spread changes in the future.

* DOCS Encourage injection for GridField and GridFieldComponents.
2022-02-02 11:14:33 +13:00
Steve Boyd 6691d31121 Merge branch '4.10' into 4 2022-01-25 16:09:14 +13:00
Thomas Portelange 0cfd98d87a
FIX support search filter instances (#9991)
and also fully qualified class names
2022-01-21 16:33:51 +13:00
Mojmir Fendek 048eb4b614 ENH Improve gridfield export pefromance by using DataList generator 2022-01-12 07:01:00 +13:00
Lukas 552cf5944d
MNT Fix various typos with codespell (#10177) 2021-12-13 21:05:33 +13:00
Steve Boyd a3d9648687 FIX Ensure tmpItem has a value before calling method_exists on it 2021-11-25 15:52:51 +13:00
GuySartorelli 49a7f08c07
ENH: Display validation messages for GridFields (#10015)
* FIX: Display validation messages for GridFields
* ENH: Add test for GridField validation messages.
2021-10-19 12:03:40 +13:00
Steve Boyd 9b42624616
Merge pull request #9994 from GuySartorelli/patch-1
ENH Provide onBeforeRenderHolder extension hook in GridField.
2021-08-06 09:47:53 +12:00
GuySartorelli 4cd6b1434a
ENH Reduce duplication of code in GridField view and edit buttons. (#9953)
* ENH Reduce duplication of code in GridField view and edit buttons.

* Fix syntax error

Co-authored-by: Daniel Hensby <dhensby@users.noreply.github.com>

Co-authored-by: Daniel Hensby <dhensby@users.noreply.github.com>
2021-07-18 16:54:22 +01:00
Guy Sartorelli 365998f445 ENH Add extension point for modifying readonly GridFields.
Developers may want to amend a gridfield (either by modifying its
components or amending the list) after it has been transformed to be
readonly.
One such modification may be replacing the GridFieldViewButton
with something else - because components are instantiated with the "new"
keyword this would be the only way to do that.
2021-06-29 11:23:58 +12:00
Guy Sartorelli 009a32fbec ENH Allow GridField readonly components to be globally modified. 2021-06-29 11:21:41 +12:00
GuySartorelli d710990e13
ENH Provide onBeforeRenderHolder extension hook.
GridField has onBeforeRender in its Field method, but that hardly ever gets called.
This commit adds the onBeforeRenderHolder extension hook that is normally available via FormField::FieldHolder().
2021-06-25 13:21:49 +12:00
Sam Minnee 8883413ba7 NEW: Add GridFieldDetailForm::setRedirectMissingRecords()
This new opt-in setting will let grid field detail forms redirect to the
“Correct” URL of a GridField if it’s not found in the current list.

This works by:
 * Looking for the item in the database
 * If it exists, check for a CMSEditLink() method that returns a value
 * If so, redirect to that

This is useful if you have a number of grid fields that each show a
partial list of records, and it’s possible for the user to make changes
such the item no longer appears in the list, but does appear in another
list.

It’s an opt-in feature as I think all changes like this should be
opt-in, based on previous experiences improving GridField and in turn
breaking SecurityAdmin and slowing versioned-data-browsing down. ;-)
2021-05-21 13:16:00 +12:00
Guy Marriott 766df06f23
Merge pull request #9631 from open-sausages/pulls/4/custom-sort-gridfield-autocompleter 2021-05-20 14:02:44 -07:00
Christopher Darling daa9060c1a
remove unused class import Convert
Was missed from PR b02a6fa02d
2021-03-22 14:34:13 +00:00
Maxime Rainville 0dd59a1e7b
BUG Reset GridFieldFilterHeader grid state when search is cleared (#9829) 2021-01-21 13:47:40 +13:00