Move NO_SAVE_DATA to FormField

This commit is contained in:
Samuel Georges 2014-12-05 18:35:42 +11:00
parent 2533b4ab4d
commit ab24c547a2
3 changed files with 7 additions and 6 deletions

View File

@ -12,6 +12,11 @@ use HTML;
*/
class FormField
{
/**
* @var int Value returned when the form field should not contribute any save data.
*/
const NO_SAVE_DATA = -1;
/**
* @var string Form field name.
*/

View File

@ -42,11 +42,6 @@ abstract class FormWidgetBase extends WidgetBase
*/
public $previewMode = false;
/**
* @var int Value returned when the widget should not contribute any save data.
*/
const NO_SAVE_DATA = -1;
/**
* Constructor
* @param $controller Controller Active controller object.

View File

@ -5,6 +5,7 @@ use Input;
use Validator;
use System\Models\File;
use System\Classes\SystemException;
use Backend\Classes\FormField;
use Backend\Classes\FormWidgetBase;
use October\Rain\Support\ValidationException;
use Exception;
@ -196,7 +197,7 @@ class FileUpload extends FormWidgetBase
*/
public function getSaveData($value)
{
return FormWidgetBase::NO_SAVE_DATA;
return FormField::NO_SAVE_DATA;
}
/**