fine-tuning the create-capsul experience

This commit is contained in:
2020-05-16 23:02:02 -05:00
parent 321a46d77b
commit e3a2e8eee4
5 changed files with 44 additions and 23 deletions

View File

@ -6,21 +6,10 @@
<div class="row third-margin">
<h1>Create Capsul</h1>
</div>
<div class="row third-margin"><div>
{% if created_os %}
<p>
Your Capsul was successfully created! You should already see it listed on the
<a href="/console/">Capsuls page</a>, but it may not have obtained an IP address yet.
Its IP address should become visible once the machine has booted and taken a DHCP lease.
</p>
{% if created_os == 'debian10' %}
<p>
Note: because Debian delays fully booting until after entropy has been generated, Debian Capsuls
may take an extra-long time to obtain an IP address, like up to 10 minutes. Be patient.
</p>
{% endif %}
{% else %}
<div class="row third-margin">
<div>
{% if cant_afford %}
<p>
Your account does not have sufficient funds to create a Capsul.
@ -79,14 +68,24 @@
</div>
</div>
<div class="row justify-end">
<input type="submit" value="Create">
<input id="submit-button" type="submit" value="Create">
<span id="submit-button-clicked" class="display-none">..Creating...</span>
</div>
<script>
window.addEventListener('DOMContentLoaded', function(event) {
var submitButton = document.getElementById('submit-button');
var submitButtonClicked = document.getElementById('submit-button-clicked');
document.getElementById('submit-button').onclick = function() {
submitButton.className = "display-none";
submitButtonClicked.className = "waiting-pulse";
}
});
</script>
</form>
</div>
{% endif %}
{% endif %}
</div></div>
</div>
</div>
{% endblock %}
{% block subcontent %}