2007-07-19 10:40:28 +00:00
|
|
|
<?php
|
|
|
|
|
2008-01-09 04:18:36 +00:00
|
|
|
/**
|
|
|
|
* @package forms
|
|
|
|
* @subpackage fields-basic
|
|
|
|
*/
|
2007-09-16 01:55:04 +00:00
|
|
|
|
2007-07-19 10:40:28 +00:00
|
|
|
/**
|
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 {
|
|
|
|
/**
|
|
|
|
* Returns a single checkbox field - used by templates.
|
|
|
|
*/
|
|
|
|
function Field() {
|
2007-09-16 01:55:04 +00:00
|
|
|
$checked = '';
|
|
|
|
if($this->value)
|
|
|
|
$checked = " checked = \"checked\"";
|
|
|
|
return "<input class=\"checkbox\" disabled=\"disabled\" type=\"checkbox\" id=\"" .
|
|
|
|
$this->id() . "\" name=\"{$this->name}\"$checked />";
|
2007-07-19 10:40:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-09-16 01:55:04 +00:00
|
|
|
|
2007-07-19 10:40:28 +00:00
|
|
|
?>
|