{% extends "./alter_common.html" %}

{% comment %}
# Copyright (C) 2025  The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU Affero General Public License version 3, or any later version
# See top-level LICENSE file for more information
{% endcomment %}

{% block page_title %}
  {% translate "Choose request category" %}
{% endblock page_title %}

{% block navbar-content %}
  <h4>{% translate "Choose request category" %}</h4>
{% endblock navbar-content %}

{% block content %}
  {% bootstrap_messages %}
  {% if form.errors %}
    {% bootstrap_alert form.errors alert_type="danger" %}
  {% endif %}
  {% include "includes/steps.html" %}
  <p>
    {% blocktranslate trimmed %}
      Please tell us why you're requesting a change to the Archive. We'll use this to determine next steps and any information we may need.
    {% endblocktranslate %}
  </p>
  <form method="POST" class="accordion mt-3" id="categoryAccordion">
    {% csrf_token %}
    <div class="accordion-item">
      <h5 class="accordion-header">
        <button class="accordion-button collapsed"
                type="button"
                data-bs-toggle="collapse"
                data-bs-target="#categoryCopyright"
                aria-expanded="false"
                aria-controls="categoryCopyright">
          {% translate "Copyright / License infringement" %}
        </button>
      </h5>
      <div id="categoryCopyright"
           class="accordion-collapse collapse"
           data-bs-parent="#categoryAccordion">
        <div class="accordion-body">
          <p>
            {% blocktranslate trimmed %}
              To report potential copyright infringement in the Archive, please submit a takedown request.
            {% endblocktranslate %}
          </p>
          {% bootstrap_button _("Submit copyright change request") button_type="submit" button_class="btn-primary" name="category" value="copyright" %}
        </div>
      </div>
    </div>
    <div class="accordion-item">
      <h5 class="accordion-header">
        <button class="accordion-button collapsed"
                type="button"
                data-bs-toggle="collapse"
                data-bs-target="#categoryPii"
                aria-expanded="false"
                aria-controls="categoryPii">
          {% translate "Personally identifiable information (PII)" %}
        </button>
      </h5>
      <div id="categoryPii"
           class="accordion-collapse collapse"
           data-bs-parent="#categoryAccordion">
        <div class="accordion-body">
          <p>{% translate "You can request a modification to the archive if:" %}</p>
          <ul>
            <li>
              {% blocktranslate trimmed %}
                Personal data was mistakenly versioned in a repository, or you have GDPR-related issues (like a name change).
              {% endblocktranslate %}
            </li>
            <li>
              {% blocktranslate trimmed %}
                You've made a change to your repository and want to apply it to the archived version.
              {% endblocktranslate %}
            </li>
          </ul>
          {% bootstrap_button _("Request personal data change") button_type="submit" button_class="btn-primary" name="category" value="pii" %}
        </div>
      </div>
    </div>
    <div class="accordion-item">
      <h5 class="accordion-header">
        <button class="accordion-button collapsed"
                type="button"
                data-bs-toggle="collapse"
                data-bs-target="#categoryLegal"
                aria-expanded="false"
                aria-controls="categoryLegal">{% translate "Other legal matters" %}</button>
      </h5>
      <div id="categoryLegal"
           class="accordion-collapse collapse"
           data-bs-parent="#categoryAccordion">
        <div class="accordion-body">
          <p>
            {% blocktranslate trimmed %}
              If you have identified other types of illegal content in the archive,
              such as child sexual abuse material (CSAM) or content that violates
              anti-terrorism laws, you must first report this content to PHAROS, a
              French government platform for reporting illegal online content. You can
              also submit a request to remove this content from the Software Heritage
              Archive in parallel.
            {% endblocktranslate %}
          </p>
          <a href="https://www.internet-signalement.gouv.fr"
             class="btn btn-primary"
             target="_blank">PHAROS</a>
          {% bootstrap_button _("Legal archive alteration request") button_type="submit" button_class="btn-secondary" name="category" value="legal" %}
        </div>
      </div>
    </div>
  </form>
{% endblock content %}
