Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

importing the fix for ZF-11315 #303

Closed
wants to merge 1 commit into from

2 participants

@robertbasic

No description provided.

@weierophinney

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
Commits on Aug 1, 2011
  1. @robertbasic
This page is out of date. Refresh to see the latest.
View
5 library/Zend/Dojo/View/Helper/Editor.php
@@ -112,8 +112,7 @@ public function direct($id = null, $value = null, $params = array(), $attribs =
$attribs = $this->_prepareDijit($attribs, $params, 'textarea');
- $html = '<input' . $this->_htmlAttribs($hiddenAttribs) . $this->getClosingBracket();
- $html .= '<div' . $this->_htmlAttribs($attribs) . '>'
+ $html = '<div' . $this->_htmlAttribs($attribs) . '>'
. $value
. "</div>\n";
@@ -123,6 +122,8 @@ public function direct($id = null, $value = null, $params = array(), $attribs =
. $this->view->broker('formTextarea')->direct($hiddenId, $value, $attribs)
. '</noscript>';
+ $html .= '<input' . $this->_htmlAttribs($hiddenAttribs) . $this->getClosingBracket();
+
return $html;
}
View
9 tests/Zend/Dojo/View/Helper/EditorTest.php
@@ -179,4 +179,13 @@ public function testHelperShouldOnlyUseTextareaInNoscriptTag()
$html = $this->helper->direct('foo');
$this->assertRegexp('#<noscript><textarea[^>]*>#', $html, $html);
}
+
+ /**
+ * @group ZF-11315
+ */
+ public function testHiddenInputShouldBeRenderedLast()
+ {
+ $html = $this->helper->direct('foo');
+ $this->assertRegexp('#</noscript><input#', $html, $html);
+ }
}
Something went wrong with that request. Please try again.