{#
/*
 * Spring Signage Ltd - http://www.springsignage.com
 * Copyright (C) 2016 Spring Signage Ltd
 * (statistics-form-export.twig)
 */
#}

{% extends "form-base.twig" %}
{% import "forms.twig" as forms %}

{% block formTitle %}
    {% trans "Export Statistics" %}
{% endblock %}

{% block formButtons %}
    {% trans "Help" %}, XiboHelpRender("{{ help }}")
    {% trans "Cancel" %}, XiboDialogClose()
    {% trans "Save" %}, statsExportFormSubmit()
{% endblock %}

{% block formHtml %}
    <div class="row">
        <div class="col-md-12">
            <form id="statisticsExportForm" class="XiboManualForm form-horizontal" method="get" action="{{ urlFor("stats.export") }}">
                {% set title %}{% trans "From Date" %}{% endset %}
                {{ forms.date("fromDt", title) }}

                {% set title %}{% trans "To Date" %}{% endset %}
                {{ forms.date("toDt", title) }}

                {% set title %}{% trans "Display" %}{% endset %}
                {% set attributes = [
                    { name: "data-width", value: "100%" },
                    { name: "data-allow-clear", value: "true" },
                    { name: "data-placeholder--id", value: null },
                    { name: "data-placeholder--value", value: "" },
                    { name: "data-search-url", value: urlFor("display.search") },
                    { name: "data-search-term", value: "display" },
                    { name: "data-id-property", value: "displayId" },
                    { name: "data-text-property", value: "display" }
                ] %}
                {{ forms.dropdown("displayId", "single", title, "", null, "displayId", "display", "", "pagedSelect", "", "d", "", attributes) }}
            </form>
        </div>
    </div>
{% endblock %}