Commit Graph

2085 Commits

Author SHA1 Message Date
Sean Harvey
0e07f1a7f5 Merge remote-tracking branch 'origin/3.0' into 3.1 2014-08-22 17:50:36 +12:00
Ingo Schommer
1661213e5b FIX Opt-out pf form message escaping (fixes #2796)
This fixes a limitation introduced through http://www.silverstripe.org/ss-2013-008-xss-in-numericfield-validation/.
Form messages used to accept HTML, now they’re escaped by default, effectively removing the ability
to pass in HTML and take care of escaping manually.

We pass through HTML to message in core through the CTF system, so this needs to be fixed.
It’s an alternative fix to https://github.com/silverstripe/silverstripe-framework/pull/2803.
2014-08-22 16:59:34 +12:00
John Milmine
e7d5537f34 Added hasMethod so that you can pass ArrayData to GridField 2014-08-07 20:55:34 +10:00
Mateusz Uzdowski
31c9fb52d1 BUG Fix the anchor selector to work for internal pages.
Currently it will only default to pulling in anchors from the current
page, from the editor.
2014-08-01 10:36:34 +12:00
Damian Mooyman
0e78e3f3dc API Let update interval of tinymce be changed or disabled 2014-07-28 13:54:02 +12:00
Will Rossiter
5a14b7227c Moved checkboxset option list generation to separate method
This allows subclasses and extensions time to modify the list of options and their configuration without having to override the entire Field method.

A more flexible way to implement silverstripe#3311
2014-07-25 11:27:14 +12:00
Damian Mooyman
4453caf32b API Let extensions control folder selector in HtmlEditorField_Toolbar 2014-07-21 15:52:10 +12:00
Tyler Kidd
16f5ef147e Updated HtmlEditorField Field()
I had a need to use onBeforeRender on a DataExtension of
HtmlEditorField and noticed it wasn't there. Added return
parent::Field($properties) use FormField::Field which utilizes
onBeforeRender.
2014-07-03 08:54:37 -05:00
Damian Mooyman
11cc27f700 Merge pull request #2967 from halkyon/formfield_readonly
Fixing FormField not setting readonly attribute on setReadonly(true)
2014-06-17 14:48:56 +12:00
Stig Lindqvist
332c2c3db0 Merge pull request #3129 from dnadesign/formFieldContainerFieldList
added in a containerFieldList getter
2014-06-14 17:06:15 +12:00
Mateusz Uzdowski
741ab96418 Fetch the nearest Controller instead of relying on global state.
Controller:curr() in this context are equivalent to calling
getToplevelController() which already solves the issue of nested
GridFields.
2014-06-12 16:47:49 +12:00
Mateusz Uzdowski
18b6870cf2 BUG Sanitise the PHP output. 2014-06-11 11:34:31 +12:00
Phill Price
b2455f2d20 Update Form.php
tiny typo
2014-06-10 13:50:28 +01:00
Phill Price
5b60646e55 Update DropdownField.php
An error in the example (missing comma) spotted by michaelcslweb
2014-05-28 11:36:51 +01:00
John Milmine
da67f9109d added in a getter 2014-05-28 13:58:40 +12:00
Damian Mooyman
df28ccb59f BUG Better checking of existing files
[ref: CWPBUG-158]
2014-05-06 14:06:16 +12:00
Damian Mooyman
892b440115 API Make default gridfield paging configurable
Documentation improved
2014-04-28 15:13:01 +12:00
Hamish Friedlander
f2c4a629a7 FIX: ConfirmedPasswordField used to expose existing hash 2014-04-17 11:57:57 +12:00
Sean Harvey
f11adcfe2e Fixing FormField not setting readonly attribute on setReadonly(true) 2014-03-24 08:59:35 +13:00
Simon Welsh
cbbce430e1 Merge pull request #2297 from colymba/htmleditorconfig-mode-fix
HtmlEditorConfig default TinyMCE mode is now none
2014-03-17 08:22:14 +13:00
colymba
9b5e5e812e HtmlEditorConfig default TinyMCE mode is now none 2014-03-16 13:48:01 +02:00
Simon Welsh
bc8d2d638e Merge pull request #2875 from kinglozzer/2361-gridfield-column-header-css
FIX: Ensure valid CSS classes for GridField header (fixes #2361)
2014-03-15 21:39:42 +13:00
Simon Welsh
3b330a065b Merge pull request #2800 from phptek/issue/2795
BUG Ensure TreeMultiSelectField doesn't populate menus with "unchanged".
2014-03-15 21:27:33 +13:00
Simon Welsh
310e90d412 Merge pull request #2751 from axyr/patch-1
formHtmlContent() uses missing FormEncType() call
2014-03-15 21:12:44 +13:00
Simon Welsh
279b927df1 Merge pull request #2903 from tractorcow/pulls/fix-fileupload-fileexists
BUG Fix issues with uploading to /assets
2014-03-15 21:02:36 +13:00
Simon Welsh
bdd936d078 Set the response to 403 on error 2014-03-15 20:58:47 +13:00
Simon Welsh
5beaebc43a Merge pull request #2718 from silverstripe-rebelalliance/2503
BUG: Fixes performReadonlyTransformation for OptionSetField

Closes #2503
2014-03-15 20:45:04 +13:00
Simon Welsh
42c90aebb9 Merge pull request #2344 from colymba/uploadfield-upload-validation
FIX UploadField server validation error display
2014-03-15 20:24:58 +13:00
Damian Mooyman
0cbad41d3b Rewrote usages of error suppression operator 2014-03-05 15:48:55 +13:00
Damian Mooyman
6d5d3d8cb7 Rewrote usages of error suppression operator 2014-03-05 14:22:19 +13:00
Will Rossiter
c74137e679 FIX: getMessageFromSession returning null on first access 2014-02-28 21:24:16 +13:00
Damian Mooyman
c1e0f98f87 BUG Fix case where setFolder('/') would break UploadField::fileexists
BUG Prevent Upload from writing to the site root folder
2014-02-27 14:23:32 +13:00
Ingo Schommer
85972dcf6d Merge pull request #2878 from tractorcow/pulls/fix-folder-find-illegalpath
BUG Fixed critical issue with Folder::find_or_make failing to handle invalid filename characters
2014-02-22 20:57:09 +13:00
Thomas Speak
c7e57e0087 DOC: DropdownField __construct
Current docs make PHPStorm spew errors about data types.

`new CheckboxSetField('Countries'...);`

Causes `Expected The, got string`.

Simple restructure.
2014-02-20 23:04:53 +00:00
Damian Mooyman
ebeb663ddf BUG Fixed critical issue with Folder::find_or_make failing to handle invalid filename characters
BUG Fix UploadField duplicate checking with invalid folderName
2014-02-21 09:11:34 +13:00
Loz Calver
90952e7bd4 FIX: Ensure valid CSS classes for GridField header (fixes #2361) 2014-02-19 21:17:52 +00:00
Ingo Schommer
5e38ef9e55 Merge pull request #2835 from kinglozzer/1891-csrf-friendly-error
NEW: Forms with invalid/expired SecurityIDs are repopulated (fixes #1891)
2014-02-12 09:44:03 +13:00
Loz Calver
058219c0ee NEW: Forms with invalid/expired SecurityIDs are repopulated (fixes #1891) 2014-02-09 10:19:24 +00:00
Ingo Schommer
0f1ae75dd8 Correct JS i18n in UploadField (fixes #2370) 2014-02-09 20:43:08 +13:00
Ingo Schommer
ab070944d5 Merge branch 'pulls/apidocs-package-list' of https://github.com/madmatt/silverstripe-framework into madmatt-pulls/apidocs-package-list
Conflicts:
	view/SSTemplateParser.php
	view/SSTemplateParser.php.inc
2014-01-31 15:15:59 +13:00
Kirk Mayo
44a8537f68 BUG: #2503 Fixes performReadonlyTransformation for OptionSetField
NEW: Adding unit test for performReadonlyTransformation #nd fixing OptionSetField #2503

BUG: Fixing undefined variables and function parameters for PerformReadonlyTransformation unit tests

NEW: Adding unit test to OptionsetField for read only fields
2014-01-30 16:09:55 +13:00
Will Rossiter
93085b9660 Correct whitespace / phpdoc 2014-01-28 20:00:47 +13:00
Russell Michell
9e2c7b6572 BUG Ensure TreeMultiSelectField doesn't populate menus with "unchanged".
TreeMultiSelectField's default for its value property is 'unchanged'
which causes menus to not load and generates console errors. Fixes #2795
2014-01-28 08:45:15 +13:00
Ingo Schommer
55608d57f6 Merge pull request #2767 from HARVS1789UK/2766-moneyfield-set-readonly
BUG: #2766 Corrects MoneyField::performReadonlyTransformation()
2014-01-22 22:08:16 +13:00
Joe Harvey
405426799b Issue #2766 - Moves logic to return ReadonlyField versions of MoneyFields child fields to performReadonlyTransformation() method and reverts changes to MoneyField::setReadonly() as per Wilr’s (https://github.com/wilr) request 2014-01-13 08:35:40 +00:00
Will Rossiter
e7266535c5 FIX: Allow empty checkboxes through setValue(null) (#1392) 2014-01-12 17:28:09 +13:00
Will Rossiter
4ea62b44f9 FIX: Ensure GridFieldDetailForm has the current record validator.
Currently the validator is only set through
ModelAdmin and not through GridField
directly. This will set the validator based on the
record unless a custom validator has been
provided.

http://www.silverstripe.org/data-model-questions/show/34650?start=8#post331958
2014-01-12 16:08:31 +13:00
Will Rossiter
f433b5000f FIX: Resolve issue when selected value is zero. (#2530)
$this->value is stored as string internally. In
the special case that the option value is 0, the
type comparison fails to resolve 0 == '0',
see http://www.php.net/manual/en/types.comparisons.php.
2014-01-11 13:25:40 +13:00
Joe Harvey
611d571b65 BUG corrects MoneyField::setReadonly() method in order to return ReadonlyField instances of its child fields
Issue #2766 - This causes our cloned MoneyField to actually contain two ReadonlyFields for currency and amount.
2014-01-10 15:38:06 +00:00
Jeremy Shipman
8d8f3abace FIX: ConfirmedPasswordField setName failed to set names of child fields.
FIX: ConfirmedPasswordField relied on POST variables. These should instead come from setValue().
Added all important tests for validating the field: valid if passwords match, invalid if passwords differ.
2014-01-07 17:17:55 +13:00