{#
    MetaTagPreset form Macro

    @author Elze Kool <info@visualmedia.nl>
#}
{% macro meta_tag_preset_widget(meta_tag_preset_form, data_fields) %}
    <div class="row meta-tag-preset">
        <div class="col-sm-1">
            <div class="form-group text-center">
                <label>&nbsp;</label><br />
                <button data-confirm="{{ 'meta_tag_preset.verwijder.confirm'|trans({}, 'forms') }}" type="button" class="btn btn-sm btn-danger js-meta-tag-preset-del"><i class="glyphicon glyphicon-minus-sign"></i></button>
            </div>
        </div>
        <div class="col-sm-11">
            <div class="row">
                <div class="col-sm-8">
                    {{ form_row(meta_tag_preset_form.titel) }}
                </div>
                <div class="col-sm-3">
                    {{ form_row(meta_tag_preset_form.type) }}
                </div>
            </div>
            <br />
            <div class="row">
                <div class="col-sm-5">
                    <div class="row">
                        <div class="col-sm-12">
                            <div data-select-update="{{ meta_tag_preset_form.type.vars.id }}" data-select-value="meta-tag">
                                {{ form_row(meta_tag_preset_form.naam) }}
                            </div>
                            <div class="form-group">
                                {{ form_label(meta_tag_preset_form.inhoud) }}
                                <label class="checkbox">
                                    {{ meta_tag_preset_form.inhoudIsExpression.vars.label|trans({}, 'forms') }}{{ form_widget(meta_tag_preset_form.inhoudIsExpression, { attr : { 'data-toggle-codemirror' : meta_tag_preset_form.inhoud.vars.id } }) }}
                                </label>
                                {{ form_widget(meta_tag_preset_form.inhoud) }}
                                <div class="errors">{{ form_errors(meta_tag_preset_form.inhoud) }}</div>
                                <div class="help-block" data-show-on="{{ meta_tag_preset_form.inhoudIsExpression.vars.id }}">
                                    {{ render(url('manage_meta_tag_available_fields')) }}
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-12">{{ form_row(meta_tag_preset_form.inhoudWijzigbaar) }}</div>
                    </div>
                </div>
                <div class="col-sm-1">&nbsp;</div>
                <div class="col-sm-5">
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group">
                                {{ form_label(meta_tag_preset_form.zichtbaar) }}

                                <label class="checkbox">
                                    {{ meta_tag_preset_form.zichtbaarIsExpression.vars.label|trans({}, 'forms') }}{{ form_widget(meta_tag_preset_form.zichtbaarIsExpression, { attr : { 'data-toggle-codemirror' : meta_tag_preset_form.zichtbaar.vars.id } }) }}
                                </label>

                                <div data-show-on="{{ meta_tag_preset_form.zichtbaarIsExpression.vars.id }}">
                                    {{ form_widget(meta_tag_preset_form.zichtbaar) }}
                                    <div class="errors">{{ form_errors(meta_tag_preset_form.zichtbaar) }}</div>
                                    <div class="help-block" data-show-on="{{ meta_tag_preset_form.zichtbaarIsExpression.vars.id }}">
                                        {{ render(url('manage_meta_tag_available_fields')) }}
                                    </div>
                                </div>

                                <div data-hide-on="{{ meta_tag_preset_form.zichtbaarIsExpression.vars.id }}">
                                    {{ form_widget(meta_tag_preset_form.zichtbaarSelect) }}
                                </div>

                            </div>
                        </div>
                        <div class="col-sm-12">{{ form_row(meta_tag_preset_form.zichtbaarWijzigbaar) }}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endmacro %}