mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding fix for #2614
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5145 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
7fb6896ab6
commit
84de5b6e35
2 changed files with 31 additions and 31 deletions
|
@ -662,7 +662,7 @@ class FormHelper extends AppHelper {
|
||||||
function hidden($fieldName, $options = array()) {
|
function hidden($fieldName, $options = array()) {
|
||||||
$options = $this->__initInputField($fieldName, $options);
|
$options = $this->__initInputField($fieldName, $options);
|
||||||
$model = $this->model();
|
$model = $this->model();
|
||||||
unset($options['class']);
|
|
||||||
if(isset($this->params['_Token']) && !empty($this->params['_Token'])) {
|
if(isset($this->params['_Token']) && !empty($this->params['_Token'])) {
|
||||||
$model = '_' . $model;
|
$model = '_' . $model;
|
||||||
}
|
}
|
||||||
|
|
|
@ -608,7 +608,7 @@ class FormHelperTest extends CakeTestCase {
|
||||||
$this->assertPattern('/^<input[^<>]+type="hidden"[^<>]+\/>$/', $result);
|
$this->assertPattern('/^<input[^<>]+type="hidden"[^<>]+\/>$/', $result);
|
||||||
$this->assertPattern('/^<input[^<>]+name="data\[Model\]\[field\]"[^<>]+id="theID"[^<>]+value="test"[^<>]+\/>$/', $result);
|
$this->assertPattern('/^<input[^<>]+name="data\[Model\]\[field\]"[^<>]+id="theID"[^<>]+value="test"[^<>]+\/>$/', $result);
|
||||||
$this->assertNoPattern('/^<input[^<>]+name="[^<>]+name="[^<>]+\/>$/', $result);
|
$this->assertNoPattern('/^<input[^<>]+name="[^<>]+name="[^<>]+\/>$/', $result);
|
||||||
$this->assertNoPattern('/<input[^<>]+[^type|name|id|value]=[^<>]*>/', $result);
|
$this->assertNoPattern('/<input[^<>]+[^type|name|id|value|class]=[^<>]*>/', $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testFileUploadField() {
|
function testFileUploadField() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue