mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE Deprecated FileIframeField and ImageField, use UploadField instead
This commit is contained in:
parent
041da993fa
commit
b8cc2085b6
@ -5,6 +5,8 @@
|
||||
*
|
||||
* If all you need is a simple file upload, it is reccomended you use {@link FileField}
|
||||
*
|
||||
* @deprecated 3.0 Use UploadField
|
||||
*
|
||||
* @package forms
|
||||
* @subpackage fields-files
|
||||
*/
|
||||
@ -59,6 +61,8 @@ class FileIFrameField extends FileField {
|
||||
* @return string
|
||||
*/
|
||||
public function Field() {
|
||||
Deprecation::notice('3.0', 'Use UploadField');
|
||||
|
||||
Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
|
||||
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
|
||||
|
@ -18,6 +18,8 @@
|
||||
* $myField->setFolderName('myFolder');
|
||||
* </code>
|
||||
*
|
||||
* @deprecated 3.0 Use UploadField with $myField->allowedExtensions = array('jpg', 'gif', 'png')
|
||||
*
|
||||
* @package forms
|
||||
* @subpackage fields-files
|
||||
*/
|
||||
@ -43,6 +45,8 @@ class ImageField extends FileIFrameField {
|
||||
* @return Form
|
||||
*/
|
||||
public function EditFileForm() {
|
||||
Deprecation::notice('3.0', 'Use UploadField');
|
||||
|
||||
$filter = create_function('$item', 'return (in_array("Folder", ClassInfo::ancestry($item->ClassName)) || in_array("Image", ClassInfo::ancestry($item->ClassName)));');
|
||||
|
||||
$form = parent::EditFileForm();
|
||||
|
Loading…
Reference in New Issue
Block a user