From 5fc6d585ad9c4a746105b69e847d4bd9bcc95c4a Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 3 Sep 2009 23:35:43 +0000 Subject: [PATCH] MDL-20203 Added support for disabled attribute for inputs and select options --- lib/outputcomponents.php | 4 ++++ lib/outputrenderers.php | 1 + 2 files changed, 5 insertions(+) diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index 455c7e446d..027447f1b3 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -878,6 +878,10 @@ class html_field extends labelled_html_component { * @var string $maxlength The maxlength attribute of the field (only applies to text type) */ public $maxlength; + /** + * @var boolean $disabled Whether or not this field is disabled + */ + public $disabled = false; public function __construct() { $this->label = new html_label(); diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 6eec01ca29..cd59e9d6a0 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1851,6 +1851,7 @@ class moodle_core_renderer extends moodle_renderer_base { 'name' => $field->name, 'id' => $field->id, 'value' => $field->value, + 'disabled' => $field->disabled, 'style' => $field->style, 'alt' => $field->alt, 'title' => $field->title, -- 2.39.5