<!DOCTYPE html>
<html lang="ja">
    <head>
        <%- include("../layout/head",{ title: "作成" }); %>
    </head>
    <body>
        <header>
            <%- include("../layout/header"); %>
        </header>
        <main>
            <div class="container">
                <%- include("../components/errorAlert",{ message: errorMessage }); %>
                <div class="card" style="width: 30rem;">
                    <h5 class="card-header">編集</h5>
                    <div class="card-body">
                        <form action="/account/edit" method="post">
                            <div class="mb-3">
                                <label for="username" class="form-label">ユーザー名</label>
                                <input type="text" class="form-control" id="username" name="username" minlength="4" value="<%= session.user.name %>" required>
                            </div>
                            <div class="mb-3">
                                <label for="oldPassword" class="form-label">現在のパスワード</label>
                                <input type="password" class="form-control" id="oldPassword" name="oldPassword" minlength="8" required>
                            </div>
                            <div class="mb-3">
                                <label for="newPassword" class="form-label">新しいパスワード</label>
                                <input type="password" class="form-control" id="newPassword" name="newPassword" minlength="8" required>
                            </div>
                            <input type="submit" class="btn btn-primary" value="決定">
                        </form>
                    </div>
                </div>
            </div>
        </main>
        <footer>
            <%- include("../layout/footer"); %>
        </footer>
    </body>
    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" crossorigin="anonymous"></script>
</html>