{% extends 'timeseer.html' %}

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

{% block menu %}
{{ menu_back(url_for('kpi_sets.show_kpi_sets', sourcename=source_name)) }}
{% endblock %}

{% block main %}
<div class="ts-section py-3 my-3">
    <h2 class="h4">Create a new KPI set</h2>
</div>

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

    <form method="POST">
        <input type="hidden" name="sourcename" value="{{ source_name }}">
        <div class="mb-3">
            <label class="form-label" for="kpiSetsName">KPI set name:</label>
            <input class="form-control" id="kpiSetsName" name="kpisetname" autofocus required>
        </div>
        <button type="submit" class="btn btn-primary me-2">Create</button>
        <a href="{{ url_for('.show_kpi_sets', sourcename=source_name) }}"
            class="btn btn-secondary">
            Cancel
        </a>
    </form>
</div>
{% endblock %}
