Add profile view , updating password, email, source repo

This commit is contained in:
AndyGrant committed 2018-06-10 23:19:15 -04:00
1 parent e77a6509fb
commit 64f492a345
8 files changed
+75 -18

No files matched your search

+1
View File
@@ -19,6 +19,7 @@
<li class="listheader">ADMIN</li>
{% if user.is_authenticated %}
<li><a href="/logout/">Logout</a></li>
<li><a href="/viewProfile/">Profile</a></li>
{% else %}
<li><a href="/login">Login </a></li>
<li><a href="/register">Register</a></li>
+1 -1
View File
@@ -29,7 +29,7 @@
<input type="text" value="{{config.protocol}}" name="baseprotocol">
</br>
<label type="text"> Source </label>
<input type="text" value="{{user.repo}}" name="source">
<input type="text" value="{{profile.repo}}" name="source">
</br>
<label type="text"> Opening Book </label>
<input type="text" value="{{config.bookname}}" name="bookname">
+1 -1
View File
@@ -19,7 +19,7 @@
<td><a href="/viewUser/{{profile.user.username}}">{{profile.user.username}}</a></td>
<td>{{profile.games}}</td>
<td>{{profile.tests}}</td>
<td>{{profile.repo}}</td>
<td><a href="{{profile.repo}}">{{profile.repo}}</a></td>
<td>{{profile.enabled}}</td>
<td>{{profile.approver}}</td>
</tr>
+22
View File
@@ -0,0 +1,22 @@
{% extends "OpenBench/base.html" %}
{% block style %}
{% load static %}
{% endblock %}
{% block content %}
<form method="POST" action="/editProfile/">
{% csrf_token %}
<label type="text">Username</label>
<input readonly value="{{profile.user.username}}" type="text" name="username"></br>
<label type="text">Email</label>
<input value="{{profile.user.email}}" type="text" name="email"></br>
<label type="text">New Password</label>
<input type="password" name="password1"></br>
<label type="text">Verify Password</label>
<input type="password" name="password2"></br>
<label type="text">Source Repo</label>
<input value="{{profile.repo}}" type="text" name="repo"></br>
<input type="submit" name="submit" value="Edit">
</form>
{% endblock %}