Fix bug in added support for "for" attributes in HTML forms - refs #7063

1.9.x
Yannick Warnier 11 years ago
parent 0d7cf3b652
commit ab0929c7c2
  1. 4
      main/inc/lib/pear/HTML/QuickForm/Renderer/Default.php

@ -251,10 +251,10 @@ class HTML_QuickForm_Renderer_Default extends HTML_QuickForm_Renderer
if (isset($this->_templates[$name])) {
$html = str_replace('{label}', $nameLabel, $this->_templates[$name]);
$html = str_replace('{label-for}', $labelFor, $this->_templates[$name]);
$html = str_replace('{label-for}', $labelFor, $html);
} else {
$html = str_replace('{label}', $nameLabel, $this->_elementTemplate);
$html = str_replace('{label-for}', $labelFor, $this->_elementTemplate);
$html = str_replace('{label-for}', $labelFor, $html);
}
if ($required) {
$html = str_replace('<!-- BEGIN required -->', '', $html);

Loading…
Cancel
Save