add view osusers.views.AddSshPublicKey
- implement new form osusers.forms.AddSshPublicKeyForm - move message texts from osusers.admin to osusers.forms - add new view osusers.views.AddSshPublicKey - add new URL patter 'add_ssh_key' to osusers.urls - add new template osusers/sshpublickey_create.html - link from hosting package detail template to 'add_ssh_key' - add changelog entry for new feature
This commit is contained in:
parent
79b460c4a6
commit
0c7bb79109
7 changed files with 159 additions and 9 deletions
|
@ -68,6 +68,7 @@
|
|||
<ul class="list-group">
|
||||
<li class="list-group-item"><a href="#" title="{% trans "Edit Hosting Package Description" %}">{% trans "Edit description" %}</a></li>
|
||||
<li class="list-group-item"><a href="{% url "set_osuser_password" slug=osuser.username %}">{% if osuser.is_sftp_user %}{% trans "Set SFTP password" %}{% else %}{% trans "Set SSH/SFTP password" %}{% endif %}</a></li>
|
||||
<li class="list-group-item"><a href="{% url "add_ssh_key" package=hostingpackage.id %}" title="{% blocktrans %}Add an SSH public key that can be used as an alternative for password{% endblocktrans %}">{% trans "Add SSH public key" %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
30
gnuviechadmin/templates/osusers/sshpublickey_create.html
Normal file
30
gnuviechadmin/templates/osusers/sshpublickey_create.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{% extends "osusers/base.html" %}
|
||||
{% load i18n crispy_forms_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} - {% spaceless %}
|
||||
{% if user == customer %}
|
||||
{% blocktrans %}Add new SSH Public Key{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans with full_name=customer.get_full_name %}Add a new SSH Public Key for Operating System User {{ osuser }} of Customer {{ full_name }}{% endblocktrans %}
|
||||
{% endif %}
|
||||
{% endspaceless %}{% endblock title %}
|
||||
|
||||
{% block page_title %}{% spaceless %}
|
||||
{% if user == customer %}
|
||||
{% blocktrans %}Add new SSH Public Key{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans with full_name=customer.get_full_name %}Add a new SSH Public Key <small>for Operating System User {{ osuser }} of Customer {{ full_name }}</small>{% endblocktrans %}
|
||||
{% endif %}
|
||||
{% endspaceless %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
{% crispy form %}
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('textarea').first().focus();
|
||||
});
|
||||
</script>
|
||||
{% endblock extra_js %}
|
Loading…
Add table
Add a link
Reference in a new issue