{% load i18n %}
{% load cradmin_tags %}

<div id="id_cradmin_modelmultichoicefieldwrapper_{{ fieldname }}"
        django-cradmin-model-choice-field-wrapper="{{ selectview_url }}"
        class="django-cradmin-modelmultichoicefield-wrapper">

    {% block input %}
        <input type="{{ rendered_input_type }}" value="{{ fieldvalue }}"
               id="{{ fieldid }}" name="{{ fieldname }}"
               django-cradmin-model-choice-field-input>
    {% endblock input %}

    {% block preview %}
        {% cradmin_render_renderable preview_list %}
    {% endblock preview %}

    {% block selectbutton %}
        <button class="btn btn-default" type="button"
                django-cradmin-model-choice-field-changebegin-button>
            {{ selectbutton_text }}
        </button>
    {% endblock selectbutton %}
</div>
