fixed closing div on empty select
This commit is contained in:
parent
8df75742d2
commit
1d994cc5b8
|
@ -1320,19 +1320,18 @@ class htmlSelect extends htmlElement {
|
||||||
}
|
}
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
// if select box has only one element then show it as text
|
// if select box has only one element then show it as text
|
||||||
if ((sizeof($this->elements) == 1) && !$this->multiSelect && $this->transformSingleSelect) {
|
if ((sizeof($this->elements) < 2) && !$this->multiSelect && $this->transformSingleSelect) {
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo ' ';
|
if (sizeof($this->elements) == 1) {
|
||||||
if ($this->hasDescriptiveElements) {
|
echo ' ';
|
||||||
$keys = array_keys($this->elements);
|
if ($this->hasDescriptiveElements) {
|
||||||
echo $keys[0];
|
$keys = array_keys($this->elements);
|
||||||
|
echo $keys[0];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo $this->elements[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
echo $this->elements[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif (sizeof($this->elements) == 0) {
|
|
||||||
echo '</div>';
|
|
||||||
}
|
}
|
||||||
if ($this->transient) {
|
if ($this->transient) {
|
||||||
return array();
|
return array();
|
||||||
|
|
Loading…
Reference in New Issue