ZF-2717: setElementDecorators() changes display of Image Element to Text Element

Description

When using decorators a Image Element is rendered as a Text Element


$image = new Zend_Form_Element_Image('submitImage');
$image->setLabel('')
    ->setValue('test.gif')
    ->setAttrib('class', 'button');
$form->addElement($image);
        
$form->setElementDecorators(array(
    array('ViewHelper'),
    array('Errors'),
    array('HtmlTag', array('tag' => 'dd')),
    array('Label', array('tag' => 'dt')),
));

A quick look at the image attributes shows the helper is defined as fromText var_dump($image->getAttribs());

Outputs: array(2) { ["helper"]=> string(8) "formText" ["class"]=> string(6) "button" }

Comments

Need to add a $helper property to Image element to correct the issue.

$helper property set to 'formImage' in trunk and release branch.