Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.3.2

Request #8626 new subtype: ximage for <img ....>
Submitted: 2006-09-03 19:16 UTC
From: b_j at tar dot hu Assigned: avb
Status: Closed Package: HTML_QuickForm2 (version 3.2.6)
PHP Version: Irrelevant OS:
Roadmaps: 0.6.0    
Subscription  


 [2006-09-03 19:16 UTC] b_j at tar dot hu (Barczi József)
Description: ------------ HTML/QuickForm/ximage.php: <?php require_once 'HTML/QuickForm/element.php'; class HTML_QuickForm_ximage extends HTML_QuickForm_element { function HTML_QuickForm_ximage($elementName = null, $src='', $attributes = null){ $this->HTML_QuickForm_element($elementName, null, $attributes); $this->setSource($src); $this->setType('ximage'); } function setType($type){ $this->_type = $type; //$this->updateAttributes(array('type'=>$type)); } // end func setType function setSource($src){ $this->updateAttributes(array('src' => $src)); } // end func setSource function setBorder($border){ $this->updateAttributes(array('border' => $border)); } // end func setBorder function setAlign($align){ $this->updateAttributes(array('align' => $align)); } // end func setAlign function setHeight($height){ $this->updateAttributes(array('height' => $height)); } function setWidth($width){ $this->updateAttributes(array('width' => $width)); } function freeze(){ return false; } //end func freeze function toHtml(){ $this->setType(null); return '<IMG' . $this->getAttributes(true) . ' />'; } function getFrozenHtml(){ return $this->toHtml(); } function setName($name){ $this->updateAttributes(array('name' => $name)); } function getName(){ return $this->getAttribute('name'); } } ?> HTML/QuickForm.php: .... //Hungarian translation: var $_jsPrefix = 'Rossz adat'; var $_jsPostfix = 'Javítani kell ezt az adatot'; var $_requiredNote = '<span style="font-size:80%; color:#ff0000;">*</span>'. '<span style="font-size:80%;"> Kötelezõ mezõ</span>'; .... $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'] = array( 'group' =>array('HTML/QuickForm/group.php','HTML_QuickForm_group'), 'hidden' =>array('HTML/QuickForm/hidden.php','HTML_QuickForm_hidden'), 'reset' =>array('HTML/QuickForm/reset.php','HTML_QuickForm_reset'), 'checkbox' =>array('HTML/QuickForm/checkbox.php','HTML_QuickForm_checkbox'), 'file' =>array('HTML/QuickForm/file.php','HTML_QuickForm_file'), 'image' =>array('HTML/QuickForm/image.php','HTML_QuickForm_image'), 'password' =>array('HTML/QuickForm/password.php','HTML_QuickForm_password'), 'radio' =>array('HTML/QuickForm/radio.php','HTML_QuickForm_radio'), 'button' =>array('HTML/QuickForm/button.php','HTML_QuickForm_button'), 'submit' =>array('HTML/QuickForm/submit.php','HTML_QuickForm_submit'), 'select' =>array('HTML/QuickForm/select.php','HTML_QuickForm_select'), 'hiddenselect' =>array('HTML/QuickForm/hiddenselect.php','HTML_QuickForm_hiddenselect'), 'text' =>array('HTML/QuickForm/text.php','HTML_QuickForm_text'), 'textarea' =>array('HTML/QuickForm/textarea.php','HTML_QuickForm_textarea'), 'link' =>array('HTML/QuickForm/link.php','HTML_QuickForm_link'), 'advcheckbox' =>array('HTML/QuickForm/advcheckbox.php','HTML_QuickForm_advcheckbox'), 'date' =>array('HTML/QuickForm/date.php','HTML_QuickForm_date'), 'static' =>array('HTML/QuickForm/static.php','HTML_QuickForm_static'), 'header' =>array('HTML/QuickForm/header.php', 'HTML_QuickForm_header'), 'html' =>array('HTML/QuickForm/html.php', 'HTML_QuickForm_html'), 'hierselect' =>array('HTML/QuickForm/hierselect.php', 'HTML_QuickForm_hierselect'), 'autocomplete' =>array('HTML/QuickForm/autocomplete.php', 'HTML_QuickForm_autocomplete'), 'xbutton' =>array('HTML/QuickForm/xbutton.php','HTML_QuickForm_xbutton'), //BJ 'ximage' =>array('HTML/QuickForm/ximage.php','HTML_QuickForm_ximage') ); ....

Comments

 [2006-09-04 16:22 UTC] avb (Alexey Borzov)
Moving feature requests to HTML_QuickForm2 package
 [2011-05-27 15:10 UTC] avb (Alexey Borzov)
-Status: Open +Status: Closed -Assigned To: +Assigned To: avb
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. It is now possible to provide a tag name to Static element and thus output <img> and similar tags (that do not have submit values)