<commit_before>{% extends '@MainMain/index.html.twig' %}

{% block title %}
    Аккаунт
{% endblock %}

{% block body %}
    <div class="container-fluid" style="padding-left: 0;">
        <div class="row">
            <div class="col-lg-12">
                <h3>Ваш аккаунт</h3><br>

                <ul id="myTab" class="nav nav-tabs" role="tablist">
                    <li class="{% if (zm is not defined) and (mes is not defined) %}active{% endif %}" role="presentation">
                        <a id="home-tab" aria-expanded="true" aria-controls="home" data-toggle="tab" role="tab" href="#home">Общая информаци</a>
                    </li>

                    <li class="" role="presentation">
                        <a id="changeProfile-tab" aria-controls="changeProfile" data-toggle="tab" role="tab" href="#changeProfile" aria-expanded="false">Изменить личные данные</a>
                    </li>

                    <li class="{% if mes is defined %}active{% endif %}" role="presentation">
                        <a id="settings-tab" aria-controls="settings" data-toggle="tab" role="tab" href="#settings" aria-expanded="false">Настройки</a>
                    </li>

                    <li class="" role="presentation">
                        <a id="profile-tab" aria-controls="profile" data-toggle="tab" role="tab" href="#profile" aria-expanded="false">Безопасность</a>
                    </li>

                    {% if app.user.accountActive == false %}
                    <li class="{% if zm is defined %}active{% endif %}" role="presentation">
                        <a id="activeaccaunt-tab" aria-controls="yes" data-toggle="tab" role="tab" href="#activeaccaunt" aria-expanded="false">Активация аккаунта</a>
                    </li>
                    {% endif %}
                </ul>

                <div id="myTabContent" class="tab-content">
                    <div id="home" class="tab-pane fade {% if (zm is not defined) and (mes is not defined) %}active in{% endif %}" aria-labelledby="home-tab" role="tabpanel">
                        <br>
                        <br>
                        <div class="col-md-5">
                            <h4 class="page-header">Ваша информация</h4>
                            <dl>
                                <dt><img src="{{ asset(app.user.avatar) }}" style="height:90px;"></dt>
                                <br>
                                <dt>Имя:</dt>
                                <dd>{{ app.user.name ~ ' ' ~ app.user.surname }}</dd>
                                <dt>Email:</dt>
                                <dd>{{ app.user.email }}</dd>
                                <dt>Кошелек perfect money:</dt>
                                <dd>{{ app.user.perfectMoney }}</dd>
                            </dl>
                        </div>
                    </div>

                    <div id="changeProfile" class="tab-pane fade" aria-labelledby="changeProfile-tab" role="tabpanel">
                        <br>
                        <br>
                        <form method="post" action="{{ path('main_userpage_change_profile') }}" style="max-width: 350px;" enctype="multipart/form-data">

                            <div class="form-group" style="margin-bottom: 30px;">
                                <label class="control-label" style="margin-bottom: 20px;">Изображение профиля (аватар)</label>
                                <input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
                                <input type="file" name="new_image" accept="image/*">
                            </div>

                            <div class="form-group">
                                <label class="control-label">Имя</label>
                                <input type="text" name="new_name" value="{{ app.user.name }}" class=" form-control" required>
                            </div>

                            <div class="form-group">
                                <label class="control-label">Фамилия</label>
                                <input type="text" name="new_surname" value="{{ app.user.surname }}" class=" form-control" required>
                            </div>

                            <div style="margin-top: 40px;">
                                <button type="submit" class="btn btn-primary">Сохранить</button>
                            </div>
                        </form>
                    </div>

                    <div id="settings" class="tab-pane fade{% if mes is defined %} active in{% endif %}" aria-labelledby="settings-tab" role="tabpanel">
                        <br>
                        <br>

                        {% if (mes is defined) and (mes == 0) %}
                            <div class="alert alert-warning alert-dismissible fade in" role="alert">
                                <button class="close" aria-label="Close" data-dismiss="alert" type="button">
                                    <span aria-hidden="true">×</span>
                                </button>
                                Не правильный старый пароль!
                            </div>
                        {% elseif (mes is defined) and (mes == 1) %}
                            <div class="alert alert-warning alert-dismissible fade in" role="alert">
                                <button class="close" aria-label="Close" data-dismiss="alert" type="button">
                                    <span aria-hidden="true">×</span>
                                </button>
                                Новый пароль и повторенный пароль не совпадают!
                            </div>
                        {% elseif (mes is defined) and (mes == 2) %}
                            <div class="alert alert-warning alert-dismissible fade in" role="alert">
                                <button class="close" aria-label="Close" data-dismiss="alert" type="button">
                                    <span aria-hidden="true">×</span>
                                </button>
                                Пароль успешно изменен!
                            </div>
                        {% endif %}

                        <form method="post" action="{{ path('main_userpage_change_password') }}" style="max-width: 350px; ">
                            <label class="control-label" style="font-size: 1.1em; margin-bottom: 30px;">Сменить пароль:</label>

                            <div class="form-group">
                                <span class="control-label">Старый пароль:</span>
                                <input name="currentPassword" type="password" class="form-control" required>
                            </div>

                            <div class="form-group">
                                <span class="control-label">Новый пароль:</span>
                                <input name="newPassword" type="password" class="form-control" required><commit_msg>change password1<commit_after>{% extends '@MainMain/index.html.twig' %}

{% block title %}
    Аккаунт
{% endblock %}

{% block body %}
    <div class="container-fluid" style="padding-left: 0;">
        <div class="row">
            <div class="col-lg-12">
                <h3>Ваш аккаунт</h3><br>

                <ul id="myTab" class="nav nav-tabs" role="tablist">
                    <li class="{% if (zm is not defined) and (mes is not defined) %}active{% endif %}" role="presentation">
                        <a id="home-tab" aria-expanded="true" aria-controls="home" data-toggle="tab" role="tab" href="#home">Общая информаци</a>
                    </li>

                    <li class="" role="presentation">
                        <a id="changeProfile-tab" aria-controls="changeProfile" data-toggle="tab" role="tab" href="#changeProfile" aria-expanded="false">Изменить личные данные</a>
                    </li>

                    <li class="{% if mes is defined %}active{% endif %}" role="presentation">
                        <a id="settings-tab" aria-controls="settings" data-toggle="tab" role="tab" href="#settings" aria-expanded="false">Настройки</a>
                    </li>

                    <li class="" role="presentation">
                        <a id="profile-tab" aria-controls="profile" data-toggle="tab" role="tab" href="#profile" aria-expanded="false">Безопасность</a>
                    </li>

                    {% if app.user.accountActive == false %}
                    <li class="{% if zm is defined %}active{% endif %}" role="presentation">
                        <a id="activeaccaunt-tab" aria-controls="yes" data-toggle="tab" role="tab" href="#activeaccaunt" aria-expanded="false">Активация аккаунта</a>
                    </li>
                    {% endif %}
                </ul>

                <div id="myTabContent" class="tab-content">
                    <div id="home" class="tab-pane fade {% if (zm is not defined) and (mes is not defined) %}active in{% endif %}" aria-labelledby="home-tab" role="tabpanel">
                        <br>
                        <br>
                        <div class="col-md-5">
                            <h4 class="page-header">Ваша информация</h4>
                            <dl>
                                <dt><img src="{{ asset(app.user.avatar) }}" style="height:90px;"></dt>
                                <br>
                                <dt>Имя:</dt>
                                <dd>{{ app.user.name ~ ' ' ~ app.user.surname }}</dd>
                                <dt>Email:</dt>
                                <dd>{{ app.user.email }}</dd>
                                <dt>Кошелек perfect money:</dt>
                                <dd>{{ app.user.perfectMoney }}</dd>
                            </dl>
                        </div>
                    </div>

                    <div id="changeProfile" class="tab-pane fade" aria-labelledby="changeProfile-tab" role="tabpanel">
                        <br>
                        <br>
                        <form method="post" action="{{ path('main_userpage_change_profile') }}" style="max-width: 350px;" enctype="multipart/form-data">

                            <div class="form-group" style="margin-bottom: 30px;">
                                <label class="control-label" style="margin-bottom: 20px;">Изображение профиля (аватар)</label>
                                <input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
                                <input type="file" name="new_image" accept="image/*">
                            </div>

                            <div class="form-group">
                                <label class="control-label">Имя</label>
                                <input type="text" name="new_name" value="{{ app.user.name }}" class=" form-control" required>
                            </div>

                            <div class="form-group">
                                <label class="control-label">Фамилия</label>
                                <input type="text" name="new_surname" value="{{ app.user.surname }}" class=" form-control" required>
                            </div>

                            <div style="margin-top: 40px;">
                                <button type="submit" class="btn btn-primary">Сохранить</button>
                            </div>
                        </form>
                    </div>

                    <div id="settings" class="tab-pane fade{% if mes is defined %} active in{% endif %}" aria-labelledby="settings-tab" role="tabpanel">
                        <br>
                        <br>

                        {% if (mes is defined) and (mes == 0) %}
                            <div class="alert alert-warning alert-dismissible fade in" role="alert">
                                <button class="close" aria-label="Close" data-dismiss="alert" type="button">
                                    <span aria-hidden="true">×</span>
                                </button>
                                Не правильный старый пароль!
                            </div>
                        {% elseif (mes is defined) and (mes == 1) %}
                            <div class="alert alert-warning alert-dismissible fade in" role="alert">
                                <button class="close" aria-label="Close" data-dismiss="alert" type="button">
                                    <span aria-hidden="true">×</span>
                                </button>
                                Новый пароль и повторенный пароль не совпадают!
                            </div>
                        {% elseif (mes is defined) and (mes == 2) %}
                            <div class="alert alert-warning alert-dismissible fade in" role="alert">
                                <button class="close" aria-label="Close" data-dismiss="alert" type="button">
                                    <span aria-hidden="true">×</span>
                                </button>
                                Пароль успешно изменен!
                            </div>
                        {% endif %}

                        <form method="post" action="{{ path('main_userpage_change_password') }}" style="max-width: 350px; ">
                            <label class="control-label" style="font-size: 1.1em; margin-bottom: 30px;">Смена пароля:</label>

                            <div class="form-group">
                                <span class="control-label">Старый пароль:</span>
                                <input name="currentPassword" type="password" class="form-control" required>
                            </div>

                            <div class="form-group">
                                <span class="control-label">Новый пароль:</span>
                                <input name="newPassword" type="password" class="form-control" required>
{'fraction_non_alphanumeric': 0.1380101857829424, 'fraction_numerical': 0.005379814934366258, 'mean_word_length': 1.2422000643293662, 'pattern_counts': {'":': 0, '<': 231, '<?xml version=': 0, '>': 231, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4039051', 'n_tokens_mistral': 3782, 'n_tokens_neox': 3456, 'n_words': 736}