{% for subwidget in widget.subwidgets %}
    {% if forloop.first %}
        {% include subwidget.template_name with widget=subwidget %}
        <button class="btn btn-default" type="button" 
            onclick="send_verification_code('{{ subwidget.attrs.id }}', '{{ send_url|escapejs }}', '{{ sent_message|escapejs }}')">
            {{ send_label }}
        </button>
    {% else %}
        <div class="input-group">
            <span class="input-group-addon">{{ code_label }}:</span>
            {% include subwidget.template_name with widget=subwidget %}
        </div>
    {% endif %}
{% endfor %}
