{% extends 'base.html' %}
{% block content %}

<div class="row">
    <div class="col-md-6 grid-margin stretch-card">
      <div class="card">
        <div class="card-body">
          <h4 class="card-title">Profile Details</h4>
         <hr>
          <form class="forms-sample" method="POST" action="{% url 'profile_update' %}" enctype="multipart/form-data">
            {% include 'includes/messages.html' %}
            {% csrf_token %}
            <div class="form-group">
              <label for="exampleInputUsername1">Profile Pic</label>
              <input type="file" class="form-control" name="profile_pic">
            </div>
            <div class="form-group">
              <label for="exampleInputEmail1">First Name</label>
              <input type="text" class="form-control" name="first_name" value="{{user.first_name}}">
            </div>
            <div class="form-group">
              <label for="exampleInputPassword1">Last Name</label>
              <input type="text" class="form-control" name="last_name" value="{{user.last_name}}">
            </div>
            <div class="form-group">
              <label for="exampleInputConfirmPassword1">Email</label>
              <input type="email" class="form-control" readonly="True" name="email" value="{{user.email}}">
            </div>
            <div class="form-group">
                <label for="exampleInputConfirmPassword1">Username</label>
                <input type="text" class="form-control" readonly="True" name="username" value="{{user.username}}">
              </div>
           
            <button type="submit" class="btn btn-primary mr-2">Update</button>
            
          </form>
        </div>
      </div>
    </div>
    </div>
    {% endblock %}