|
|
@@ -315,12 +315,15 @@ class Zend_Form_Element implements Zend_Validate_Interface
|
|
|
|
|
|
$decorators = $this->getDecorators();
|
|
|
if (empty($decorators)) {
|
|
|
+ $getId = create_function('$decorator',
|
|
|
+ 'return $decorator->getElement()->getId()
|
|
|
+ . "-element";');
|
|
|
$this->addDecorator('ViewHelper')
|
|
|
- ->addDecorator('Errors')
|
|
|
- ->addDecorator('Description', array('tag' => 'p', 'class' => 'description'))
|
|
|
- ->addDecorator('HtmlTag', array('tag' => 'dd',
|
|
|
- 'id' => $this->getName() . '-element'))
|
|
|
- ->addDecorator('Label', array('tag' => 'dt'));
|
|
|
+ ->addDecorator('Errors')
|
|
|
+ ->addDecorator('Description', array('tag' => 'p', 'class' => 'description'))
|
|
|
+ ->addDecorator('HtmlTag', array('tag' => 'dd',
|
|
|
+ 'id' => array('callback' => $getId)))
|
|
|
+ ->addDecorator('Label', array('tag' => 'dt'));
|
|
|
}
|
|
|
}
|
|
|
|