mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +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()) {
|
||||
$options = $this->__initInputField($fieldName, $options);
|
||||
$model = $this->model();
|
||||
unset($options['class']);
|
||||
|
||||
if(isset($this->params['_Token']) && !empty($this->params['_Token'])) {
|
||||
$model = '_' . $model;
|
||||
}
|
||||
|
|
|
@ -608,7 +608,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
$this->assertPattern('/^<input[^<>]+type="hidden"[^<>]+\/>$/', $result);
|
||||
$this->assertPattern('/^<input[^<>]+name="data\[Model\]\[field\]"[^<>]+id="theID"[^<>]+value="test"[^<>]+\/>$/', $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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue