{% extends "base.html" %}
{% load bootstrap_helpers %}
{% load community_utils %}
{% load django_bootstrap5 %}

{% block title %}{% block headline %}Delete end-to-end encryption password{% endblock %}{% endblock %}
{% block subtitle %}{{ masterkeysecret }}{% endblock %}

{% block breadcrumbs %}
  {% url 'e2ee-status' as e2ee_status_url%}
  {% breadcrumbs "E2EE Status"|combine:e2ee_status_url "Delete password"|combine:request.path %}
{% endblock %}

{% block content %}
  {% if not can_delete_secret %}
    {% bootstrap_alert "This secret cannot be deleted as it is the only one!" alert_type="danger" dismissible=False %}
    <p>
      Please
      <a href="{% url 'e2ee-status' %}">
        do create a second password
      </a>
      in order to delete this one here.
    </p>
  {% else %}
    <div class="alert alert-danger" role="alert">
      <p>
        Are you sure, you want to delete this password?
      </p>
    </div>

    <form role="form" method="post">
      {% csrf_token %}
      {% bootstrap_button "Delete E2EE password" button_type="submit"  %}
    </form>
  {% endif %}
{% endblock %}
