<commit_before>{% load i18n bootstrap3 formset_tags %}

<div class="address_formset_wrapper" id="addresses">
    <div class="formset" data-formset-prefix="{{ formset.prefix }}">
        {{ formset.management_form }}

        <div data-formset-body>
            <!-- New forms will be inserted in here -->
            {% for form in formset %}
                <div data-formset-form>
                    {% for field in form.hidden_fields %}
                        {{ field }}
                    {% endfor %}
                    <div class="form-group">
                        {% bootstrap_field form.street layout="horizontal" form_group_class="form-group-inline" %}
                        {% bootstrap_field form.street_number layout="horizontal" form_group_class="form-group-inline" field_class="col-md-2" label_class="hidden" %}
                        {% bootstrap_field form.complement layout="horizontal" form_group_class="form-group-inline" field_class="col-md-1" label_class="hidden" %}

                        {% if formset.can_delete %}
                            <div class="col-md-1">
                                <a href="javascript:void(0)" data-formset-undo-delete class="btn btn-sm default hidden" title="{% trans 'Undo the deletion of this row' %}">
                                    <i class="fa fa-undo"></i>
                                </a>
                                <a href="javascript:void(0)" data-formset-delete-button class="btn btn-sm default" title="{% trans 'Delete this row' %}">
                                    <i class="fa fa-trash"></i>
                                </a>
                                {% bootstrap_field form.DELETE form_group_class="form-group-inline hidden" %}
                            </div>
                        {% endif %}
                    </div>
                    <div class="form-group">
                        {% bootstrap_field form.postal_code layout="horizontal" form_group_class="form-group-inline" field_class="col-md-4 col-md-offset-2" label_class="hidden" %}
                        {% bootstrap_field form.city layout="horizontal" form_group_class="form-group-inline" field_class="col-md-3" label_class="hidden" %}
                    </div>
                    <div class="form-group">
                        {% bootstrap_field form.country layout="horizontal" form_group_class="form-group-inline" field_class="col-md-4 col-md-offset-2" label_class="hidden" %}
                        {% bootstrap_field form.type layout="horizontal" form_group_class="form-group-inline" field_class="col-md-3" label_class="hidden" %}
                    </div>
                </div>
            {% endfor %}
        </div>
         <div class="form-group add-link">
             <label class="col-md-2 control-label{% if formset|length %} hide{% endif %}">
                 {{ formset.empty_form.street.label }}
             </label>
             <div class="col-md-10 {% if formset|length %} col-md-offset-2{% else %} form-control-static{% endif %}">
                 <a href="javascript:void(0)" data-formset-add>{% trans 'Add an address' %}</a>
             </div>
         </div>
        <!-- The empty form template. By wrapping this in a <script> tag, the __prefix__ placeholder can easily be replaced in both attributes and any scripts -->
        <script type="form-template" data-formset-empty-form>
            <div data-formset-form>
                <div class="form-group">
                    {% bootstrap_field formset.empty_form.street layout="horizontal" form_group_class="form-group-inline" %}
                    {% bootstrap_field formset.empty_form.street_number layout="horizontal" form_group_class="form-group-inline" field_class="col-md-2" label_class="hidden" %}
                    {% bootstrap_field formset.empty_form.complement layout="horizontal" form_group_class="form-group-inline" field_class="col-md-2" label_class="hidden" %}

                    <div class="col-md-1">
                        <a href="javascript:void(0)" data-formset-undo-delete class="btn btn-sm default hidden" title="{% trans 'Undo the deletion of this row' %}">
                            <i class="fa fa-undo"></i>
                        </a>
                        <a href="javascript:void(0)" data-formset-delete-button class="btn btn-sm default" title="{% trans 'Delete this row' %}">
                            <i class="fa fa-trash"></i>
                        </a>
                        {% bootstrap_field formset.empty_form.DELETE form_group_class="form-group-inline hidden" %}
                    </div>
                </div>
                <div class="form-group">
                    {% bootstrap_field formset.empty_form.postal_code layout="horizontal" form_group_class="form-group-inline" field_class="col-md-4 col-md-offset-2" label_class="hidden" %}
                    {% bootstrap_field formset.empty_form.city layout="horizontal" form_group_class="form-group-inline" label_class="hidden" %}
                </div>
                <div class="form-group">
                    {% bootstrap_field formset.empty_form.country layout="horizontal" form_group_class="form-group-inline" field_class="col-md-4 col-md-offset-2" label_class="hidden" %}
                    {% bootstrap_field formset.empty_form.type layout="horizontal" form_group_class="form-group-inline" label_class="hidden" %}
                </div>
            </div>
        </script>
    </div>
</div><commit_msg>LILY-735: Moved address delete button to bottom of formset<commit_after>{% load i18n bootstrap3 formset_tags %}

<div class="address_formset_wrapper" id="addresses">
    <div class="formset" data-formset-prefix="{{ formset.prefix }}">
        {{ formset.management_form }}

        <div data-formset-body>
            <!-- New forms will be inserted in here -->
            {% for form in formset %}
                <div data-formset-form>
                    {% for field in form.hidden_fields %}
                        {{ field }}
                    {% endfor %}
                    <div class="form-group">
                        {% bootstrap_field form.street layout="horizontal" form_group_class="form-group-inline" %}
                        {% bootstrap_field form.street_number layout="horizontal" form_group_class="form-group-inline" field_class="col-md-2" label_class="hidden" %}
                        {% bootstrap_field form.complement layout="horizontal" form_group_class="form-group-inline" field_class="col-md-1" label_class="hidden" %}
                    </div>
                    <div class="form-group">
                        {% bootstrap_field form.postal_code layout="horizontal" form_group_class="form-group-inline" field_class="col-md-4 col-md-offset-2" label_class="hidden" %}
                        {% bootstrap_field form.city layout="horizontal" form_group_class="form-group-inline" field_class="col-md-3" label_class="hidden" %}
                    </div>
                    <div class="form-group">
                        {% bootstrap_field form.country layout="horizontal" form_group_class="form-group-inline" field_class="col-md-4 col-md-offset-2" label_class="hidden" %}
                        {% bootstrap_field form.type layout="horizontal" form_group_class="form-group-inline" field_class="col-md-3" label_class="hidden" %}

                        {% if formset.can_delete %}
                            <div class="col-md-1">
                                <a href="javascript:void(0)" data-formset-undo-delete class="btn btn-sm default hidden" title="{% trans 'Undo the deletion of this row' %}">
                                    <i class="fa fa-undo"></i>
                                </a>
                                <a href="javascript:void(0)" data-formset-delete-button class="btn btn-sm default" title="{% trans 'Delete this row' %}">
                                    <i class="fa fa-trash"></i>
                                </a>
                                {% bootstrap_field form.DELETE form_group_class="form-group-inline hidden" %}
                            </div>
                        {% endif %}
                    </div>
                </div>
            {% endfor %}
        </div>
         <div class="form-group add-link">
             <label class="col-md-2 control-label{% if formset|length %} hide{% endif %}">
                 {{ formset.empty_form.street.label }}
             </label>
             <div class="col-md-10 {% if formset|length %} col-md-offset-2{% else %} form-control-static{% endif %}">
                 <a href="javascript:void(0)" data-formset-add>{% trans 'Add an address' %}</a>
             </div>
         </div>
        <!-- The empty form template. By wrapping this in a <script> tag, the __prefix__ placeholder can easily be replaced in both attributes and any scripts -->
        <script type="form-template" data-formset-empty-form>
            <div data-formset-form>
                <div class="form-group">
                    {% bootstrap_field formset.empty_form.street layout="horizontal" form_group_class="form-group-inline" %}
                    {% bootstrap_field formset.empty_form.street_number layout="horizontal" form_group_class="form-group-inline" field_class="col-md-2" label_class="hidden" %}
                    {% bootstrap_field formset.empty_form.complement layout="horizontal" form_group_class="form-group-inline" field_class="col-md-2" label_class="hidden" %}
                </div>
                <div class="form-group">
                    {% bootstrap_field formset.empty_form.postal_code layout="horizontal" form_group_class="form-group-inline" field_class="col-md-4 col-md-offset-2" label_class="hidden" %}
                    {% bootstrap_field formset.empty_form.city layout="horizontal" form_group_class="form-group-inline" label_class="hidden" %}
                </div>
                <div class="form-group">
                    {% bootstrap_field formset.empty_form.country layout="horizontal" form_group_class="form-group-inline" field_class="col-md-4 col-md-offset-2" label_class="hidden" %}
                    {% bootstrap_field formset.empty_form.type layout="horizontal" form_group_class="form-group-inline" label_class="hidden" %}
                    <div class="col-md-1">
                        <a href="javascript:void(0)" data-formset-undo-delete class="btn btn-sm default hidden" title="{% trans 'Undo the deletion of this row' %}">
                            <i class="fa fa-undo"></i>
                        </a>
                        <a href="javascript:void(0)" data-formset-delete-button class="btn btn-sm default" title="{% trans 'Delete this row' %}">
                            <i class="fa fa-trash"></i>
                        </a>
                        {% bootstrap_field formset.empty_form.DELETE form_group_class="form-group-inline hidden" %}
                    </div>
                </div>
            </div>
        </script>
    </div>
</div>
{'fraction_non_alphanumeric': 0.1327177258736194, 'fraction_numerical': 0.005341300018106102, 'mean_word_length': 1.852310870126517, 'pattern_counts': {'":': 0, '<': 113, '<?xml version=': 0, '>': 113, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1077529', 'n_tokens_mistral': 3146, 'n_tokens_neox': 2857, 'n_words': 577}