diff --git a/lam/lib/html.inc b/lam/lib/html.inc
index 49bcccf9..b724861a 100644
--- a/lam/lib/html.inc
+++ b/lam/lib/html.inc
@@ -289,6 +289,8 @@ class htmlInputField extends htmlElement {
private $fieldMaxLength = 255;
/** password field */
private $isPassword = false;
+ /** enabled or disabled */
+ private $isEnabled = true;
/**
* Constructor
@@ -333,7 +335,11 @@ class htmlInputField extends htmlElement {
if ($this->isPassword) {
$inputType = 'password';
}
- echo '';
+ $disabled = '';
+ if (!$this->isEnabled) {
+ $disabled = ' disabled';
+ }
+ echo '';
return array($this->fieldName => 'text');
}
@@ -364,6 +370,15 @@ class htmlInputField extends htmlElement {
$this->isPassword = $isPassword;
}
+ /**
+ * Specifies if this component is enabled and accepts user modification.
+ *
+ * @param boolean $isEnabled enabled if true
+ */
+ public function setIsEnabled($isEnabled) {
+ $this->isEnabled = $isEnabled;
+ }
+
}
/**
@@ -487,6 +502,8 @@ class htmlButton extends htmlElement {
protected $isImageButton;
/** title */
private $title = null;
+ /** enabled or disabled */
+ private $isEnabled = true;
/**
* Constructor.
@@ -533,7 +550,11 @@ class htmlButton extends htmlElement {
if ($this->title != null) {
$title = ' title="' . $this->title . '"';
}
- echo '';
+ $disabled = '';
+ if (!$this->isEnabled) {
+ $disabled = ' disabled';
+ }
+ echo '';
return array($this->name => 'submit');
}
@@ -546,6 +567,15 @@ class htmlButton extends htmlElement {
$this->title = htmlspecialchars($title);
}
+ /**
+ * Specifies if this component is enabled and accepts user modification.
+ *
+ * @param boolean $isEnabled enabled if true
+ */
+ public function setIsEnabled($isEnabled) {
+ $this->isEnabled = $isEnabled;
+ }
+
}
/**
@@ -595,6 +625,8 @@ class htmlSelect extends htmlElement {
private $sortElements = true;
/** right to left text direction */
private $rightToLeftTextDirection = false;
+ /** enabled or disabled */
+ private $isEnabled = true;
/**
* Constructor.
@@ -637,7 +669,11 @@ class htmlSelect extends htmlElement {
if ($this->rightToLeftTextDirection) {
$class = ' class="rightToLeftText"';
}
- echo '