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