{% extends 'users/base.html' %}
{% block navi_content %}
 
    {% ifequal user.groups.all.0 'admin_group' %}
		{%include "users/includes/navicontents_admin.html" %}
    
	{% else %}
		{%include "users/includes/navicontents_leader.html" %}
    {% endifequal %}
 
{% endblock %}
{% block usernavi_content %}
{% ifequal user.groups.all.0 'admin_group' %}
		{%include "users/includes/usernavicontents_admin.html" %} 
    
	{% else %}
		{%include "users/includes/usernavicontents_leader.html" %} 
    {% endifequal %}	
		           
				   
{% endblock %}

{% block main_content %}
{% block title %}<h4> Update {{ user.first_name }} {{ user.last_name }} Information</h4>{% endblock %}
    {% if errors %}
        <ul>
        {% for key, error in errors.items %}
            {{ key }} - {{ error }}
        {% endfor %}
        </ul>

    {% endif %}
<form action="" method="post">
    {% csrf_token %}
    <div class="row">
        <div class="col-md-4">
            <div class="form-group">
                <label >First Name</label>
                <input type="text" class="form-control" placeholder="First Name" name="first_name" value="{{ user.first_name }}">
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-4">
            <div class="form-group">
                <label >Last Name</label>
                <input type="text" class="form-control" placeholder="Last Name" name="last_name" value="{{ user.last_name }}">
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-4">
            <div class="form-group">
                <label >Email</label>
                <input type="email" class="form-control" placeholder="Email" name="email" value="{{ user.email }}">
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-4">
            <div class="form-group">
                <label >Password</label>
                <input type="password" class="form-control" placeholder="" name="password" value="">
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-4">
            <div class="form-group">
                <label >Bio</label>
                <textarea rows="5" class="form-control" placeholder="Description" name="bio">{{ user.bio }}</textarea>
            </div>
        </div>
    </div>
    <br>
    <button type="submit" class="btn btn-info btn-fill btnleft" value="Update">Update</button>
</form>
{% endblock %}