Commit 93193018 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes some html errors

parent 43e48a61
......@@ -1054,7 +1054,12 @@ class SelectAttribute extends Attribute
if ($this->outputs !== NULL) {
$smarty->assign($id."_outputs", array_values($this->outputs));
} else {
$smarty->assign($id."_outputs", $this->choices);
$outputs = $this->choices;
$key = array_search('', $outputs);
if ($key !== FALSE) {
$outputs[$key] = ' ';
}
$smarty->assign($id."_outputs", $outputs);
}
$smarty->assign($id."_selected", $this->getValue());
$display = '<select name="'.$id.'" id="'.$id.'" ';
......@@ -1961,7 +1966,7 @@ class SetAttribute extends Attribute
parent::renderAttribute($attributes, $readOnly);
} else {
$attributes[$this->getLdapName()] = array(
'htmlid' => $this->getHtmlId(),
'htmlid' => $this->attribute->getHtmlId(), // Label should point to the attribute
'label' => '{literal}'.$this->getLabel().'{/literal}'.($this->isRequired()?'{$must}':''),
'description' => ($this->isRequired()?sprintf(_("%s (required)"), $this->getDescription()):$this->getDescription()),
'input' => $this->renderOnlyFormInput(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment