We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdcf98c commit 844fceeCopy full SHA for 844fcee
Resources/views/Form/widget_attributes.html.php
@@ -1,7 +1,8 @@
1
-id="<?php echo $view->escape($id) ?>" name="<?php echo $view->escape($full_name) ?>" <?php if ($read_only && !isset($attr['readonly'])): ?>readonly="readonly" <?php endif ?>
+id="<?php echo $view->escape($id) ?>" name="<?php echo $view->escape($full_name) ?>" <?php if ($read_only): ?>readonly="readonly" <?php endif ?>
2
<?php if ($disabled): ?>disabled="disabled" <?php endif ?>
3
<?php if ($required): ?>required="required" <?php endif ?>
4
<?php foreach ($attr as $k => $v): ?>
5
+<?php if ('readonly' === $k && $read_only): continue; endif ?>
6
<?php if (in_array($k, array('placeholder', 'title'), true)): ?>
7
<?php printf('%s="%s" ', $view->escape($k), $view->escape($view['translator']->trans($v, array(), $translation_domain))) ?>
8
<?php elseif ($v === true): ?>
0 commit comments