Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59f124084c | ||
|
|
0f4473f9a0 | ||
|
|
af7663294a |
No files matched your search
@@ -642,6 +642,7 @@ class FormBuilder {
|
|||||||
$selected = $this->getSelectedValue(null, $selected);
|
$selected = $this->getSelectedValue(null, $selected);
|
||||||
|
|
||||||
$options = compact('selected');
|
$options = compact('selected');
|
||||||
|
$options['value'] = '';
|
||||||
|
|
||||||
return '<option' . $this->html->attributes($options) . '>' . e($display) . '</option>';
|
return '<option' . $this->html->attributes($options) . '>' . e($display) . '</option>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase {
|
|||||||
null,
|
null,
|
||||||
['placeholder' => 'Select One...']
|
['placeholder' => 'Select One...']
|
||||||
);
|
);
|
||||||
$this->assertEquals($select, '<select name="size"><option selected="selected">Select One...</option><option value="L">Large</option><option value="S">Small</option></select>');
|
$this->assertEquals($select, '<select name="size"><option selected="selected" value="">Select One...</option><option value="L">Large</option><option value="S">Small</option></select>');
|
||||||
|
|
||||||
$select = $this->formBuilder->select(
|
$select = $this->formBuilder->select(
|
||||||
'size',
|
'size',
|
||||||
@@ -330,7 +330,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase {
|
|||||||
'L',
|
'L',
|
||||||
['placeholder' => 'Select One...']
|
['placeholder' => 'Select One...']
|
||||||
);
|
);
|
||||||
$this->assertEquals($select, '<select name="size"><option>Select One...</option><option value="L" selected="selected">Large</option><option value="S">Small</option></select>');
|
$this->assertEquals($select, '<select name="size"><option value="">Select One...</option><option value="L" selected="selected">Large</option><option value="S">Small</option></select>');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFormSelectYear()
|
public function testFormSelectYear()
|
||||||
|
|||||||
Reference in new issue
Block a user