bug #17568 Improved Bootstrap form theme for hidden fields (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #17568).
Discussion
----------
Improved Bootstrap form theme for hidden fields
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16925
| License | MIT
| Doc PR | -
Commits
-------
ba5d7f9
Improved Bootstrap form theme for hidden fields
This commit is contained in:
commit
df4cc40082
@ -3,7 +3,7 @@
|
||||
{# Widgets #}
|
||||
|
||||
{% block form_widget_simple -%}
|
||||
{% if type is not defined or 'file' != type %}
|
||||
{% if type is not defined or type not in ['file', 'hidden'] %}
|
||||
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%}
|
||||
{% endif %}
|
||||
{{- parent() -}}
|
||||
|
@ -22,7 +22,7 @@
|
||||
"require-dev": {
|
||||
"symfony/asset": "~2.7",
|
||||
"symfony/finder": "~2.3",
|
||||
"symfony/form": "~2.7,>=2.7.8",
|
||||
"symfony/form": "~2.7.10|~2.8.3",
|
||||
"symfony/http-kernel": "~2.3",
|
||||
"symfony/intl": "~2.3",
|
||||
"symfony/routing": "~2.2",
|
||||
|
@ -684,7 +684,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)]
|
||||
]
|
||||
]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"]
|
||||
]
|
||||
'
|
||||
);
|
||||
@ -844,7 +844,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)]
|
||||
]
|
||||
]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"]
|
||||
]
|
||||
'
|
||||
);
|
||||
@ -883,7 +883,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)]'.$classPart.'
|
||||
]
|
||||
]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"]
|
||||
]
|
||||
'
|
||||
);
|
||||
@ -930,7 +930,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
./input[@type="radio"][@name="name"][@id="name_1"][not(@checked)]
|
||||
]
|
||||
]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"]
|
||||
]
|
||||
'
|
||||
);
|
||||
@ -966,7 +966,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
./input[@type="radio"][@name="name"][@id="name_1"][not(@checked)]
|
||||
]
|
||||
]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"]
|
||||
]
|
||||
'
|
||||
);
|
||||
@ -1012,7 +1012,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)]
|
||||
]
|
||||
]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"]
|
||||
]
|
||||
'
|
||||
);
|
||||
@ -1182,7 +1182,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)]
|
||||
]
|
||||
]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"]
|
||||
]
|
||||
'
|
||||
);
|
||||
@ -1231,7 +1231,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)]
|
||||
]
|
||||
]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
|
||||
/following-sibling::input[@type="hidden"][@id="name__token"]
|
||||
]
|
||||
'
|
||||
);
|
||||
@ -1733,7 +1733,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
'/input
|
||||
[@type="hidden"]
|
||||
[@name="name"]
|
||||
[@class="my&class form-control"]
|
||||
[@class="my&class"]
|
||||
[@value="foo&bar"]
|
||||
'
|
||||
);
|
||||
|
Reference in New Issue
Block a user