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:
phpnut 2007-05-21 05:15:26 +00:00
parent 7fb6896ab6
commit 84de5b6e35
2 changed files with 31 additions and 31 deletions

View file

@ -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;
}

View file

@ -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() {