Working on manual payout GUI
This commit is contained in:
parent
4f6116fc5b
commit
9c1b334fe8
7 changed files with 68 additions and 5 deletions
|
|
@ -142,11 +142,27 @@
|
|||
<a class="btn btn-primary" href="/league_settings/season={{$currentSeason->id}}">Liga bearbeiten</a>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group" >
|
||||
<div class="form-group" style="width:650px;" >
|
||||
<h4>
|
||||
<label style="float:left; width:200px;">Liga 1, Platz 1:</label>
|
||||
<input type="text" class="form-control" id="liga_platz1" name="liga_platz1" value="{{ $quotas['Liga Platz 1'] }}" style="float:left; width:75px;"required>
|
||||
|
||||
<span class="dropdown" id="dropdown1">
|
||||
<button id="btn_winner" onclick="toggleDropdown('dropdown_winner'); return false;" class="dropbtn">Sieger festlegen</button>
|
||||
<div id="dropdown_winner" class="dropdown-content">
|
||||
@foreach($users as $user)
|
||||
<a onclick="setWinner('{{$user->id}}',{{$user->name}});return false;" >{{$user->name}}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<label style="float:left"> % = {{$payouts['liga_platz1']}} €</label>
|
||||
|
||||
|
||||
|
||||
<p> </p>
|
||||
|
||||
<label style="float:left; width:200px;">Liga 1, Platz 2:</label>
|
||||
|
|
@ -195,4 +211,36 @@
|
|||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function setWinner($user_id, $user_name, $elem_name="btn_winner") {
|
||||
var global_winner_id = document.getElementById($elem_winner).innerHTML=$roundname;
|
||||
}
|
||||
|
||||
// When the user clicks on the button,toggle between hiding and showing the dropdown content
|
||||
function toggleDropdown($elementName) {
|
||||
document.getElementById($elementName).classList.toggle("show");
|
||||
}
|
||||
|
||||
// Close the dropdown menu if the user clicks outside of it
|
||||
window.onclick = function(event) {
|
||||
if (!event.target.matches('.dropbtn')) {
|
||||
|
||||
var dropdowns = document.getElementsByClassName("dropdown-content");
|
||||
var i;
|
||||
for (i = 0; i < dropdowns.length; i++) {
|
||||
var openDropdown = dropdowns[i];
|
||||
if (openDropdown.classList.contains('show')) {
|
||||
openDropdown.classList.remove('show');
|
||||
}
|
||||
}
|
||||
}
|
||||
event.cancelBubble=true;
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
Loading…
Add table
Add a link
Reference in a new issue