]> git.mjollnir.org Git - moodle.git/commitdiff
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 455c7e446dee9c8edb1a1ae714c4c7e9a95a03c9..027447f1b37b8dee5b534f1314985330a48d23c6 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 6eec01ca2936a9023c43bf31db106848b40ba5f8..cd59e9d6a07bfac529b1b0d1d0cbdc2fad703c18 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,