<table class="table">
    <tr>
        <td style="width: 40%; text-align: center;"><h3 class="cont"><?php echo e($game->teamOne); ?></h3></td>
        <td style="background: #b1f10c; color: red; text-align: center; width: 10%" valign="bottom">VS</td>
        <td style="width: 40%; text-align: center;"><h3 class="cont"><?php echo e($game->teamTwo); ?></h3></td>
    </tr>
</table>
<hr>

<div class="container">
<form action="<?php echo e(route('/ajaxTestimonial')); ?>" method="POST" id="testimonial">
    <input type="hidden" name="id" value="<?php echo e($game->id); ?>">
    <div class="form-group col-md-12">
        <label>SELECT POTENTIAL PREDICTION</label>
        <select name="potential" class="form-control" required>
            <option value="">Select here...</option>
            <option value="Draw Odd : <?php echo e($game->drawOdd); ?>"><b>Draw Odd</b> : <?php echo e($game->drawOdd); ?></option>
            <option value="Full-Time Recommendation : <?php echo e($game->FTRecommendation); ?>"><b>Full-Time Recommendation</b> : <?php echo e($game->FTRecommendation); ?></option>
            <option value="Actual Point/Odd : <?php echo e($game->actualPoint); ?>"><b>Actual Point/Odd</b> : <?php echo e($game->actualPoint); ?></option>
            <option value="2+ Max Stake : <?php echo e($game->twoMaxStake); ?>"><b>2+ Max Stake</b> : <?php echo e($game->twoMaxStake); ?></option>
            <option value="3+ Max Stake : <?php echo e($game->threeMaxStake); ?>"><b>3+ Max Stake</b> : <?php echo e($game->threeMaxStake); ?></option>
            <option value="Daily Double : <?php echo e($game->dailyDouble); ?>"><b>Daily Double</b> : <?php echo e($game->dailyDouble); ?></option>
            <option value="Daily Treble : <?php echo e($game->dailyTreble); ?>"><b>Daily Treble</b> : <?php echo e($game->dailyTreble); ?></option>
            <option value="Pick of the Day : <?php echo e($game->pickDay); ?>"><b>Pick of the Day</b> : <?php echo e($game->pickDay); ?></option>
            <option value="Daily Super Singles : <?php echo e($game->superSingles); ?>"><b>Daily Super Singles</b> : <?php echo e($game->superSingles); ?></option>
            <option value="Accumulator Tips : <?php echo e($game->accumulatorTips); ?>"><b>Accumulator Tips</b> : <?php echo e($game->accumulatorTips); ?></option>
            <option value="1.5 Goals : <?php echo e($game->oneDotFive); ?>"><b>1.5 Goals</b> : <?php echo e($game->oneDotFive); ?></option>
            <option value="2.5 Goals : <?php echo e($game->twoDotFive); ?>"><b>2.5 Goals</b> : <?php echo e($game->twoDotFive); ?></option>
            <option value="3.5 Goals : <?php echo e($game->threeDotFive); ?>"><b>3.5 Goals</b> : <?php echo e($game->threeDotFive); ?></option>
            <option value="BTTS? : <?php echo e($game->BTTS); ?>"><b>BTTS?</b> : <?php echo e($game->BTTS); ?></option>
            <option value="Jackpot : <?php echo e($game->jackPot); ?>"><b>Jacpot</b> : <?php echo e($game->jackPot); ?></option>
            <option value="Halftime/Fulltime : <?php echo e($game->HTFT); ?>"><b>Halftime/Fulltime</b> : <?php echo e($game->HTFT); ?></option>
            <option value="Correct Score : <?php echo e($game->correctScore); ?>"><b>Correct Score</b> : <?php echo e($game->correctScore); ?></option>
            <option value="Double Chance : <?php echo e($game->doubleChance); ?>"><b>Double Chance</b> : <?php echo e($game->doubleChance); ?></option>
            <option value="1st Half Result? : <?php echo e($game->firstHalfResult); ?>"><b>1st Half Result?</b> : <?php echo e($game->firstHalfResult); ?></option>
            <option value="Custom Tips : <?php echo e($game->customTips); ?>"><b>Custom Tips</b> : <?php echo e($game->customTips); ?></option>
        </select>
    </div>

    <?php echo csrf_field(); ?>


    <div id="teststatus" class="col-xs-6"></div>
    <div class="form-group col-sm-12">
        <button class="btn btn-md btn-success" name="submit" id="submittest">SAVE/DONE</button>
    </div>
</form>
</div>

<script>
    $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
    });

    $(document).ready(function () {
        $('#testimonial').submit(function (e) {
            e.preventDefault();
            var id = "<?php echo e($game->id); ?>";
            $('#submittest').prop('disabled', true).html('SAVING');
            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) {
                        $('#submittest').prop('disabled', false).html('SAVE/DONE');
                        swal(data.encounters, '', 'warning');
                        console.log(data);
                    }
                    else{
                        $('#f'+id).css('color', 'green').html('Marked Testimonial');
                        swal(data.encounters, '', 'success');
                        $('#marktest').modal('hide');
                    }
                }
            });

        });
    });
</script>