Fibinger Ádám
2019-10-17 a4186ab0762833a4c4dd741e6dd112185efc2272
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{% extends "admin/html-skeleton.twig" %}
{% block body %}
    <form action="/generator/match-history.php" method="post">
        <select name="currentMap" id="currentMap" onchange="updateSites()">
            {% for map in history.getMapNames %}
                <option value="{{ map }}" {{ history.getCurrentMap == map ? "selected" }}>{{ map }}</option>
            {% endfor %}
        </select>
        <div class="form-group">
            <pre>
            {% for round in history %}
                {% include "admin/history-round.twig" %}
            {% endfor %}
            </pre>
        </div>
    </form>
{% endblock %}
 
{% block lazyload %}
    {{ parent() }}
    <script type="text/javascript">
        var maps = {{ history.getMaps|json_encode|raw }}
            function updateSites() {
                var currentMap = document.getElementById('currentMap').value;
                console.log(maps[currentMap]);
            }
    </script>
{% endblock %}