MDL-20203 Added support for disabled attribute for inputs and select options
authornicolasconnault <nicolasconnault>
Thu, 3 Sep 2009 23:35:43 +0000 (23:35 +0000)
committernicolasconnault <nicolasconnault>
Thu, 3 Sep 2009 23:35:43 +0000 (23:35 +0000)
lib/outputcomponents.php
lib/outputrenderers.php

index 455c7e4..027447f 100644 (file)
@@ -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();
index 6eec01c..cd59e9d 100644 (file)
@@ -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,