<form action="<?php echo e(route('/ajaxVIPGameUpdate')); ?>/<?php echo e($game->id); ?>/<?php echo e($datain); ?>" method="POST" id="updateForm">
    <div class="container-fluid">
        <div class="col-xs-12">
            <div class="col-md-5 col-xs-12" style="background: whitesmoke; padding: 15px;">
                <div class="form-group col-xs-12">
                    <input type="text" name="teamOne" class="form-control" placeholder="TEAM ONE *" value="<?php echo e($game->teamOne); ?>" required>
                    <input type="hidden" value="<?php echo e($game->gameType); ?>" name="gameType" required>
                </div>
                <div class="form-group col-md-6 col-xs-12">
                    <label for="team1odd">FORM</label>
                    <input type="text" name="teamOneForm" placeholder="eg. WWWLD" class="form-control" value="<?php echo e($game->teamOneForm); ?>" maxlength="5">
                </div>
                <div class="form-group col-md-6 col-xs-12">
                    <label for="team1odd">ODDS</label>
                    <input type="text" name="teamOneOdds" placeholder="eg. 1.5" class="form-control" value="<?php echo e($game->teamOneOdds); ?>">
                </div>
            </div>

            <div class="col-md-2 col-xs-12" style="margin: 10px 0px; background: grey; border-radius: 0px 0px 8px 8px;"><center><span style="padding: 5px 10px; background: grey; color: white; border-radius: 100px; margin-top: -30px;">VS</span></center>
                <br>
                <?php /*<div class="form-group">*/ ?>
                    <?php /*<input class="form-control" name="drawOdd" type="text" value="<?php echo e($game->drawOdd); ?>" placeholder="DRAW ODD">*/ ?>
                <?php /*</div>*/ ?>
                <div class="form-group">
                    <input class="form-control" name="gameDate" id="matchdate" type="text" placeholder="MATCH DATE *" value="<?php echo e($game->gameDate); ?>" required>
                </div>
                <div class="form-group">
                    <input class="form-control" name="gameTime" id="matchtime" type="text" placeholder="MATCH TIME *" value="<?php echo e($game->gameTime); ?>" required>
                </div>
                <div class="form-group">
                    <select name="league" class="form-control select2" required>
                        <?php foreach($allleagues->all() as $leagues): ?>
                            <option value="<?php echo e($leagues->code); ?>" <?php if($game->league==$leagues->code): ?> selected <?php endif; ?>><?php echo e($leagues->code); ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
            </div>

            <div class="col-md-5 col-xs-12" style="background: whitesmoke; padding: 15px;">
                <div class="form-group col-xs-12">
                    <input type="text" name="teamTwo" class="form-control" placeholder="TEAM TWO *" value="<?php echo e($game->teamTwo); ?>" required>
                </div>

                <div class="form-group col-md-6 col-xs-12">
                    <label for="team1odd">FORM</label>
                    <input type="text" name="teamTwoForm" placeholder="eg. WWWLD" class="form-control" value="<?php echo e($game->teamTwoForm); ?>" maxlength="5">
                </div>
                <div class="form-group col-md-6 col-xs-12">
                    <label for="team1odd">ODDS</label>
                    <input type="text" name="teamTwoOdds" placeholder="eg. 1.5" class="form-control" value="<?php echo e($game->teamTwoOdds); ?>">
                </div>
            </div>
        </div>
    </div>
    <hr>
    <div class="col-sm-12"><h4>SILVERWARE PRO TIPS</h4></div>
    <div class="container-fluid">
        <div class="form-group col-md-6 bg-danger" style="padding: 10px;">
            <div class="row">
                <div class="col-sm-4">
                    <label>FORTE 2 ODDS</label>
                    <select name="sure2Odds" class="form-control">
                        <option value="firstBatch" <?php if($game->sure2Odds=='firstBatch'): ?> selected <?php endif; ?>>First Batch</option>
                        <option value="secondBatch" <?php if($game->sure2Odds=='secondBatch'): ?> selected <?php endif; ?>>Second Batch</option>
                        <option value="No" <?php if($game->sure2Odds=='No'): ?> selected <?php endif; ?>>No</option>
                    </select>
                </div>
                <div class="col-sm-4">
                    <label>PREDICTION</label>
                    <input type="text" name="sure2OddsTip" value="<?php echo e($game->sure2OddsTip); ?>" class="form-control">
                </div>
                <div class="col-sm-4">
                    <label>ODD</label>
                    <input type="text" name="sure2OddsOdds" value="<?php echo e($game->sure2OddsOdds); ?>" class="form-control">
                </div>
            </div>
        </div>

        <div class="form-group col-md-6 bg-success" style="padding: 10px;">
            <div class="row">
                <div class="col-sm-4">
                    <label>FORTE 3 ODDS</label>
                    <select name="sure3Odds" class="form-control">
                        <option value="firstBatch" <?php if($game->sure3Odds=='firstBatch'): ?> selected <?php endif; ?>>First Batch</option>
                        <option value="secondBatch" <?php if($game->sure3Odds=='secondBatch'): ?> selected <?php endif; ?>>Second Batch</option>
                        <option value="No" <?php if($game->sure3Odds=='No'): ?> selected <?php endif; ?>>No</option>
                    </select>
                </div>
                <div class="col-sm-4">
                    <label>PREDICTION</label>
                    <input type="text" name="sure3OddsTip" value="<?php echo e($game->sure3OddsTip); ?>" class="form-control">
                </div>
                <div class="col-sm-4">
                    <label>ODD</label>
                    <input type="text" name="sure3OddsOdds" value="<?php echo e($game->sure3OddsOdds); ?>" class="form-control">
                </div>
            </div>
        </div>

        <div class="form-group col-md-6 bg-success" style="padding: 10px;">
            <div class="row">
                <div class="col-sm-4">
                    <label>FORTE SINGLES</label>
                    <select name="forteSingle" class="form-control">
                        <option value="firstBatch" <?php if($game->forteSingle=='firstBatch'): ?> selected <?php endif; ?>>First Batch</option>
                        <option value="secondBatch" <?php if($game->forteSingle=='secondBatch'): ?> selected <?php endif; ?>>Second Batch</option>
                        <option value="No" <?php if($game->forteSingle=='No'): ?> selected <?php endif; ?>>No</option>
                    </select>
                </div>
                <div class="col-sm-4">
                    <label>PREDICTION</label>
                    <input type="text" name="forteSingleTip" value="<?php echo e($game->forteSingleTip); ?>" class="form-control">
                </div>
                <div class="col-sm-4">
                    <label>ODD</label>
                    <input type="text" name="forteSingleOdds" value="<?php echo e($game->forteSingleOdds); ?>" class="form-control">
                </div>
            </div>
        </div>

        <div class="form-group col-md-6 bg-danger" style="padding: 10px;">
            <div class="row">
                <div class="col-sm-6">
                    <label>BTTS/GG</label>
                    <select name="BTTS" class="form-control">
                        <option value="">*-*-*-*-*-*-*-*-*-*</option>
                        <option value="firstBatch" <?php if($game->BTTS=='firstBatch'): ?> selected <?php endif; ?>>First Batch</option>
                        <option value="secondBatch" <?php if($game->BTTS=='secondBatch'): ?> selected <?php endif; ?>>Second Batch</option>
                    </select>
                </div>
                <div class="col-sm-6">
                    <label>ODD</label>
                    <input type="text" name="BTTSOdds" value="<?php echo e($game->BTTSOdds); ?>" class="form-control">
                </div>
            </div>
        </div>

    </div>
    <hr>
    <div class="col-sm-12"><h4>GOLDENWARE PRO TIPS</h4></div>
    <div class="row">
        <div class="col-sm-12">
            <div class="col-sm-12">

                <div class="form-group col-md-4 bg-success" style="padding: 10px;">
                    <div class="row">
                        <div class="col-sm-4">
                            <label>5 ODDS</label>
                            <select name="sure5Odds" class="form-control">
                                <option value="firstBatch" <?php if($game->sure5Odds=='firstBatch'): ?> selected <?php endif; ?>>First Batch</option>
                                <option value="secondBatch" <?php if($game->sure5Odds=='secondBatch'): ?> selected <?php endif; ?>>Second Batch</option>
                                <option value="No" <?php if($game->sure5Odds=='No'): ?> selected <?php endif; ?>>No</option>
                            </select>
                        </div>
                        <div class="col-sm-4">
                            <label>PREDICTION</label>
                            <input type="text" name="sure5OddsTip" value="<?php echo e($game->sure5OddsTip); ?>" class="form-control">
                        </div>
                        <div class="col-sm-4">
                            <label>ODD</label>
                            <input type="text" name="sure5OddsOdds" value="<?php echo e($game->sure5OddsOdds); ?>" class="form-control">
                        </div>
                    </div>
                </div>

                <div class="form-group col-md-4 bg-success" style="padding: 10px;">
                    <div class="row">
                        <div class="col-sm-4">
                            <label>DOUBLE</label>
                            <select name="forteDouble" class="form-control">
                                <option value="firstBatch" <?php if($game->forteDouble=='firstBatch'): ?> selected <?php endif; ?>>First Batch</option>
                                <option value="secondBatch" <?php if($game->forteDouble=='secondBatch'): ?> selected <?php endif; ?>>Second Batch</option>
                                <option value="No" <?php if($game->forteDouble=='No'): ?> selected <?php endif; ?>>No</option>
                            </select>
                        </div>
                        <div class="col-sm-4">
                            <label>PREDICTION</label>
                            <input type="text" name="forteDoubleTip" value="<?php echo e($game->forteDoubleTip); ?>" class="form-control">
                        </div>
                        <div class="col-sm-4">
                            <label>ODD</label>
                            <input type="text" name="forteDoubleOdds" value="<?php echo e($game->forteDoubleOdds); ?>" class="form-control">
                        </div>
                    </div>
                </div>

                <div class="form-group col-md-4 bg-danger" style="padding: 10px;">
                    <div class="row">
                        <div class="col-sm-6">
                            <label>HT/FT</label>
                            <select name="HTFT" class="form-control">
                                <option value="1/1" <?php if($game->HTFT=='1/1'): ?> selected <?php endif; ?>>1/1</option>
                                <option value="1/X" <?php if($game->HTFT=='1/X'): ?> selected <?php endif; ?>>1/X</option>
                                <option value="1/2" <?php if($game->HTFT=='1/2'): ?> selected <?php endif; ?>>1/2</option>
                                <option value="X/1" <?php if($game->HTFT=='X/1'): ?> selected <?php endif; ?>>X/1</option>
                                <option value="X/2" <?php if($game->HTFT=='X/2'): ?> selected <?php endif; ?>>X/2</option>
                                <option value="X/X" <?php if($game->HTFT=='X/X'): ?> selected <?php endif; ?>>X/X</option>
                                <option value="2/1" <?php if($game->HTFT=='2/1'): ?> selected <?php endif; ?>>2/1</option>
                                <option value="2/2" <?php if($game->HTFT=='2/2'): ?> selected <?php endif; ?>>2/2</option>
                                <option value="2/X" <?php if($game->HTFT=='2/X'): ?> selected <?php endif; ?>>2/X</option>
                                <option value="No" <?php if($game->HTFT=='No'): ?> selected <?php endif; ?>>No</option>
                            </select>
                        </div>
                        <div class="col-sm-6">
                            <label>ODD</label>
                            <input type="text" name="HTFTOdds" value="<?php echo e($game->HTFTOdds); ?>" class="form-control">
                        </div>
                    </div>
                </div>
            </div>
            <hr>
            <div class="col-sm-12"><h4>MASTERPLAN PRO TIPS</h4></div>
            <div class="col-sm-12">

                <div class="form-group col-md-6 bg-danger" style="padding: 10px;">
                    <div class="row">
                        <div class="col-sm-6">
                            <label>OVER 3.5</label>
                            <select name="over35Goals" class="form-control">
                                <option value="Over 3.5" <?php if($game->over35Goals=='Over 3.5'): ?> selected <?php endif; ?>>Over 3.5</option>
                                <option value="Under 3.5" <?php if($game->over35Goals=='Under 3.5'): ?> selected <?php endif; ?>>Under 3.5</option>
                                <option value="" <?php if($game->over35Goals==''): ?> selected <?php endif; ?>>*-*-*-*-*-*-*-*-*-</option>
                            </select>
                        </div>
                        <div class="col-sm-6">
                            <label>ODD</label>
                            <input type="text" name="over35GoalsOdds" value="<?php echo e($game->over35GoalsOdds); ?>" class="form-control">
                        </div>
                    </div>
                </div>

                <div class="form-group col-md-6 bg-success" style="padding: 10px;">
                    <div class="row">
                        <div class="col-sm-4">
                            <label>WEEKEND</label>
                            <select name="weekend" class="form-control">
                                <option value="Yes" <?php if($game->weekend=='Yes'): ?> selected <?php endif; ?>>Yes</option>
                                <option value="No" <?php if($game->weekend=='No'): ?> selected <?php endif; ?>>No</option>
                            </select>
                        </div>
                        <div class="col-sm-4">
                            <label>TIP</label>
                            <input type="text" name="weekendTip" value="<?php echo e($game->weekendTip); ?>" class="form-control">
                        </div>
                        <div class="col-sm-4">
                            <label>ODD</label>
                            <input type="text" name="weekendOdds" value="<?php echo e($game->weekendOdds); ?>" class="form-control">
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <?php echo csrf_field(); ?>


        <div class="col-sm-12">
            <div id="settingstatus" class="col-xs-6"></div>
            <div class="form-group col-sm-12">
                <button class="btn btn-md btn-success" name="submit" id="submitsetting">UPDATE PREDICTION</button>
            </div>
        </div>

    </div>
</form>

<script>
    $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
    });
    $(document).ready(function () {
        $('#updateForm').submit(function (e) {
            e.preventDefault();
            $('#submitsetting').prop('disabled', true).html("UPDATING PREDICTION");
            var url = $(this).attr('action');

            var dataString = $(this).serialize();
            console.log(dataString);
            $.ajax({
                type: "POST",
                url: url,
                data: dataString,
                dataType: "JSON",
                success: function(data){
                    if (data.status == 1) {
                        $('#submitsetting').prop('disabled', false).html("UPDATE PREDICTION");
                        swal(data.encounters, '', 'warning');
                    }
                    else{
                        swal(data.encounters, '', 'success');
                        $('#updategame').modal('hide');
                    }
                }
            });

        });
    });
</script>