{% extends 'timeseer.html' %}

{% from 'macros.html' import alerter %}
{% from 'configure.html' import configure_menu with context %}

{% block menu %}
{{ configure_menu('Time series names') }}
{% endblock %}

{% block main %}
<div class="ts-section py-3 my-3">
    <h2 class="h4">Manage time series names</h2>
</div>

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

    <div class="alert alert-info">
        Time series naming preferences are user specific.
        Changing them here does not change them for other users.
    </div>

    <form method="POST">
        <div class="mb-3">
            <label for="series-display-length">Maximum time series name display length</label>
            {% if has_display_length %}
            <input type="text" class="form-control" id="series-display-length" name="series-display-length" aria-describedby="seriesDisplayHelp" value="{{ series_display_length }}">
            {% else %}
            <input type="text" class="form-control" id="series-display-length" name="series-display-length" aria-describedby="seriesDisplayHelp" placeholder="{{ series_display_length }}">
            {% endif %}
            <small id="seriesDisplayHelp" class="form-text text-muted">The maximum display length of the name of time series. Set to <code>0</code> to disable abbreviation.</small>
        </div>
        <button type="submit" class="btn btn-primary">Submit</button>
    </form>
</div>
{% endblock %}
