Display a conditional button for generation dkim keys, fixes #346

master
kaiyou 7 years ago
parent d0b8de72e4
commit 8d224824ea

@ -10,7 +10,13 @@
{% block main_action %}
{% if current_user.global_admin %}
<a class="btn btn-primary" href="{{ url_for(".domain_genkeys", domain_name=domain.name) }}">{% trans %}Regenerate keys{% endtrans %}</a>
<a class="btn btn-primary" href="{{ url_for(".domain_genkeys", domain_name=domain.name) }}">
{% if domain.dkim_publickey %}
{% trans %}Regenerate keys{% endtrans %}
{% else %}
{% trans %}Generate keys{% endtrans %}
{% endif %}
</a>
{% endif %}
{% endblock %}

Loading…
Cancel
Save