@extends('admin.layouts.app')

@section('header-script')
@include('admin.layouts.dashboard-header-script')
@endsection


@section('content')


<!-- Page-Title -->
<div class="row">
    <div class="col-sm-12">
        <!--
                                                <ul class="nav nav-pills nav-pills-custom display-xs-none pull-right m-t-25">
                            <li role="presentation"><a href="#">Today</a></li>
                            <li role="presentation" class="active"><a href="#">Yesterday</a></li>
                            <li role="presentation"><a href="#">Last Week</a></li>
                        </ul>
        -->
        <h4 class="page-title"><span>Welcome</span> <span
                style="color: #fe6271 ;text-transform: uppercase;">{{ Auth::user()->name }}</span> To <span
                style="color: red;">Rajtextile</span> <span>School</span></h4>
    </div>
</div>
</div>

<div class="container">

    <div class="container">
        <div class="row">
            <div class="col-md-8 col-md-offset-2">
                <div class="panel panel-default">
                    <div class="panel-heading"> প্রশ্ন সংশোধন করুন। </div>

                    <div class="panel-body">
                        <form class="form-horizontal" enctype="multipart/form-data" method="POST"
                              action="{{action('AdminController@singlequistionsstore')}}">
                            {{ csrf_field() }}

                            <div class="form-group">
                                <label for="round_id" class="col-md-4 control-label"> Round </label>

                                <div class="col-md-6">
                                    <select name="round_id" id="round_id" class="form-control" value="" selected>
                                        <option value="0"> বাছাই </option>
                                        <option value="1"> এক</option>
                                        <option value="2"> দুই</option>
                                        <option value="3"> তিন</option>
                                        <option value="4"> চার</option>
                                        <option value="5"> পাঁচ</option>
                                        <option value="6"> ফাইনাল</option>

                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="section_one" class="col-md-4 control-label"> Type</label>

                                <div class="col-md-6">
                                    <select name="question_type" id="question_type" value="" class="form-control"
                                            selected>
                                        <option value="1"> টেক্সট </option>
                                        <option value="2"> ছবি </option>
                                        <option value="3"> অডিও </option>
                                        <option value="4"> ভিডিও </option>
                                        <option value="5"> এলোঝেলো </option>
                                        <option value="6"> ছবির ধাঁধা </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="studentid" class="col-md-4 control-label"> Episode Name</label>

                                <div class="col-md-6">
                                    <select name="episode_name" id="episode_name" class="form-control" value=""
                                            class="form-control" selected>
                                        <option value="1"> লেখাপড়া করে যে </option>
                                        <option value="2"> আমাকে চাই </option>
                                        <option value="3"> আমারও পরানও যাহা চায় </option>
                                        <option value="4"> গানের খাতার স্বরলিপি </option>
                                        <option value="5"> আমার সোনার বাংলা </option>
                                        <option value="6"> আদর্শলিপি </option>
                                        <option value="7"> একটুখানি বিজ্ঞান... </option>
                                        <option value="8"> বায়োস্কোপ </option>
                                        <option value="9"> কোথাও কেউ নেই </option>

                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="fathername" class="col-md-4 control-label"> Question Name </label>

                                <div class="col-md-6">
                                    <input id="question_name" type="text" class="form-control" name="question_name"
                                           value="">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="studentid" class="col-md-4 control-label">Options Number</label>

                                <div class="col-md-6">
                                    <select name="option_num" id="question_num" class="form-control" value=""
                                            class="form-control">
                                        <option value="4">4</option>
                                        <option value="3">3</option>
                                        <option value="2">2</option>
                                        <option value="1">1</option>
                                        <option value="0">N/A</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group option1" >
                                <label for="picture " class="col-md-4 control-label"> Option 1 </label>

                                <div class="col-md-6">
                                    <input id="op_1" type="text" class="form-control" name="op_1" value="">
                                </div>
                            </div>

                            <div class="form-group option2">
                                <label for="picture " class="col-md-4 control-label"> Option 2 </label>

                                <div class="col-md-6">
                                    <input id="op_2" type="text" class="form-control" name="op_2" value="">
                                </div>
                            </div>
                            <div class="form-group option3">
                                <label for="picture " class="col-md-4 control-label"> Option 3</label>

                                <div class="col-md-6">
                                    <input id="op_1" type="text" class="form-control" name="op_3" value="">
                                </div>
                            </div>
                            <div class="form-group option4">
                                <label for="picture " class="col-md-4 control-label"> Option 4</label>

                                <div class="col-md-6">
                                    <input id="op_4" type="text" class="form-control" name="op_4" value="">
                                </div>
                            </div>


                           

                            <div class="form-group">
                                <label for="picture " class="col-md-4 control-label"> ছবি </label>

                                <div class="col-md-6">
                                    <input id="qus_media" type="file" class="form-control" name="qus_media">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="picture " class="col-md-4 control-label"> Audio/Video Link </label>

                                <div class="col-md-6">
                                    <input id="link" type="text" class="form-control" name="link" value="">
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="picture " class="col-md-4 control-label"> Time </label>

                                <div class="col-md-6">
                                    <input id="time" type="text" class="form-control" name="time" value="">
                                </div>
                            </div>
                             <div class="form-group option_na" style=" display:  none">
                                <label for="picture " class="col-md-4 control-label"> Right Answer</label>

                                <div class="col-md-6">
                                    <input id="na_answer" type="text" class="form-control" name="na_answer" value="">
                                </div>
                            </div>
                            <div class="form-group multiright">
                                <label for="picture " class="col-md-4 control-label"> Right Answer</label>

                                <div class="col-md-6">
                                    <td>
                                        <select name="right_answer" id="episode_name" class="form-control" value="">
                                            <option value="op_1"> ১ম অপশন </option>
                                            <option value="op_2"> ২য় অপশন </option>
                                            <option value="op_3"> ৩য় অপশন </option>
                                            <option value="op_4"> ৪র্থ অপশন </option>
                                        </select>
                                    </td>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="picture " class="col-md-4 control-label"> Points </label>

                                <div class="col-md-6">
                                    <input id="points" type="text" class="form-control" name="points" value="">
                                </div>
                            </div>
                            <input id="status" type="hidden" class="form-control" name="status" value="1">


                            <div class="form-group">
                                <div class="col-md-6 col-md-offset-4">
                                    <button type="submit" class="btn btn-primary">
                                        Update
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>


</div>

</div>
</div>
</div><!-- end col -->

</div>
<!-- end row -->


<!-- Footer -->
@section('footer')
@include('admin.layouts.footer')
@endsection
<!-- End Footer -->

@endsection

@section('footer-script')
@include('admin.layouts.dashboard-footer-script')
<script>
    $("#question_num").change(function () {
        var question_num = $(this).val();
        if (question_num == 1) {
            $('.option1').css('display', 'block');
            $('.option2').css('display', 'none');
            $('.option3').css('display', 'none');
            $('.option4').css('display', 'none');
            $('.option_na').css('display', 'none');
            $('.multiright').css('display', 'block');
        } else if (question_num == 2) {
            $('.option1').css('display', 'block');
            $('.option2').css('display', 'block');
            $('.option3').css('display', 'none');
            $('.option4').css('display', 'none');
            $('.option_na').css('display', 'none');
            $('.multiright').css('display', 'block');
        } else if (question_num == 3) {
            $('.option1').css('display', 'block');
            $('.option2').css('display', 'block');
            $('.option3').css('display', 'block');
            $('.option4').css('display', 'none');
            $('.option_na').css('display', 'none');
            $('.multiright').css('display', 'block');
        } else if (question_num == 4) {
            $('.option1').css('display', 'block');
            $('.option2').css('display', 'block');
            $('.option3').css('display', 'block');
            $('.option4').css('display', 'block');
            $('.option_na').css('display', 'none');
            $('.multiright').css('display', 'block');
        } else {
            $('.option1').css('display', 'none');
            $('.option2').css('display', 'none');
            $('.option3').css('display', 'none');
            $('.option4').css('display', 'none');
            $('.option_na').css('display', 'block');
            $('.multiright').css('display', 'none');
            
        }
    });
</script>
@endsection