Commit Graph

38 Commits

Author SHA1 Message Date
JorisDebonnet
349589b23b
Clarify that $title in FormField can accept ViewableData
When constructing a FormField, an IDE would previously tell you the `$title` needs to be string (or null). Let's make it more clear that a ViewableData instance (such as `HTMLValue::create($title)`) is also accepted. This should help people more quickly find a solution to put html in labels.
2019-09-26 02:39:39 +02:00
Nicholas Sorokin
4a32b3418a Add onBeforeRenderHolder extension point for FormField 2019-08-09 14:43:14 +09:30
Robbie Averill
14673ffd0a Merge branch '4.3' into 4.4 2019-05-30 09:35:26 +12:00
shoosah
4da8be3bf5 Add extend function in getSchemaValidation function
This allows to create extensions which add validation list
2019-05-14 09:47:14 +12:00
Robbie Averill
394dd4765c NEW Scaffolded field labels now only have an uppercased first word 2019-01-07 17:52:28 +01:00
Will Rossiter
66a404ad1a FIX use Injector for FormField::castedCopy
Allows LookupField to be replaced with user specificed classes.
2018-10-24 12:13:14 +13:00
Thomas Portelange
fdd5acff5d
raw2att accepts array, but sprintf doesn't
it's not very likely to happen (it did in my case :-) ) but if the value is an array, sprintf will fail (because raw2att accepts array, but sprintf doesn't). i suggest to json encode any array data to ensure it's safely included in the html. Or we should throw proper exceptions to make sure invalid values do not result in a php error.
2018-09-27 12:12:59 +02:00
Thomas Portelange
f103648f8c
value can be something else than a string
if the value is not a string (an array for instance), sprintf will fail
2018-09-26 11:35:40 +02:00
Robbie Averill
b93e94c0c3
FIX FormField::Link now throws a LogicException if no form is set yet 2018-07-16 13:02:58 +01:00
Damian Mooyman
386ef27f65
Update requesthandlers with missing extension points 2018-03-23 15:28:00 +13:00
Damian Mooyman
625f7b4eee
Merge remote-tracking branch 'origin/4.0' into 4.1 2018-03-13 14:26:18 +13:00
Damian Mooyman
32637413de ENHANCEMENT Improve upgrade rules to support advanced upgrader rewrites (#7903)
* ENHANCEMENT Improve upgrade rules to support advanced upgrader rewrites

* Minor: Grammar fixes.
2018-03-05 15:47:06 +13:00
Damian Mooyman
e359948eb3
Merge remote-tracking branch 'origin/4.0' into 4
# Conflicts:
#	src/Core/CoreKernel.php
2018-02-05 17:52:38 +13:00
Robbie Averill
c0ffe2797a Update phpdoc for FormField::setRightTitle regarding escaped HTML 2018-01-31 11:03:35 +13:00
Andrew Aitken-Fincham
3274f29c00 sanitise more docblocks 2017-11-14 10:02:24 +00:00
Andrew Aitken-Fincham
25d8795c70 sanitise FormField docblock 2017-11-14 09:52:06 +00:00
Damian Mooyman
eff5c28f24
Adjust FormField::onBeforeRendor so that it can influence both context and passed properties
Fixes #7466
2017-10-11 11:43:57 +13:00
Robbie Averill
595ba75a50 API Make FormField::hasClass return a boolean instead of an int 2017-08-23 16:23:28 +12:00
Damian Mooyman
64e802f795
API Move createTag to HTML class
ENHANCEMENT Better HTML generation behaviour for Requirements_Backend
2017-06-16 12:22:05 +12:00
Damian Mooyman
fba8e2c245 API Remove Object class
API DataObjectSchema::manyManyComponent() return array is now associative array
2017-05-23 13:50:35 +12:00
Saophalkun Ponlu
1ec7c4e523 Fix lint error 2017-05-16 11:53:23 +12:00
Saophalkun Ponlu
a975b88661 Pass autofocus flag to front-end 2017-05-16 11:53:23 +12:00
Daniel Hensby
e741af9127
Merge branch 'pull/6905' 2017-05-12 12:21:02 +01:00
Ralph Slooten
43a122cc36 Fix for meta closing tags
Prevent html errors when FormField::create_tag('meta') is called from $MetaTags() so
```
<meta name="generator" content="SilverStripe - http://silverstripe.org"></meta>
```
becomes
```
<meta name="generator" content="SilverStripe - http://silverstripe.org" />
```

Add all void elements to list
2017-05-12 08:49:15 +12:00
Christopher Joe
403f4db14d Fix change titles to return schema values in schema
Enhancement Add EditorExternalLink call for toolbar
2017-05-11 09:57:55 +12:00
Saophalkun Ponlu
97dac7028c De-couple schema type and type attribute 2017-05-09 16:50:33 +12:00
Ingo Schommer
1d438d3fb5 API Remove deprecated FormAction::createTag() 2017-05-09 11:38:35 +12:00
Ingo Schommer
cbe534c675 Fixed component capitalisation 2017-04-27 15:36:18 +12:00
Damian Mooyman
3362e15a29 API Upgrade code to use updated config 2017-02-27 16:54:01 +13:00
Damian Mooyman
029a8b9586
API Substitute Zend_Currency with NumberFormatter based solution
API Substitute Zend_Locale with Locale / NumberFormatter
API Substitute Zend_Date with IntlDateFormatter
API Added DBTIme::Nice12, FormatFromSettings
API Added Short() method to DBDate / DBTime / DBDatetime
API Add Date::getTimestamp()
API Added setSubmittedValue api for FormField
API Add second arg to base FormField::setValue()
API Major refactor of i18n into component data parts
API Implement Resettable interface to reset objects between tests
ENHANCEMENT Changed DBField::create_field return type to `static` to support better type hinting
ENHANCEMENT i18nTextCollector supports __CLASS__
2017-02-09 15:28:59 +13:00
Colin Tucker
34398b0faa Cast SmallFieldHolder to HTMLFragment - fixes #6568 2017-01-27 09:16:58 +11:00
Damian Mooyman
6e589aac75
API Updates to Form, ValidationResponse, ValidationException
API Implement form schema "errors" handling
2016-12-09 14:24:11 +13:00
Daniel Hensby
c6d43b477e
Merge branch '3' 2016-11-29 13:27:49 +00:00
Damian Mooyman
1b1e921e3d
PSR2: Whitespace-only changes 2016-11-29 12:31:16 +13:00
Christopher Joe
8a7ea044ac Added validator class to decouple validation library from FormBuilder
Added required rule priority logic and fix styling of error messages
2016-11-03 10:39:53 +13:00
Christopher Joe
0901de2995 BUG Fix php schema generation 2016-11-03 10:26:39 +13:00
Damian Mooyman
1142757c21 API Add 'validation' to form schema 2016-11-03 10:07:24 +13:00
Sam Minnee
7a10c194bd NEW: Move code files into src/ folder.
This updates framework to be more in keeping with PHP conventions.
2016-11-01 13:37:24 +13:00