<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="<?php echo e($game->FTRecommendation); ?>"><b>Full-Time Recommendation</b> : <?php echo e($game->FTRecommendation); ?></option>
            <?php if($game->regularTips=='Yes'): ?><option value="<?php echo e($game->regularTipsValue); ?>"><b>Regular Tips</b> : <?php echo e($game->regularTipsValue); ?></option> <?php endif; ?>
            <?php if($game->customTips=='Yes'): ?><option value="<?php echo e($game->customTipsValue); ?>"><b>Custom Tips</b> : <?php echo e($game->customTipsValue); ?></option> <?php endif; ?>
            <?php if($game->weekendTips=='Yes'): ?><option value="<?php echo e($game->weekendTipsValue); ?>"><b>Weekend Tips</b> : <?php echo e($game->weekendTips); ?></option> <?php endif; ?>
            <option value="<?php echo e($game->oneFiveGoals); ?>"><b>Over 1.5</b> : <?php echo e($game->oneFiveGoals); ?></option>
            <option value="<?php echo e($game->doubleChance); ?>"><b>Double Chance</b> : <?php echo e($game->doubleChance); ?></option>
            <option value="<?php echo e($game->twoFiveGoals); ?>"><b>2.5 Goals</b> : <?php echo e($game->twoFiveGoals); ?></option>
            <option value="<?php echo e($game->HTResults); ?>"><b>Halftime Results</b> : <?php echo e($game->HTResults); ?></option>
            <option value="<?php echo e($game->overZeroFiveHT); ?>"><b>Over 0.5 HT</b> : <?php echo e($game->overZeroFiveHT); ?></option>
            <option value="<?php echo e($game->underOneFiveHT); ?>"><b>Under 1.5 HT</b> : <?php echo e($game->underOneFiveHT); ?></option>
            <option value="<?php echo e($game->BTTS); ?>"><b>BTTS/GG</b> : <?php echo e($game->BTTS); ?></option>
            <option value="<?php echo e($game->HTFT); ?>"><b>Halftime/Fulltime</b> : <?php echo e($game->HTFT); ?></option>
            <option value="<?php echo e($game->matchCorners); ?>"><b>Match Corners</b> : <?php echo e($game->matchCorners); ?></option>
            <option value="<?php echo e($game->fullTimeDraw); ?>"><b>Fulltime Draws</b> : <?php echo e($game->fullTimeDraw); ?></option>
            <option value="<?php echo e($game->homeAwayScore); ?>"><b>Home/Away to Score</b> : <?php echo e($game->homeAwayScore); ?></option>
            <option value="<?php echo e($game->drawNoBet); ?>"><b>Draw No Bet</b> : <?php echo e($game->drawNoBet); ?></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>