1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-10-31 19:44:16 +00:00
webvirtcloud/accounts/templates/profile.html

84 lines
3.5 KiB
HTML
Raw Permalink Normal View History

2015-03-18 15:13:44 +00:00
{% extends "base.html" %}
{% load i18n %}
{% load django_bootstrap5 %}
{% load bootstrap_icons %}
2015-05-27 11:10:57 +00:00
{% load tags_fingerprint %}
2015-03-18 15:13:44 +00:00
2020-10-14 08:37:46 +00:00
{% block title %}{% trans "Profile" %}: {{ request.user.first_name }} {{ request.user.last_name}}{% endblock %}
2015-03-18 15:13:44 +00:00
2020-10-15 14:18:45 +00:00
{% block page_heading %}{% trans "Profile" %}: {{ request.user.first_name }} {{ request.user.last_name}}{% endblock page_heading %}
2020-10-14 08:37:46 +00:00
{% block content %}
<ul class="nav nav-tabs">
<li class="nav-item" role="presentation">
<button class="nav-link active" data-bs-toggle="tab" data-bs-target="#editprofile" type="button" role="tab" aria-controls="editprofile" aria-selected="true">
{% trans "Edit Profile" %}
</button>
2020-10-14 08:37:46 +00:00
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#sshkeys" type="button" role="tab" aria-controls="sshkeys" aria-selected="false">
{% trans "SSH Keys" %}
</button>
2020-10-14 08:37:46 +00:00
</li>
</ul>
<div class="tab-content">
<div class="tab-pane tab-pane-bordered active" id="editprofile">
2020-10-14 08:37:46 +00:00
<div class="card">
<div class="card-body">
<form method="post" action="" role="form" aria-label="Edit user info form">
{% csrf_token %}
{% bootstrap_form profile_form layout='horizontal' %}
{% if perms.accounts.change_password %}
2020-10-14 08:37:46 +00:00
<a href="{% url 'accounts:change_password' %}" class="btn btn-primary">
{% bs_icon 'lock' %} {% trans "Change Password" %}
2020-10-14 08:37:46 +00:00
</a>
{% endif %}
<div class="mb-0 float-end">
2020-10-14 08:37:46 +00:00
<button type="submit" class="btn btn-primary">
{% bs_icon 'pencil' %} {% trans "Update" %}
2020-10-14 08:37:46 +00:00
</button>
</div>
</form>
</div>
</div>
</div>
<div class="tab-pane tab-pane-bordered fade" id="sshkeys">
2020-10-14 08:37:46 +00:00
{% if publickeys %}
<div class="col-lg-12">
<div class="table-responsive">
<table class="table table-hover">
<tbody class="text-center">
{% for key in publickeys %}
<tr>
<td>{{ key.keyname }} ({% ssh_to_fingerprint key.keypublic %})</td>
<td>
<a href="{% url 'accounts:ssh_key_delete' key.id %}" title="{% trans "Delete" %}" class="btn btn-sm btn-secondary">
{% bs_icon 'trash' %}
2020-10-14 08:37:46 +00:00
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
<div class="card">
<div class="card-header">
{%trans "Add SSH Key" %}
</div>
<div class="card-body">
<form method="post" action="{% url 'accounts:ssh_key_create' %}" role="form" aria-label="Add key to user form">
{% csrf_token %}
{% bootstrap_form ssh_key_form layout='horizontal' %}
<div class="mb-0 float-end">
2020-10-14 08:37:46 +00:00
<button type="submit" class="btn btn-primary">
2023-08-11 06:40:38 +00:00
{% bs_icon 'plus-circle-fill' %} {% trans "Add" %}
2020-10-14 08:37:46 +00:00
</button>
</div>
</form>
2015-03-18 15:13:44 +00:00
</div>
2020-10-14 08:37:46 +00:00
</div>
</div>
</div>
{% endblock %}