close#314 - checkbox label is inline

This commit is contained in:
Marc Ducobu 2014-11-17 09:36:56 +01:00
parent 22818c01a3
commit 8030c51897
3 changed files with 19 additions and 84 deletions

View File

@ -2730,7 +2730,7 @@ input, label, select {
font-size: $form-font-size; */ }
label.inline {
display: inline-block; }
display: inline; }
label {
font-weight: bold;

File diff suppressed because one or more lines are too long

View File

@ -24,47 +24,36 @@
{{ form_errors(form) }}
</div>
{% endspaceless %}
{% endblock form_row %}
{% block choice_widget_collapsed %}
<div class="picker">
{% spaceless %}
{% if required and empty_value is none and not empty_value_in_choices %}
{% set required = false %}
{% endif %}
<select {{ block('widget_attributes') }}{% if multiple %} multiple="multiple"{% endif %}>
{% if empty_value is not none %}
<option value=""{% if required and value is empty %} selected="selected"{% endif %}>{{ empty_value|trans({}, translation_domain) }}</option>
{% endif %}
{% if preferred_choices|length > 0 %}
{% set options = preferred_choices %}
{{ block('choice_widget_options') }}
{% if choices|length > 0 and separator is not none %}
<option disabled="disabled">{{ separator }}</option>
{% endif %}
{% endif %}
{% set options = choices %}
{{ block('choice_widget_options') }}
</select>
{% endspaceless %}
</div>
{% endblock choice_widget_collapsed %}
{% endblock form_row %}
{% block choice_widget_expanded %}
{% spaceless %}
<div {{ block('widget_container_attributes') }}>
{% for child in form %}
{{ form_widget(child) }}
{{ form_label(child, '', {'label_attr': { 'class' : 'inline radio'} }) }}
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
{% endfor %}
</div>
{% endspaceless %}
{% endblock choice_widget_expanded %}
{% block choice_with_other_widget %}
{% spaceless %}
{% for child in form._choices %}
<div class="blop">
{{ form_widget(child) }}
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
</div>
{% endfor %}
{{ form_widget(form._choices) }}
{{ form_widget(form._other) }}
{% endspaceless %}
{% endblock choice_with_other_widget %}
{% block date_widget %}
{% spaceless %}
{% if widget == 'single_text' %}
{% set attr = {'class' : 'input wide datepicker'} %}
{% set attr = {'class' : 'input datepicker'} %}
{{ block('form_widget_simple') }}
{% else %}
<div {{ block('widget_container_attributes') }}>
@ -77,33 +66,6 @@
{% endif %}
{% endspaceless %}
{% endblock date_widget %}
{% block form_label %}
{% spaceless %}
{% if label is not sameas(false) %}
{% if not compound %}
{% set label_attr = label_attr|merge({'for': id}) %}
{% endif %}
{% if required %}
{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
{% endif %}
{% if label is empty %}
{% set label = name|humanize %}
{% endif %}
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>{{ label|trans({}, translation_domain) }}</label>
{% endif %}
{% endspaceless %}
{% endblock form_label %}
{% block belgian_national_number_widget %}
{% spaceless %}
{{ form_widget(form.inversed_date, { 'attr': { 'class': 'input belgian_national_number_inversed_date' } } ) }}
{{ form_widget(form.daily_counter, { 'attr': { 'class': 'input belgian_national_number_daily_counter' } } ) }}
{{ form_widget(form.control_digit, { 'attr': { 'class': 'input belgian_national_number_control_digit' } } ) }}
{% endspaceless %}
{% endblock %}
{% block form_errors %}
{% spaceless %}
@ -115,31 +77,4 @@
</ul>
{% endif %}
{% endspaceless %}
{% endblock form_errors %}
{#
{% block widget_attributes %}
{% spaceless %}
{% set class_added = false %}
{% if gumby_class_wide is not defined %}
{% set gumby_class_wide = 'normal' %}
{% endif %}
{% set gumby_class_input = 'input' %}
id="{{ id }}" name="{{ full_name }}"{% if read_only %} readonly="readonly"{% endif %}{% if disabled %} disabled="disabled"{% endif %}{% if required %} required="required"{% endif %}{% if max_length %} maxlength="{{ max_length }}"{% endif %}{% if pattern %} pattern="{{ pattern }}"{% endif %}
{% for attrname, attrvalue in attr %}
{% if attrname in ['placeholder', 'title'] %}{{ attrname }}="{{ attrvalue|trans({}, translation_domain) }}"
class="{{ gumby_class_input }} {{gumby_class_wide}} {{attrvalue}}" {% set class_added = true %}
{% else %}{{ attrname }}="{{ attrvalue }}"
{% endif %}
{% endfor %}
{% if class_added == false %}
class="{{ gumby_class_input }} {{gumby_class_wide}}"
{% endif %}
{% endspaceless %}
{% endblock widget_attributes %}
#}
{% endblock form_errors %}