Skip to content

Commit

Permalink
Fix indentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 22, 2016
1 parent 1a7e8c5 commit d5d46e2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
36 changes: 18 additions & 18 deletions lib/Cake/Test/Case/View/Helper/FormHelperTest.php
Expand Up @@ -3914,24 +3914,24 @@ public function testRadio() {
);
$this->assertTags($result, $expected);

$result = $this->Form->radio('Model.field', array('option A', 'option B'), array('fieldset' => 'classy-stuff'));
$expected = array(
'fieldset' => array('class' => 'classy-stuff'),
'legend' => array(),
'Field',
'/legend',
'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '', 'id' => 'ModelField_'),
array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField0')),
array('label' => array('for' => 'ModelField0')),
'option A',
'/label',
array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField1')),
array('label' => array('for' => 'ModelField1')),
'option B',
'/label',
'/fieldset'
);
$this->assertTags($result, $expected);
$result = $this->Form->radio('Model.field', array('option A', 'option B'), array('fieldset' => 'classy-stuff'));
$expected = array(
'fieldset' => array('class' => 'classy-stuff'),
'legend' => array(),
'Field',
'/legend',
'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '', 'id' => 'ModelField_'),
array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField0')),
array('label' => array('for' => 'ModelField0')),
'option A',
'/label',
array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField1')),
array('label' => array('for' => 'ModelField1')),
'option B',
'/label',
'/fieldset'
);
$this->assertTags($result, $expected);

$result = $this->Form->radio(
'Employee.gender',
Expand Down
10 changes: 5 additions & 5 deletions lib/Cake/View/Helper/FormHelper.php
Expand Up @@ -975,11 +975,11 @@ public function inputs($fields = null, $blacklist = null, $options = array()) {
$out .= $this->input($name, $options);
}

if (is_string($fieldset)) {
$fieldsetClass = array('class' => $fieldset);
} else {
$fieldsetClass = '';
}
if (is_string($fieldset)) {
$fieldsetClass = array('class' => $fieldset);
} else {
$fieldsetClass = '';
}

if ($fieldset) {
if ($legend) {
Expand Down

0 comments on commit d5d46e2

Please sign in to comment.