{#
  Copyright (C) 2024 I-Form.

  invenio-theme-iform is free software; you can redistribute it and/or modify it
  under the terms of the MIT License; see LICENSE file for more details.
#}
{% extends "invenio_administration/base.html" %}

{% block admin_page_content %}
<div class="ui container dashboard rel-mt-5">
  <div class="ui grid">
    <div class="sixteen wide column">
      <h2 class="ui header">
        <i class="user plus icon"></i>
        <div class="content">
          {{ _("Create User") }}
          <div class="sub header">{{ _("Manually add a new user account.") }}</div>
        </div>
      </h2>

      {% with messages = get_flashed_messages(with_categories=true) %}
        {% if messages %}
          {% for category, message in messages %}
            <div class="ui {{ 'positive' if category == 'success' else 'negative' }} message">
              {{ message }}
            </div>
          {% endfor %}
        {% endif %}
      {% endwith %}

      <div class="ui segment">
        <form method="POST" class="ui form">
          <div class="field required">
            <label>{{ _("Email Address") }}</label>
            <input type="email" name="email" placeholder="user@example.com" required>
          </div>

          <div class="field required">
            <label>{{ _("Password") }}</label>
            <input type="password" name="password" placeholder="Password" required>
          </div>

          <div class="field">
            <div class="ui checkbox">
              <input type="checkbox" name="confirm_email" value="true" id="confirm_email" checked>
              <label for="confirm_email">{{ _("Automatically confirm email address (allow immediate login)") }}</label>
            </div>
          </div>

          <button type="submit" class="ui button primary">
            <i class="user plus icon"></i> {{ _("Create User") }}
          </button>
        </form>
      </div>
    </div>
  </div>
</div>
{% endblock %}
