2015-03-18 15:13:44 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% load i18n %}
|
2020-06-16 08:36:53 +00:00
|
|
|
{% load icons %}
|
2015-05-27 11:10:57 +00:00
|
|
|
{% load tags_fingerprint %}
|
2015-03-24 12:45:38 +00:00
|
|
|
{% block title %}{% trans "Profile" %}{% endblock %}
|
2015-03-18 15:13:44 +00:00
|
|
|
{% block content %}
|
|
|
|
<!-- Page Heading -->
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12">
|
2020-05-19 16:53:54 +00:00
|
|
|
<h2 class="page-header">{% trans "Profile" %}</h2>
|
2015-03-18 15:13:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- /.row -->
|
|
|
|
|
|
|
|
{% include 'errors_block.html' %}
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12">
|
2015-03-24 12:45:38 +00:00
|
|
|
<h3 class="page-header">{% trans "Edit Profile" %}</h3>
|
2020-06-16 08:36:53 +00:00
|
|
|
{% if perms.accounts.change_password %}
|
|
|
|
<a href="{% url 'change_password' %}" class="btn btn-primary">{% icon 'lock' %} {% trans "Change Password" %}</a>
|
|
|
|
{% endif %}
|
2020-05-26 13:18:38 +00:00
|
|
|
<form method="post" action="" role="form" aria-label="Edit user info form">{% csrf_token %}
|
2015-03-24 12:45:38 +00:00
|
|
|
<div class="form-group">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-2 col-form-label">{% trans "Login" %}</label>
|
2015-03-24 12:45:38 +00:00
|
|
|
<div class="col-sm-4">
|
|
|
|
<input type="text" class="form-control" value="{{ request.user.username }}" disabled>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group bridge_name_form_group_dhcp">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-2 col-form-label">{% trans "Username" %}</label>
|
2015-03-24 12:45:38 +00:00
|
|
|
<div class="col-sm-4">
|
|
|
|
<input type="text" class="form-control" name="username" value="{{ request.user.first_name }}" pattern="[0-9a-zA-Z]+">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group bridge_name_form_group_dhcp">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-2 col-form-label">{% trans "Email" %}</label>
|
2015-03-24 12:45:38 +00:00
|
|
|
<div class="col-sm-4">
|
|
|
|
<input type="email" class="form-control" name="email" value="{{ request.user.email }}">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-sm-offset-2 col-sm-10">
|
|
|
|
<button type="submit" class="btn btn-primary">{% trans "Change" %}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2015-05-27 11:10:57 +00:00
|
|
|
<h3 class="page-header">{% trans "SSH Keys" %}</h3>
|
|
|
|
{% if publickeys %}
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-hover">
|
2020-05-19 16:53:54 +00:00
|
|
|
<tbody class="text-center">
|
2015-05-27 11:10:57 +00:00
|
|
|
{% for key in publickeys %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ key.keyname }} ({% ssh_to_fingerprint key.keypublic %})</td>
|
|
|
|
<td>
|
2020-05-26 13:18:38 +00:00
|
|
|
<form action="" method="post" role="form" aria-label="Delete user public key form">{% csrf_token %}
|
2015-05-27 11:10:57 +00:00
|
|
|
<input type="hidden" name="keyid" value="{{ key.id }}"/>
|
2020-05-19 16:53:54 +00:00
|
|
|
<button type="submit" class="btn btn-sm btn-secondary" name="keydelete" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
|
|
|
|
<span class="fa fa-trash"></span>
|
2015-05-27 11:10:57 +00:00
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-05-26 13:18:38 +00:00
|
|
|
<form method="post" action="" role="form" aria-label="Add key to user form">{% csrf_token %}
|
2015-05-27 11:10:57 +00:00
|
|
|
<div class="form-group bridge_name_form_group_dhcp">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-2 col-form-label">{% trans "Key name" %}</label>
|
2015-05-27 11:10:57 +00:00
|
|
|
<div class="col-sm-4">
|
|
|
|
<input type="text" class="form-control" name="keyname" placeholder="{% trans "Enter Name" %}">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group bridge_name_form_group_dhcp">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-2 col-form-label">{% trans "Public key" %}</label>
|
2015-05-27 11:10:57 +00:00
|
|
|
<div class="col-sm-8">
|
|
|
|
<textarea name="keypublic" class="form-control" rows="6" placeholder="{% trans "Enter Public Key" %}"></textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2020-05-19 16:53:54 +00:00
|
|
|
<div class="col-sm-10">
|
2017-06-27 08:29:41 +00:00
|
|
|
<button type="submit" class="btn btn-primary">{% trans "Add" %}</button>
|
2015-05-27 11:10:57 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2015-03-18 15:13:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-06-27 07:22:09 +00:00
|
|
|
{% endblock %}
|