Skip to content

Commit 3d18d42

Browse files
committed
[FrameworkBundle] Fix PHP form templates on translatable attributes
1 parent 7b64266 commit 3d18d42

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-
<?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)