ui: Create reusable CSS class for collapsible-button

.collapsible-button is used by both "Client Apps" and the "How to verify?"
button in backups:verify-ssh-hostkey page.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
Joseph Nuthalapati committed 2019-07-03 12:42:48 +05:30
1 parent 3a6dcbe7a7
commit 9f71c5867e
3 files changed
+30 -33

No files matched your search

@@ -20,41 +20,39 @@
{% load bootstrap %}
{% load i18n %}
{% block content %}
<h3>{{ title }}</h3>
<form class="form" method="post">
{% csrf_token %}
<h3>{{ title }}</h3>
<br/>
<form class="form" method="post">
{% csrf_token %}
<br/>
<p>
The authenticity of host {{ hostname }} cannot be established.<br/> The SSH host advertises the following public keys. Please verify any one of them.
</p>
<section>
<p>
The authenticity of host {{ hostname }} cannot be established.<br/>
The SSH host advertises the following public keys. Please verify any one of them.
<a class="btn btn-default collapsed collapsible-button" data-toggle="collapse" href="#help" aria-expanded="false"><i class="fa fa-chevron-right fa-fw" aria-hidden="true"></i> {% trans "How to verify?" %}</a>
</p>
<section>
<div class="collapse panel-body" id="help">
{% blocktrans trimmed %}
<p>Run the following command on the SSH host machine. The output should match one of the provided options. You can also use dsa, ecdsa, ed25519 etc. instead of rsa, by choosing the corresponding file.</p>
{% endblocktrans %}
<p>
<a class="btn btn-default" data-toggle="collapse" href="#help" aria-expanded="false">{% trans "How to verify?" %} <i class="fa fa-chevron-down fa-fw" aria-hidden="true"></i></a>
<code>sudo ssh-keygen -lf /etc/ssh/ssh_host_rsa_key</code>
</p>
<div class="collapse" id="help">
{% blocktrans trimmed %}
<p>Run the following command on the SSH host machine. The output should match one of the provided options. You can also use dsa, ecdsa, ed25519 etc. instead of rsa, by choosing the corresponding file.</p>
{% endblocktrans %}
<p>
<code>sudo ssh-keygen -lf /etc/ssh/ssh_host_rsa_key</code>
</p>
</div>
</section>
</div>
</section>
{{ form|bootstrap }}
{{ form|bootstrap }}
<input type="submit" class="btn btn-primary"
value="{% trans "Verify" %}"/>
<a class="btn btn-default" role="button" href="{% url 'backups:index' %}">
{% trans "Cancel" %}
</a>
</form>
<input type="submit" class="btn btn-primary" value="{% trans " Verify " %}"/>
<a class="btn btn-default" role="button" href="{% url 'backups:index' %}">
{% trans "Cancel" %}
</a>
</form>
{% endblock %}