Fibinger Ádám
9 days ago c5946f44341c29594803c5b2ca64dcaf335fbca3
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{% extends "admin/html-skeleton.twig" %}
{% block body %}
    <form action="/generator/form.php" method="post">
        <input type="hidden" name="stripe[class]" value="team-ban"/>
 
        <div class="form-group">
            <div class="form-row">
                <div class="col-md-8 mb-3">
                    <label for="validationServer01">Kupa neve</label>
                    <input type="text" name="stripe[cup][name]" class="form-control" id="validationServer01"
                           placeholder="Pld.: 5on5 Bomb Cup" value="{{ stripe.cup.name }}">
                </div>
                <div class="col-md-2 mb-3">
                    <label for="validationServer02">Kupa sorszám</label>
                    <input type="text" name="stripe[cup][number]" class="form-control" id="validationServer02"
                           placeholder="Pld.: #654"
                           value="{{ stripe.cup.number }}">
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="form-row">
                <label for="teamname">Csapat gyorsfeltöltés:</label>
                <select id="teamname">
                    {% for teamName in teamNames %}
                        <option value="{{ teamName }}">{{ teamName }}</option>
                    {% endfor %}
                </select>
                <button class="btn btn-primary"
                        title="Legyen az itt kiválasztott a kék csapat"
                        onclick="$('#team_blue_name').val($('#teamname').val()); return false;">Legyen kék</button>
 
                <button class="btn btn-warning"
                        title="Csapat színcsere"
                        onclick="$('#team_orange_name').val($('#teamname').val()); return false;">Legyen narancs</button>
            </div>
        </div>
        <div class="form-group">
            <div class="form-row">
                <div class="form-group bg-primary">
                    <div class="col-md-12 mb-4">
                        <label for="team_blue_name" class="bg-primary">Kék csapat neve</label>
                        <input type="text" name="stripe[team][blue][name]" class="form-control" id="team_blue_name"
                               placeholder="Pld.: Impress!ve" value="{{ stripe.team.blue.name }}" required>
                    </div>
                    <div class="col-md-12 mb-4">
                        <label for="op-blue" class="bg-primary">Banolt operátorok</label>
                        <select name="stripe[team][blue][ban][]" class="operators" id="op-blue" style="width: 100%"
                                multiple>
                            {% for operator in operators %}
                                <option value="{{ operator }}" {{ operator in stripe.team.blue.ban ? "selected" }}>{{ operator|capitalize }}</option>
                            {% endfor %}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <button class="btn btn-info" title="Csapat színcsere" onclick="swapTeams(); return false;"><=>
                    </button>
                </div>
                <div class="form-group bg-warning">
                    <div class="col-md-12 mb-4">
                        <label for="team_orange_name">Narancs csapat neve</label>
                        <input type="text" name="stripe[team][orange][name]" class="form-control" id="team_orange_name"
                               placeholder="Pld.: Opress!ve" value="{{ stripe.team.orange.name }}" required>
                    </div>
                    <div class="col-md-12 mb-4">
                        <label for="op-orange" class="bg-warning">Banolt operátorok</label>
                        <select name="stripe[team][orange][ban][]" class="operators" id="op-orange" style="width: 100%"
                                multiple>
                            {% for operator in operators %}
                                <option value="{{ operator }}" {{ operator in stripe.team.orange.ban ? "selected" }}>{{ operator|capitalize }}</option>
                            {% endfor %}
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <button class="btn btn-primary mx-auto" type="submit">Overlay felülírása</button>
        </div>
    </form>
 
    <a href="/generator/match-history.php" class="btn btn-secondary">Meccstörténet</a>
 
    <form action="/generator/save-teams.php" method="post">
        <div class="form-group">
            <div class="col-md-4 mb-4">
                <label for="json">Csapatok API Input adatai:</label>
                Pld: https://api.eslgaming.com/play/v1/leagues/198846/contestants válasz eredménye
                <textarea class="form-control" name="json" id="json"></textarea>
                <button class="btn btn-secondary" type="submit">Csapatok frissítése</button>
            </div>
        </div>
    </form>
{% endblock %}
{% block lazyload %}
    {{ parent() }}
    <script type="text/javascript">
        $('.operators').chosen(
            {
                'placeholder_text_multiple': 'Banolt operátorok',
                'max_selected_options': 2
            }
        );
 
        $('#teamname').chosen();
 
        function swapTeams() {
            var blue = document.getElementById('team_blue_name');
            var orange = document.getElementById('team_orange_name');
 
            var blue_name = blue.value;
            blue.value = orange.value;
            orange.value = blue_name;
 
            return false;
        }
 
    </script>
{% endblock %}