Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.10.0
-
Fix Version/s: 1.10.7
-
Component/s: Zend_Captcha
-
Labels:None
Description
At the moment it is not possible to put the input text field of an Zend_Form_Element_Captcha besides the captcha image with css for example.
The generated code looks like this:
<img src="/images/captcha/f2fa4b159345bf3bd7ab7268349aa11a.png"/><br/> <input type="hidden" name="verific[id]" value="f2fa4b159345bf3bd7ab7268349aa11a" id="verific-id"> <input type="text" name="verific[input]" id="verific-input" value="">
The render() method looks like this at the moment:
public function render(Zend_View_Interface $view = null, $element = null) { return '<img width="'.$this->getWidth().'" height="'.$this->getHeight().'" alt="'.$this->getImgAlt().'" src="' . $this->getImgUrl() . $this->getId() . $this->getSuffix() . '"/><br/>'; }
So there is always a <br/> in it which makes it hard to change the appearance with css.
The <br/> should not be hardcoded and the output should be more flexible, so a developer can put the textfield right beside the Image.
At the moment I changed that behaviour by extending Zend_Captcha_Image and changing the render() method.
Totally agree, created a patch to simplify update