silverstripe-userforms/code/model/formfields/EditableFileField.php
Fred Condo 656a9fbb4e BUG: Fix access to static configuration variables
- Make statics private
- Use Config::get rather than eval to read private statics
- Add a helper function to expose UserDefinedForm_EmailRecipient::$summary_fields
  (to make them available for i18n).
2013-04-03 14:31:37 -07:00

25 lines
461 B
PHP
Executable File

<?php
/**
* Allows a user to add a field that can be used to upload a file.
*
* @package userforms
*/
class EditableFileField extends EditableFormField {
private static $singular_name = 'File Upload Field';
private static $plural_names = 'File Fields';
public function getFormField() {
$field = new FileField($this->Name, $this->Title);
return $field;
}
public function getSubmittedFormField() {
return new SubmittedFileField();
}
}