Merge branch 'master' into 2.6

This commit is contained in:
mark_story 2014-10-26 21:25:05 -04:00
commit 177b797aab
2 changed files with 4 additions and 3 deletions

View file

@ -2695,7 +2695,7 @@ class FormHelperTest extends CakeTestCase {
array('label' => array('for' => "ContactMultiple")),
'Multiple',
'/label',
array('input' => array('type' => 'hidden', 'name' => "data[Contact][multiple]", 'value' => '', 'id' => "ContactMultiple")),
array('input' => array('type' => 'hidden', 'name' => "data[Contact][multiple]", 'value' => '', 'id' => "ContactMultiple", 'disabled' => 'disabled')),
array('div' => array('class' => 'checkbox')),
array('input' => array('type' => 'checkbox', 'name' => "data[Contact][multiple][]", 'value' => 1, 'disabled' => 'disabled', 'id' => "ContactMultiple1")),
array('label' => array('for' => "ContactMultiple1")),
@ -5004,7 +5004,7 @@ class FormHelperTest extends CakeTestCase {
'Multiple',
'/label',
'input' => array(
'type' => 'hidden', 'name' => 'data[Contact][multiple]', 'value' => '', 'id' => 'ContactMultiple_'
'type' => 'hidden', 'name' => 'data[Contact][multiple]', 'value' => '', 'id' => 'ContactMultiple_', 'disabled' => 'disabled'
),
'select' => array(
'name' => 'data[Contact][multiple][]', 'disabled' => 'disabled', 'multiple' => 'multiple', 'id' => 'ContactMultiple'

View file

@ -2073,7 +2073,8 @@ class FormHelper extends AppHelper {
'id' => $attributes['id'] . ($style ? '' : '_'),
'secure' => false,
'form' => isset($attributes['form']) ? $attributes['form'] : null,
'name' => $attributes['name']
'name' => $attributes['name'],
'disabled' => $attributes['disabled'] === true || $attributes['disabled'] === 'disabled'
);
$select[] = $this->hidden(null, $hiddenAttributes);
}