Commit Graph

2137 Commits

Author SHA1 Message Date
Ingo Schommer
60333f68ee NEW UploadField lists all files, shows path info
It doesn't make a lot of sense to limit the listing
to assets/Uploads/, which is the default set through FileField->folderName.
Showing all files regardless of folder makes them easier
to find, users can still opt-in to filtering by folder
through the TreeDropdownField.
2013-12-20 01:00:36 +01:00
Ingo Schommer
03b2e9dc74 "alt" and "title" attrs for images from URLs (fixes #2723) 2013-12-19 19:43:46 +01:00
Ingo Schommer
323364bc85 Fixed merge errors 2013-12-06 15:44:24 +01:00
Ingo Schommer
740560c487 Fixed merge errors
- HTML identifier changes in master breaking tests
- Regression from b6b3cd9889 in GridFieldSortableHeader (var capitalisation)
2013-12-06 15:37:51 +01:00
Ingo Schommer
6176d65bd2 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	forms/gridfield/GridFieldSortableHeader.php
	model/DataList.php
	model/fieldtypes/Enum.php
2013-12-02 20:49:34 +01:00
Ingo Schommer
73eae2990f Merge pull request #2683 from tractorcow/pulls/2682-fix-gridfieldsortableheader
BUG Fixes #2682 - Regression in #2595
2013-11-29 09:17:39 -08:00
madmatt
bebe0f6e37 Updating @package and @subpackage doc tags 2013-11-29 17:49:30 +13:00
Ingo Schommer
eaa390b1de Merge pull request #2692 from sheadawson/formfieldhook
MINOR added onBeforeRender extension hook to FormField
2013-11-28 16:48:18 -08:00
sheadawson
759cb2dd6d MINOR added onBeforeRender extension hook to FormField 2013-11-29 11:20:30 +11:00
Damian Mooyman
7636699c9f BUG Fixes #2682 - Regression in #2595 causing gridfield headers to break on summary_fields containing field methods 2013-11-27 18:43:27 +13:00
Ingo Schommer
7e291133a0 Merge pull request #2663 from ajshort/has-many-prepopulate
NEW: Pre-populate and disable foreign key field on has many lists.
2013-11-22 11:18:11 -08:00
Ingo Schommer
053258b984 Merge pull request #2595 from kinglozzer/gridfield-sort-relation
NEW: GridField can sort on relation columns
2013-11-22 11:14:12 -08:00
Ian Walls
b906442a9c Fixes issue #2669
Add local setName() function to DatetimeField, which also sets Name
on the constituent DateField, TimeField and timezoneField.
2013-11-15 14:18:48 -05:00
Loz Calver
a1a402224f NEW: GridField can sort on relation columns
Slightly improved logic

Add support for relations more than one 'level' apart

Add unit tests

Fixing PostgreSQL support

Throw exception if attempting to sort on a has_many/many_many relation
2013-11-13 10:33:00 +00:00
Andrew Short
fc773c5c22 NEW: Pre-populate and disable foreign key field on has many lists.
This is a common use case, and by default a form field is added which
has no effect. While this coupling is undesirable, it makes the default
behaviour much more sensible.

See #2662, #2651, #2637 for more information.
2013-11-13 16:21:18 +11:00
Andrew Short
bedf292612 Merge branch '3.1'
Conflicts:
	docs/en/reference/execution-pipeline.md
	lang/nl.yml
2013-11-11 18:18:25 +11:00
Zauberfisch
2df5269ae5 disable source_file_comments in GridFieldAddExistingAutocompleter->doSearch() because they would be displayed as plaintext in the dropdown 2013-11-08 08:34:22 +00:00
Zauberfisch
54a58eff27 Replace HTML entities in GridFieldAddExistingAutocompleter->doSearch() with actual charaters as the DropDown does not play nicely with HTML entities 2013-11-08 07:54:47 +00:00
Ingo Schommer
61f99fa1ef UploadField changeDetection optional (fixes #2638) 2013-11-06 23:34:29 +01:00
Maks Feltrin
0e05353efc make setHeadingLevel a chainable method 2013-11-02 01:21:56 +01:00
Sean Harvey
8e36290b56 Merge pull request #2205 from jthomerson/pulls/fix_gridfield_class_name
FIX: wrong class name being returned
2013-10-31 18:19:05 -07:00
Damian Mooyman
fbf64c8c48 Merge pull request #2603 from chillu/pulls/htmleditor-upload-replace
Default UploadField to replace files
2013-10-31 15:25:22 -07:00
Will Rossiter
9633f49aaf Merge pull request #2612 from AlphaCactus/patch-1
Replace new *Field with *Field::create()
2013-10-29 23:15:05 -07:00
Damian Mooyman
4102cc64a0 BUG Issues with CMSForm not consistently respecting new form naming scheme.
Fixes for failing CMSFormTest cases
2013-10-30 17:08:31 +13:00
Simon Welsh
60bb9d81c5 Merge pull request #2411 from simonwelsh/circ_ref
Revert "Merge pull request #2390 from phptek/2389"
2013-10-28 14:05:13 -07:00
AlphaCactus
133c6dd089 Replace some new *Field with *Field::create()
Specifically intended to change new TreeDropdownField with TreeDropdownField::create but also replaced a few others as well.  This allows class replacement of TreeDropdownField in order to extend its functionality without having to override HTMLEditorField.
2013-10-25 12:49:41 -07:00
Ingo Schommer
2266d77237 Revert "Style destructive actions destructively"
This reverts commit 3851ef9f2c.
Breaks button alignment in CMS.
2013-10-24 11:37:40 +02:00
Damian Mooyman
b6b3cd9889 API GridState_Data values can have default values specified during retrieval.
Fixes issues with GridStata_Data being returned from various states when value types are necessary.
Pruning of dead code from GridFieldAddExistingAutocompleter
Documentation for GridState
2013-10-24 16:15:33 +13:00
Ingo Schommer
5dadb5a74f Default UploadField to replace files
Honours the $overwriteWarning setting, rather than warning
about overwritten files, and when that warning is acknowledged by the user,
create a new file instead. We need to set this as close to
the Upload->load() call as possible, since it depends
on non-deterministic config state.
2013-10-23 23:07:53 +02:00
Ingo Schommer
739d591e45 Merge pull request #2558 from chillu/pulls/uploadfield-874
HTML attr encoding for UploadField config
2013-10-23 13:00:39 -07:00
Ingo Schommer
b56ca812dc Merge remote-tracking branch 'origin/3.1'
Conflicts:
	tests/security/MemberTest.php
2013-10-23 14:53:29 +02:00
Ingo Schommer
d7e10e620a Merge pull request #2537 from wilr/membervalidator
FIX: Use Injector API for managing Member_Validator instance.
2013-10-23 03:01:15 -07:00
Ingo Schommer
3f479ad282 Merge pull request #2575 from dhensby/patch-2
FIX #2496 `ConfirmedPasswordField` mismatch passwords saved
2013-10-23 02:29:42 -07:00
Ingo Schommer
ea5b3e4269 Merge pull request #2520 from wilr/destructivestyles
Style destructive actions destructively
2013-10-22 17:07:38 -07:00
Loz Calver
e9fdfb05b2 GridField 'Add existing' action styling improvements 2013-10-22 16:44:28 +01:00
Daniel Hensby
2a6f1f1949 FIX #2496 ConfirmedPasswordField mismatch passwords saved
Fixes #2496

Also fixes another issue where 'Password' is hard coded as field name in `validate()`
2013-10-21 22:27:41 +01:00
Ingo Schommer
25b6175e67 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	.travis.yml
	forms/FormField.php
2013-10-20 13:52:56 +02:00
Nathan J. Brauer
fee54c75f0 API: Change DropdownField::getSource() to not return the emptyString value. 2013-10-18 11:16:27 +13:00
Will Rossiter
1c983bc16d API: LookupField::Field now returns an HTMLText instance.
Moved LookupField into a template, removed getSource() as the DropdownField getSource() has been simplified to just a getter
2013-10-18 10:28:17 +13:00
Ingo Schommer
e1b7df38ef HTML attr encoding for UploadField config
Also fixed UploadField operation with canUpload=false,
which broke the JS because no config could be found,
since the <input> field wasn't present. We can't put the data-config
attribute on the field holder, since fields can be rendered
without their field holder through FormField->SmalLFieldHolder().

Fixes https://github.com/silverstripe/silverstripe-cms/issues/874
2013-10-17 10:55:11 +02:00
Ingo Schommer
b6c16fcbf1 Merge pull request #2554 from tractorcow/pulls/3.1-moneyfield-style-fix
BUG Fixed incorrect CSS class on MoneyField holder
2013-10-17 01:22:01 -07:00
Damian Mooyman
24950692cd BUG Fixes serious issue with FieldList::addFieldsToTab failing to accept multiple field groups.
Additional groups beyond the first are ignored.
Test cases included.
2013-10-17 15:38:22 +13:00
Damian Mooyman
702b6c94c4 BUG Fixed incorrect CSS class on MoneyField holder 2013-10-17 13:28:27 +13:00
Will Rossiter
813d34b15e FIX: Use Injector API for managing Member_Validator instance.
Updates the CMS profile page and SecurityAdmin to give developers a few ways to customise the required fields.

Added extension hook updateValidator for getValidator for things like modules to inject required fields to go along with Injector for replacing the entire class for project specific use.
2013-10-16 11:29:43 +13:00
Ingo Schommer
1bcd4c9a6a Merge pull request #2531 from ajshort/pull-5
Correct some incorrect PHPDoc definitions.
2013-10-13 01:36:16 -07:00
Andrew Short
c082dc3bd1 Correct some incorrect PHPDoc definitions. 2013-10-13 18:59:53 +11:00
Will Rossiter
3851ef9f2c Style destructive actions destructively 2013-10-11 20:00:11 +13:00
Ingo Schommer
d485faf0c9 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	.travis.yml
	forms/Form.php
2013-10-08 11:17:06 +02:00
Ingo Schommer
aa6ca49651 Merge pull request #2493 from kinglozzer/2449-form-validation-exemptions
NEW: Allow setting of specific form actions that do not require validation on CMSForm
2013-10-08 01:51:11 -07:00
Ingo Schommer
6e8ec778c3 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	admin/templates/Includes/LeftAndMain_Menu.ss
	lang/en.yml
2013-10-07 16:19:40 +02:00
Ingo Schommer
795d3e4b3b Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	dev/install/install.php5
	docs/en/index.md
	tests/core/CoreTest.php
2013-10-07 16:18:20 +02:00
Ingo Schommer
60fc7e5346 Merge remote-tracking branch 'origin/3.1' 2013-10-06 19:07:39 +02:00
Loz Calver
3172c7732e Allow setting of specific form actions that do not require validation
Move validation exemptions into CMSForm

Also fix buttonClicked() to skip CompositeField

Whitespace

Adding unit tests
2013-10-04 10:30:20 +01:00
Ingo Schommer
dcf9f2c133 Merge pull request #2311 from unclecheese/patch-12
API Change: Make GridFieldConfig objects decoratable
2013-10-03 16:46:13 -07:00
Sean Harvey
5e5a2f8845 Merge pull request #2288 from chillu/pulls/browser-spellcheck
API Disable discontinued Google Spellcheck in TinyMCE (#2213)
2013-10-03 14:42:45 -07:00
Tom Densham
37e032df86 API: Change CreditCardField to use AttributeHTML 2013-10-03 15:26:31 +01:00
Ingo Schommer
bb7c973e34 Merge pull request #2468 from nedmas/make-creditcardfield-use-template
FIX: Make CreditCardField use template
2013-10-03 03:22:06 -07:00
Tom Densham
d79d50770c FIX: Make CreditCardField use template 2013-10-03 10:51:39 +01:00
Loz Calver
9b0564b7d6 FIX: Undefined variable in TreeDropdownField.php
I'm guessing this was just a simple typo. Checked this by searching on SiteTree, behaves as expected after this change.
2013-10-02 15:41:39 +01:00
Ingo Schommer
837304b81b Query param support in TreeMultiselectField (fixes #2438)
Thanks to @bummzack for the initial fix
2013-10-02 15:42:29 +02:00
Loz Calver
6b3b61873a FEATURE: Disable specific tree nodes in TreeDropdownField
DO NOT MERGE: to be reviewed.

This feature request was born out of wanting the ability to disable (for example) a top level page from being selected, while still being able to select a child page. Using setFilterFunction() simply removes the node and its children.

Extra styling for disabled nodes

Disable ability to select a disabled node for TreeDropdownField

Disable hover CSS changes

Fixing merge conflict during rebase

Return a boolean for nodeIsDisabled()
2013-10-02 12:53:23 +01:00
Ingo Schommer
9709a5cd8c Merge remote-tracking branch 'origin/3.1.0' into 3.1 2013-10-01 01:45:27 +02:00
Ingo Schommer
deadc154ca Don't link record in GridField form message
This is no longer allows through Form->sessionMessage() to avoid XSS.
2013-10-01 00:00:37 +02:00
Ingo Schommer
bda56eb9b0 Don't link record in GridField form message
This is no longer allows through Form->sessionMessage() to avoid XSS.
2013-09-30 23:55:32 +02:00
Ingo Schommer
298de5a67d FIX Escape breadcrumbs in SecurityAdmin (SS-2013-007) 2013-09-30 22:53:43 +02:00
Ingo Schommer
d8d07d971e FIX Auto-escape titles in TreeDropdownField
Related to SS-2013-009. While the default "TreeTitle" was escaped
within the SiteTree->TreeTitle() getter, other properties like SiteTree->Title
weren't escaped. The new logic uses the underlying casting helpers
on the processed objects.
2013-09-30 22:53:21 +02:00
Ingo Schommer
a338e608b8 API Escape form validation messages (SS-2013-008) 2013-09-30 22:53:07 +02:00
Daniel Hensby
6c943007a1 removeRequiredField() limits field (fixes #2165)
Added tests to RequiredFields and fixed bugs that were found

Now you:
1. Can't add the same field name many times
2. Can use append RequiredFields correctly without fear of duplicates

I've also added a Deprecation warning to $useLabels as it's not used
*anywhere* in framework
2013-09-27 19:58:59 +02:00
Ingo Schommer
d3aa38f4b4 $.data() for GridField autocomplete (fixes #2440) 2013-09-27 19:51:32 +02:00
Ingo Schommer
455e550d9a Merge remote-tracking branch 'origin/3.1'
Conflicts:
	docs/en/topics/testing/create-silverstripe-test.md
	forms/Form.php
	i18n/i18n.php
	model/Image.php
2013-09-27 19:22:14 +02:00
Ingo Schommer
2e3511bc5f Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	docs/en/changelogs/3.0.6.md
	forms/Form.php
	forms/FormField.php
	forms/TreeDropdownField.php
2013-09-27 18:50:47 +02:00
Ingo Schommer
debd81d380 Merge pull request #2453 from chillu/pulls/escape-3.1.0
Escaping 3.1
2013-09-25 16:02:45 -07:00
Ingo Schommer
c243418597 API Escape form validation messages (SS-2013-008) 2013-09-24 21:54:31 +02:00
Ingo Schommer
2b7a2a289e API Escape form validation messages (SS-2013-008) 2013-09-24 21:41:21 +02:00
Ingo Schommer
f3ef04a432 FIX Auto-escape titles in TreeDropdownField
Related to SS-2013-009. While the default "TreeTitle" was escaped
within the SiteTree->TreeTitle() getter, other properties like SiteTree->Title
weren't escaped. The new logic uses the underlying casting helpers
on the processed objects.
2013-09-24 21:41:21 +02:00
Ingo Schommer
78ce99be09 FIX Escape breadcrumbs in SecurityAdmin (SS-2013-007) 2013-09-24 21:41:18 +02:00
Ingo Schommer
114fb59107 FIX Auto-escape titles in TreeDropdownField
Related to SS-2013-009. While the default "TreeTitle" was escaped
within the SiteTree->TreeTitle() getter, other properties like SiteTree->Title
weren't escaped. The new logic uses the underlying casting helpers
on the processed objects.
2013-09-24 21:40:17 +02:00
Sean Harvey
b383a07f90 BUG Fixing tabindex added to CreditCardField when tabindex is NULL
The tabindex increment *should* only be done if there is a tabindex
that has been set on a CreditCardField already, otherwise it breaks
the tab ordering.
2013-09-24 21:40:17 +02:00
Ingo Schommer
48021e9fd3 Merge pull request #2166 from dhensby/patch-2
FormFields now allow setting of extra CSSClasses en masse
2013-09-24 11:50:01 -07:00
Ingo Schommer
d291a96326 Merge pull request #2152 from dhensby/patch-1
FIX Empty Datefield with defined min or max has non-object error thrown
2013-09-24 11:48:05 -07:00
Ingo Schommer
1bb993b0b3 Form errors in LeftAndMain response negotiation
The session key for form errors changed from "Form_EditForm" to "CMSForm_EditForm",
causing a mismatch. See https://github.com/silverstripe/silverstripe-framework/pull/2084/files#r6338249 for discussion
2013-09-18 14:30:37 +02:00
Simon Welsh
6df6cb719d Revert "Merge pull request #2390 from phptek/2389"
This reverts commit 58da57dd1b, reversing
changes made to 8864256601.
2013-09-13 08:22:32 +12:00
Ingo Schommer
c2b312d76f Merge remote-tracking branch 'origin/3.1.0' into 3.1 2013-09-12 17:24:42 +02:00
Sean Harvey
c309867a1c Merge pull request #2373 from chillu/pulls/treedropdown-searchfield-default
Default TreeDropdown to "Title" search if $labelField isn't in DB
2013-09-10 21:45:40 -07:00
Russell Michell
abcb2ef40b FIX: Modified fix for #2389 to ensure existing tests pass. 2013-09-06 08:48:32 +12:00
Russell Michell
128c33b82c FIX: Fixes #2389
- Prevent circular references in `GridFieldAddExistingAutocompleter` when linking DataObjects whose ID matches the current object to which the gridfield is attached.
2013-09-05 13:55:47 +12:00
Ingo Schommer
1c31c098ee FIX Correct Zend_Locale fallbacks in i18n/DateField/DateTimeField
Due to the recent change of translations to transifex, some
locales changed their names, which prompted a fix to
i18n::get_available_translations() (see 00ffe7294).
This caused a regression where short locales are determined
from the YAML file names (e.g. "en"), but weren't matched up
with fully qualified locales from get_available_translations() (e.g. "en_US").
Since this list is used in the admin/myprofile dropdown for the Member.Locale value,
it didn't match up with any entries and defaulted to the first one ("Africaans").

Note that the behaviour of admin/myprofile is still a bit weird:
It defaults the locale on new members to the one set for the current administrator.
So if a site defaults to en_US in _config.php, but the admin happens to view
his backend in de_DE, all members he creates default to de_DE as well.

Thanks to @tractorcow for contributing and peer reviewing!
2013-08-30 10:18:00 +02:00
Ingo Schommer
20b49e215c Merge pull request #2136 from nedmas/fix-remove-export-button-padding
FIX: GridField button styling
2013-08-30 00:24:21 -07:00
Ingo Schommer
79cab42a91 Default TreeDropdown to "Title" search if $labelField isn't in DB
This is a workaround in order to ensure the field stays operational
for SiteTree and File records with the new $showSearch=true default.
Previously it was necessary to use setSearchCallback(), otherwise
the SQL query would fail. One limitation to keep this change generic
is that "MenuTitle" won't be used to search, since its SiteTree specific,
while the "Title" and "Name" fields are generally regarded as
model conventions (e.g. they're used in DataObject->getTitle() as well).

See https://github.com/silverstripe/silverstripe-framework/pull/2364
2013-08-29 17:12:01 +02:00
Naomi Guyer
8b5f89f3b9 API: Treedropdownfield showsearch default true, provide better ui
Set search option true on treedropdown fields by default, to provide a
fallback solution when trees fail to render (too many children errors)

Provide better indication/more meaningful styling to search (match
chosen styles for consistency)
2013-08-29 16:21:04 +12:00
Ingo Schommer
5249664833 More consistent English grammar 2013-08-22 16:07:27 +02:00
Ingo Schommer
a4c6ae3e90 Merge remote-tracking branch 'origin/3.1' 2013-08-22 13:56:33 +02:00
Ingo Schommer
40c239076b Merge remote-tracking branch 'origin/3.0' into 3.1.0
Conflicts:
	model/Hierarchy.php
2013-08-22 12:55:47 +02:00
Simon Welsh
c66cc952d2 Correct line length and indentation 2013-08-21 21:27:16 +12:00
Simon Welsh
151baeede1 Correct line length and indentation 2013-08-21 18:54:05 +12:00
Ingo Schommer
a6da1f5570 Merge pull request #2294 from wilr/fixgridexport
FIX: Remove limit on GridField export
2013-08-20 14:08:18 -07:00
Ingo Schommer
351c1168b6 Merge pull request #2314 from mateusz/required-attrs
HTML5 required attributes on default fields, add validator to the login form
2013-08-20 06:40:58 -07:00
Ingo Schommer
02cc662aaf More specific entwine rule for delete alert in GridField
The rule didn't apply in Firefox because of how it handles specificity,
so made it a bit more specific (added "button" and ".action")
2013-08-16 16:06:31 +02:00
Ingo Schommer
7ae75c1a89 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	forms/HtmlEditorField.php
2013-08-16 13:37:44 +02:00
Ingo Schommer
acc07e67ea Merge pull request #2318 from micmania1/2317-gridfieldfilterheader-duplicate-fields
Added gridField->getName() to field names to avoid duplication
2013-08-15 15:44:17 -07:00