merged branch bschussek/button-fix (PR #7800)
This PR was merged into the master branch.
Discussion
----------
[Form] Fixed missing label in button
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
6671b32
[Form] Fixed missing label in button
This commit is contained in:
commit
b13af94e01
@ -1,4 +1,2 @@
|
||||
<?php if (!$label) { $label = $view['form']->humanize($name); } ?>
|
||||
<button type="<?php echo isset($type) ? $view->escape($type) : 'button' ?>" <?php echo $view['form']->block($form, 'button_attributes') ?>>
|
||||
<?php $view->escape($view['translator']->trans($label, array(), $translation_domain)) ?>
|
||||
</button>
|
||||
<button type="<?php echo isset($type) ? $view->escape($type) : 'button' ?>" <?php echo $view['form']->block($form, 'button_attributes') ?>><?php echo $view->escape($view['translator']->trans($label, array(), $translation_domain)) ?></button>
|
||||
|
@ -1769,7 +1769,7 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg
|
||||
$form = $this->factory->createNamed('name', 'button');
|
||||
|
||||
$this->assertWidgetMatchesXpath($form->createView(), array(),
|
||||
'/button[@type="button"][@name="name"]'
|
||||
'/button[@type="button"][@name="name"][.="[trans]Name[/trans]"]'
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user