{% extends "base.html" %}

{% block content %}
<div class="mx-auto text-center">
<h1> Your Profile</h1>
{% if user.profile_image %}
    <img src="static/uploads/{{ user.profile_image }}" class="border rounded-circle">
{% else %}
    <img src="static/uploads/default.png" class="border rounded-circle">
{% endif %}
<form method="POST" action="" enctype="multipart/form-data">
    <input type="file" id="profilepic_upload" name="profilepic_upload" accept="image/png, image/jpeg">
    <button type="submit" class="btn btn-primary">Update Photo</button>
</form>
<p>{{ user.firstname }}</p>
<p>{{ user.lastname }}</p>
<p>{{ user.gender }} , {{ user.age }}</p>
<form method="POST">
    {{ form1.hidden_tag() }}

    {{ form1.description(placeholder=user.description, cols="45", rows="4") }}
    <br />
    {{ form1.submit(class="btn btn-primary updesc") }}
</form>
<br />
<form method="POST">
    <div class="container">
    {{ form2.hidden_tag() }}

    <div class="row">
    {{ form2.passwd_1(placeholder="Edit Password", class="description_area upswd") }}
    </div>
    <br />
    <div class="row">
    {{ form2.passwd_2(placeholder="Confirm Password", class="description_area upswd") }}
    </div>
    <br />
    {{ form2.submit(class="btn btn-primary upswd") }}
</form>
{% endblock %}
</div>
