<commit_before>{% load crispy_forms_tags %}
{% load i18n %}
{% load hq_shared_tags %}
{% load djangular_tags %}

<div class="modal fade"
     id="createExportOptionsModal"
     ng-controller="DrilldownToFormController">
    <div class="modal-dialog">
        <form name="exportOptionsForm"
              class="form form-horizontal"
              ng-submit="handleSubmitForm()">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">
                        <span aria-hidden="true">&times;</span><span class="sr-only">{% trans 'Close' %}</span>
                    </button>
                    <h4 class="modal-title">{{ create_export_form_title }}</h4>
                </div>
                <div class="modal-body"
                     ng-show="!isLoaded">
                    <i class="fa fa-spinner fa-spin"></i> {% trans 'Loading Form' %}
                </div>
                <div class="modal-body"
                     ng-show="!showNoAppsError && !formLoadError && !!isLoaded && !isSubmittingForm">
                    <div class="alert alert-warning"
                         ng-show="!!formSubmissionError">
                        <i class="fa fa-exclamation-triangle"></i>
                        <strong ng-if="formSubmissionError === 'default'">
                            {% blocktrans %}
                                There was an issue fetching the export data.
                                Please check your internet connection.
                            {% endblocktrans %}
                        </strong>
                        <strong ng-if="formSubmissionError !== 'default'">
                            {% angularjs %}{{ formSubmissionError }}{% endangularjs %}
                        </strong>
                        <p>
                            If this problem persists,
                            please <a href="#modalReportIssue"
                                      data-toggle="modal">Report an Issue</a>.
                        </p>
                    </div>
                    {% crispy create_export_form %}
                    <div class="alert alert-info"
                         ng-show="hasNoCaseTypes && !!formData.application">
                        {% blocktrans %}
                            This application does not appear to be using
                            <a href="https://wiki.commcarehq.org/display/commcarepublic/Case+Management"
                               target="_blank"><i class="fa fa-info-circle"></i> case management</a>.
                        {% endblocktrans %}
                     </div>
                    <div class="alert alert-info"
                         ng-show="!_.isEmpty(selectedFormData)">
                        {% angularjs %}
                            {{ selectedFormData.submissions }}
                            {% blocktrans %}form submission<span ng-show="selectedFormData.submissions != 1">s</span> available.{% endblocktrans %}
                        {% endangularjs %}
                    </div>
                    <div class="alert alert-warning"
                         ng-show="formData.app_type === '_unknown' && !formData.form && !selectedFormData.app_copy">
                        <i class="fa fa-exclamation-triangle"></i>
                        {% trans "Mislabeled" %}
                    </div>
                    <div class="well"
                         ng-show="formData.app_type === '_unknown' && !formData.form && !selectedFormData.no_suggestions">
                        <h4>{% trans "Suggestions" %}:</h4>
                        <div ng-show="selectedFormData.app_does_not_exist">
                            {% trans "These form submissions are tagged as if they belong to an application that doesn't exist." %}
                        </div>
                        <div ng-show="selectedFormData.duplicate">
                            <p>{% trans "These submissions could belong to one of the following forms:" %}</p>
                            {% angularjs %}
                            <ul>
                                <li ng-repeat="possiblitly in selectedFormData.possibilities">
                                    {{ possibility.app.name }} &gt;
                                    <span ng-if="selectedFormData.is_user_registration">
                                        {% trans "User Registration" %}
                                    </span>
                                    <span ng-if="!selectedFormData.is_user_registration">
                                        {{ selectedFormData.name }}
                                    </span>
                                    <span ng-if="possiblity.app_deleted">
                                        {% trans "App was deleted." %}
                                    </span>
                                </li>
                            </ul>
                            {% endangularjs %}
                        </div>
                     </div>
                    {% if request.couch_user.can_edit_apps %}
                        <div class="well"
                             ng-show="formData.app_type === 'deleted' && !!formData.application">
                            {% angularjs %}
                                <h4>
                                    "{{ selectedAppData.name }}" {% trans "is a deleted Application." %}
                                </h4>
                                <p>
                                    <a class="btn btn-default"
                                       href="{{ selectedAppData.restoreUrl }}">{% trans "Restore App" %}</a>
                                </p>
                            {% endangularjs %}
                        </div>
                    {% endif %}
                </div>
                <div class="modal-body"
                     ng-show="!!isSubmittingForm">
                    <p class="lead">
                        <i class="fa fa-spinner fa-spin"></i>
                        {% blocktrans %}
                            Preparing Export Data...
                        {% endblocktrans %}
                    </p>
                    <p>
                        {% blocktrans %}
                            Please note that for some forms this may take several minutes.
                            Thank you for your patience!
                        {% endblocktrans %}
                    </p>
                </div>
                <div class="modal-body"
                     ng-show="!!formLoadError">
                    <div class="alert alert-warning">
                        <i class="fa fa-exclamation-triangle"></i>
                        <span ng-if="formLoadError === 'default'">
                            {% trans "There is an issue communicating with the server at this time." %}
                        </span>
                        <span ng-if="formLoadError !== 'default'">
                            {% angularjs %}{{ formLoadError }}{% endangularjs %}
                        </span>
                    </div>
                    <p>
                        {% blocktrans %}
                            If this problem persists, please <a href="#reportIssueModoal"
                                data-toggle="modal">Report an Issue</a> and include this error
                                message in the description.
                        {% endblocktrans %}
                    </p>
                    <p>
                        {% blocktrans %}
                            We apologize for the inconvenience, and thank you for your patience. Someone
                            on our development team is quickly working to resolve this issue.
                        {% endblocktrans %}
                    </p>
                </div>
                <div class="modal-body"
                     ng-show="!!showNoAppsError">
                    <p class="lead">
                    {% blocktrans %}
                        It seems as though you haven't submitted any data to CommCare HQ.
                        Please deploy an Application and submit data before creating any exports.
                    {% endblocktrans %}
                    </p>
                    <a href="https://confluence.dimagi.com/display/commcarepublic/Application+Building"
                       target="_blank">
                        <i class="fa fa-info-circle"></i>
                        {% trans 'How to Create and Deploy a CommCare Application.' %}
                    </a>
                 </div>
                <div class="modal-footer">
                    <button type="button"
                            class="btn btn-default"
                            data-dismiss="modal"
                            ng-disabled="!!isSubmittingForm">{% trans 'Cancel' %}</button>
                    <button type="submit"
                            class="btn btn-success"
                            ng-show="!showNoAppsError && !formLoadError"
                            ng-disabled="!!exportOptionsForm.$invalid || !!isSubmittingForm">
                        {% trans "Create Export" %}
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
<commit_msg>Make copy more vague<commit_after>{% load crispy_forms_tags %}
{% load i18n %}
{% load hq_shared_tags %}
{% load djangular_tags %}

<div class="modal fade"
     id="createExportOptionsModal"
     ng-controller="DrilldownToFormController">
    <div class="modal-dialog">
        <form name="exportOptionsForm"
              class="form form-horizontal"
              ng-submit="handleSubmitForm()">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">
                        <span aria-hidden="true">&times;</span><span class="sr-only">{% trans 'Close' %}</span>
                    </button>
                    <h4 class="modal-title">{{ create_export_form_title }}</h4>
                </div>
                <div class="modal-body"
                     ng-show="!isLoaded">
                    <i class="fa fa-spinner fa-spin"></i> {% trans 'Loading Form' %}
                </div>
                <div class="modal-body"
                     ng-show="!showNoAppsError && !formLoadError && !!isLoaded && !isSubmittingForm">
                    <div class="alert alert-warning"
                         ng-show="!!formSubmissionError">
                        <i class="fa fa-exclamation-triangle"></i>
                        <strong ng-if="formSubmissionError === 'default'">
                            {% blocktrans %}
                                There was an issue fetching the export data.
                                Please check your internet connection.
                            {% endblocktrans %}
                        </strong>
                        <strong ng-if="formSubmissionError !== 'default'">
                            {% angularjs %}{{ formSubmissionError }}{% endangularjs %}
                        </strong>
                        <p>
                            If this problem persists,
                            please <a href="#modalReportIssue"
                                      data-toggle="modal">Report an Issue</a>.
                        </p>
                    </div>
                    {% crispy create_export_form %}
                    <div class="alert alert-info"
                         ng-show="hasNoCaseTypes && !!formData.application">
                        {% blocktrans %}
                            This application does not appear to be using
                            <a href="https://wiki.commcarehq.org/display/commcarepublic/Case+Management"
                               target="_blank"><i class="fa fa-info-circle"></i> case management</a>.
                        {% endblocktrans %}
                     </div>
                    <div class="alert alert-info"
                         ng-show="!_.isEmpty(selectedFormData)">
                        {% angularjs %}
                            {{ selectedFormData.submissions }}
                            {% blocktrans %}form submission<span ng-show="selectedFormData.submissions != 1">s</span> available.{% endblocktrans %}
                        {% endangularjs %}
                    </div>
                    <div class="alert alert-warning"
                         ng-show="formData.app_type === '_unknown' && !formData.form && !selectedFormData.app_copy">
                        <i class="fa fa-exclamation-triangle"></i>
                        {% trans "Mislabeled" %}
                    </div>
                    <div class="well"
                         ng-show="formData.app_type === '_unknown' && !formData.form && !selectedFormData.no_suggestions">
                        <h4>{% trans "Suggestions" %}:</h4>
                        <div ng-show="selectedFormData.app_does_not_exist">
                            {% trans "These form submissions are tagged as if they belong to an application that doesn't exist." %}
                        </div>
                        <div ng-show="selectedFormData.duplicate">
                            <p>{% trans "These submissions could belong to one of the following forms:" %}</p>
                            {% angularjs %}
                            <ul>
                                <li ng-repeat="possiblitly in selectedFormData.possibilities">
                                    {{ possibility.app.name }} &gt;
                                    <span ng-if="selectedFormData.is_user_registration">
                                        {% trans "User Registration" %}
                                    </span>
                                    <span ng-if="!selectedFormData.is_user_registration">
                                        {{ selectedFormData.name }}
                                    </span>
                                    <span ng-if="possiblity.app_deleted">
                                        {% trans "App was deleted." %}
                                    </span>
                                </li>
                            </ul>
                            {% endangularjs %}
                        </div>
                     </div>
                    {% if request.couch_user.can_edit_apps %}
                        <div class="well"
                             ng-show="formData.app_type === 'deleted' && !!formData.application">
                            {% angularjs %}
                                <h4>
                                    "{{ selectedAppData.name }}" {% trans "is a deleted Application." %}
                                </h4>
                                <p>
                                    <a class="btn btn-default"
                                       href="{{ selectedAppData.restoreUrl }}">{% trans "Restore App" %}</a>
                                </p>
                            {% endangularjs %}
                        </div>
                    {% endif %}
                </div>
                <div class="modal-body"
                     ng-show="!!isSubmittingForm">
                    <p class="lead">
                        <i class="fa fa-spinner fa-spin"></i>
                        {% blocktrans %}
                            Preparing Export Data...
                        {% endblocktrans %}
                    </p>
                    <p>
                        {% blocktrans %}
                            Please note that this may take several minutes.
                            Thank you for your patience!
                        {% endblocktrans %}
                    </p>
                </div>
                <div class="modal-body"
                     ng-show="!!formLoadError">
                    <div class="alert alert-warning">
                        <i class="fa fa-exclamation-triangle"></i>
                        <span ng-if="formLoadError === 'default'">
                            {% trans "There is an issue communicating with the server at this time." %}
                        </span>
                        <span ng-if="formLoadError !== 'default'">
                            {% angularjs %}{{ formLoadError }}{% endangularjs %}
                        </span>
                    </div>
                    <p>
                        {% blocktrans %}
                            If this problem persists, please <a href="#reportIssueModoal"
                                data-toggle="modal">Report an Issue</a> and include this error
                                message in the description.
                        {% endblocktrans %}
                    </p>
                    <p>
                        {% blocktrans %}
                            We apologize for the inconvenience, and thank you for your patience. Someone
                            on our development team is quickly working to resolve this issue.
                        {% endblocktrans %}
                    </p>
                </div>
                <div class="modal-body"
                     ng-show="!!showNoAppsError">
                    <p class="lead">
                    {% blocktrans %}
                        It seems as though you haven't submitted any data to CommCare HQ.
                        Please deploy an Application and submit data before creating any exports.
                    {% endblocktrans %}
                    </p>
                    <a href="https://confluence.dimagi.com/display/commcarepublic/Application+Building"
                       target="_blank">
                        <i class="fa fa-info-circle"></i>
                        {% trans 'How to Create and Deploy a CommCare Application.' %}
                    </a>
                 </div>
                <div class="modal-footer">
                    <button type="button"
                            class="btn btn-default"
                            data-dismiss="modal"
                            ng-disabled="!!isSubmittingForm">{% trans 'Cancel' %}</button>
                    <button type="submit"
                            class="btn btn-success"
                            ng-show="!showNoAppsError && !formLoadError"
                            ng-disabled="!!exportOptionsForm.$invalid || !!isSubmittingForm">
                        {% trans "Create Export" %}
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>

{'fraction_non_alphanumeric': 0.10812253175365567, 'fraction_numerical': 0.0009606147934678194, 'mean_word_length': 0.9661105865071871, 'pattern_counts': {'":': 0, '<': 235, '<?xml version=': 0, '>': 235, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 38, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6964169', 'n_tokens_mistral': 4419, 'n_tokens_neox': 3912, 'n_words': 914}