Skip to content
This repository

importing the fix for ZF-11315 #303

Closed
wants to merge 1 commit into from

2 participants

Robert Basic Matthew Weier O'Phinney
Robert Basic

No description provided.

Matthew Weier O'Phinney
Owner

Reviewed, merged, and pushed to master - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Aug 01, 2011
Robert Basic robertbasic importing the fix for ZF-11315 4ed2ac9
This page is out of date. Refresh to see the latest.
5 library/Zend/Dojo/View/Helper/Editor.php
@@ -112,8 +112,7 @@ public function direct($id = null, $value = null, $params = array(), $attribs =
112 112
113 113 $attribs = $this->_prepareDijit($attribs, $params, 'textarea');
114 114
115   - $html = '<input' . $this->_htmlAttribs($hiddenAttribs) . $this->getClosingBracket();
116   - $html .= '<div' . $this->_htmlAttribs($attribs) . '>'
  115 + $html = '<div' . $this->_htmlAttribs($attribs) . '>'
117 116 . $value
118 117 . "</div>\n";
119 118
@@ -123,6 +122,8 @@ public function direct($id = null, $value = null, $params = array(), $attribs =
123 122 . $this->view->broker('formTextarea')->direct($hiddenId, $value, $attribs)
124 123 . '</noscript>';
125 124
  125 + $html .= '<input' . $this->_htmlAttribs($hiddenAttribs) . $this->getClosingBracket();
  126 +
126 127 return $html;
127 128 }
128 129
9 tests/Zend/Dojo/View/Helper/EditorTest.php
@@ -179,4 +179,13 @@ public function testHelperShouldOnlyUseTextareaInNoscriptTag()
179 179 $html = $this->helper->direct('foo');
180 180 $this->assertRegexp('#<noscript><textarea[^>]*>#', $html, $html);
181 181 }
  182 +
  183 + /**
  184 + * @group ZF-11315
  185 + */
  186 + public function testHiddenInputShouldBeRenderedLast()
  187 + {
  188 + $html = $this->helper->direct('foo');
  189 + $this->assertRegexp('#</noscript><input#', $html, $html);
  190 + }
182 191 }

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.