mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 23:49:55 +00:00
Fixing spacing between button tag attributes. Fixes #241
This commit is contained in:
parent
913450daef
commit
a8040506b0
2 changed files with 4 additions and 1 deletions
|
@ -1170,7 +1170,7 @@ class FormHelper extends AppHelper {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
$this->Html->tags['button'],
|
$this->Html->tags['button'],
|
||||||
$options['type'],
|
$options['type'],
|
||||||
$this->_parseAttributes($options, array('type'), '', ' '),
|
$this->_parseAttributes($options, array('type'), ' ', ''),
|
||||||
$title
|
$title
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4753,6 +4753,9 @@ class FormHelperTest extends CakeTestCase {
|
||||||
$result = $this->Form->button('Clear Form >', array('type' => 'reset'));
|
$result = $this->Form->button('Clear Form >', array('type' => 'reset'));
|
||||||
$this->assertTags($result, array('button' => array('type' => 'reset'), 'Clear Form >', '/button'));
|
$this->assertTags($result, array('button' => array('type' => 'reset'), 'Clear Form >', '/button'));
|
||||||
|
|
||||||
|
$result = $this->Form->button('Clear Form >', array('type' => 'reset', 'id' => 'clearForm'));
|
||||||
|
$this->assertTags($result, array('button' => array('type' => 'reset', 'id' => 'clearForm'), 'Clear Form >', '/button'));
|
||||||
|
|
||||||
$result = $this->Form->button('<Clear Form>', array('type' => 'reset', 'escape' => true));
|
$result = $this->Form->button('<Clear Form>', array('type' => 'reset', 'escape' => true));
|
||||||
$this->assertTags($result, array('button' => array('type' => 'reset'), '<Clear Form>', '/button'));
|
$this->assertTags($result, array('button' => array('type' => 'reset'), '<Clear Form>', '/button'));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue