{% extends 'timeseer.html' %}

{% from 'macros.html' import alerter, menu_back %}

{% block menu %}
{{ menu_back(url_for('.manage_series_set', seriessetname=series_set_name, sourcename=source_name)) }}
{% endblock %}

{% block main %}
<div class="ts-section py-3 my-3">
    <h2 class="h4">Rename {{ series_set_name }}</h2>
</div>

<div class="pt-3 my-3">
    {{ alerter() }}

    <form method="POST">
        <input type="hidden" name="seriessetname" value="{{ series_set_name }}">

        <div class="row mb-3">
            <label for="seriesSetNameInput" class="col-sm-2 col-form-label">New name</label>
            <div class="col-sm-10">
                <input type="text"
                        class="form-control"
                        id="seriesSetNameInput"
                        name="new_seriessetname"
                        value="{{ new_series_set_name }}"
                        required>
            </div>
        </div>

        <div class="btn-toolbar">
            <button type="submit" class="btn btn-primary me-2">Rename</button>
            <a class="btn btn-secondary"
                href="{{ url_for('.manage_series_set', seriessetname=series_set_name, sourcename=source_name) }}"
                role="button">
                Cancel
            </a>
        </div>
    </form>
</div>
{% endblock %}
