{# User profile page
 # Copyright (C) 2020  Ngô Ngọc Đức Huy
 #
 # This file is part of Acanban.
 #
 # Acanban is free software: you can redistribute it and/or modify
 # it under the terms of the GNU Affero General Public License as published
 # by the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # Acanban is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU Affero General Public License for more details.
 #
 # You should have received a copy of the GNU Affero General Public License
 # along with Acanban.  If not, see <https://www.gnu.org/licenses/>.
 #}

{% extends 'base.html' %}

{% block title %}Edit profile{% endblock %}

{% block content %}
<div class=col-wide>
  <form action="edit" method="POST">
    <label for="name">Full name</label>
    <input type="text" name="name" id="name"
           value="{{ user.name }}" required/>
    <label for="email">Email</label>
    <input type="email" name="email" id="email"
           value="{{ user.email }}" required/>
    {% if user.role == 'student' %}
    <label for="student-id">Student ID</label>
    <input type="text" name="student-id" id="student-id"
           value="{{ user['student-id'] }}">
    {% endif %}
    <label for="department">Department</label>
    <input type="text" name="department" id="department"
           value="{{ user.department }}">
    <button>Save</button>
  </form>
</div>
{% endblock%}
