Commit Graph

2345 Commits

Author SHA1 Message Date
Ingo Schommer
f63a78c0b9 Fixed Filesystem class capitalization 2014-02-17 00:12:26 +13:00
Sam Minnee
346d3edb37 Merge branch '3.1' 2014-02-13 17:58:30 +13:00
Sam Minnee
4f7c6ebcff FIX: Fixed behat text selection rule, which broke some tests.
The behat rule for text selection wasn't working due to the JavaScript not executing properly. I have
also updated the code to traverse all childNodes, which is important if you have text like this:

<p>text1 <b>text2</b> text3</p>

And you are trying to select 'text3'
2014-02-13 17:36:46 +13:00
Sean Harvey
9048eab4a2 Merge branch '3.1' 2014-02-12 11:06:54 +13: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
Sean Harvey
c322cb2d65 Fixing SQLQueryTest failures on PHPUnit 3.7.30 2014-02-10 13:32:39 +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
4af9143d3b Merge remote-tracking branch 'origin/3.1'
Conflicts:
	docs/en/misc/contributing/code.md
2014-02-07 16:43:22 +13:00
madmatt
267786a7d1 Add behat test for security permission checkboxes. 2014-02-07 15:41:33 +13:00
Mateusz Uzdowski
e91f10b0ab Add Behat step to click on a row in the first GridField table. 2014-02-07 15:40:06 +13:00
Ingo Schommer
bb9f84afd5 Merge pull request #2806 from tractorcow/pulls/bug-member-locale
BUG Default Member.Locale now chooses a better default value when i18n.locale is not a valid translation
2014-02-03 17:03:48 -08:00
Ingo Schommer
457ec9446b Merge pull request #2700 from ajshort/injector-factory
Injector Factory
2014-02-03 16:50:15 -08:00
Ingo Schommer
0d7e9a9692 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	_config/routes.yml
	docs/en/topics/datamodel.md
	forms/DropdownField.php
2014-02-04 08:19:04 +13:00
Andrew Short
2f817ba177 NEW: Allow specifying a factory to use for creating services.
A service factory can be used for creating instances where a non-trivial
construction process is required. This is done by adding a `factory`
key to the service definition.
2014-02-03 11:30:22 +11:00
Ingo Schommer
91b363b141 Merge pull request #2756 from madmatt/pulls/behat-form-context
Update theHtmlFieldShouldContain step to include negation.
2014-01-30 18:09:55 -08:00
Ingo Schommer
558d202bf2 Merge pull request #2746 from micmania1/move-test-theme-setup
API moved useTestTheme to base Sapphire test class so that it can be used elsewhere
2014-01-30 18:08:21 -08:00
Damian Mooyman
293c672fa7 BUG Default Member.Locale now chooses a better default value when i18n.locale is not a valid translation
This will resolve issues in cases where the site locale may be assigned a value that does not have an explicit translation. E.g. if the locale is en_NZ (and it's appropriate for this to be the assigned locale), Afrikaans will no longer be the default selected locale when creating members. Now en_US is chosen as a better fallback default.

This is a minor ease of use fix that means fewer CMS users can be accidentally created in Afrikaans within NZ based sites.

Test cases included.
2014-01-30 15:55:14 +13:00
Simon Welsh
cf01ca818a Revert "MINOR: Added behat test to cover changes made in e69e65c."
This reverts commit e0b4e6125c.
2014-01-22 15:20:48 +13:00
Mateusz U
ce3a944903 Merge pull request #2780 from madmatt/pulls/securityadmin-js2
BUGFIX: Fix JS for PermissionCheckboxsetField in SecurityAdmin
2014-01-20 19:00:00 -08:00
madmatt
e0b4e6125c MINOR: Added behat test to cover changes made in e69e65c. 2014-01-15 16:20:19 +13:00
Will Rossiter
a50996a010 NEW: Add support for push operator on ArrayList (Fixes #1539) 2014-01-12 18:55:40 +13: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
Jeremy Shipman
62694b0a8b NEW: Made ValidationResult functions chain-able.
Added unit tests for CombiningResults
2014-01-09 16:32:27 +13:00
Simon Welsh
39d42e4ea3 Merge branch '3.1' 2014-01-09 08:22:47 +13: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
Matt Peel
0eaae90bdb Update theHtmlFieldShouldContain step to include negation.
This allows steps to be declared as either “should contain” or “should not
contain”.
2014-01-06 17:22:40 +13:00
micmania1
5fff5afb47 API moved useTestTheme to base Sapphire test class so that it can be used elsewhere (eg CMS test) 2013-12-23 21:54:20 +00:00
Stephen Shkardoon
40163edba7 Make CacheTest sleep properly
This way it will always sleep for the right amount of time (or longer)
2013-12-21 15:05:51 +13:00
Will Rossiter
3d2875a111 Merge pull request #2741 from simonwelsh/hhvm-test
Changes to error message detection to handle the differences in HHVM
2013-12-20 16:55:14 -08:00
Simon Welsh
8de403abd4 Changes to error message detection to handle the differences in HHVM 2013-12-21 13:17:47 +13:00
micmania1
229bea399b added logout url to Security and deprecated Security::set_login_url in favour of config 2013-12-20 21:55:54 +00:00
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
madmatt
7d271d5346 Fix profile.feature behat test 2013-12-20 12:32:44 +13:00
Ingo Schommer
1afb8bb414 Merge remote-tracking branch 'origin/3.1' 2013-12-19 20:47:31 +01:00
Ingo Schommer
d032fadfb5 Fixed spelling of class in test 2013-12-19 20:47:16 +01:00
Ingo Schommer
f29d51f433 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	docs/en/reference/dataobject.md
	lang/es.yml
2013-12-19 20:23:09 +01:00
Ingo Schommer
78a530524b Merge pull request #2684 from Firesphere/feature/force_write_js_to_bottom
NEW Forcefully write javascripts to the end of the HTML if wished
2013-12-19 09:21:06 -08:00
Sean Harvey
6fc9db6f0e API DataObject::validate() visibility changed to public (issue #1659)
DataObject::validate() is currently set to protected, but this means
you can't call validate() from outside the context of itself unless
you overload the method to use a public visibility and then call
parent::validate()

As it would turn out, most classes that overload this method already
set the visibility to public, so it would make sense the parent matches
that as well.
2013-12-19 16:36:39 +13:00
Daniel Pickering
94c19e349a FIX: Year.php getDefaultOptions now fixed, sets key as year. Also added YearTest unit test. 2013-12-16 03:29:29 +00:00
Firesphere
af7afbe918 IMPROVEMENT/FEATURE Forcefully write javascripts to the end of the HTML if wanted.
It's defaulted to false. But when set to true, the JS is written to the end of the HTML, even though there are earlier scripts.
This results in faster page-loading if the JS isn't needed earlier-on.
2013-12-14 14:04:03 +01:00
Ingo Schommer
ab91a5a80b Merge pull request #2622 from froog/patch-1
Created LessThanOrEqualFilter and GreaterThanEqualFilter
2013-12-13 03:34:45 -08:00
Ingo Schommer
c811556ea5 Removed debug code 2013-12-13 10:04:26 +01:00
Firesphere
41371fea72 NEW Force the javascripts to be put before the closing body tag 2013-12-07 15:47:31 +01:00
Fred Condo
b88a0955a5 API: Support string descriptors for unique indexes in Versioned
- Document the format for descriptor arrays
- Implement the behaviour that developers have come to expect for
  string descriptors of indexes
- Add test for handling of unique indexes (MySQL & sqlite3)
- Resolve #2403

Versioned needs to convert unique indexes to non-unique for its suffixed
tables, such as Foo_Live and Foo_versions. Because DataObject accepts
string descriptors such as array('UniqIDX' => 'unique (Uniq)') as well
as array-based descriptors, Versioned needs to recognize string
descriptors. This patch accomplishes that. Before, Versioned would fail
to convert string-described indexes to non-unique, resulting in run-time
errors when creating a new version of an object.
2013-12-06 10:02:44 -08: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
a7ad85c2a8 Better "editable page" Behat assertion 2013-12-02 19:07:14 +01:00
micmania1
b89ab1eb16 Added SSViewer::get_templates_by_class() to make the functionality in LeftAndMain::getTemplatesWithSuffix() more open. 2013-12-01 07:42:37 +00:00