Skip to content

Commit

Permalink
bug #18354 [FrameworkBundle][TwigBridge] fix high deps tests (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][TwigBridge] fix high deps tests

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

aa4dd4f fix high deps tests
  • Loading branch information
fabpot committed Mar 30, 2016
2 parents b054aeb + aa4dd4f commit 45755e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -314,10 +314,10 @@

{%- block widget_attributes -%}
id="{{ id }}" name="{{ full_name }}"
{%- if read_only and attr.readonly is not defined %} readonly="readonly"{% endif -%}
{%- if read_only %} readonly="readonly"{% endif -%}
{%- if disabled %} disabled="disabled"{% endif -%}
{%- if required %} required="required"{% endif -%}
{%- for attrname, attrvalue in attr -%}
{%- for attrname, attrvalue in attr if 'readonly' != attrname or not read_only -%}
{{- " " -}}
{%- if attrname in ['placeholder', 'title'] -%}
{{- attrname }}="{{ attrvalue|trans({}, translation_domain) }}"
Expand Down
@@ -1,7 +1,8 @@
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 ?>
<?php if ($disabled): ?>disabled="disabled" <?php endif ?>
<?php if ($required): ?>required="required" <?php endif ?>
<?php foreach ($attr as $k => $v): ?>
<?php if ('readonly' === $k && $read_only): continue; endif ?>
<?php if (in_array($k, array('placeholder', 'title'), true)): ?>
<?php printf('%s="%s" ', $view->escape($k), $view->escape($view['translator']->trans($v, array(), $translation_domain))) ?>
<?php elseif ($v === true): ?>
Expand Down

0 comments on commit 45755e0

Please sign in to comment.