dynamicweb/hosting/templates/hosting/choice_ssh_keys.html

67 lines
2.3 KiB
HTML
Raw Normal View History

{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 i18n %}
{% block content %}
<div>
<div class="container virtual-machine-container dashboard-container dashboard-choice-container">
2017-08-01 19:55:27 +05:30
<div class="wide440">
2017-08-01 19:05:52 +05:30
<div class="page-header">
2017-08-02 23:51:44 +05:30
<h1 class="h1-thin"><i class="fa fa-key" aria-hidden="true"></i>&nbsp;{% trans "SSH Key"%}</h1>
2017-08-01 19:05:52 +05:30
<p>{% trans "Choose a key option in order to access your VM" %}.</p>
</div>
{% if messages %}
<div class="alert alert-warning">
{% for message in messages %}
<span>{{ message }}</span>
{% endfor %}
</div>
{% endif %}
<div class="choice-container">
<div class="choice-container-top">
<h2>{% trans "Generating a new key pair" %}</h2>
<p>{% trans "I want to generate a new key pair" %}.</p>
<form class="text-right" action="" method="post">
{% csrf_token %}
2017-08-01 21:20:42 +05:30
<button type="submit" class="btn choice-btn choice-btn-faded">
2017-08-02 23:51:44 +05:30
{% trans "Generate" %}
2017-08-01 19:05:52 +05:30
</button>
</form>
2017-08-01 19:05:52 +05:30
</div>
<div>
<h2>{% trans "Using existing key" %}</h2>
<p>{% trans "I want to use my existing public key"%}.</p>
<form class="text-right" action="{% url 'hosting:create_ssh_key' %}">
2017-08-01 21:20:42 +05:30
<button type="submit" class="btn choice-btn">
2017-08-02 23:51:44 +05:30
{% trans "Upload" %}
2017-08-01 19:05:52 +05:30
</button>
</form>
</div>
</div>
</div>
</div>
</div>
{% if next_url %}
<script type="text/javascript">
window.location.href = '{{next_url}}';
</script>
{% endif %}
<script type="text/javascript">
window.onload = function () {
{% for user_key in keys %}
var locale_date = moment.utc(document.getElementById("ssh-created_at-{{user_key.id}}").textContent,'YYYY-MM-DD HH:mm').toDate();
locale_date = moment(locale_date).format("YYYY-MM-DD h:mm:ss a");
document.getElementById('ssh-created_at-{{user_key.id}}').innerHTML = locale_date;
{% endfor %}
};
</script>
{%endblock%}