2008-09-29 03:18:23 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* EditableEmailField
|
2009-04-17 02:26:40 +00:00
|
|
|
*
|
2008-09-29 03:18:23 +00:00
|
|
|
* Allow users to define a validating editable email field for a UserDefinedForm
|
2009-04-17 02:26:40 +00:00
|
|
|
*
|
|
|
|
* @package userforms
|
2008-09-29 03:18:23 +00:00
|
|
|
*/
|
|
|
|
class EditableEmailField extends EditableFormField {
|
|
|
|
|
2009-05-06 03:34:40 +00:00
|
|
|
static $singular_name = 'Email Field';
|
2008-09-29 03:18:23 +00:00
|
|
|
|
2009-05-06 03:34:40 +00:00
|
|
|
static $plural_name = 'Email Fields';
|
2008-09-29 03:18:23 +00:00
|
|
|
|
|
|
|
function getFormField() {
|
2009-04-27 02:45:40 +00:00
|
|
|
return new EmailField($this->Name, $this->Title);
|
2008-09-29 03:18:23 +00:00
|
|
|
}
|
|
|
|
|
2009-04-21 03:44:13 +00:00
|
|
|
/**
|
|
|
|
* Return the validation information related to this field. This is
|
|
|
|
* interrupted as a JSON object for validate plugin and used in the
|
|
|
|
* PHP.
|
|
|
|
*
|
|
|
|
* @see http://docs.jquery.com/Plugins/Validation/Methods
|
|
|
|
* @return Array
|
|
|
|
*/
|
|
|
|
public function getValidation() {
|
|
|
|
return array(
|
|
|
|
'email' => true
|
|
|
|
);
|
|
|
|
}
|
2008-09-29 03:18:23 +00:00
|
|
|
}
|
|
|
|
?>
|