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.

30 lines
1.3 KiB

<html>
<body>
<nav>
<a href="{% url 'home' %}">Home</a>
{% if person.name == '' %}
<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>
{% endif %}
</nav>
<form action="{% url 'register' %}" method="POST">
{% csrf_token %}
<fieldset>
<legend><h1>Register</h1></legend>
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
<label for="name">Name</label><br>
<input name="name" id="name" value="{{ person.name }}"><br/>
<label for="role">Role</label><br>
<select name="role" id="role">
<option value="Student" {% if person.role == 'Student' %}selected{% endif %}>Student</option>
<option value="Teacher" {% if person.role == 'Teacher' %}selected{% endif %}>Teacher</option>
</select>
</fieldset>
<input type="submit" value="Register">
</form>
</body>
</html>