You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
2.4 KiB
52 lines
2.4 KiB
<html>
|
|
<head>
|
|
{% load static %}
|
|
<link rel="stylesheet" href="{% static 'redis_app/style.css' %}">
|
|
</head>
|
|
<body>
|
|
<nav>
|
|
<a href="{% url 'home' %}">Home</a>
|
|
{% if person == '' %}
|
|
<a href="{% url 'login_form' %}">Login</a>
|
|
<a href="{% url 'register_form' %}">Register</a>
|
|
{% else %}
|
|
<a href="{% url 'courses' %}">Courses</a>
|
|
<a href="{% url 'profile' %}">Profile</a>
|
|
<a href="{% url 'search' %}">Search</a>
|
|
<a href="{% url 'notifications_view' %}">Notifications</a>
|
|
{% if person.role == 'Teacher' %}
|
|
<a href="{% url 'publish_message' %}">Publish a message</a>
|
|
{% endif %}
|
|
<a href="{% url 'logout' %}">Logout</a>
|
|
{% endif %}
|
|
</nav>
|
|
<div class="body">
|
|
<div class="container">
|
|
<form action="{% url 'change_profile' %}" method="POST">
|
|
{% csrf_token %}
|
|
<fieldset>
|
|
<legend><h1>Profile</h1></legend>
|
|
{% if error_message %}
|
|
<p class="error-message">{{ error_message }}</p>
|
|
{% endif %}
|
|
{% if success_message %}
|
|
<p class="success-message">{{ success_message }}</p>
|
|
{% endif %}
|
|
|
|
<label for="name">Name</label>
|
|
<input name="name" id="name" value="{{ person.name }}" class="input">
|
|
<label for="role">Role</label>
|
|
<select name="role" id="role">
|
|
<!-- Selecting if he's Student or Teacher. This is cool when you arrive to this page, everything is well selected! -->
|
|
<option value="Student" {% if person.role == 'Student' %}selected{% endif %}>Student</option>
|
|
<option value="Teacher" {% if person.role == 'Teacher' %}selected{% endif %}>Teacher</option>
|
|
</select>
|
|
</fieldset>
|
|
<div class="submit-container">
|
|
<input type="submit" value="Update profile" class="submit">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |