[localePicker]
forceUrl = 1

[account]
redirect = "index"
paramCode = "code"
forceSecure = 0
requirePassword = 0
view = "signin"

[session]
security = "all"
==
<?php
function onStart(){
    $this['email'] = TPS\Birzha\Models\Settings::getValue('email');
    $this['short_name'] = TPS\Birzha\Models\Settings::getValue('short_name');
    $this['site_name'] = TPS\Birzha\Models\Settings::getValue('site_name');
}
?>
==
<!DOCTYPE html>
<html lang="{{activeLocale}}">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap" rel="stylesheet">
    <!-- <link rel="icon" type="image/svg" href="{{ 'assets/images/svg/fav_icon.svg'|theme }}"> -->
    <link rel="icon" href="{{'assets/images/svg/fav_icon.svg'|theme}}" sizes="32x32">
    <link rel="icon" href="{{'assets/images/svg/fav_icon.svg'|theme}}" sizes="192x192">
    <link rel="apple-touch-icon-precomposed" href="{{'assets/images/svg/fav_icon.svg'|theme}}">
    <meta name="msapplication-TileImage" content="{{'assets/images/svg/fav_icon.svg'|theme}}">
    {% styles %}
    <link rel="stylesheet" href="{{'assets/css/main.css'|theme}}">
    <link rel="stylesheet" href="{{'assets/css/phone_box.css'|theme}}">
    <!--    <link href="{{ ['assets/css/main.css']|theme }}" rel="stylesheet">-->


    <title>{{this.page.title}}</title>

</head>
<body>

{% flash success %}
<p data-control="flash-message" data-interval="5" class="success">
    {{ message }}
</p>
{% endflash %}

{% flash error %}
<p data-control="flash-message" data-interval="5" class="error">
    {{ message }}
</p>
{% endflash %}

<div class="acc_lang">
    <div class="auto_container">
        <div class="inner">
            {% for code, name in locales %}
            <a href="#" class="acc_lang-item" data-request="onSwitchLocale" data-request-data="locale: '{{code}}'">
                {{ code }}
            </a>
            {% endfor %}
        </div>
    </div>
</div>

{% page %}

<script src="{{'assets/js/jquery.js'|theme}}"></script>

{% framework extras %}
{% scripts %}

<script src="{{'assets/js/accaunt.js'|theme}}"></script>
<script>
    $('.iti__country').click(function (e) {
        let flagClass = $(this).find('.iti__flag').attr("class").split(/\s+/)[1]

        let oldClasses = $('.phone_box-flag').attr("class").split(/\s+/);
        delete(oldClasses[2])

        $('.phone_box-flag').attr('class', oldClasses.join(' '))


        $('.phone_box-flag').addClass(flagClass)

        // todo code

        let code = $(this).find('.iti__dial-code').text()
        $('.phone_box-code').html(code)

        $('input[name="dial_code"]').val(code)

    })

</script>
</body>
</html>