2007-07-19 10:40:28 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2008-01-09 04:18:36 +00:00
|
|
|
* Single checkbox field, disabled
|
|
|
|
* @package forms
|
|
|
|
* @subpackage fields-basic
|
2007-07-19 10:40:28 +00:00
|
|
|
*/
|
|
|
|
class CheckboxFieldDisabled extends CheckboxField {
|
2008-08-12 02:58:48 +00:00
|
|
|
|
|
|
|
protected $disabled = true;
|
|
|
|
|
2007-07-19 10:40:28 +00:00
|
|
|
/**
|
|
|
|
* Returns a single checkbox field - used by templates.
|
|
|
|
*/
|
|
|
|
function Field() {
|
2008-04-06 04:08:45 +00:00
|
|
|
$attributes = array(
|
|
|
|
'type' => 'checkbox',
|
|
|
|
'class' => $this->extraClass() . " text",
|
|
|
|
'id' => $this->id(),
|
2008-04-09 11:21:22 +00:00
|
|
|
'name' => $this->Name(),
|
2008-09-16 23:14:31 +00:00
|
|
|
'tabindex' => $this->getTabIndex(),
|
2008-04-06 04:08:45 +00:00
|
|
|
'checked' => ($this->value) ? 'checked' : false,
|
|
|
|
'disabled' => 'disabled'
|
|
|
|
);
|
|
|
|
|
|
|
|
return $this->createTag('input', $attributes);
|
2007-07-19 10:40:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-09-16 01:55:04 +00:00
|
|
|
|
2007-07-19 10:40:28 +00:00
|
|
|
?>
|