{% extends 'bootstrap_3_horizontal_layout.html.twig' %}

{% block form_help -%}
    {% for attrname, attrvalue in attr %}
        {% if attrname == 'help' %}
            <span class="help-block">{{ attrvalue }}</span>
        {% endif %}
    {% endfor %}
{%- endblock form_help %}

{% block form_errors -%}
    {{ parent() }}
    {{- block('form_help') -}}
{%- endblock form_errors %}

{%- block widget_attributes -%}
    {% set tmp = false %}
    {% if attr.help is defined %}
        {% set tmp = attr.help %}
        {% set attr = attr|merge({help: false}) %}
    {% endif %}
    {{ parent() }}
    {% if tmp != false %}
        {% set attr = attr|merge({help: tmp}) %}
    {% endif %}
{%- endblock widget_attributes -%}

{%- block cmfcmfmediamodule_font_choice_widget -%}
    {{ pageAddAsset('stylesheet', fontUrl) }}
    {{ block('choice_widget') }}
    <script type="text/javascript">
        // Using JavaScript here is extremely ugly. Oh well..
        (function ($) {
            $('#{{ id|e('js') }}').find('.radio label').each(function () {
                var font = $(this).text();
                $(this).css({'font-family': font});
            });
        })(jQuery);
    </script>
{%- endblock -%}

{% extends 'bootstrap_3_horizontal_layout.html.twig' %}

{% block form_help -%}
    {% for attrname, attrvalue in attr %}
        {% if attrname == 'help' %}
            <span class="help-block">{{ attrvalue }}</span>
        {% endif %}
    {% endfor %}
{%- endblock form_help %}

{% block form_errors -%}
    {{ parent() }}
    {{- block('form_help') -}}
{%- endblock form_errors %}

{%- block widget_attributes -%}
    {% set tmp = false %}
    {% if attr.help is defined %}
        {% set tmp = attr.help %}
        {% set attr = attr|merge({help: false}) %}
    {% endif %}
    {{ parent() }}
    {% if tmp != false %}
        {% set attr = attr|merge({help: tmp}) %}
    {% endif %}
{%- endblock widget_attributes -%}

{%- block cmfcmfmediamodule_font_choice_widget -%}
    {{ pageAddAsset('stylesheet', fontUrl) }}
    {{ block('choice_widget') }}
    <script type="text/javascript">
        // Using JavaScript here is extremely ugly. Oh well..
        (function ($) {
            $('#{{ id|e('js') }}').find('.radio label').each(function () {
                var font = $(this).text();
                console.log(font);
                $(this).css({'font-family': "'" + font + "'"});
            });
        })(jQuery);
    </script>
{%- endblock -%}

Make it work for all the fonts.
Make it work for all the fonts.
