<commit_before>{% extends 'base.html.twig' %}
{% form_theme form 'bootstrap_3_horizontal_layout.html.twig' %}

{% block body %}

    <div class="inner-page">
        <div class="container">
            <h2><strong>{{ 'user.settings.header'|trans }}</strong></h2>

            <div class="row">
                <div class="col-md-4 col-md-push-8 col-sm-6 col-sm-push-6">
                    <div class="well br-white border-orange black">
                        {{ 'user.settings.intro'|trans }}
                    </div>
                </div>

                <div class="col-md-8 col-md-pull-4 col-sm-6 col-sm-pull-6">
                    <div class="row">
                        {{ form_start(form) }}

                        <div class="form-group">
                            {{ form_label(form.firstName) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.firstName) }}
                                {{ form_errors(form.firstName) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.lastName) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.lastName) }}
                                {{ form_errors(form.lastName) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.wantToLearn) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.wantToLearn) }}
                                {{ form_errors(form.wantToLearn) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.musicFriend) }}
                            <div class="col-sm-4 col-md-offset-4">
                                {{ form_widget(form.musicFriend) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.categories) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.categories) }}
                                {{ form_errors(form.categories) }}
                            </div>
                            <div class="col-sm-4">
                                {{ form_widget(form.musicCategories) }}
                                {{ form_errors(form.musicCategories) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.about) }}
                            <div class="col-sm-8">
                                {{ form_widget(form.about) }}
                                {{ form_errors(form.about) }}
                                <span class="help-block">{{ 'user.form.about.help'|trans }}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.age) }}
                            <div class="col-sm-2">
                                {{ form_widget(form.age) }}
                                {{ form_errors(form.age) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.gender) }}
                            <div class="col-sm-2">
                                {{ form_widget(form.gender) }}
                                {{ form_errors(form.gender) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.from) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.from) }}
                                {{ form_errors(form.from) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.municipality) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.municipality) }}
                                {{ form_errors(form.municipality) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.hasChildren) }}
                            <div class="col-sm-10">
                                {{ form_widget(form.hasChildren) }}
                                {{ form_errors(form.hasChildren) }}
                            </div>
                        </div>



                        {{ form_widget(form) }}

                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">

                                <img
                                        src="{% if form.profilePicture.vars.value %}{{ form.profilePicture.vars.value }}{% else %}/images/user.png{% endif %}"
                                        id="profile-picture"
                                        class="img-responsive thumbnail pull-left"
                                        alt=""
                                        width="75px"
                                        style="margin-right:10px;"
                                        >

                                <fb:login-button scope="public_profile" onlogin="checkLoginState();">{{ 'user.form.facebook'|trans }}</fb:login-button>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-offset-4 col-sm-4">
                                <button type="submit" class="btn btn-default">{{ 'user.form.button'|trans }}</button>
                            </div>
                        </div>
                        {{ form_end(form) }}
                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock %}


{% block javascripts %}

    <script>
        function statusChangeCallback(response) {
            if (response.status === 'connected') {
                loggedIn();
            }
        }

        function checkLoginState() {
            FB.getLoginStatus(function(response) {
                statusChangeCallback(response);
            });
        }

        window.fbAsyncInit = function() {
            FB.init({
                appId      : '{{ facebook_client_id }}',
                cookie     : true,  // enable cookies to allow the server to access
                                    // the session
                xfbml      : true,  // parse social plugins on this page
                version    : 'v2.2' // use version 2.2
            });
        };

        // Load the SDK asynchronously
        (function(d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/en_US/sdk.js";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));

        function loggedIn() {
            FB.api('/me?fields=picture', function(response) {
                document.getElementById('profile-picture').src = response.picture.data.url;
                document.getElementById('user_profilePicture').value = response.picture.data.url;
            });
        }
    </script>

{% endblock %}
<commit_msg>Decrease more form input fields<commit_after>{% extends 'base.html.twig' %}
{% form_theme form 'bootstrap_3_horizontal_layout.html.twig' %}

{% block body %}

    <div class="inner-page">
        <div class="container">
            <h2><strong>{{ 'user.settings.header'|trans }}</strong></h2>

            <div class="row">
                <div class="col-md-4 col-md-push-8 col-sm-6 col-sm-push-6">
                    <div class="well br-white border-orange black">
                        {{ 'user.settings.intro'|trans }}
                    </div>
                </div>

                <div class="col-md-8 col-md-pull-4 col-sm-6 col-sm-pull-6">
                    <div class="row">
                        {{ form_start(form) }}

                        <div class="form-group">
                            {{ form_label(form.firstName) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.firstName) }}
                                {{ form_errors(form.firstName) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.lastName) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.lastName) }}
                                {{ form_errors(form.lastName) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.wantToLearn) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.wantToLearn) }}
                                {{ form_errors(form.wantToLearn) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.musicFriend) }}
                            <div class="col-sm-4 col-md-offset-4">
                                {{ form_widget(form.musicFriend) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.categories) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.categories) }}
                                {{ form_errors(form.categories) }}
                            </div>
                            <div class="col-sm-4">
                                {{ form_widget(form.musicCategories) }}
                                {{ form_errors(form.musicCategories) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.about) }}
                            <div class="col-sm-8">
                                {{ form_widget(form.about) }}
                                {{ form_errors(form.about) }}
                                <span class="help-block">{{ 'user.form.about.help'|trans }}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.age) }}
                            <div class="col-sm-2">
                                {{ form_widget(form.age) }}
                                {{ form_errors(form.age) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.gender) }}
                            <div class="col-sm-2">
                                {{ form_widget(form.gender) }}
                                {{ form_errors(form.gender) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.from) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.from) }}
                                {{ form_errors(form.from) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.municipality) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.municipality) }}
                                {{ form_errors(form.municipality) }}
                            </div>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.hasChildren) }}
                            <div class="col-sm-4">
                                {{ form_widget(form.hasChildren) }}
                                {{ form_errors(form.hasChildren) }}
                            </div>
                        </div>

                        {{ form_widget(form) }}

                        <div class="form-group">
                            <div class="col-sm-offset-4 col-sm-4">

                                <img
                                        src="{% if form.profilePicture.vars.value %}{{ form.profilePicture.vars.value }}{% else %}/images/user.png{% endif %}"
                                        id="profile-picture"
                                        class="img-responsive thumbnail pull-left"
                                        alt=""
                                        width="75px"
                                        style="margin-right:10px;"
                                        >

                                <fb:login-button scope="public_profile" onlogin="checkLoginState();">{{ 'user.form.facebook'|trans }}</fb:login-button>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-offset-4 col-sm-4">
                                <button type="submit" class="btn btn-default">{{ 'user.form.button'|trans }}</button>
                            </div>
                        </div>
                        {{ form_end(form) }}
                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock %}


{% block javascripts %}

    <script>
        function statusChangeCallback(response) {
            if (response.status === 'connected') {
                loggedIn();
            }
        }

        function checkLoginState() {
            FB.getLoginStatus(function(response) {
                statusChangeCallback(response);
            });
        }

        window.fbAsyncInit = function() {
            FB.init({
                appId      : '{{ facebook_client_id }}',
                cookie     : true,  // enable cookies to allow the server to access
                                    // the session
                xfbml      : true,  // parse social plugins on this page
                version    : 'v2.2' // use version 2.2
            });
        };

        // Load the SDK asynchronously
        (function(d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/en_US/sdk.js";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));

        function loggedIn() {
            FB.api('/me?fields=picture', function(response) {
                document.getElementById('profile-picture').src = response.picture.data.url;
                document.getElementById('user_profilePicture').value = response.picture.data.url;
            });
        }
    </script>

{% endblock %}

{'fraction_non_alphanumeric': 0.1224907300856668, 'fraction_numerical': 0.004858713719473213, 'mean_word_length': 0.8410027068377074, 'pattern_counts': {'":': 0, '<': 165, '<?xml version=': 0, '>': 165, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 62, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6602792', 'n_tokens_mistral': 3847, 'n_tokens_neox': 3558, 'n_words': 548}