Commit Graph

1934 Commits

Author SHA1 Message Date
Ingo Schommer
88536998b9 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	.travis.yml
2013-05-31 18:08:59 +02:00
Ingo Schommer
5d97f615ce Merge remote-tracking branch 'origin/3.0' into 3.1 2013-05-31 17:52:24 +02:00
Fred Condo
59657d94bb Use upper case to represent HTTP methods for forms
Per [RFC 2616 section 5.1.1][ietf], HTTP methods are case-sensitive.

- Change the internal representation of the form's method to upper case
- Update FormTest to accommodate the case changes
- Change method to lower case for HTML in Form#getAttributesHTML()
[ietf]: http://tools.ietf.org/html/rfc2616#section-5.1.1
2013-05-28 17:51:56 -07:00
Damian Mooyman
7f057ce343 API UploadField functions on new records
Fixed regression from 1e5d40474d (UploadField::canPreviewFolder).
Merged in pull request #2009 - (6018bdd631).
Merged pull request #1259 (34bfc862ee).
2013-05-27 15:22:59 +12:00
Ingo Schommer
6f2ba3fcac Merge pull request #2009 from sminnee/uploadfield-choose-new-file
NEW 'Choose another file' button on upload field AAS-917
2013-05-25 01:55:26 -07:00
Julian Seidenberg
22c7bbfcd4 NEW UploadField displays a warning before overwriting files (only relevant if config.yml: Upload:replaceFile = true). 2013-05-25 19:07:06 +12:00
jean
6018bdd631 NEW 'Choose another file' button on upload field AAS-917 2013-05-25 18:38:02 +12:00
Simon Erkelens
513270ca48 API: Allow array of fields passed to FieldList::removeByName()
Supports passing an array to removeByName(), which is iterate and then removed. Useful for removing fields from a fieldlist that are not on a tab. Similar to removeFieldsFromTab();
This is cleaner than a new function.
2013-05-25 15:31:30 +12:00
uniun
5596442081 FIX: Form::set_current_action() never gets called. 2013-05-24 11:25:36 +03:00
Ingo Schommer
c85c495848 BUG GridFieldFilterHeader works without non-filterable cols
Previously relied on the presence of a last column which wasn't filterable,
commonly a GridFieldEditButton. If this wasn't present, the filter buttons
were never added, leading to the GridField JS reload request being sent
without the required button form action, so GridFieldFilterHeader->handleAction()
was never called.
2013-05-23 17:48:27 +02:00
Ingo Schommer
8b96db151f Merge pull request #1974 from chillu/pulls/ajaxunique-remove
API Remove AjaxUniqueTextField, since its operation is very limited (#19...
2013-05-23 00:57:08 -07:00
Sam Minnee
d97ca43cd0 Merge branch '3.1'
Conflicts:
	README.md
	dev/install/install.php5
	forms/ConfirmedPasswordField.php
	tests/forms/FormTest.php
2013-05-23 19:01:58 +12:00
Ingo Schommer
cb1f95e51e API Remove AjaxUniqueTextField, since its operation is very limited (#1947)
It used to validate via ajax, but that has been removed as part
of the 3.0 refactor of all prototype.js code. In the end,
its a field which is quite trivial to implement in custom code
(or in controller code), unless we re-add the Ajax features.
And I think an ajax-validating uniqueness field is too much
of an edge case to belong into core.
2013-05-22 16:29:03 +02:00
Will Rossiter
ddcfcf7bed Update @package, @subpackage labels
Cleanup of framework's use of @package and @subpackage labels and additional of labels for classes missing packages.

Moved all GridField related components to the one name.

Countless spelling fixes, grammar for other comments.

Link ClassName references in file headers.
2013-05-21 22:24:41 +12:00
Will Morgan
372890703c FIX allow children to be accessed via template 2013-05-17 10:29:21 +02:00
Ingo Schommer
842dc98681 Added "saves into..." label to UploadField template
CMS users shouldn't need to guess where their files will end up.
2013-05-14 10:39:05 +02:00
Justin Martin
644fa29e41 Include Zend_Locale_Format
Fix Zend_Locale_Format not being included.
2013-05-13 10:55:05 -07:00
Will Rossiter
a99dbae012 FIX: NumericField should work with numbers like 54,6
Fixes http://open.silverstripe.org/ticket/5577.

Uses Zend_Locale_Format::isNumber(). Includes unit test for NumericField. Does not include testing work on DBField underlying NumericField to ensure that works consistently.
2013-05-11 22:51:39 +12:00
Will Rossiter
42cf2a95bd FIX: Add support for multi dimensional source arrays in LookupField (open/6132) 2013-05-11 00:01:39 +12:00
Will Rossiter
94d6b1ccff FIX: Disable autocomplete on ConfirmedPasswordField instances. 2013-05-10 20:32:59 +12:00
Will Rossiter
09fcdb8c31 Coding conventions for ConfirmedPasswordField 2013-05-10 20:23:06 +12:00
Sam Minnée
9672a22166 Merge pull request #1851 from chillu/pulls/form-strict-method-check
Form strict method check
2013-05-08 22:31:40 -07:00
Ingo Schommer
a1216b5e32 Merge pull request #1250 from wilr/gridfield-action-fixes
FIX: Do not blindly pass input values to GridField_FormAction URL's
2013-05-08 04:20:40 -07:00
Ingo Schommer
a9edf47189 Merge pull request #1830 from a2nt/media_dialog_add_url_btn_fix
FIX media dialog add url button fix
2013-05-08 01:42:04 -07:00
Ingo Schommer
14c59be85e API Form::setStrictFormMethodCheck() and strict argument to setFormMethod()
Thanks to @sminnee for getting this started
2013-05-08 10:25:13 +02:00
Simon Welsh
8930304dfc Only set GridField state in request if a value is submitted 2013-05-07 08:15:27 +12:00
a2nt
423c737502 FIX media dialog add url button fix
Use HtmlEditorField.BUTTONADDURL for localization
2013-05-04 03:34:02 +07:00
Ingo Schommer
8f3c0b57ba Merge remote-tracking branch 'origin/3.1' 2013-04-29 09:32:58 +02:00
Ingo Schommer
5ca9db5e5e Limit HtmlEditorField HTMLText casting note to existing fields
This prevents it from failing for proxied values
like BlogEntryForm, where the field name doesn't exist,
and rather gets processed and saved into a different field.
2013-04-29 09:32:05 +02:00
Ingo Schommer
6c2e791a48 Merge remote-tracking branch 'origin/3.1' 2013-04-29 08:59:06 +02:00
Will Rossiter
a6b0807b9f Merge pull request #1800 from willmorgan/patch-1
Define ConfirmedPassword::$children as a public variable
2013-04-24 16:18:44 -07:00
Will Morgan
9732a7fb3b Fixing typo on Validator exception message 2013-04-24 18:50:40 +02:00
Will Morgan
676aa8de05 Defining $children as a public variable
Defining $children as a public variable (it was previously defined on-the-fly)
2013-04-24 16:25:13 +02:00
Nico Haase
5fbb3da661 Enhanced tests for regeneration of images and a bugfix for images that were cached in multiple steps 2013-04-24 10:27:20 +02:00
Ingo Schommer
7f6671628d "UploadFieldFileButtons" casting (regression from casting changes)
Caused the UploadField rows to show "[Object object]" because
it tried to pass through a PHP object to JS without string casting
(the return used to be a string).
2013-04-18 17:09:56 +02:00
uniun
4d70daa9e2 BUG: HiddenFields and VisibleFields should always return extraFields
HiddenFields() and VisibleFields() should always return extraFields, e.g. HiddenFields doesn't return SecurityID if it is called before Fields().
2013-04-17 20:31:17 +02:00
Sean Harvey
2a65f17542 Merge pull request #1757 from tractorcow/3.1-phone-field-fix
BUG Fixed incorrect variable usage in generation of PhoneNumberField form fields
2013-04-14 14:01:09 -07:00
chiujl
cb463449e8 DatetimeField returns wrong year
This is related to how Zend_Date returns year for YYYY & yyyy format. Detailed explanation is here http://framework.zend.com/issues/browse/ZF-5297

Sample code (adapted the Datetimefield setValue() method) to highlight the problem:

include 'framework/thirdparty/Zend/Date.php';

$userValueObj = new Zend_Date(null, null, 'en_US');
$userValueObj->setTimezone('GMT');
$userValueObj->setDate('2012-01-01', 'YYYY-MM-dd');
$userValueObj->setTime('00:00:00', 'HH:mm:ss');
echo $userValueObj->get('YYYY-MM-dd HH:mm:ss', 'en_US'), "\n"; // returns 2011-01-01 00:00:00
echo $userValueObj->get('yyyy-MM-dd HH:mm:ss', 'en_US'), "\n"; // returns 2012-01-01 00:00:00
2013-04-13 06:26:52 +08:00
Damian Mooyman
0dfc6d5eab BUG Fixed incorrect variable usage in generation of PhoneNumberField form fields 2013-04-12 15:13:58 +12:00
Ingo Schommer
9eab893e7c Merge remote-tracking branch 'origin/3.1'
Conflicts:
	model/Image.php
2013-04-12 01:14:55 +02:00
Ingo Schommer
59dc0085d8 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	docs/en/reference/urlvariabletools.md
	tests/forms/CheckboxFieldTest.php
2013-04-12 01:13:32 +02:00
Ingo Schommer
933fbf8ea4 l10n key to make "yes" and "no" translatable (see #1749) 2013-04-12 01:11:24 +02:00
Ingo Schommer
0343a77d30 Merge remote-tracking branch 'origin/3.1' 2013-04-11 11:42:04 +02:00
Ingo Schommer
9856fcef21 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	javascript/DateField.js
	model/DataQuery.php
	model/Versioned.php
	tests/forms/RequirementsTest.php
	tests/model/DataObjectLazyLoadingTest.php
	view/Requirements.php
2013-04-09 14:45:35 +02:00
Ingo Schommer
01f46d039f NEW Enforce max node counts to avoid excessive resource usage
Rendering potentially 1000s of nodes can exceed the CPU and memory constraints
of a normal PHP process, as well as the rendering capabilities of browsers.
Set a hard maximum for the renderable nodes, deferring to a "show as list" action
in the main CMS tree. For TreeDropdownField, we don't have the list fallback option,
so ask the user to search for the node title instead.

Also makes both the "node_threshold_total" and "node_threshold_leaf" values configurable
2013-04-09 10:24:18 +12:00
Will Rossiter
69722222b4 FIX: Ensure FieldList::push() doesn't eliminate key 2013-04-06 19:16:59 +13:00
Ingo Schommer
91477617e6 Fixed HiddenField->SmallFieldHolder() declaration 2013-04-05 14:03:13 +02:00
Ingo Schommer
b3db70fcbd HiddenField->SmallFieldHolder() (fixes trac/4608) 2013-04-05 13:45:48 +02:00
Ingo Schommer
35b6887568 Detection of <FormField>_Readonly classes (fixes #1473)
Consistent behavior with _Disabled classes
2013-04-05 11:15:09 +02:00
Nik Rolls
5143c8149a Form now loads correctly when ClassName is changed. 2013-04-02 11:03:49 +02:00