init without trunk
This commit is contained in:
parent
ed24ac4994
commit
bb809e7233
14652 changed files with 177862 additions and 94817 deletions
67
app/Resources/views/default/form/theme.html.twig
Normal file
67
app/Resources/views/default/form/theme.html.twig
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{% use 'form_div_layout.html.twig' with
|
||||
choice_widget_collapsed as base_choice_widget_collapsed,
|
||||
checkbox_widget as base_checkbox_widget,
|
||||
radio_widget as base_radio_widget
|
||||
%}
|
||||
{% use 'bootstrap_3_layout.html.twig' %}
|
||||
|
||||
{% block choice_widget_collapsed -%}
|
||||
{% set attr = attr|merge({
|
||||
class: (attr.class|default('') ~ ' selectpicker')|trim,
|
||||
'data-style': attr['data-style']|default('btn-white'),
|
||||
'data-dropout': attr['data-dropout']|default('false')
|
||||
}) %}
|
||||
<div class="dropdown" data-toggle="dropdown">
|
||||
{{- block('base_choice_widget_collapsed') -}}
|
||||
</div>
|
||||
{%- endblock %}
|
||||
|
||||
{% block date_widget -%}
|
||||
{% set range = 0 %}
|
||||
{% for attrname, attrvalue in attr %}
|
||||
{% if attrname == 'data-range' %}
|
||||
{% set range = 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if range == 1 -%}
|
||||
{{- parent() -}}
|
||||
{%- else -%}
|
||||
{% set attr = attr|merge({class: (attr.class|default('') ~ ' datepicker')|trim}) -%}
|
||||
<div class="input-group">
|
||||
<label for="{{ id }}" class="input-group-addon"><i class="fa fa-calendar"></i></label>
|
||||
{{ parent() -}}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{%- endblock %}
|
||||
|
||||
{% block st_plain_date_widget -%}
|
||||
<div class="input-group">
|
||||
{{- block('form_widget_simple') -}}
|
||||
</div>
|
||||
{%- endblock %}
|
||||
|
||||
{% block checkbox_widget -%}
|
||||
{{- block('base_checkbox_widget') -}}
|
||||
{%- endblock checkbox_widget %}
|
||||
|
||||
{% block radio_widget -%}
|
||||
{{- block('base_radio_widget') -}}
|
||||
{%- endblock radio_widget %}
|
||||
|
||||
{% block datalist_widget -%}
|
||||
{% set attr = attr|merge({list: attr.list|default(id ~ '_list')}) -%}
|
||||
{{ block('form_widget_simple') -}}
|
||||
<datalist id="{{ id }}_list">
|
||||
{% for choice in choices %}
|
||||
<option value="{{ choice }}"></option>
|
||||
{% endfor %}
|
||||
</datalist>
|
||||
{%- endblock datalist_widget %}
|
||||
|
||||
{% block form_label -%}
|
||||
{%- if required -%}
|
||||
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' st-required')|trim}) -%}
|
||||
{%- endif -%}
|
||||
{{- parent() -}}
|
||||
{%- endblock form_label %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue