Issues

ZF-9268: Inconsistent id with Zend_Form_Element_Captcha

Issue Type: Sub-task Created: 2010-02-25T10:05:57.000+0000 Last Updated: 2010-04-07T17:54:36.000+0000 Status: Resolved Fix version(s): Reporter: Michael Gallego (bakura) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Form

Related issues: - ZF-9338

Attachments:

Description

There is a very small inconsistency with Zend_Form_Element_Captcha, because contrary to all elements that generate an

, the HtmlTag decorator with Zend_Form_Element_Captcha has no id : public function loadDefaultDecorators() { if ($this->loadDefaultDecoratorsIsDisabled()) { return; } $decorators = $this->getDecorators(); if (empty($decorators)) { $this->addDecorator('Errors') ->addDecorator('Description', array('tag' => 'p', 'class' => 'description')) ->addDecorator('HtmlTag', array('tag' => 'dd') ->addDecorator('Label', array('tag' => 'dt')); } } Here is the fix, so that it is consistent with other elements : public function loadDefaultDecorators() { if ($this->loadDefaultDecoratorsIsDisabled()) { return; } $decorators = $this->getDecorators(); if (empty($decorators)) { $this->addDecorator('Errors') ->addDecorator('Description', array('tag' => 'p', 'class' => 'description')) ->addDecorator('HtmlTag', array('tag' => 'dd', 'id' => $this->getName() . '-element')) ->addDecorator('Label', array('tag' => 'dt')); } }

Comments

Posted by Stanislav Malyshev (stas) on 2010-04-07T17:54:36.000+0000

fixed in trunk

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts