|
@@ -62,8 +62,12 @@
|
|
|
|
|
|
{% block text_field %}
|
|
|
{% spaceless %}
|
|
|
- {#{% set attr.maxlength = attr.maxlength|default(field.maxlength) %}#}
|
|
|
- <input type="text" {{ block('field_attributes') }} value="{{ field.displayedData }}" />
|
|
|
+ {% if attr.type is defined and attr.type != "text" %}
|
|
|
+ <input {{ block('field_attributes') }} value="{{ field.displayedData }}" />
|
|
|
+ {% else %}
|
|
|
+ {#{% set attr.maxlength = attr.maxlength|default(field.maxlength) %}#}
|
|
|
+ <input type="text" {{ block('field_attributes') }} value="{{ field.displayedData }}" />
|
|
|
+ {% endif %}
|
|
|
{% endspaceless %}
|
|
|
{% endblock text_field %}
|
|
|
|
|
@@ -144,7 +148,7 @@
|
|
|
|
|
|
{% block date_field %}
|
|
|
{% spaceless %}
|
|
|
- {% if field.isfield %}
|
|
|
+ {% if field.isField %}
|
|
|
{{ block('text_field') }}
|
|
|
{% else %}
|
|
|
{{ field.pattern|replace({ '{{ year }}': form_field(field.year), '{{ month }}': form_field(field.month), '{{ day }}': form_field(field.day) })|raw }}
|
|
@@ -155,24 +159,33 @@
|
|
|
{% block time_field %}
|
|
|
{% spaceless %}
|
|
|
{# TODO the next line should be set attr.size = 1, but that's not supported yet by Twig #}
|
|
|
- {% if field.isfield %}{% set attr = { 'size': 1 } %}{% endif %}
|
|
|
+ {% if field.isField %}{% set attr = { 'size': 1 } %}{% endif %}
|
|
|
{{ form_field(field.hour, attr) }}:{{ form_field(field.minute, attr) }}{% if field.isWithSeconds %}:{{ form_field(field.second, attr) }}{% endif %}
|
|
|
{% endspaceless %}
|
|
|
{% endblock time_field %}
|
|
|
|
|
|
{% block number_field %}
|
|
|
{% spaceless %}
|
|
|
- <input type="text" {{ block('field_attributes') }} value="{{ field.displayedData }}" />
|
|
|
+ {# TODO the next line should be set attr.type = 'number', but that's not supported yet by Twig #}
|
|
|
+ {% set attr = { 'type': 'number' } %}
|
|
|
+ {{ block('text_field') }}
|
|
|
{% endspaceless %}
|
|
|
{% endblock number_field %}
|
|
|
|
|
|
{% block money_field %}
|
|
|
{% spaceless %}
|
|
|
- {% set widget %}{{ block('number_field') }}{% endset %}
|
|
|
- {{ field.pattern|replace({ '{{ widget }}': widget })|raw }}
|
|
|
+ {{ field.pattern|replace({ '{{ widget }}': block('number_field') })|raw }}
|
|
|
{% endspaceless %}
|
|
|
{% endblock money_field %}
|
|
|
|
|
|
+{% block url_field %}
|
|
|
+{% spaceless %}
|
|
|
+ {# TODO the next line should be set attr.type = 'url', but that's not supported yet by Twig #}
|
|
|
+ {% set attr = { 'type': 'url' } %}
|
|
|
+ {{ block('text_field') }}
|
|
|
+{% endspaceless %}
|
|
|
+{% endblock url_field %}
|
|
|
+
|
|
|
{% block percent_field %}
|
|
|
{% spaceless %}
|
|
|
{{ block('text_field') }} %
|