diff --git a/lam/lib/html.inc b/lam/lib/html.inc
index af99776b..21bc402a 100644
--- a/lam/lib/html.inc
+++ b/lam/lib/html.inc
@@ -381,6 +381,10 @@ class htmlInputField extends htmlElement {
private $validationRule = null;
/** enable autocomplete */
private $autocomplete = false;
+ /** multiple values in one field */
+ private $autocompleteMultiValue = false;
+ /** separator expression for multiple values in one field */
+ private $autocompleteMultiValueSeparator = null;
/** autocompletion suggestions */
private $autocompleteValues = array();
/** autocomplete start at this input length */
@@ -471,10 +475,27 @@ class htmlInputField extends htmlElement {
// autocompletion
if ($this->autocomplete) {
echo "";
}
if ($this->transient) {
@@ -566,14 +587,18 @@ class htmlInputField extends htmlElement {
*
* @param array $values list of values to suggest
* @param int $minLength autocompletion starts after this number of caracters entered (default 1; 0 means immediate start)
+ * @param boolean $multiValue allow multiple autocompletion values in the same fields
+ * @param String $multiSeparator separator expression if multiple autocompletion values are allowed
*/
- public function enableAutocompletion($values, $minLength = 1) {
+ public function enableAutocompletion($values, $minLength = 1, $multiValue = false, $multiSeparator = ',\s*') {
for ($i = 0; $i < sizeof($values); $i++) {
$values[$i] = '"' . htmlspecialchars($values[$i]) . '"';
}
$this->autocomplete = true;
$this->autocompleteValues = $values;
$this->autocompleteMinLength = $minLength;
+ $this->autocompleteMultiValue = $multiValue;
+ $this->autocompleteMultiValueSeparator = $multiSeparator;
}
/**
@@ -954,8 +979,12 @@ class htmlSelect extends htmlElement {
}
$size = ' size="' . $this->size . '"';
$class = '';
+ $classList = $this->cssClasses;
if ($this->rightToLeftTextDirection) {
- $class = ' class="rightToLeftText"';
+ $classList[] = 'rightToLeftText';
+ }
+ if (sizeof($classList) > 0) {
+ $class = ' class="' . implode(' ', $classList) . '"';
}
$disabled = '';
if (!$this->isEnabled) {