PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_QuickForm » Bug #2276

name attribute of header element not rendered out in Array

Details

Submitted2004-09-03 16:52 UTC
Fromveeeee at gmail dot com
Assignedavb
StatusClosed
PackageHTML_QuickForm
PHP Version4.3.9
Roadmaps(Not assigned)

Comments

[2004-09-03 16:52 UTC] veeeee at gmail dot com

Description:
------------
name attribute of header element not exported when rendered to array. Here's a small patch to render out the name as well.
---

Index: PEAR/HTML/QuickForm/header.php
===================================================================
diff -u -r1.1 header.php
--- PEAR/HTML/QuickForm/header.php 24 Aug 2004 17:00:47 -0000 1.1
+++ PEAR/HTML/QuickForm/header.php 3 Sep 2004 16:30:45 -0000
@@ -42,6 +42,7 @@
{
$this->HTML_QuickForm_static($elementName, null, $text);
$this->_type = 'header';
+ $this->_name = $elementName;
}

// }}}
Index: PEAR/HTML/QuickForm/Renderer/Array.php
===================================================================
diff -u -r1.1 Array.php
--- PEAR/HTML/QuickForm/Renderer/Array.php 24 Aug 2004 17:00:47 -0000 1.1
+++ PEAR/HTML/QuickForm/Renderer/Array.php 3 Sep 2004 16:30:45 -0000
@@ -176,7 +176,7 @@

function renderHeader(&$header)
{
- $this->_ary['sections'][$this->_sectionCount] = array('header' => $header->toHtml());
+ $this->_ary['sections'][$this->_sectionCount] = array('header' => $header->toHtml(), 'name' => $header->getName());
$this->_currentSection = $this->_sectionCount++;
} // end func renderHeader