2008-09-29 03:18:23 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2009-04-17 02:26:40 +00:00
|
|
|
* Allows a user to add a field that can be used to upload a file
|
|
|
|
*
|
|
|
|
* @package userforms
|
2008-09-29 03:18:23 +00:00
|
|
|
*/
|
2009-12-07 02:04:20 +00:00
|
|
|
|
2008-09-29 03:18:23 +00:00
|
|
|
class EditableFileField extends EditableFormField {
|
|
|
|
|
|
|
|
/**
|
2008-10-03 03:43:41 +00:00
|
|
|
* @see Upload->allowedMaxFileSize
|
2008-09-29 03:18:23 +00:00
|
|
|
* @var int
|
|
|
|
*/
|
|
|
|
public static $allowed_max_file_size;
|
|
|
|
|
|
|
|
/**
|
2008-10-03 03:43:41 +00:00
|
|
|
* @see Upload->allowedExtensions
|
2008-09-29 03:18:23 +00:00
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
public static $allowed_extensions = array();
|
|
|
|
|
2009-05-06 03:34:40 +00:00
|
|
|
static $singular_name = 'File Upload Field';
|
2009-04-19 23:22:22 +00:00
|
|
|
|
2009-05-06 03:34:40 +00:00
|
|
|
static $plural_names = 'File Fields';
|
2008-09-29 03:18:23 +00:00
|
|
|
|
2009-04-27 04:32:47 +00:00
|
|
|
public function getFormField() {
|
|
|
|
return new FileField($this->Name, $this->Title);
|
2008-09-29 03:18:23 +00:00
|
|
|
}
|
2009-04-28 02:03:13 +00:00
|
|
|
|
2010-02-14 07:53:16 +00:00
|
|
|
public function getSubmittedFormField() {
|
|
|
|
return new SubmittedFileField();
|
|
|
|
}
|
2009-12-07 02:04:20 +00:00
|
|
|
}
|