@extends('layouts.app')

@section('content')
<div id="accountPassword" class="container">

    @include('account.navTabs')

    <dl>
        <dt>비밀번호 변경</dt>
        <dd>개인정보 보호를 위해 비밀번호를 변경 해주세요.</dd>
        <dd>이전과 동일한 비밀번호는 사용할 수 없습니다.</dd>
    </dl>

    <hr/>
    <form name="f_account_password" id="fAccountPassword" method="post" action="{{ route('account.password.update') }}" autocomplete="off">
        @csrf
        <table class="table table-borderless">
            <colgroup>
                <col width="25%"/>
                <col width="*"/>
            </colgroup>
            <tr>
                <th rowspan="4">새 비밀번호</th>
            </tr>
            <tr>
                <td>
                    <label for="password" class="form-label">새 비밀번호</label>
                    <input type="password" name="password" id="password" class="form-control" required minlength="{{ config('password_min_length', 0) }}" />
                </td>
            </tr>
            <tr>
                <td>
                    <label for="passwordConfirm" class="form-label">새 비밀번호 확인</label>
                    <input type="password" name="password_confirmation" id="passwordConfirm" class="form-control" required />
                </td>
            </tr>
            <tr>
                <td>
                    <div class="row g-2">
                        <div class="col-auto">
                            <button type="submit" class="btn btn-success">확인</button>
                        </div>
                        <div class="col-auto">
                            <a href="{{ route('account.profile') }}" class="btn btn-default">취소</a>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
    </form>
    <hr/>
</div>
@endsection

@push('styles')
    <link rel="stylesheet" href="{{ asset('css/desktop/account/passwords.css') }}"/>
@endpush

@push('scripts')
    <script src="{{ asset('/js/account/passwords.js') }}" defer></script>
@endpush
