{% load i18n %}
<h4 id="a2-ssl-certificate-profile" class="a2-ssl-certificate-profile-title">
  {% trans "SSL Certificates" %}
</h4>

<div class="a2-ssl-certificate-profile-body">
  <ul class="a2-ssl-certificate-list">
  {% for certificate in certificates %}
    <li class="a2-ssl-certificate-item">
      <form action="{% url "delete_certificate" certificate_pk=certificate.pk %}"
            method="post">
        {% csrf_token %}
        <p class="a2-ssl-certificate-dn">
          <dl class="a2-ssl-certificate-dn-parts">
            {% for k, v in certificate.explode_subject_dn %}
              <dt class="a2-ssl-certificate-dn-part-name">{{ k }}</dt>
              <dd class="a2-ssl-certificate-dn-part-value">{{ v }}</dd>
            {% endfor %}
          </dl>
        </p>
        <button class="submit-button a2-ssl-certificate-submit-button">{% trans "Delete" %}</button>
      </form>
    </p>
  {% endfor %}
  </ul>
  <p>
    <form action="{% url "user_signin_ssl" %}" method="get">
      <label for="id_del_cert">{% trans "Add a certificate?" %}</label>
      <input type="hidden" name="next" value="{% url "account_management" %}#a2-ssl-certificate-profile" />
      <button class="submit-button a2-ssl-certificate-submit-button">{% trans "Add" %}</button>
    </form>
  </p>
</div>
