8000 bug #20934 [FrameworkBundle] Fix PHP form templates on translatable a… · symfony/framework-bundle@6770545 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6770545

Browse files
committed
bug #20934 [FrameworkBundle] Fix PHP form templates on translatable attributes (ro0NL)
This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] Fix PHP form templates on translatable attributes | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#20365 (comment) | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> Separated from #20365 Commits ------- 10806e0 [FrameworkBundle] Fix PHP form templates on translatable attributes
2 parents efba256 + 3d18d42 commit 6770545

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Resources/views/Form/button_attributes.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id="<?php echo $view->escape($id) ?>" name="<?php echo $view->escape($full_name) ?>" <?php if ($disabled): ?>disabled="disabled" <?php endif ?>
22
<?php foreach ($attr as $k => $v): ?>
3-
<?php if (in_array($v, array('placeholder', 'title'), true)): ?>
3+
<?php if (in_array($k, array('placeholder', 'title'), true)): ?>
44
<?php printf('%s="%s" ', $view->escape($k), $view->escape($view['translator']->trans($v, array(), $translation_domain))) ?>
55
<?php elseif ($v === true): ?>
66
<?php printf('%s="%s" ', $view->escape($k), $view->escape($k)) ?>

Resources/views/Form/widget_container_attributes.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php if (!empty($id)): ?>id="<?php echo $view->escape($id) ?>" <?php endif ?>
22
<?php foreach ($attr as $k => $v): ?>
3-
54FA <?php if (in_array($v, array('placeholder', 'title'), true)): ?>
3+
<?php if (in_array($k, array('placeholder', 'title'), true)): ?>
44
<?php printf('%s="%s" ', $view->escape($k), $view->escape($view['translator']->trans($v, array(), $translation_domain))) ?>
55
<?php elseif ($v === true): ?>
66
<?php printf('%s="%s" ', $view->escape($k), $view->escape($k)) ?>

0 commit comments

Comments
 (0)
0