Newer
Older
{% load static %}
{% include "header.html" %}
Stefano Alberto Russo
committed
{% include "navigation.html" %}
<div class="container">
<div class="dashboard">
<div class="span8 offset2">
<h1>Account and profile</h1>
<hr>
<br />
<h3>Account</h3>
<form action="/account/" method="POST">
{% csrf_token %}
<table class="dashboard">
<tr>
<td>
</td>
<td>
Stefano Alberto Russo
committed
{{data.user.username}}
</td>
</tr>
<tr>
<td>
</td>
<td>
{% if data.edit == 'email' %}
<table class="frametab"><tr><td>
<input type='hidden' name='edit' value='email' />
<input type="email" value="{{data.user.email}}" name='value' style='width:95%' required autofocus />
</td><td>
<input type="submit" value="Go">
</td></tr></table>
{% else %}
{{data.user.email}}{% if data.user.profile.auth == 'local' %} | <a href="/account/?edit=email">Change</a>{% endif %}
{% endif %}
</td>
</tr>
{% if data.user.profile.auth == 'local' %}
<tr>
<td>
</td>
<td>
{% if data.edit == 'password' %}
<table class="frametab"><tr><td>
<input type='hidden' name='edit' value='password' />
<input type="password" name='value' style='width:95%' required autofocus />
</td><td>
<input type="submit" value="Go">
</td></tr></table>
{% else %}
******* | <a href="/account/?edit=password">Change</a>
{% endif %}
</td>
</tr>
{% endif %}
<tr>
<td>
<b>Auth</b>
</td>
<td>
{% if data.user.profile.auth == 'local' %}
Local
{% elif data.user.profile.auth == 'oidc' %}
Open ID Connect
{% else %}
{{ data.user.profile.auth }}
{% endif %}
</td>
</tr>
Stefano Alberto Russo
committed
</table>
<br />
Stefano Alberto Russo
committed
<h3>Profile</h3>
<table class="dashboard">
<tr>
<td>
<b>Time Zone</b>
</td>
<td>
{% if data.edit == 'timezone' %}
{% include "components/tzselect.html" %}
<input type='hidden' name='edit' value='timezone' />
<input type="submit" value="Go">
{% else %}
{{data.profile.timezone}} | <a href="/account/?edit=timezone">Change</a>
{% endif %}
</td>
</tr>
Stefano Alberto Russo
committed
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<tr>
<td valign=top>
<b>Extra configurations</b>
</td>
<td>
{% for conf_uuid, conf_data in data.profile.extra_confs.items %}
<code>{{ conf_data.type }}</code>
{% if conf_data.object_uuid %}
{% for computing in data.computings %}
{% if conf_data.object_uuid == computing.uuid_as_str %}
<font style="font-size:0.9em"> @ {{ computing.name }}</font>
{% endif %}
{% endfor %}
{% endif %}
: <code>{{conf_data.value}}</code> | <a href='?delete_extra_conf_uuid={{conf_uuid}}'>delete</a>
<br/>
{% endfor %}
<span style="margin:3px"><a href="/add_profile_conf" style="line-height:2em">Add new...</a></span>
</td>
</tr>
</table>
<br />
Stefano Alberto Russo
committed
<h3>KeyPair</h3>
<table class="dashboard">
<tr>
<td valign="top">
<b>Default public key</b>
</td>
<td>
<textarea style="width:100%; max-width:500px; word-wrap:break-word; display:inline-block; font-family:monospace" rows=3 cols=41>{{ data.default_public_key}}</textarea>
</table>
</form>
Stefano Alberto Russo
committed
<div style="margin-left:10px; margin-top:40px">
{% if data.user.profile.auth == 'oidc' %}
Stefano Alberto Russo
committed
<form action="{% url 'oidc_logout' %}" method="post">
{% csrf_token %}
<input type="submit" value="logout">
</form>
{% else %}
<form action="/logout/" method="get">
<input type="submit" value="logout">
</form>
{% endif %}
</div>