@extends('user.master')
@section('content')
<div class="col-md-12">
    <!------- Poll Page  ---------->
    <div class="clearfix">&nbsp;</div>
    <div class="clearfix">&nbsp;</div>
    <div class="clearfix">&nbsp;</div>
    <div class="clearfix">&nbsp;</div>

    <div class="clearfix">&nbsp;</div>
    <div class="clearfix">&nbsp;</div>
    <div class="row">
        <div class="col-md-1"></div>
        <div class="col-md-10">
            <div class="col-md-9">
                @if(Session::get('message'))
                <div class="alert alert-danger animated bounce" role="alert">
                    <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
                    <span class="sr-only">Error:</span>
                    {{Session::get('message')}}
                </div>
                @endif
                @if(!empty($quiz))

                <div class="col-md-12 animated fadeIn bg-default poll-content">
                    <h2>{{$quiz->group_name}}</h2>
                    <img src="{{$quiz->image_path}}"class="img-responsive">
                    {{Form::open(array('url' => '/quiz/'.$quiz->group_id, 'method' => 'post'))}}
                    <h3 class="ques-row"> <i class="fa fa-question-circle"></i> {{$question['text']}}</h3>
                    <?php $c = 1; ?>
                    @foreach($question['options'] as $k=>$q)
                    <h4 option_id="{{$k}}" class="option options-row animated flipInX" style="-webkit-animation-delay: 0.{{$c}}s">   {{$q}} </h4>
                    <?php ++$c; ?>
                    @endforeach
                    <input type="hidden" name="quiz_id" value="{{$quiz->group_id}}">
                    <input type="hidden" name="question_id" value="{{$question['id']}}">
                    <input type="hidden" name="answer_id">
                    <input type="hidden" name="next_id" value="{{$question['next_id']}}">
                    <div class="clearfix">&nbsp;</div>
                    <button type="submit" class="btn btn-success btn-md disabled"> Next Question <i class="fa fa-arrow-circle-o-right"></i> </button>
                </div>

                {{Form::close()}}
                <div class="clearfix load-content">&nbsp;</div>
                <div id="more"></div>

                @endif
            </div>

            <div class="col-md-3 bg-default">
                @include('user.rightbar')
            </div>
        </div>
        <div class="col-md-1"></div>
    </div>
    <!------- // Poll Page  ---------->
</div>
@stop
