Commit Graph

48 Commits

Author SHA1 Message Date
Roman Schmid 8da9f83cde fix: Fall back to the `ID` if no title is given 2022-07-26 10:47:13 +02:00
Roman Schmid 560a1398ab fix: Do not use `getField` to allow for field fallback values 2022-07-25 16:49:23 +02:00
Roman Schmid e34d6e4898 fix: Use the title-field for has_one DataObject relations 2022-07-04 16:10:02 +02:00
Roman Schmid bc7bf5265b fix: Deal with DataObjects or Int values, so that the correct value is shown with has_one 2022-06-28 09:29:32 +02:00
Will Rossiter 527c5b2224
FIX Selected tag is not shown when isMutliple is false (#201)
* doc: add note about `setTitleField` (Fixes #153)

* NEW Add support for saving tag value into has_one components

FIX Value not shown if isMultiple is false (#195)

* fix: don't default to ID column as pgsql throws an error if comparing string value
2022-06-07 13:00:12 +12:00
Steve Boyd 1b7dba124a ENH PHP 8.1 compatibility 2022-04-13 13:50:19 +12:00
Joseph Madden 55e03731bf
FIX Use existing source datalist if available before creating a new one
Fix for #171 - Issue when utilizing multiple of same parent class

Co-authored-by: Joe Madden <joe.madden@moosylvania.com>
2021-10-15 13:38:53 +13:00
Maxime Rainville ccca22c6fa Merge branch '2.4' into 2 2020-10-22 13:41:47 +13:00
Ingo Schommer 70d80920d7 FIX Preselect based on SS_List values 2020-07-16 17:45:04 +12:00
Damian Mooyman 748ef1a8f0
Actually save the values 2020-07-06 14:36:17 +12:00
Damian Mooyman 2790d7504a
PHP 5 compatibility 🙄 2020-07-06 14:33:09 +12:00
Damian Mooyman 5decfa39e1
Merge remote-tracking branch 'origin/2.4' into pulls/fix-react 2020-07-06 14:18:12 +12:00
Damian Mooyman a61612ec4b
BUG Resolve issue with react select values not being saved
Fixes #150
2020-07-06 14:17:08 +12:00
Sam Minnee d11b9474ed FIX: Fix readonly transformation of field with setTitleField()
If the title field was customised, this metadata was lost during a
readonly transformation. This can cause fatal errors in read-only views
such as history browsing.
2020-06-17 16:40:57 +12:00
Christopher Darling c538a231b7
FIX $record->hasMethod() should be called before getting the relation 2020-05-06 19:45:41 +01:00
Garion Herman 01e7f457a6 Merge branch '2.3' into 2.4 2020-02-13 15:42:44 +13:00
Garion Herman b7a2b3b1d7 Merge branch '2.1' into 2.2 2020-02-13 15:18:32 +13:00
Robbie Averill 804c6bac2f
Run automated phpcs linting 2019-07-25 12:27:29 +12:00
Guy Marriott bd84139b96
Code clean-up 2019-07-25 12:23:04 +12:00
Guy Marriott 61d3d04ed6
FIX Removing potentially breaking lower-case change (and fix tests) 2019-07-25 12:13:52 +12:00
Guy Marriott a1c57f664d
FIX redux-form can now control tag fields
This also fixes an issue where tags would be created and tags could not have the same name as the ID of an existing tag
And the react-select module is updated to the (current) latest 1.x version
And the tests are now working again after updating jest
2019-07-25 12:13:52 +12:00
Guy Marriott e97a82f0b7
FIX Ensure tagfield is compatible with both React and Entwine contexts 2019-07-25 12:13:50 +12:00
Will Rossiter 068e4c6a26
Setup TagField to work within AssetAdmin (Fixes #107) 2019-07-25 12:13:44 +12:00
Nivanka Fonseka 6276ad2aee php cs fixes 2019-04-29 06:37:31 +05:30
Nivanka Fonseka ead0fbac6b fixed the issue with filters being taken off from rendering values 2019-04-17 11:19:42 +05:30
Hayden Shaw fd06a8da5f Add css and js to left and main
* Add yaml file
* Remove requirement calls from field constructors
2018-12-19 14:40:17 +13:00
Robbie Averill dbc519ef31 Move schema data into getSchemaDataDefaults() from Field() 2018-11-15 21:48:46 +02:00
Robbie Averill 204ef6df53 Update array syntax style, broken doc blocks and namespace imports 2018-11-15 21:33:38 +02:00
Robbie Averill 3ce41f60ec FIX Prevent FormField::Type() from adding "tag" class to TagField 2018-11-15 21:23:22 +02:00
Robbie Averill 1ad87eb374 FIX Replace Convert JSON methods with json_* methods, deprecated from SilverStripe 4.4 2018-10-28 21:42:26 +00:00
Damian Mooyman 77bad9b943
Use getShouldLazyLoad() accesser 2018-09-18 09:12:44 +12:00
Damian Mooyman ce8ba85182
Revert default argument change 2018-09-17 18:24:03 +12:00
Damian Mooyman 690f0cc793
BUG Fix for $source left null
BUG Fix missing imports
Semver compatible setSource()
2018-09-17 18:18:40 +12:00
Simon Gow 024e648e5a Added getSource() function to populate source inline with the api.
Source isn't populated to the parent because it's transformed directly
to an array. Instead we're lazy loading the source when it's requested.
2018-09-13 11:18:55 +12:00
Simon Gow fa754f3fd3
TagField lazy load shouldnt render Options
TagField should only render options if the lazy load value isn't set. Options from here come from subsequent POSTs, and rendering the options for every request significantly slows down both the form generation and render.
2018-09-07 17:28:05 +12:00
Simon Gow 3797049a31
Resolve Performance issues with TagField
TagField hydrates the entire result set because a parent class calls `toArray()` on the $source. 
This fix changes the source to an empty array, so no such manipulation can be made.
2018-09-06 18:16:06 +12:00
Guy Marriott cef407d53f
Adding tests & various feedback updates 2018-07-17 16:19:44 +12:00
Guy Marriott 70e83c0995
Travis fixes 2018-07-16 14:34:08 +12:00
Guy Marriott ff3c8eb2bb
Additional changes to convert tagfield to use react-select 2018-07-16 13:27:11 +12:00
Guy Marriott 77f10965d4
NEW Converting tagfield to use react components 2018-07-11 17:47:38 +12:00
Jackson 1e40d07a98 Set "title field" at a meaningful point in TagField instantiation
* Switch diet to dogfood
2018-04-06 14:18:14 +12:00
Jackson 7a286d432d Set "title field" at a meaningful point in TagField instantiation
* Added parameter to SilverStripe\TagFieldTagField::__construct()
* Modified SilverStripe\TagFieldTagField::getOptions() to use assigned title field
* Modified SilverStripe\TagFieldTagField::getValue() to use assigned title field
2018-04-06 13:47:49 +12:00
Nivanka Fonseka 7691fc27c6 Tag field to look similar to list field (#108)
* updated the CSS of the tag field to match with 

the dropdown fields / list fields

* resolve with of the field to the style attr of 

dropdown

* added style width

* removed the empty lines

* changed to the correct classname readonly tag field

* fixed the tag field signature

* removed the whitespace ending in line 352
2018-02-20 13:39:58 +00:00
Nivanka Fonseka 6d7d6ff9e2 readonly field namespaces are corrected and updated the unit tests with cases covering performReadonlyTrasnformation 2018-01-19 13:07:55 +05:30
Robbie Averill e2aea4e0eb FIX Update module for latest SS4, vendorise
* Update Scrutinizer configuration
* Update Travis and code coverage build badges, update example code
2017-10-18 14:19:15 +13:00
Lee Bradley ad28757338 Remove `Requirements::javascript()` for Framework src JS
As jQuery is bundled in the frameworks vendor.js having
  these calls causes a duplicate of the jQuery library

This also means plugins link with the wrong library etc.
  Noticed with `jQuery.dialog()` from a Page edit screen
  going to an associated DataObject edit screen
2017-02-24 11:08:52 +00:00
Damian Mooyman 2129f9f997
BUG Fix issue with initial save 2017-01-26 18:10:14 +13:00
Robbie Averill 518189e2ef SilverStripe 4 compatibility (#87)
* Update composer constraint and branch alias to support SS4 testing

* Add namespaces, update DataList quirk with getSourceList

* Add PSR-4 autoloader definition

* Move template to correct namespace location, update requirement paths

* FIX Visibility on allowed actions

* FIX Update chosen class names to match updates in framework

* Update Travis configuration for 4.x builds. Update docs for namespaced classes.

* Use "4" for the release instead of master.

* FIX Selected tag height. Move Readonly to own class.
2017-01-13 19:11:59 +00:00