<commit_before>{% extends "cloudcare/base.html" %}
{% load i18n %}
{% load hq_shared_tags %}

{% block head %} {{ block.super }}
{% endblock %}

{% block js %} {{ block.super }}
    <script src="{% static 'hqwebapp/js/lib/jquery.textchange.min.js' %}"></script>
    <script src="{% static 'hqwebapp/js/lib/underscore-1.4.4.js' %}"></script>
<script type="text/javascript" src="{% static 'hqwebapp/js/lib/datatables-1.9/js/jquery.dataTables.min.js' %}"></script>

<script src="{% static 'hqwebapp/js/ui-element.js' %}"></script>
    <script src="{% static 'case/js/cheapxml.js' %}"></script>
    <script src="{% static 'case/js/casexml.js' %}"></script>
    <script src="{% static 'cloudcare/js/case-edit-form.js' %}"></script>
    <script src="{% static 'hqwebapp/js/lib/backbone.js' %}"></script>
    <script src="{% static 'cloudcare/js/util.js' %}"></script>
    <script src="{% static 'cloudcare/js/backbone/shared.js' %}"></script>
    <script src="{% static 'cloudcare/js/backbone/apps.js' %}"></script>
    <script src="{% static 'cloudcare/js/backbone/cases.js' %}"></script>
    <script src="{% static 'cloudcare/js/post.js' %}"></script>
    
    {# touchforms includes #}
    <script language="javascript" type="text/javascript" src="{% static 'hqwebapp/js/lib/jquery-ui/jquery-ui-1.8.16.min.js' %}"></script>
    <link rel="stylesheet" href="{% static 'hqwebapp/js/lib/jquery-ui/jquery-ui-redmond-1.8.16.css' %}">
    
    <script language="javascript" type="text/javascript" src="{% static 'formplayer/script/shortcut.js' %}"></script>
    <script language="javascript" type="text/javascript" src="{% static 'formplayer/script/xforgasm.js' %}?version={{app_version}}"></script>
    <script language="javascript" type="text/javascript" src="{% static 'formplayer/script/formnav-all.js' %}?version={{app_version}}"></script>
    <script language="javascript" type="text/javascript" src="{% static 'formplayer/script/entrycontrols_full.js' %}?version={{app_version}}"></script>
    <script language="javascript" type="text/javascript" src="{% static 'formplayer/script/fullform-ui.js' %}?version={{app_version}}"></script>

    <link rel="stylesheet" href="{% static 'formplayer/style/webforms.css' %}">
    <link rel="stylesheet" href="{% static 'cloudcare/css/cloudcare.css' %}">

{% endblock %}

{% block js-inline %} {{ block.super }}
<script>

    GMAPS_API_KEY = '{{ maps_api_key|safe }}'; // maps api is loaded on-demand

    $(function () {
        var urlRoot = "{% url "cloudcare_main" domain '' %}";
        var appUrlRoot = "{% url "cloudcare_get_apps" domain %}";
        var caseUrlRoot = "{% url "cloudcare_get_cases" domain %}";
        var submitUrlRoot = "{% url "receiver_post" domain %}";
        var sessionUrlRoot = "{% url "cloudcare_get_sessions" domain %}";
        var language = "{{ language }}";
        var apps = {{ apps|JSON }};
        var initialApp = {{ app|JSON }};
        var initialCase = {{ case|JSON }};
        window.mainView = new cloudCare.AppMainView({
			apps: apps,
			language: language,
			urlRoot: urlRoot,
			appUrlRoot: appUrlRoot,
			caseUrlRoot: caseUrlRoot,
			sessionUrlRoot: sessionUrlRoot,
			submitUrlRoot: submitUrlRoot,
			initialApp: initialApp,
			initialCase: initialCase
        });
        // TODO: when we figure out what to do about get params, use this
        Backbone.history.start({pushState: true, root: urlRoot});

        set_pin(30, $('#cloudcare-main'), $('#loading'));

        function enableOffline() {
            $('#debug-opts').show();
            $('#use-offline').attr('checked', 'checked');
        }
        var offlineEnabled = {{ offline_enabled|JSON }};
        if (offlineEnabled) {
            enableOffline();
        }

    }());

</script>
    <script>
        $(function() {
           window.onbeforeunload = function() {
               if (window.mainView.router.view.dirty) {
                   return "You have unsaved changes. To stay on the page, press cancel. To discard changes and leave the page, press OK";
               }
           }
        }())
    </script>
{% endblock %}

{% block sidebar %}
    <section id="app-main" >
        <nav id="app-list" ></nav>
        <nav id="module-list" ></nav><commit_msg>update unload text to match form navigation text<commit_after>{% extends "cloudcare/base.html" %}
{% load i18n %}
{% load hq_shared_tags %}

{% block head %} {{ block.super }}
{% endblock %}

{% block js %} {{ block.super }}
    <script src="{% static 'hqwebapp/js/lib/jquery.textchange.min.js' %}"></script>
    <script src="{% static 'hqwebapp/js/lib/underscore-1.4.4.js' %}"></script>
<script type="text/javascript" src="{% static 'hqwebapp/js/lib/datatables-1.9/js/jquery.dataTables.min.js' %}"></script>

<script src="{% static 'hqwebapp/js/ui-element.js' %}"></script>
    <script src="{% static 'case/js/cheapxml.js' %}"></script>
    <script src="{% static 'case/js/casexml.js' %}"></script>
    <script src="{% static 'cloudcare/js/case-edit-form.js' %}"></script>
    <script src="{% static 'hqwebapp/js/lib/backbone.js' %}"></script>
    <script src="{% static 'cloudcare/js/util.js' %}"></script>
    <script src="{% static 'cloudcare/js/backbone/shared.js' %}"></script>
    <script src="{% static 'cloudcare/js/backbone/apps.js' %}"></script>
    <script src="{% static 'cloudcare/js/backbone/cases.js' %}"></script>
    <script src="{% static 'cloudcare/js/post.js' %}"></script>
    
    {# touchforms includes #}
    <script language="javascript" type="text/javascript" src="{% static 'hqwebapp/js/lib/jquery-ui/jquery-ui-1.8.16.min.js' %}"></script>
    <link rel="stylesheet" href="{% static 'hqwebapp/js/lib/jquery-ui/jquery-ui-redmond-1.8.16.css' %}">
    
    <script language="javascript" type="text/javascript" src="{% static 'formplayer/script/shortcut.js' %}"></script>
    <script language="javascript" type="text/javascript" src="{% static 'formplayer/script/xforgasm.js' %}?version={{app_version}}"></script>
    <script language="javascript" type="text/javascript" src="{% static 'formplayer/script/formnav-all.js' %}?version={{app_version}}"></script>
    <script language="javascript" type="text/javascript" src="{% static 'formplayer/script/entrycontrols_full.js' %}?version={{app_version}}"></script>
    <script language="javascript" type="text/javascript" src="{% static 'formplayer/script/fullform-ui.js' %}?version={{app_version}}"></script>

    <link rel="stylesheet" href="{% static 'formplayer/style/webforms.css' %}">
    <link rel="stylesheet" href="{% static 'cloudcare/css/cloudcare.css' %}">

{% endblock %}

{% block js-inline %} {{ block.super }}
<script>

    GMAPS_API_KEY = '{{ maps_api_key|safe }}'; // maps api is loaded on-demand

    $(function () {
        var urlRoot = "{% url "cloudcare_main" domain '' %}";
        var appUrlRoot = "{% url "cloudcare_get_apps" domain %}";
        var caseUrlRoot = "{% url "cloudcare_get_cases" domain %}";
        var submitUrlRoot = "{% url "receiver_post" domain %}";
        var sessionUrlRoot = "{% url "cloudcare_get_sessions" domain %}";
        var language = "{{ language }}";
        var apps = {{ apps|JSON }};
        var initialApp = {{ app|JSON }};
        var initialCase = {{ case|JSON }};
        window.mainView = new cloudCare.AppMainView({
			apps: apps,
			language: language,
			urlRoot: urlRoot,
			appUrlRoot: appUrlRoot,
			caseUrlRoot: caseUrlRoot,
			sessionUrlRoot: sessionUrlRoot,
			submitUrlRoot: submitUrlRoot,
			initialApp: initialApp,
			initialCase: initialCase
        });
        // TODO: when we figure out what to do about get params, use this
        Backbone.history.start({pushState: true, root: urlRoot});

        set_pin(30, $('#cloudcare-main'), $('#loading'));

        function enableOffline() {
            $('#debug-opts').show();
            $('#use-offline').attr('checked', 'checked');
        }
        var offlineEnabled = {{ offline_enabled|JSON }};
        if (offlineEnabled) {
            enableOffline();
        }

    }());

</script>
    <script>
        $(function() {
           window.onbeforeunload = function() {
               if (window.mainView.router.view.dirty) {
                   return "You have not submitted this form. Click 'Cancel' to continue working on this form. If you click 'OK' you can resume work on this form later.";
               }
           }
        }())
    </script>
{% endblock %}

{% block sidebar %}
    <section id="app-main" >
        <nav id="app-list" ></nav>
        <nav id="module-list" ></nav>
{'fraction_non_alphanumeric': 0.1924475196434854, 'fraction_numerical': 0.003987334349712678, 'mean_word_length': 3.3311325545962416, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 103, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6718920', 'n_tokens_mistral': 2892, 'n_tokens_neox': 2696, 'n_words': 574}