diff --git a/code/editor/EditableEmailField.php b/code/editor/EditableEmailField.php index 68823b8..427ec3e 100755 --- a/code/editor/EditableEmailField.php +++ b/code/editor/EditableEmailField.php @@ -8,48 +8,18 @@ */ class EditableEmailField extends EditableFormField { - static $db = array( - "SendCopy" => "Boolean" - ); - static $singular_name = 'Email field'; + static $plural_name = 'Email fields'; - function populateFromPostData( $data ) { - $this->SendCopy = !empty($data['SendCopy']) ? "1" : "0"; - parent::populateFromPostData($data); - } - - function ExtraOptions() { - $baseName = "Fields[$this->ID]"; - - $extraFields = new FieldSet( - new CheckboxField( $baseName . "[SendCopy]", _t('EditableEmailField.SENDCOPY', 'Send copy of submission to this address'), $this->SendCopy ) - ); - - foreach(parent::ExtraOptions() as $extraField) - $extraFields->push($extraField); - - if($this->readonly) - $extraFields = $extraFields->makeReadonly(); - - return $extraFields; - } - function getFormField() { - return new EmailField( $this->Name, $this->Title, $this->getField('Default') ); + return new EmailField($this->Name, $this->Title); } function getFilterField() { return $this->createField(true); } - function DefaultField() { - $disabled = ($this->readonly) ? " disabled=\"disabled\"" : ''; - - return '
'; - } - /** * Return the validation information related to this field. This is * interrupted as a JSON object for validate plugin and used in the