<commit_before><!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>{% block title %}Phospr{% endblock %}</title>
        {% block stylesheets %}
            {% stylesheets
                'bundles/phosprcore/css/*'
                'http://fonts.googleapis.com/css?family=Norican'
                'http://fonts.googleapis.com/css?family=Oxygen:400,300,700|Aladin|Eagle+Lake'
                'https://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css'
                filter='cssrewrite' %}
                    <link rel="stylesheet" href="{{ asset_url }}" />
            {% endstylesheets %}
        {% endblock %}
        <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="//code.jquery.com/jquery-1.10.2.js"></script>
        <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
    </head>
    <body>
        <div id="dynamicMasthead" class="masthead main section">
            <div class="inner">
                <div class="logo"><a href="{{ path('_homepage') }}">Phospr</a></div>
            </div><!-- .inner -->
        </div><!-- #dynamicMasthead.masthead.main.section -->
        <div class="breadcrumbs main section">
            <div class="inner">
                {% block breadcrumbs %}{{ wo_render_breadcrumbs() }}{% endblock %}
            </div><!-- .inner -->
        </div><!-- .breadcrumbs.main.section -->
        <div id="content" class="main section">
            <div class="inner">
                {% block content %}{% endblock %}
            </div><!-- .inner -->
        </div><!-- #content.main.section -->
        <div id="footer" class="main section">
            <div class="inner">
                {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
                    <p>
                        Logged in as <strong>{{ app.user.username }}</strong>.
                        <a href="{{ path('fos_user_security_logout') }}">Log out</a>
                    </p>
                    <p>Current organization: <strong>{{ organization_handler.organization.name }}</strong>.</p>
                {% endif %}
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus risus libero, luctus eu lectus sed, viverra convallis leo.</p>
                <p>Sed ac convallis erat, nec viverra leo. Suspendisse auctor lobortis ante, euismod rhoncus magna feugiat a.</p>
                <p>Suspendisse mi mauris, euismod id enim vel, rutrum volutpat nulla.</p>
                <p>Donec vehicula diam quis facilisis ultricies. In convallis ligula ac scelerisque egestas. Nunc et posuere ante. Pellentesque eleifend sodales lectus eu lobortis.</p>
            </div><!-- .inner -->
        </div><!-- #footer.main.section -->
        {% block javascripts %}{% endblock %}
<script>
    $(function() {
        $.ajax({
            url: "/vendor.json",
            dataType: "json",
            success: function(data) {
                $(".vendor_selector").autocomplete({
                    delay: 0,
                    source: data,
                    minlength: 0,
                    select: function(event, ui)
                    {
                        $("#simple_journal_description").val(
                            ui.item.defaultJournalDescription
                        );
                        $("#simple_journal_offsetAccount").val(
                            ui.item.defaultOffsetAccount
                        );
                        $("#simple_journal_description").val(
                            ui.item.defaultJournalDescription
                        );
                        $("#simple_journal_creditAmount").val(
                            ui.item.defaultJournalCreditAmount
                        );
                        $("#simple_journal_debitAmount").val(
                            ui.item.defaultJournalDebitAmount
                        );
                    }
                });
            }
        });

        $.ajax({
            url: "/accounts.json",
            dataType: "json",
            success: function(data) {
                $(".account_selector").autocomplete({
                    delay: 0,
                    source: data,
                    minlength: 0
                });
            }
        });
    });
    </script>
    </body>
</html><commit_msg>Now only loading autoload ajax if user is logged in (fixes Phospr/Phospr#10)<commit_after><!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>{% block title %}Phospr{% endblock %}</title>
        {% block stylesheets %}
            {% stylesheets
                'bundles/phosprcore/css/*'
                'http://fonts.googleapis.com/css?family=Norican'
                'http://fonts.googleapis.com/css?family=Oxygen:400,300,700|Aladin|Eagle+Lake'
                'https://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css'
                filter='cssrewrite' %}
                    <link rel="stylesheet" href="{{ asset_url }}" />
            {% endstylesheets %}
        {% endblock %}
        <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="//code.jquery.com/jquery-1.10.2.js"></script>
        <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
    </head>
    <body>
        <div id="dynamicMasthead" class="masthead main section">
            <div class="inner">
                <div class="logo"><a href="{{ path('_homepage') }}">Phospr</a></div>
            </div><!-- .inner -->
        </div><!-- #dynamicMasthead.masthead.main.section -->
        <div class="breadcrumbs main section">
            <div class="inner">
                {% block breadcrumbs %}{{ wo_render_breadcrumbs() }}{% endblock %}
            </div><!-- .inner -->
        </div><!-- .breadcrumbs.main.section -->
        <div id="content" class="main section">
            <div class="inner">
                {% block content %}{% endblock %}
            </div><!-- .inner -->
        </div><!-- #content.main.section -->
        <div id="footer" class="main section">
            <div class="inner">
                {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
                    <p>
                        Logged in as <strong>{{ app.user.username }}</strong>.
                        <a href="{{ path('fos_user_security_logout') }}">Log out</a>
                    </p>
                    <p>Current organization: <strong>{{ organization_handler.organization.name }}</strong>.</p>
                {% endif %}
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus risus libero, luctus eu lectus sed, viverra convallis leo.</p>
                <p>Sed ac convallis erat, nec viverra leo. Suspendisse auctor lobortis ante, euismod rhoncus magna feugiat a.</p>
                <p>Suspendisse mi mauris, euismod id enim vel, rutrum volutpat nulla.</p>
                <p>Donec vehicula diam quis facilisis ultricies. In convallis ligula ac scelerisque egestas. Nunc et posuere ante. Pellentesque eleifend sodales lectus eu lobortis.</p>
            </div><!-- .inner -->
        </div><!-- #footer.main.section -->
        {% block javascripts %}{% endblock %}
        {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
            <script>
                $(function() {
                    $.ajax({
                        url: "/vendor.json",
                        dataType: "json",
                        success: function(data) {
                            $(".vendor_selector").autocomplete({
                                delay: 0,
                                source: data,
                                minlength: 0,
                                select: function(event, ui)
                                {
                                    $("#simple_journal_description").val(
                                        ui.item.defaultJournalDescription
                                    );
                                    $("#simple_journal_offsetAccount").val(
                                        ui.item.defaultOffsetAccount
                                    );
                                    $("#simple_journal_description").val(
                                        ui.item.defaultJournalDescription
                                    );
                                    $("#simple_journal_creditAmount").val(
                                        ui.item.defaultJournalCreditAmount
                                    );
                                    $("#simple_journal_debitAmount").val(
                                        ui.item.defaultJournalDebitAmount
                                    );
                                }
                            });
                        }
                    });

                    $.ajax({
                        url: "/accounts.json",
                        dataType: "json",
                        success: function(data) {
                            $(".account_selector").autocomplete({
                                delay: 0,
                                source: data,
                                minlength: 0
                            });
                        }
                    });
                });
            </script>
        {% endif %}
    </body>
</html>
{'fraction_non_alphanumeric': 0.1378299120234604, 'fraction_numerical': 0.005865102639296188, 'mean_word_length': 1.2553141237600378, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 0, '>': 133, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 17, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6322155', 'n_tokens_mistral': 2648, 'n_tokens_neox': 2433, 'n_words': 473}