mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
letsencrypt: I18n and minor fixes
- Fix indentation from a recent change. - Internationalize 'no domains configured' message. - Expand the message as per orignal pull request.
This commit is contained in:
parent
a685870b19
commit
7e4af695ce
@ -35,73 +35,76 @@
|
|||||||
|
|
||||||
{% block configuration %}
|
{% block configuration %}
|
||||||
{% if status.domains %}
|
{% if status.domains %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<table class="table table-bordered table-condensed table-striped">
|
<table class="table table-bordered table-condensed table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{% trans "Domain" %}</th>
|
||||||
|
<th>{% trans "Certificate Status" %}</th>
|
||||||
|
<th>{% trans "Website Security" %}</th>
|
||||||
|
<th>{% trans "Actions" %}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for domain, domain_status in status.domains.items %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Domain" %}</th>
|
<td>{{ domain }}</td>
|
||||||
<th>{% trans "Certificate Status" %}</th>
|
<td>
|
||||||
<th>{% trans "Website Security" %}</th>
|
{% if domain_status.certificate_available %}
|
||||||
<th>{% trans "Actions" %}</th>
|
<span class="label label-success">
|
||||||
|
{% blocktrans trimmed with expiry_date=domain_status.expiry_date %}
|
||||||
|
Expires on {{ expiry_date }}
|
||||||
|
{% endblocktrans %}
|
||||||
|
</span>
|
||||||
|
{% else %}
|
||||||
|
<span class="label label-warning">
|
||||||
|
{% trans "No certificate" %}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if domain_status.web_enabled %}
|
||||||
|
<span class="label label-success">{% trans "Enabled" %}</span>
|
||||||
|
{% else %}
|
||||||
|
<span class="label label-warning">{% trans "Disabled" %}</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if domain_status.certificate_available %}
|
||||||
|
<form class="form form-inline" method="post"
|
||||||
|
action="{% url 'letsencrypt:revoke' domain %}">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button class="btn btn-sm btn-default" type="submit">
|
||||||
|
{% trans "Revoke" %}</button>
|
||||||
|
</form>
|
||||||
|
<form class="form form-inline" method="post"
|
||||||
|
action="{% url 'letsencrypt:obtain' domain %}">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button class="btn btn-sm btn-default" type="submit">
|
||||||
|
{% trans "Re-obtain" %}</button>
|
||||||
|
</form>
|
||||||
|
{% else %}
|
||||||
|
<form class="form form-inline" method="post"
|
||||||
|
action="{% url 'letsencrypt:obtain' domain %}">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button class="btn btn-sm btn-primary" type="submit">
|
||||||
|
{% trans "Obtain" %}</button>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
{% endfor %}
|
||||||
<tbody>
|
</tbody>
|
||||||
{% for domain, domain_status in status.domains.items %}
|
</table>
|
||||||
<tr>
|
|
||||||
<td>{{ domain }}</td>
|
|
||||||
<td>
|
|
||||||
{% if domain_status.certificate_available %}
|
|
||||||
<span class="label label-success">
|
|
||||||
{% blocktrans trimmed with expiry_date=domain_status.expiry_date %}
|
|
||||||
Expires on {{ expiry_date }}
|
|
||||||
{% endblocktrans %}
|
|
||||||
</span>
|
|
||||||
{% else %}
|
|
||||||
<span class="label label-warning">
|
|
||||||
{% trans "No certificate" %}
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% if domain_status.web_enabled %}
|
|
||||||
<span class="label label-success">{% trans "Enabled" %}</span>
|
|
||||||
{% else %}
|
|
||||||
<span class="label label-warning">{% trans "Disabled" %}</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% if domain_status.certificate_available %}
|
|
||||||
<form class="form form-inline" method="post"
|
|
||||||
action="{% url 'letsencrypt:revoke' domain %}">
|
|
||||||
{% csrf_token %}
|
|
||||||
<button class="btn btn-sm btn-default" type="submit">
|
|
||||||
{% trans "Revoke" %}</button>
|
|
||||||
</form>
|
|
||||||
<form class="form form-inline" method="post"
|
|
||||||
action="{% url 'letsencrypt:obtain' domain %}">
|
|
||||||
{% csrf_token %}
|
|
||||||
<button class="btn btn-sm btn-default" type="submit">
|
|
||||||
{% trans "Re-obtain" %}</button>
|
|
||||||
</form>
|
|
||||||
{% else %}
|
|
||||||
<form class="form form-inline" method="post"
|
|
||||||
action="{% url 'letsencrypt:obtain' domain %}">
|
|
||||||
{% csrf_token %}
|
|
||||||
<button class="btn btn-sm btn-primary" type="submit">
|
|
||||||
{% trans "Obtain" %}</button>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% include "diagnostics_button.html" with module="letsencrypt" %}
|
{% include "diagnostics_button.html" with module="letsencrypt" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
No domains have been configured....
|
{% blocktrans trimmed %}
|
||||||
|
No domains have been configured. Configure domains to be able to
|
||||||
|
obtain certificates for them.
|
||||||
|
{% endblocktrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user