Will Rossiter
ca87b8b794
API: Form Field ID attribute should follow HTML specification
...
Fixes: http://open.silverstripe.org/ticket/4431 .
Changes Form and Form Field classes to make use of Convert::raw2htmlid() which follows http://www.w3.org/TR/REC-html40/types.html#type-cdata .
Introduces a FormTemplateHelper class to assist in these sort of updates in the future.
2013-05-26 11:11:55 +12:00
Will Rossiter
32559554fa
PHPDoc
2013-05-26 11:11:54 +12:00
Ingo Schommer
35b6887568
Detection of <FormField>_Readonly classes ( fixes #1473 )
...
Consistent behavior with _Disabled classes
2013-04-05 11:15:09 +02:00
Ingo Schommer
06ff9f72b1
Increased recent deprecation warnings from 3.1 to 3.2
...
The deprecations are supposed to denote the release where
the functionality will be removed, as opposed to the one where
its deprecated. Having 3.1 as a target for recent changes
in popular methods like Object::add_extension() causes
too many short-term hassles, there's no "grace period".
2013-03-20 10:00:51 +01:00
g4b0
63dbb1c6c9
BUG:removed null FormField value. fixes #8088
2013-01-02 15:47:06 +01:00
Ingo Schommer
559abecd56
API Copying instance props on FormField readonly/disabled transformations
...
Introduced new FormField->castedCopy() method
which tries to replicate the existing form field instance
as closely as possible.
Primarily, the fix was targeted at consistently passing
through FormField->description to all of its variations.
2012-12-14 01:58:04 +01:00
Ingo Schommer
6f9d01f621
API FormField->setDescription() visible in default template
...
Renders into <span class="description"> instead of "title" attribute
2012-12-14 01:58:04 +01:00
Ingo Schommer
644cc79ebb
API Removed methods previously deprecated in 3.0
2012-12-14 01:16:47 +01:00
Simon Welsh
b0121b541c
Add codesniffer that ensures indentation is with tabs.
2012-12-12 17:33:31 +13:00
Sean Harvey
8b0bb8dd09
API Replace deprecated FormField::createTag() with static create_tag()
...
GridField uses createTag() which is marked for deprecation, rather
than have it used as the cornerstone of generating FormField templates,
use it as a helper in case fields generate HTML tags from PHP.
2012-11-15 14:43:21 +13:00
Sean Harvey
b3b071a05a
Removing deprecated FormField functions
...
setTabIndex() -> setAttribute('tabindex')
getTabIndex() -> getAttribute('tabindex')
describe() -> setDescription()
2012-11-15 14:43:20 +13:00
Sean Harvey
0d659a5e5a
Removing deprecated FormField::Name(), use getName() instead
2012-11-15 14:43:20 +13:00
Sean Harvey
fbc6e3366b
Merge branch '3.0'
2012-11-05 15:11:48 +13:00
Ingo Schommer
2d04de0377
BUG FormField->removeExtraClass() works on indexed arrays
...
Was assuming an associative map, which isn't the case
in the current implementations.
2012-10-31 15:44:57 +01:00
Ingo Schommer
56f7ce1dcf
Merge remote-tracking branch 'origin/3.0'
...
Conflicts:
control/Cookie.php
control/Director.php
control/HTTPResponse.php
model/Database.php
model/MySQLDatabase.php
model/SQLQuery.php
view/Requirements.php
view/SSViewer.php
2012-10-03 16:16:19 +02:00
Sam Minnee
1f7fc1f76a
FIX Remove instances of lines longer than 120c
...
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit. This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Howard Grigg
aa6f345d1d
API FormField::name_to_label() for unlabelled fields
...
Will convert camel case to spaces, e.g. "TotalAmount"
to "Total Amount".
2012-09-26 11:20:34 +02:00
Ingo Schommer
e2f073f38a
Method visibility according to coding conventions
2012-09-20 10:46:59 +02:00
Juerg Rast
4848becf5e
Removed duplicated 'return '
2012-07-28 01:11:03 +02:00
Will Rossiter
78c15ea882
BUGFIX: Fix correct input type for ImageFormAction replaces.
...
ImageFormAction is deprecated, using the new API results in a submit input rather than an image input being generated. Added hasAttribute helper to FormField as well as test coverage.
2012-06-13 09:57:54 +02:00
Mateusz Uzdowski
64c0d2fb0a
MINOR: add comments to FormField's RightTitle
2012-06-01 15:01:42 +12:00
Sean Harvey
9da92e04cf
API CHANGE Renamed setContainerFieldSet() to setContainerFieldList() to match the FieldList API.
...
API CHANGE Renamed rootFieldSet() to rootFieldList() to match the FieldList API.
2012-05-14 15:16:44 +12:00
Sean Harvey
e12a82e28f
MINOR Documentation on EmailField type attribute change
2012-04-21 11:09:34 +12:00
Simon Welsh
13865cb7ac
BUGFIX Don't filter out attributes that are '0'
2012-04-20 12:22:40 +12:00
Will Rossiter
07d2d5273a
ENHANCEMENT: populate FormField:: on the fly based on class name of field rather than requiring explict definition.
2012-04-14 17:36:19 +12:00
Sean Harvey
865cde0c39
BUGFIX FormField::name_to_label() is now declared as static as it was never used as an instance method
...
API CHANGE FormField::validate() $validator argument is now required for FormField classes
2012-04-12 12:18:55 +12:00
Sean Harvey
9f3344b355
API CHANGE Removed built-in behaviour.js client-side form validation.
...
This is no longer supported. Please use custom client-side validation instead. (see 3.0.0 changelog
for more information)
2012-03-09 12:19:57 +13:00
Ingo Schommer
e4a6dd5850
Merge branch 'integration'
...
Conflicts:
forms/gridfield/GridField.php
2012-03-08 20:25:21 +01:00
Ingo Schommer
391ffde4f3
API CHANGE Deprecated FormField->getTabIndex()/setTabIndex(), use getAttribute()/setAttribute() instead. Removed FormField->getTabIndexHTML()
2012-03-07 17:46:10 +01:00
Ingo Schommer
55a0fb18e4
API CHANGE Deprecated FormField->describe(), use setDescription() instead. Actually use the description in form fields other than FormAction.
2012-03-07 13:32:42 +01:00
AngryPHPNerd
0e2cbb0b88
Replace ereg with preg_*
2012-02-27 22:14:02 +01:00
Ingo Schommer
ad8fe82b37
MINOR Added FormField->getDescription() to complement FormField->describe()
2012-02-17 13:35:54 +01:00
Ingo Schommer
7602d081a2
ENHANCEMENT Fluent interface in Form API by returning instance from all setters
2012-02-17 13:35:26 +01:00
Sam Minnee
6a08a82c9c
MINOR: Removed notice-level errors from form field construction.
2012-01-10 16:58:27 +13:00
Ingo Schommer
cc32957414
API CHANGE Don't allow specifying $form as constructor argument in various form fields, use setForm() instead (to achieve a cleaner API with less confusing parameter order)
2012-01-02 17:50:34 +01:00
Ingo Schommer
b5421d9598
ENHANCEMENT Allowing custom attributes in (most) FormField implementations, which allows for HTML5 data attributes
2012-01-02 16:48:14 +01:00
Ingo Schommer
c77f4e8421
MINOR Allowing usage of FormField->Type() on base implementation
2012-01-02 16:48:14 +01:00
Ingo Schommer
a6148c33da
MERGE Using FormField->template in most fields
2012-01-02 16:48:14 +01:00
Sean Harvey
9e548f501e
API CHANGE FormField::Field() and FormField::FieldHolder() now render into templates on each FormField instead of creating HTML from PHP
2012-01-02 16:48:13 +01:00
Sam Minnee
b0b5fea3f5
MINOR: Removed use of deprecated securityTokenEnable.
2011-10-29 17:36:38 +13:00
Sam Minnee
e5afa25522
MINOR: Use Deprecation class to indicate deprecated methods in core.
2011-10-29 17:34:31 +13:00
Hamish Friedlander
0a3e0f15de
MINOR: Replace references to FieldSet (now deprecated) with references to FieldList
2011-10-28 15:58:55 +13:00
Ingo Schommer
b438a0a095
API CHANGE Removed support for undocumented and only partially implemented FormField->reserveNL flag, which is just the opposite of the documented and more frequently used FormField->dontEscape flag.
2011-10-07 14:12:49 +02:00
Will Rossiter
1732a17114
Merged new-orm into datagrid
2011-09-26 16:47:54 +13:00
Will Rossiter
4448325ad3
BUGFIX: convert new lines to break tags in unescape mode without reverting the entire behaviour of dontEscape
2011-09-19 17:26:01 +02:00
Ingo Schommer
ac537ee18d
Merge pull request #35 from marijnkampf/sapphire
...
---
MINOR Updated return types for createTag and describe in documentation
2011-07-04 09:42:52 +02:00
Marijn Kampf
047d256792
Updated return types for createTag and describe in documentation
2011-06-08 23:29:01 -07:00
ajshort
1f6f7f0862
API CHANGE: Deprecated CompositeField->FieldSet() in favour of CompositeField->FieldList().
...
MINOR: Replaced usage of FieldSet with FieldList.
MINOR: Renamed FieldSetTest to FieldListTest.
2011-05-11 17:51:54 +10:00
ajshort
16a016b9dc
API CHANGE: Deprecated FormField->Name() in favour of FormField->getName().
2011-05-06 00:48:45 +10:00
Ingo Schommer
03547fb205
ENHANCEMENT Added FormField->setTemplate() and getTemplate(), using it in TabSet and other already template-driven FormField subclasses
2011-04-24 11:46:50 +12:00