{% extends "layout.html" %}
{% block content %}
<section class="row">
  <div class="col-md-12">
    <h2>
      Delete {{ secret.secret_type.pretty_name }}
      "{{ secret.name or secret.uuid }}"
    </h2>
    <dl>
      {% if secret.name %}
      <dt>UUID</dt>
      <dd>{{ secret.uuid }}</dd>
      {% endif %}
      <dt>Created</dt>
      <dd>{{ secret.created | date }}</dd>
      <dt>Last used</dt>
      <dd>{{ secret.updated | date }}</dd>
      {% if secret.secret_type.value == "plaintext_file" %}
      <dt>File</dt>
      <dd>{{ secret.path }} (<i>{{ '%03o' % secret.mode }}</i> mode)</dd>
      {% endif %}
    <dl>
    <form method="POST" action="/secret/delete">
      {{csrf_token()}}
      <input type="hidden" name="uuid" value="{{ secret.uuid }}"></input>
      <button type="submit" class="btn btn-danger">
        Permanently delete secret {{icon('caret-right')}}
      </button>
      <a href="/secrets" class="btn btn-default">
        Cancel operation and keep this secret {{icon('caret-right')}}
      </a>
    </form>
  </div>
</section>
{% endblock %}
