<%- include('../partials/header.ejs') -%>

    <link rel="stylesheet" href="css/account.css">
    <div class="signup-form">
        <form action="/account.html" method="POST">
            <h2>My Account</h2>
            <p class="hint-text">Edit your Account</p>
            <div class="form-group">
                <label for=""><%= user.first_name %><%= user.last_name %> profile picture :</label>
                <img style="width: 100%; border-radius: 5px;" src="images/profile_pictures/<%=user.email%>.png" style="width: 25px;height: 25px; " alt="user picture">
            </div>
            <div class="form-group">
                <% if(msg){ %>
                    <div class="error" style="color: red;">
                        *
                        <%= msg %>
                    </div><br>
                    <% } %>
                        <label for="">First name :</label>
                        <input type="hidden" name="user_id" value="<%= user.user_id %>">
                        <input type="text" class="form-control" name="first_name" placeholder="First Name" required="required" value="<%= user.first_name %>">


            </div>
            <div class="form-group">
                <label for="">Last name :</label>
                <input type="text" class="form-control" name="last_name" placeholder="Last Name" required="required" value="<%= user.last_name %>">
            </div>
            <div class="form-group">
                <label for="">email :</label>
                <input type="email" class="form-control" name="email" placeholder="Email" required="required" value="<%= user.email %>" disabled>
            </div>
            <div class="form-group">
                <label for="">Old password :</label>
                <input type="password" class="form-control" name="password" placeholder="old password" required="required">
            </div>
            <div class="form-group">
                <label for="">new password :</label>
                <input type="password" class="form-control" name="confirm_password" placeholder="new password" required="required">
            </div>
            <div class="form-group">
                <label for="">Address :</label>
                <input type="text" class="form-control" name="Address" placeholder="Address" required="required" value="<%= user.address %>">
            </div>

            <div class="form-group">
                <input type="submit" class="btn btn-success btn-lg btn-block" value="Update">
            </div>

        </form>

    </div>
    <%- include( '../partials/footer.ejs') -%>