{% extends 'base.html' %}
{% block content %}
{% if request.query_params.get('submitted') %}
<section class="card form-card notice-card success-card evidence-board">
  <div class="case-legend"><span class="section-label">Submission packet</span><span class="pill">Filed</span></div>
  <h2>Submission Created</h2>
  <p>Submission {{ request.query_params.get('submitted') }} was created successfully.</p>
  <p class="muted">Artifact: {{ request.query_params.get('artifact_kind', 'document') }} · Files: {{ request.query_params.get('file_count', '1') }}</p>
  <p class="muted">Paperless status: {{ request.query_params.get('paperless_status', 'uploaded-local') }}</p>
</section>
{% endif %}
<section class="card form-card evidence-board">
  <div class="case-legend chain-of-custody"><span class="section-label">Submission packet</span><span class="pill">chain-of-custody</span></div>
  <h2>Assignment Upload</h2>
  <p class="muted">Package coursework like a proper intake docket so the archive, Paperless, and later review all stay in sync.</p>
  <form class="stack intake-docket" method="post" enctype="multipart/form-data" action="/api/assignments/intake" id="assignment-upload-form">
    <label>Class
      <select name="class_id" id="class-select" required>
        <option value="">Loading classes…</option>
      </select>
      <input type="hidden" name="class_name" id="class-name-input">
    </label>
    <label>Assignment
      <select name="assignment_name" id="assignment-select" required>
        <option value="">Pick a class first</option>
      </select>
    </label>
    <label>Version <input name="version" value="v1"></label>
    <p class="muted">Programming-class uploads are bundled into one zip artifact for archival. The source files stay grouped together as one submission.</p>
    <label>Notes <textarea name="notes" rows="4" placeholder="Anything useful about this turn-in."></textarea></label>
    <label>Files
      <input type="file" name="files" multiple required>
      <small class="muted">Pick one or many files for the same assignment version. Schoolhouse will build one source bundle.</small>
    </label>
    <button type="submit">Build submission bundle</button>
  </form>
</section>
{% endblock %}
