2007-07-19 12:40:28 +02:00
|
|
|
<?php
|
|
|
|
|
2008-01-09 05:18:36 +01:00
|
|
|
/**
|
|
|
|
* @package forms
|
|
|
|
* @subpackage fields-basic
|
|
|
|
*/
|
2007-09-16 03:55:04 +02:00
|
|
|
|
2007-07-19 12:40:28 +02:00
|
|
|
/**
|
2008-01-09 05:18:36 +01:00
|
|
|
* Single checkbox field, disabled
|
|
|
|
* @package forms
|
|
|
|
* @subpackage fields-basic
|
2007-07-19 12:40:28 +02:00
|
|
|
*/
|
|
|
|
class CheckboxFieldDisabled extends CheckboxField {
|
|
|
|
/**
|
|
|
|
* Returns a single checkbox field - used by templates.
|
|
|
|
*/
|
|
|
|
function Field() {
|
2007-09-16 03:55:04 +02: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 12:40:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-09-16 03:55:04 +02:00
|
|
|
|
2007-07-19 12:40:28 +02:00
|
|
|
?>
|