{% extends edc_base_template %}

{% load static %}

{% block main %}
  <div class="container">
    <div class="col-sm-3"></div>
    <div class="col-sm-6">
      <div class="panel panel-default">
        <div class="panel-heading">Create secure PDF file</div>
        <div class="panel-body">
          <span class="text-default">You have selected {{ object_count }} "{{ report_name }}" record{{ object_count|pluralize }} to include in this PDF.
          <BR>Enter a passphrase below or accept the one provided. <BR>When you are ready, click "Create file". </span><BR><BR>
          <form class="form-horizontal" action="{{ url }}" method="post" onSubmit="document.getElementById('submit').disabled=true;">
            {% csrf_token %}
            <div class="form-group">
              <label class="control-label col-sm-2" for="phrase">Passphrase:</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" id="phrase" name="phrase" placeholder="Enter a passphrase" value="{{ phrase }}" required>
              </div>
            </div>
            <button type="submit" class="btn btn-default" name="submit" id="submit">Create file</button>
            <a class="btn btn-default" href="{{return_to_changelist_url}}">Done</a>
          </form>
        </div>
      </div>
    </div>
    <div class="col-sm-3"></div>
  </div>
{% endblock main %}
