Commit Graph

245 Commits

Author SHA1 Message Date
Andre Kiste
460715197d
Merge pull request #9190 from open-sausages/pulls/4/test-state
Don't include default value in url grid state
2020-11-18 12:31:50 +13:00
Sam Minnee
b3dd27953b NEW: Allow league/csv ^9
Hopefully this has better PHP 8 support.
2020-09-15 17:40:42 +12:00
Maxime Rainville
5226d961e8 Fix unit test 2020-08-18 10:29:57 +12:00
Maxime Rainville
a43414dedb Make sure GridState always outputs a JSON Object string 2020-08-17 23:23:42 +12:00
Maxime Rainville
70ffb3297a API Only include gridfield state value that differ from the expected default 2020-08-17 12:11:56 +12:00
Ingo Schommer
9d03a6856c FIX Retain custom sort on custom lists in GridFieldAddExistingAutoCompleter
Forcing sort by the first search field isn't always appropriate.
When a custom search list is used, we can set the expectation that custom sorting is intended as well.
As an example, this can be used to autocomplete based on FULLTEXT indexes,
and sort based on relevancy.
2020-08-04 22:02:20 +12:00
Robbie Averill
84b4057a9a
Merge pull request #9406 from chrispenny/feature/standardise-get-cms-validator
v4 improvement: Standardise getCMSValidator for DataObjects/Forms
2020-07-16 15:58:33 -07:00
Ingo Schommer
8d6a248431 Merge remote-tracking branch 'origin/4.6' into 4 2020-07-11 09:07:39 +12:00
Ingo Schommer
1f0a78e57b FIX More context for GridFieldDataColumns callbacks
This emulates the callback signature from
GridFieldEditableColumns in the symbiote/silverstripe-gridfieldextensions module, which extends GridFieldDataColumns. In case canEdit() fails, this component passes control back to the parent (rendering a standard column content rather than a formfield). Which can become an issue if you've defined custom 'callback' handlers on setDisplayFields() - GridFieldDataColumns passes in only one arg (`$record`), while GridFieldEditableColumns passes in three (`$record`, `$col` and `$grid`).

While you could argue that this is a bug in the other module,
I think this additional context is beneficial for the main
GridFieldDataColumns use case as well, and it just happens to fix that bug.
2020-07-09 09:33:21 +12:00
Tom Yrjas
00ee8d8abf BUGFIX: Re-declare $items to be an ArrayList if it's null
getBackLink() modified to tolerate empty ArrayList
2020-06-29 16:07:24 +03:00
Tom Yrjas
824b5e0b67 BUGFIX: Ensure $items isn't null in GridFieldDetailForm_ItemRequest->Breadcrumbs() prior to performing operations on it. 2020-06-29 14:13:49 +03:00
Guy Marriott
1a6e2da995
Merge pull request #9543 from jakxnz/pulls/4.6/undeclared-private-statics 2020-06-15 23:16:57 -07:00
Jackson Darlow
dadac00c19
Added array declaration to GridFieldDetailForm_ItemRequest::$formActions
Co-authored-by: Robbie Averill <robbie@averill.co.nz>
2020-06-15 11:45:33 +12:00
Steve Boyd
4daccfab67 Merge branch '4.5' into 4.6 2020-06-12 11:20:13 +12:00
Jackson Darlow
84235c6518 Adjusted missing definitions to only include definitions referenced by framework 2020-06-11 14:28:47 +12:00
Adrian Humphreys
d320026375
Remove recursive write until its fixed 2020-05-28 14:34:55 +12:00
cpenny
d4165db690 Update getter name to getCMSCompositeValidator 2020-05-28 12:23:35 +12:00
cpenny
bca4be77ed Update name to CompositeValidator. Add docblocks 2020-05-28 11:18:46 +12:00
cpenny
b45a3561df Implemented PR feedback. Added some initial test cov 2020-05-28 11:18:46 +12:00
cpenny
d7dd93f7a7 Standardise getCMSValidator for DataObjects/Forms 2020-05-28 11:18:46 +12:00
Andre Kiste
ec51f98adb
Merge pull request #8870 from jinjie/4
Fix: Allow editing of relation if item is created.
2020-05-01 15:37:52 +12:00
Daniel Hensby
237b2d5f74
Convert array delcarations to short array syntax 2020-04-20 18:58:09 +01:00
Robbie Averill
f77f725355
Merge pull request #9447 from mattclegg/docs__GridFieldDetailForm_ItemRequest-httpError
[DOCS] Better debug text for errors generated by GridFieldDetailForm_ItemRequest
2020-04-02 13:05:49 -07:00
Robbie Averill
d3b19069b3
Apply suggestions from code review
Add double quotes around object title
2020-04-02 12:51:13 -07:00
Dan Hensby
d1075f29b8
Remove empty parameter as per feedback 2020-04-02 12:11:35 +01:00
Dan Hensby
9e0ed0a50a
Fix spaces around concatenation operator 2020-04-02 12:09:22 +01:00
mattclegg
24bc80ed35
[DOCS] Better debug text for errors generated by GridFieldDetailForm_ItemRequest 2020-03-31 12:09:16 +05:45
Mojmir Fendek
9c38c5f625 CMS action related extension points (#9340)
* CMS action related extension points

* Refactor to use fewer extension points

* Remove explicit return type

Co-authored-by: Aaron Carlino <unclecheese@leftandmain.com>
2020-01-27 15:09:15 +13:00
Maxime Rainville
6ff0f3f466 BUG The "Link existing" should be disabled rather than readonly. 2020-01-24 14:47:12 +13:00
Mojmir Fendek
acbbf80d14 CMS action related extension points (#9340)
* CMS action related extension points

* Refactor to use fewer extension points

* Remove explicit return type

Co-authored-by: Aaron Carlino <unclecheese@leftandmain.com>
2020-01-15 14:24:49 +13:00
Serge Latyntcev
7873efde9c Merge branch '4.4' into 4 2019-10-18 10:58:19 +13:00
Damian Mooyman
d7752b7945
Run PSR2 Lint cleaner 2019-10-04 13:26:31 +13:00
Damian Mooyman
f1594fd991 BUG Ensure that canCreate() context matches that respected by GridFieldAddNewButton 2019-10-04 11:24:34 +13:00
Serge Latyntcev
88fde6e7c3 Merge branch '4.4' into 4 2019-09-24 17:29:06 +12:00
Serge Latyntcev
50a1aa4c4d Merge branch '4.3' into 4.4 2019-09-24 17:28:31 +12:00
Loz Calver
d85ff3bc44 FIX: Don't force-add view button to readonly GridField (fixes #9249) 2019-09-23 16:52:47 +01:00
Guy Marriott
6ff97821ed Merge branch '4.4' into 4 2019-09-18 15:52:36 -07:00
Guy Marriott
7877ffcc85 Merge branch '4.3' into 4.4 2019-09-18 15:52:18 -07:00
Hayden Shaw
daf9d55ecb Allow non summary fields to be used as export fields
Fixes regression in 3d989a6eae.
2019-09-19 10:00:54 +12:00
Maxime Rainville
dd40d53e6b Merge branch '4.4' into 4 2019-09-04 09:46:33 +12:00
Robbie Averill
ef49dcf726
Merge pull request #9164 from sminnee/fix-9162
FIX: Write relations when saving in grid-field item edit form
2019-09-01 20:44:13 -07:00
Maxime Rainville
a2a202c016
Merge pull request #9200 from open-sausages/pulls/4.4.3/consistent-actions
FIX make the grid field actions consistent to what they look like on pages
2019-09-02 14:07:22 +12:00
bergice
2f8d847a10 FIX make the grid field actions consistent to what they look like on pages
Resolves https://github.com/silverstripe/silverstripe-admin/issues/904
2019-09-02 12:22:32 +12:00
Will Rossiter
d2a07b1047
FIX Remove error when exporting a column that is not displayed in a GridField 2019-08-27 11:54:31 +12:00
Robbie Averill
45f86658ca Merge branch '4.4' into 4 2019-08-14 09:31:05 +12:00
Robbie Averill
4b44272367 Merge branch '4.3' into 4.4 2019-08-14 09:30:53 +12:00
Guy Marriott
3d989a6eae
FIX Use content generated by DataColumns component for print and csv export 2019-08-09 15:04:38 +12:00
Aaron Carlino
b3093b7a1a BUGFIX: Allow state to be shared across nested GridFields 2019-08-07 23:09:51 +12:00
Sam Minnee
6ec02da577 FIX: Allow multi-line content in grid field cells
It’s amazing that this but has been present for 7 years, but there you
go!
2019-08-02 17:46:56 +12:00
Sam Minnee
d088354f46 FIX: Write relations when saving in grid-field item edit form
Fixes https://github.com/silverstripe/silverstripe-framework/issues/9162
2019-08-02 16:17:42 +12:00
Rafael Marins de Sousa
f7c1be7ac1 Including canCreate in if statement so that button gets removed if user isn't to be able to create new records 2019-05-28 12:28:00 +12:00
Guy Marriott
856e841955 FIX Ensuring pagination buttons have a consistent state to work off of (#8957) 2019-05-06 14:42:25 +12:00
Robbie Averill
5337e6d048 API Replace FormActions with anchors to enable panel-based loading in GridField navigation buttons (#8953)
* FIX Add accessibility labels and titles to previous, next, and add new buttons in GridFields

* API Replace FormActions with anchors to enable panel-based loading in GridField navigation buttons

* FIX Previous and Next links are now correctly disabled when end of lists are reached

* Add English translations
2019-05-03 15:03:59 +12:00
Guy Marriott
ecfe039e72
FIX Don't add "better buttons" previous and next without a paginator 2019-05-01 15:48:03 +12:00
Robbie Averill
8a06682e31 Merge branch '4.3' into 4
# Conflicts:
 #	src/ORM/Connect/DBSchemaManager.php
2019-04-11 11:24:17 +12:00
Robbie Averill
55cbacca86 Merge branch '4.2' into 4.3
# Conflicts:
 #	src/Forms/GridField/GridFieldLevelup.php
 #	src/includes/constants.php
2019-04-11 11:21:42 +12:00
Sam Minnee
f12fa62ad6 FIX: Better error message when GridFieldLevelup passed bad record details
Fixes https://github.com/silverstripe/silverstripe-framework/issues/3519
2019-04-08 18:09:51 +12:00
Aaron Carlino
fc6213c293 Merge branch '4.3' into 4 2019-03-27 13:25:57 +13:00
Damian Mooyman
6dc41e50a0
MINOR Linting fixes 2019-03-26 17:35:58 +13:00
Kong Jin Jie
1d406c64b9 Fix: Allow editing of relation if item is created. 2019-03-20 12:51:49 +08:00
Aaron Carlino
f6a7bddd8d Linting 2019-03-20 15:50:54 +13:00
Robbie Averill
3e90fdf42f Merge branch '4.3' into 4 2019-02-19 08:41:05 +07:00
Robbie Averill
ed74549c4f Merge branch '4.2' into 4.3 2019-02-19 08:39:59 +07:00
Robbie Averill
79e44b42fa Merge branch '4.1' into 4.2 2019-02-19 08:37:07 +07:00
Robbie Averill
cb7f15a681 Merge branch '4.0' into 4.1 2019-02-19 08:36:41 +07:00
Robbie Averill
dc9d1b9cc0 FIX GridFieldPrintButton no longer assumes that children of GridField would implement their own print template 2019-01-28 11:45:55 +02:00
Robbie Averill
5d7c5ffb07 Merge branch '4.3' into 4 2018-12-06 09:40:40 +00:00
Guy Marriott
c7b5b1efd2
FIX Switching to use Controller::curr as it was using previously 2018-11-30 15:40:45 +13:00
Guy Marriott
32d096d9e5
DOCS Moving interface subscription to the abstract and adding a changelog entry 2018-11-30 15:40:45 +13:00
Guy Marriott
ddaa22986f
Updating StateStore interface not to define a constructor & fixing GridFieldFilterHeader to add required attributes 2018-11-30 15:40:45 +13:00
Guy Marriott
b4c8f699eb
FIX Provide alternatives to session for storing GridField_FormAction state 2018-11-30 15:40:45 +13:00
Loz Calver
441d079647
Merge pull request #8637 from creative-commoners/pulls/4.4/falsy-detail-component
FIX getComponentByType can return null - prevent null pointer errors
2018-11-26 18:28:26 +01:00
Robbie Averill
f22a4b980b FIX getComponentByType can return null - prevent null pointer errors 2018-11-26 16:01:46 +01:00
Robbie Averill
efa427fc45 FIX Remove redundant "rightGroup" logic and increase getRightGroupField to protected 2018-11-26 12:42:47 +01:00
Andre Kiste
1d9e40ba26 Use new plus icon (#8619)
* Use new plus icon and refactor

* MINOR: Add ability to customise the visibility of the `Previous`, `Next` and `Add` buttons at a `GridField` level

* - Merge `showPrevious` and `showNext` to `showPagination` for grid fields
- Update documentation
- Improve performance for next/previous buttons by not fetching all list records
- Refactoring

* Refactor to fail gracefully on GridFieldPaginator

* Fix merge
2018-11-23 12:40:18 +13:00
Andre Kiste
cc712892a9 NEW Port betterbuttons to framework (#8569)
* MINOR: Add `Previous`, `Next` and `Create New` actions in edit form

If the form is opened via a grid field, the filters will be retained so the previous/next record opened will be correct

* MINOR: Add ability to customise the visibility of the `Previous`, `Next` and `Add` buttons at a `GridField` level

* Fix invalid action when pressing the `New` button in an edit form unless `betterbuttons` module was installed

* - Merge `showPrevious` and `showNext` to `showPagination` for grid fields
- Update documentation
- Improve performance for next/previous buttons by not fetching all list records
- Refactoring

* Refactor to fail gracefully on GridFieldPaginator
2018-11-19 11:06:47 +13:00
Robbie Averill
64c2938c96 Merge branch '4.3' into 4 2018-11-06 11:05:22 +01:00
Aaron Carlino
0ba275cb40 Merge branch '4.2' into 4.3 2018-11-06 15:09:01 +13:00
Luke Edwards
97180c2612 Fix readonly grid state always being truthy (#8562) 2018-11-02 14:28:47 +13:00
Luke Edwards
c7b8b80e8b Persist GridField readonly state, add view button (#8535)
* Persist GridField readonly state, add view button

* Minor clarity fixes
2018-11-01 11:12:52 +13:00
Andre Kiste
511c368e8c
Merge pull request #8521 from open-sausages/pulls/4.3/searching-for-legacy
Add config to force legacy filter header globally
2018-10-29 14:57:21 +13:00
Robbie Averill
b02a6fa02d FIX Replace usage of Convert JSON methods with json_encode 2018-10-28 21:15:29 +00:00
Luke Edwards
3284bf48d6 Fix search filtering relations and clear filters (#8477) 2018-10-26 14:43:56 +13:00
Luke Edwards
d879148bff Add config to force legacy filter header globally 2018-10-26 14:28:15 +13:00
bergice
a6a1743997 BUG: Fix ENTER not triggering form save button as GridFields used submit type buttons 2018-10-18 12:37:24 +13:00
Maxime Rainville
98afbfe9b4 Implement Peer review feedback #8460 2018-10-11 14:56:06 +13:00
Maxime Rainville
ef439f9306 MINOR Correct GridField_DataManipulator PHPDOC to not assume DataList
Tweak GridField_DataManipulator to not assume only DataList will be
provided. Use the SS_List Interface instead. (#8460)
2018-10-11 12:06:21 +13:00
Maxime Rainville
2e2ca5a4a7 Make sure LazyLoader still woks after a readonly transofrmation (#8460) 2018-10-11 11:56:39 +13:00
Maxime Rainville
fdb53311ba Fix linting issue. 2018-10-09 17:32:42 +13:00
Maxime Rainville
bfb6518176 Tweak the logic to empty lazy list. 2018-10-09 17:32:42 +13:00
Maxime Rainville
d2a51471e9 Don't lazy load tab that are not in a TabSet. 2018-10-09 17:32:42 +13:00
Maxime Rainville
bdb53979aa API Create a new GridFieldLazyLoader GridField component 2018-10-09 17:32:42 +13:00
Robbie Averill
ee24413c30 Merge branch '4.2' into 4 2018-10-03 15:28:05 +02:00
Robbie Averill
cb2b9498fb API Deprecate updateSearchContextCallback and updateSearchFormCallback 2018-10-03 13:47:40 +13:00
Luke Edwards
bf60a699a5 Add extension points for ModelAdmin search API 2018-10-03 13:47:40 +13:00
Robbie Averill
c8e7672ede
Merge pull request #8414 from creative-commoners/pulls/4/searching-for-a-name-conflict
FIX Avoid having search fields with the same names as form elements
2018-10-02 13:43:59 +02:00
Guy Marriott
c503dbd634
Prefixing search filters for the React search form context 2018-10-01 13:38:32 +13:00
Robbie Averill
f842ee2eec Update deprecation PHPDocs to be PSR-5 compliant
See: https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#55-deprecated
2018-09-28 10:49:14 +02:00
Guy Marriott
c54e7317d2
FIX Avoid having search fields with the same names as form elements 2018-09-27 17:39:50 +12:00
Robbie Averill
0276f6c089 FIX Revert semver break in adding GridField type hint to method signature 2018-09-24 13:39:33 +02:00