Files
wireguard_webadmin/templates/app_gateway/dns_credential_form.html
T

63 lines
2.8 KiB
HTML
Raw Normal View History

{% extends 'base.html' %}
{% load crispy_forms_tags %}
{% load i18n %}
{% block content %}
<div class='row'>
<div class='col-lg-6'>
<div class="card card-primary card-outline">
<div class="card-header">
<h3 class="card-title">{{ page_title }}</h3>
</div>
<div class="card-body row">
<div class="col-lg-12">
{% crispy form %}
</div>
</div>
</div>
</div>
<div class='col-lg-6'>
<div class="card card-primary card-outline">
<div class="card-body row">
<div class="col-lg-12">
<h5>{% trans 'DNS Credential' %}</h5>
<p>{% trans 'Credentials used to create the DNS records required by the ACME DNS challenge.' %}</p>
<p>{% blocktrans trimmed %}
Use a token restricted to editing DNS records of the zones you need. For Cloudflare, create an
API Token with the <strong>Zone / Zone / Read</strong> and <strong>Zone / DNS / Edit</strong> permissions.
{% endblocktrans %}</p>
<p>{% trans 'Secret values are never displayed after saving. Leave them blank when editing to keep the current value.' %}</p>
<h5>{% trans 'Delegation domain' %}</h5>
<p>{% blocktrans trimmed %}
Use a delegation domain when the zone of the hostnames is not managed by this provider, or
to keep the token restricted to a zone used only for certificate validation. The challenge
record is created in the delegation domain, and each hostname needs a CNAME record pointing
to it:
{% endblocktrans %}</p>
<p><code>_acme-challenge.app.example.com CNAME app.example.com.acme.example.net</code></p>
<p>{% trans 'The token must be able to edit the DNS records of the delegation domain zone. The required record of each host is shown when the host is edited and in the host list.' %}</p>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block custom_page_scripts %}
<script>
$(document).ready(function () {
function toggleProviderFields() {
var provider = $('#id_provider').val();
$('.provider-group').hide();
if (provider) {
$('.provider-' + provider).show();
}
}
$('#id_provider').change(toggleProviderFields);
toggleProviderFields();
});
</script>
{% endblock %}