Fix HTML errors.

Range and color do not support "required" attribute
This commit is contained in:
Tobias Nyholm 2018-02-27 10:04:56 +01:00
parent cd5f4105a4
commit f75d8c1985
No known key found for this signature in database
GPG Key ID: B14C3A029D1831F6

View File

@ -10,6 +10,10 @@
{%- block form_widget_simple -%}
{%- set type = type|default('text') -%}
{%- if type == 'range' or type == 'color' -%}
{# Attribute "required" is not supported #}
{%- set required = false -%}
{%- endif -%}
<input type="{{ type }}" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/>
{%- endblock form_widget_simple -%}