Improved Bootstrap form theme for hidden fields

This commit is contained in:
Javier Eguiluz 2016-01-27 13:22:05 +01:00 committed by Fabien Potencier
parent 3a027badb7
commit ba5d7f99e9
3 changed files with 11 additions and 11 deletions

View File

@ -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() -}}

View File

@ -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",

View File

@ -664,7 +664,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"]
]
'
);
@ -701,7 +701,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"]
]
'
);
@ -740,7 +740,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"]
]
'
);
@ -786,7 +786,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"]
]
'
);
@ -822,7 +822,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"]
]
'
);
@ -868,7 +868,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"]
]
'
);
@ -915,7 +915,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"]
]
'
);
@ -964,7 +964,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"]
]
'
);
@ -1466,7 +1466,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
'/input
[@type="hidden"]
[@name="name"]
[@class="my&class form-control"]
[@class="my&class"]
[@value="foo&bar"]
'
);