commit | author | age
|
f6a0dc
|
1 |
{% extends "admin/site-base.twig" %} |
b40e93
|
2 |
{% block body %} |
f6a0dc
|
3 |
<h1 class="display-4">Mérkőzés overlay</h1> |
FÁ |
4 |
|
b40e93
|
5 |
<form action="/generator/form.php" method="post"> |
FÁ |
6 |
<input type="hidden" name="stripe[class]" value="team-ban"/> |
|
7 |
|
|
8 |
<div class="form-group"> |
|
9 |
<div class="form-row"> |
|
10 |
<div class="col-md-8 mb-3"> |
|
11 |
<label for="validationServer01">Kupa neve</label> |
|
12 |
<input type="text" name="stripe[cup][name]" class="form-control" id="validationServer01" |
c5946f
|
13 |
placeholder="Pld.: 5on5 Bomb Cup" value="{{ stripe.cup.name }}"> |
b40e93
|
14 |
</div> |
FÁ |
15 |
<div class="col-md-2 mb-3"> |
|
16 |
<label for="validationServer02">Kupa sorszám</label> |
|
17 |
<input type="text" name="stripe[cup][number]" class="form-control" id="validationServer02" |
|
18 |
placeholder="Pld.: #654" |
c5946f
|
19 |
value="{{ stripe.cup.number }}"> |
b40e93
|
20 |
</div> |
FÁ |
21 |
</div> |
|
22 |
</div> |
|
23 |
<div class="form-group"> |
|
24 |
<div class="form-row"> |
|
25 |
<div class="form-group bg-primary"> |
68333e
|
26 |
{% include 'admin/modules/team-list-select.twig' %} |
b40e93
|
27 |
<div class="col-md-12 mb-4"> |
FÁ |
28 |
<label for="team_blue_name" class="bg-primary">Kék csapat neve</label> |
68333e
|
29 |
<input type="text" name="stripe[team][blue][name]" class="form-control team" id="team_blue_name" |
b40e93
|
30 |
placeholder="Pld.: Impress!ve" value="{{ stripe.team.blue.name }}" required> |
FÁ |
31 |
</div> |
|
32 |
<div class="col-md-12 mb-4"> |
|
33 |
<label for="op-blue" class="bg-primary">Banolt operátorok</label> |
68333e
|
34 |
<select name="stripe[team][blue][ban][]" class="operators" id="op-blue" style="width: 100%" multiple> |
b40e93
|
35 |
{% for operator in operators %} |
FÁ |
36 |
<option value="{{ operator }}" {{ operator in stripe.team.blue.ban ? "selected" }}>{{ operator|capitalize }}</option> |
|
37 |
{% endfor %} |
|
38 |
</select> |
|
39 |
</div> |
|
40 |
</div> |
|
41 |
<div class="form-group"> |
|
42 |
<button class="btn btn-info" title="Csapat színcsere" onclick="swapTeams(); return false;"><=> |
|
43 |
</button> |
|
44 |
</div> |
|
45 |
<div class="form-group bg-warning"> |
68333e
|
46 |
{% include 'admin/modules/team-list-select.twig' %} |
b40e93
|
47 |
<div class="col-md-12 mb-4"> |
FÁ |
48 |
<label for="team_orange_name">Narancs csapat neve</label> |
68333e
|
49 |
<input type="text" name="stripe[team][orange][name]" class="form-control team" id="team_orange_name" |
b40e93
|
50 |
placeholder="Pld.: Opress!ve" value="{{ stripe.team.orange.name }}" required> |
FÁ |
51 |
</div> |
|
52 |
<div class="col-md-12 mb-4"> |
|
53 |
<label for="op-orange" class="bg-warning">Banolt operátorok</label> |
|
54 |
<select name="stripe[team][orange][ban][]" class="operators" id="op-orange" style="width: 100%" |
|
55 |
multiple> |
|
56 |
{% for operator in operators %} |
|
57 |
<option value="{{ operator }}" {{ operator in stripe.team.orange.ban ? "selected" }}>{{ operator|capitalize }}</option> |
|
58 |
{% endfor %} |
|
59 |
</select> |
|
60 |
</div> |
|
61 |
</div> |
|
62 |
</div> |
|
63 |
</div> |
|
64 |
<div class="form-group"> |
|
65 |
<button class="btn btn-primary mx-auto" type="submit">Overlay felülírása</button> |
|
66 |
</div> |
|
67 |
</form> |
|
68 |
{% endblock %} |
|
69 |
{% block lazyload %} |
|
70 |
{{ parent() }} |
|
71 |
<script type="text/javascript"> |
|
72 |
$('.operators').chosen( |
|
73 |
{ |
|
74 |
'placeholder_text_multiple': 'Banolt operátorok', |
|
75 |
'max_selected_options': 2 |
|
76 |
} |
|
77 |
); |
|
78 |
|
68333e
|
79 |
$('.teamname').chosen().on('change',function (event) { |
FÁ |
80 |
$(this).parent().children().find('input.team')[0].value = event.target.value; |
|
81 |
}); |
b40e93
|
82 |
|
FÁ |
83 |
function swapTeams() { |
|
84 |
var blue = document.getElementById('team_blue_name'); |
|
85 |
var orange = document.getElementById('team_orange_name'); |
|
86 |
|
|
87 |
var blue_name = blue.value; |
|
88 |
blue.value = orange.value; |
|
89 |
orange.value = blue_name; |
|
90 |
|
|
91 |
return false; |
|
92 |
} |
|
93 |
|
|
94 |
</script> |
|
95 |
{% endblock %} |