{% extends "base.html" %}

{% block content %}
<div class="container">
  <section>
    <div class="page-header"><h1>Secret</h1></div>
    <p>Save the following secret to a secure location.</p>
    <div class="row">
      <div class="col-sm-6 margin-bottom-10">
        <textarea class="form-control" rows="10" cols="50" id="password-text" name="password-text" readonly="readonly">{{ password }}</textarea>
      </div>

      <div class="col-sm-6">
        <button title="Copy to clipboard" type="button" class="btn btn-primary copy-clipboard-btn"
              id="copy-clipboard-btn" data-clipboard-target="#password-text"
              data-placement='bottom'>
          <i class="fa fa-clipboard"></i>
        </button>
      </div>
    </div>
    <p>The secret has now been permanently deleted from the system, and the URL will no longer work. Refresh this page to verify.</p>
  </section>
</div>
{% endblock %}

{% block js %}
<script src="{{ config.STATIC_URL }}/clipboardjs/clipboard.min.js"></script>
<script src="{{ config.STATIC_URL }}/snappass/scripts/clipboard_button.js"></script>
{% endblock %}
