{% extends 'timeseer.html' %}

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

{% block menu %}
{{ menu_back(url_for('.edit_flow', flowname=flow.name, sourcename=source_name)) }}
{% endblock %}

{% block main %}
<div class="ts-section py-3 my-3">
    <h2 class="h4">Edit time range for {{ flow.name }}</h2>
</div>

<div class="pt-3 my-3">

</div>

<div id="edit-flow-time-range"
    data-flow-name='{{ flow.name }}'
    data-time-range='{{ flow.time_range.to_data()|tojson|safe }}'
    data-relative-dates='{{ relative_dates|tojson|safe }}'
    data-create-url="{{ url_for('.edit_flow_time_range', flowname=flow.name, sourcename=source_name) }}"
    data-cancel-url="{{ url_for('.edit_flow', flowname=flow.name, sourcename=source_name) }}">
</div>
{% endblock %}


{% block scripts_bottom %}
<script src="{{ url_for('static', filename='dist/edit-flow-time-range.js') }}"></script>
{% endblock %}
