BareGit
{% extends "layout.html" %}

{% block content %}
<section class="page-shell form-page" aria-labelledby="SeriesFormHeading">
    <a class="back-link" href="{{ back_url }}">← All series</a>
    <p class="eyebrow">Series administration</p>
    <h1 id="SeriesFormHeading">{{ heading }}</h1>

    <form class="standalone-form" method="post" action="{{ action_url }}">
        <input type="hidden" name="csrf_token" value="{{ csrf_token }}">
        <label class="form-field" for="SeriesGame">
            <span>Game</span>
            {% if mode == "create" %}
            <select id="SeriesGame" name="game" required>
                <option value="">Select a game</option>
                {% for item in games %}
                <option value="{{ item.short_name }}">
                    {{ item.display_name }}
                    {% if item.internal %} (Internal){% endif %}
                </option>
                {% endfor %}
            </select>
            {% else %}
            <input id="SeriesGame" type="text" value="{{ game }}" disabled>
            {% endif %}
        </label>
        <label class="form-field" for="SeriesName">
            <span>Name</span>
            <input id="SeriesName" name="name" type="text"
                   maxlength="200" value="{{ name }}" required>
        </label>
        <label class="form-field" for="SeriesDescription">
            <span>Description</span>
            <textarea id="SeriesDescription" name="description"
                      rows="8">{{ description }}</textarea>
        </label>
        <button class="form-submit" type="submit">{{ submit_label }}</button>
    </form>
</section>
{% endblock %}