Browse Source

ZF-6802: do not include "type" attribute in Textarea dijit

- Don't include 'type' attribute in generated HTML

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23776 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew 15 years ago
parent
commit
abdd758c7d

+ 0 - 1
library/Zend/Dojo/View/Helper/Textarea.php

@@ -67,7 +67,6 @@ class Zend_Dojo_View_Helper_Textarea extends Zend_Dojo_View_Helper_Dijit
             $attribs['id']    = $id;
         }
         $attribs['name']  = $id;
-        $attribs['type']  = $this->_elementType;
 
         $attribs = $this->_prepareDijit($attribs, $params, 'textarea');
 

+ 6 - 0
tests/Zend/Dojo/View/Helper/TextareaTest.php

@@ -124,6 +124,12 @@ class Zend_Dojo_View_Helper_TextareaTest extends PHPUnit_Framework_TestCase
         $html = $this->helper->textarea('foo[bar]', '', array(), array('id' => 'foo-bar'));
         $this->assertContains('id="foo-bar"', $html);
     }
+
+    public function testGeneratedMarkupShouldNotIncludeTypeAttribute()
+    {
+        $html = $this->getElement();
+        $this->assertNotRegexp('/type="text/', $html, $html);
+    }
 }
 
 // Call Zend_Dojo_View_Helper_TextareaTest::main() if this source file is executed directly.