{{ form_ajax('onUpdate',{class:'post_form','data-request-validate':''}) }}

    <div class="post_input">
        <label for="name">{{'auth.name'|_}}</label>
        <input type="text"  id="name" name="name" value="{{user.name}}">
        <div data-validate-for="name"></div>
    </div>

    <div class="post_input">
        <label for="surname">{{'auth.surname'|_}}</label>
        <input type="text" id="surname" name="surname" value="{{user.surname}}">
        <div data-validate-for="surname"></div>
    </div>

    <div class="post_input">
        <label for="phone_num">{{'auth.phone'|_}}</label>
        <input type="text"  id="phone_num" name="username" value="{{user.username}}">
        <div data-validate-for="username"></div>
    </div>


    <div class="post_input">
        <label for="blue_mail">{{'auth.email'|_}}</label>
        <input type="email"  id="blue_mail" name="email" value="{{user.email}}">
        <div data-validate-for="email"></div>
    </div>

    <div class="post_input">
        <label for="company">{{'account.company'|_}}</label>
        <input type="text" id="company" name="company" value="{{user.company}}">
        <div data-validate-for="company"></div>
    </div>

    <div class="post_input">
        <label for="zip">{{'account.legalization_number'|_}}</label>
        <input type="text" placeholder="123456" id="zip" name="zip" value="{{user.zip}}">
        <div data-validate-for="zip"></div>
    </div>

    <div class="post_input">
        <label for="password">{{'account.new_password'|_}}</label>
        <input type="password" placeholder="************" id="password" name="password">
        <div class="eye">
            <img class="eye_off" src="{{'assets/images/svg/eye-off.svg'|theme}}" alt="eye">
            <img class="eye_on" src="{{'assets/images/svg/eye.svg'|theme}}" alt="eye">
        </div>
        <div data-validate-for="password"></div>
    </div>
    <div class="post_input">
        <label for="password_confirmation">{{'account.password_confirmation'|_}}</label>
        <input type="password" placeholder="************" id="password_confirmation" name="password_confirmation">
        <div class="eye">
            <img class="eye_off" src="{{'assets/images/svg/eye-off.svg'|theme}}" alt="eye">
            <img class="eye_on" src="{{'assets/images/svg/eye.svg'|theme}}" alt="eye">
        </div>
        <div data-validate-for="password_confirmation"></div>
    </div>

    <div class="btn_bg">
        <button class="post_btn" type="submit">
            {{'account.save'|_}}
        </button>
    </div>
{{ form_close() }}

{% put scripts %}
<script>

    // document.querySelector('.eye_off').addEventListener('click', function () {
    //     document.getElementById('password').type = "password"
    //     document.getElementById('password_current').type = "password"

    //     document.querySelector('.eye_on').classList.remove('active');
    //     document.querySelector('.eye_off').classList.remove('active');
    // })

    // document.querySelector('.eye_on').addEventListener('click', function () {
    //     document.getElementById('password').type = "text";
    //     document.getElementById('password_current').type = "text";

    //     document.querySelector('.eye_on').classList.add('active');
    //     document.querySelector('.eye_off').classList.add('active');
    // })

    // document.querySelector('.profile_head').addEventListener('click', function () {
    //     sleep(2).then(() => {
    //         document.querySelector('.profile_drop').classList.toggle('active');
    //     });
    // });

</script>
{% endput %}

