2016-05-20 21:11:42 +00:00
|
|
|
{% extends "hosting/base_short.html" %}
|
Created signup view. Added login after signup.Added signup url to nosystem app urls.py. Added logout view, Added logout button on nabber, Added password reset form, Added password view , Added password reset html, Added password reset email for nosystemd app. Added confirm_reset_password.html, Added confirm_ reset password view, Added confirm reset password form, Fixed reset password token generation, Started donation view, Added donation view, Added donation.html, Added donation form, Adding donation.js lib in order to capture stripe payments for nosystem app.
2016-07-22 06:24:32 +00:00
|
|
|
{% load staticfiles bootstrap3 i18n %}
|
2017-07-05 13:57:49 +00:00
|
|
|
{% block content %}
|
2016-05-20 21:11:42 +00:00
|
|
|
<div>
|
2017-06-01 16:24:50 +00:00
|
|
|
<div class="virtual-machine-container dashboard-container ">
|
2016-05-20 21:11:42 +00:00
|
|
|
<div class="row">
|
2017-06-01 16:24:50 +00:00
|
|
|
<div class="container-table col-md-9 col-md-offset-2">
|
2017-08-01 13:35:52 +00:00
|
|
|
<div class="col-sm-12">
|
2017-06-12 01:04:06 +00:00
|
|
|
<form method="POST" action="" novalidate class="form-ssh">
|
2017-05-04 04:19:32 +00:00
|
|
|
{% csrf_token %}
|
2017-07-29 12:49:10 +00:00
|
|
|
<h3><i class="fa fa-key fa-separate" aria-hidden="true"></i>{% trans "Add your public SSH key" %}</h3>
|
2017-05-12 05:56:35 +00:00
|
|
|
{% if messages %}
|
|
|
|
<div class="alert alert-warning">
|
|
|
|
{% for message in messages %}
|
|
|
|
<span>{{ message }}</span>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2017-06-01 18:47:11 +00:00
|
|
|
{% endif %}
|
|
|
|
{% for field in form %}
|
|
|
|
{% bootstrap_field field %}
|
|
|
|
{% endfor %}
|
|
|
|
{% buttons %}
|
2017-07-05 13:57:49 +00:00
|
|
|
<div class="underform-contaner">
|
2017-07-29 12:49:10 +00:00
|
|
|
<h4>{% trans "Use your created key to access to the VM" %}.</h4>
|
2017-07-06 08:47:12 +00:00
|
|
|
<button type="submit" name='add_ssh' class="btn btn-success custom_form_button">
|
2017-07-05 13:57:49 +00:00
|
|
|
{% trans "Add SSH key"%}
|
2017-06-01 18:47:11 +00:00
|
|
|
</button>
|
2017-07-05 13:57:49 +00:00
|
|
|
</div>
|
|
|
|
<div class="underform-contaner">
|
2017-07-29 12:49:10 +00:00
|
|
|
<h4>{% trans "Or you can generate a new key pair"%}.</h4>
|
2017-07-27 14:44:10 +00:00
|
|
|
<button type="submit" name='generate' class="btn btn-default custom_form_button">{% trans "Generate"%}
|
2017-07-05 13:57:49 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
2017-05-04 04:19:32 +00:00
|
|
|
|
2017-07-05 13:57:49 +00:00
|
|
|
|
|
|
|
{% endbuttons %}
|
2017-06-03 13:03:55 +00:00
|
|
|
</form>
|
2017-05-04 04:19:32 +00:00
|
|
|
|
2016-05-24 06:19:49 +00:00
|
|
|
{% if private_key %}
|
|
|
|
<div class="alert alert-warning">
|
2017-07-05 13:57:49 +00:00
|
|
|
|
2017-07-29 12:49:10 +00:00
|
|
|
<strong>{% trans "Warning!"%}</strong>{% trans "You can download your SSH private key once. Don't loose your key" %}
|
2016-05-24 06:19:49 +00:00
|
|
|
</div>
|
2016-05-20 21:11:42 +00:00
|
|
|
<div class="form-group">
|
2017-05-04 04:19:32 +00:00
|
|
|
<textarea class="form-control" rows="6" id="ssh_key" type="hidden" style="display:none">{{private_key}}</textarea>
|
2016-05-20 21:11:42 +00:00
|
|
|
</div>
|
2017-06-03 13:03:55 +00:00
|
|
|
{% endif %}
|
2016-05-24 06:19:49 +00:00
|
|
|
<div class="clearfix"></div>
|
2016-05-20 21:11:42 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-05-24 06:19:49 +00:00
|
|
|
|
|
|
|
{% if private_key %}
|
|
|
|
<!-- Force to download ssh key on page load -->
|
2017-07-05 13:57:49 +00:00
|
|
|
<script type="text/javascript">
|
2016-05-24 06:19:49 +00:00
|
|
|
|
2017-05-04 04:19:32 +00:00
|
|
|
var key = window.document.getElementById('ssh_key');
|
|
|
|
|
2016-05-24 06:19:49 +00:00
|
|
|
var a = window.document.createElement('a');
|
|
|
|
|
2017-05-04 04:19:32 +00:00
|
|
|
a.href = window.URL.createObjectURL(new Blob([key.value], {type: 'text'}));
|
|
|
|
a.download = '{{key_name}}.pem';
|
2016-05-24 06:19:49 +00:00
|
|
|
|
|
|
|
// Append anchor to body.
|
|
|
|
document.body.appendChild(a);
|
|
|
|
a.click();
|
|
|
|
|
|
|
|
// Remove anchor from body
|
|
|
|
document.body.removeChild(a);
|
|
|
|
|
2017-05-11 05:11:33 +00:00
|
|
|
|
2016-05-20 21:11:42 +00:00
|
|
|
</script>
|
2016-05-24 06:19:49 +00:00
|
|
|
{%endif%}
|
|
|
|
|
2017-05-22 03:35:43 +00:00
|
|
|
{% if next_url %}
|
2017-07-05 13:57:49 +00:00
|
|
|
<script type="text/javascript">
|
2017-05-22 03:46:31 +00:00
|
|
|
window.location.href = '{{next_url}}';
|
2017-05-22 03:38:12 +00:00
|
|
|
</script>
|
2017-05-22 03:35:43 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2016-05-20 21:11:42 +00:00
|
|
|
{%endblock%}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|