2008-09-29 05:18:23 +02:00
< ? php
/**
* EditableCheckbox
* A user modifiable checkbox on a UserDefinedForm
2009-04-17 04:26:40 +02:00
*
* @ package userforms
2008-09-29 05:18:23 +02:00
*/
class EditableCheckbox extends EditableFormField {
static $singular_name = 'Checkbox' ;
2009-04-25 04:54:10 +02:00
static $plural_name = 'Checkboxes' ;
2008-09-29 05:18:23 +02:00
2009-04-27 08:00:05 +02:00
public function ExtraOptions () {
2009-04-25 04:54:10 +02:00
$fields = new FieldSet (
new CheckboxField ( " Fields[ $this->ID ][CustomSettings][Default] " , _t ( 'EditableFormField.CHECKEDBYDEFAULT' , 'Checked by Default?' ), $this -> getSetting ( 'Default' ))
);
$fields -> merge ( parent :: ExtraOptions ());
return $fields ;
2008-09-29 05:18:23 +02:00
}
2009-04-27 08:00:05 +02:00
public function getFormField () {
return new CheckboxField ( $this -> Name , $this -> Title , $this -> getSetting ( 'Default' ));
2008-09-29 05:18:23 +02:00
}
}
?>