Permalink
Browse files

API CHANGE Deprecated FileIframeField and ImageField, use UploadField…

… instead
  • Loading branch information...
1 parent 041da99 commit b8cc2085b612a839721da9268a2bfb8d40ff1d14 @chillu chillu committed Feb 2, 2012
Showing with 8 additions and 0 deletions.
  1. +4 −0 forms/FileIFrameField.php
  2. +4 −0 forms/ImageField.php
@@ -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 @@ public function dataClass() {
* @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');
View
@@ -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 @@ public function FileTypeName() {
* @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();

0 comments on commit b8cc208

Please sign in to comment.