letsencrypt: Split CSS styling into a separate file

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2020-12-17 17:07:34 -08:00 committed by Veiko Aasa
parent 9c2d936b33
commit ccefd98135
No known key found for this signature in database
GPG Key ID: 478539CAE680674E
2 changed files with 19 additions and 14 deletions

View File

@ -0,0 +1,11 @@
/*
# SPDX-License-Identifier: AGPL-3.0-or-later
*/
.table .form .btn {
width: 6.125rem;
}
.operations form {
display: inline;
}

View File

@ -5,17 +5,11 @@
{% load bootstrap %} {% load bootstrap %}
{% load i18n %} {% load i18n %}
{% load static %}
{% block page_head %} {% block page_head %}
<style type="text/css"> <link type="text/css" rel="stylesheet"
.table .form .btn { href="{% static 'letsencrypt/letsencrypt.css' %}"/>
width: 6.125rem;
}
.form-inline {
display: inline;
}
</style>
{% endblock %} {% endblock %}
{% block configuration %} {% block configuration %}
@ -77,22 +71,22 @@
<span class="badge badge-warning">{% trans "Disabled" %}</span> <span class="badge badge-warning">{% trans "Disabled" %}</span>
{% endif %} {% endif %}
</td> </td>
<td> <td class="operations">
{% if domain_status.certificate_available %} {% if domain_status.certificate_available %}
<form class="form form-inline" method="post" <form class="form" method="post"
action="{% url 'letsencrypt:re-obtain' domain %}"> action="{% url 'letsencrypt:re-obtain' domain %}">
{% csrf_token %} {% csrf_token %}
<button class="btn btn-sm btn-default" type="submit"> <button class="btn btn-sm btn-default" type="submit">
{% trans "Re-obtain" %}</button> {% trans "Re-obtain" %}</button>
</form> </form>
<form class="form form-inline" method="post" <form class="form" method="post"
action="{% url 'letsencrypt:delete' domain %}"> action="{% url 'letsencrypt:delete' domain %}">
{% csrf_token %} {% csrf_token %}
<button class="btn btn-sm btn-default" type="submit"> <button class="btn btn-sm btn-default" type="submit">
{% trans "Delete" %}</button> {% trans "Delete" %}</button>
</form> </form>
{% if "revoked" not in domain_status.validity %} {% if "revoked" not in domain_status.validity %}
<form class="form form-inline" method="post" <form class="form" method="post"
action="{% url 'letsencrypt:revoke' domain %}"> action="{% url 'letsencrypt:revoke' domain %}">
{% csrf_token %} {% csrf_token %}
<button class="btn btn-sm btn-default" type="submit"> <button class="btn btn-sm btn-default" type="submit">
@ -100,7 +94,7 @@
</form> </form>
{% endif %} {% endif %}
{% else %} {% else %}
<form class="form form-inline" method="post" <form class="form" method="post"
action="{% url 'letsencrypt:obtain' domain %}"> action="{% url 'letsencrypt:obtain' domain %}">
{% csrf_token %} {% csrf_token %}
<button class="btn btn-sm btn-primary" type="submit"> <button class="btn btn-sm btn-primary" type="submit">