{% extends 'index.twig' %}

{% block content %}
<section class="col-12">
  <h2 class="mb-4 border-bottom">{{ 'msgUserRemoval' | translate }}</h2>
  <p>{{ 'msgUserRemovalText' | translate }}</p>

  <p>
    {{ 'msgContactPrivacyNote' | translate }}
    <a title="{{ 'msgPrivacyNote' | translate }}" href="{{ privacyURL }}" target="_blank" rel="noopener">
      {{ 'msgPrivacyNote' | translate }}
    </a>
  </p>
  <p><strong>{{ 'msgContactRemove' | translate }}</strong></p>

  <div class="row mb-2">
    <div class="col">
      <div class="spinner-border text-primary d-none" id="loader" role="status">
        <span class="visually-hidden">Loading...</span>
      </div>
      <div id="pmf-request-removal-response"></div>
    </div>
  </div>

  <form id="pmf-request-removal-form" action="#" method="post" class="needs-validation" novalidate>
    <input type="hidden" name="lang" id="lang" value="{{ lang }}">
    <input type="hidden" name="userId" id="userId" value="{{ userId }}">
    {{ csrf | raw }}

    <div class="row mb-2">
      <label class="col-3 col-form-label" for="loginname">{{ 'msgUsername' | translate }}</label>
      <div class="col-9">
        <input
          type="text"
          class="form-control-plaintext"
          name="loginname"
          id="loginname"
          value="{{ defaultLoginName }}"
          readonly
          required
        />
      </div>
    </div>

    <div class="row mb-2">
      <label class="col-sm-3 col-form-label" for="name">{{ 'msgNewContentName' | translate }}</label>
      <div class="col-9">
        <input
          type="text"
          class="form-control-plaintext"
          name="name"
          id="name"
          value="{{ defaultContentName }}"
          readonly
          required
        />
      </div>
    </div>

    <div class="row mb-2">
      <label class="col-sm-3 col-form-label" for="email">{{ 'msgNewContentMail' | translate }}</label>
      <div class="col-9">
        <input
          type="email"
          class="form-control-plaintext"
          name="email"
          id="email"
          value="{{ defaultContentMail }}"
          readonly
          required
        />
      </div>
    </div>

    <div class="row mb-2">
      <label class="col-sm-3 col-form-label" for="question">{{ 'msgMessage' | translate }}</label>
      <div class="col-9">
        <textarea class="form-control" cols="37" rows="5" name="question" id="question" required></textarea>
      </div>
    </div>

    <div class="row mb-2">
      <div class="col-sm-12 text-end">
        <button
          class="btn btn-primary btn-lg"
          type="submit"
          id="pmf-submit-request-removal"
          data-pmf-form="submit-request-removal"
        >
          {{ 'msgNewContentSubmit' | translate }}
        </button>
      </div>
    </div>
  </form>
</section>

{% endblock %}
