@extends('admin.layouts.app')
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $("#myelement").click(function() {
        $('#another-element').toggle("slide")
    });

    $("#addRows").click(function() {
        $("#maintable").each(function() {
            var tds = '<tr>';
            jQuery.each($('tr:last td', this), function() {
                tds += '<td>' + $(this).html() + '</td>';
            });
            tds += '</tr>';
            if ($('tbody', this).length > 0) {
                $('tbody', this).append(tds);
            } else {
                $(this).append(tds);
            }
        });
    });

    $("#deleteRows").click(function() {
        $("tr:last").remove()
    });


});
</script>
@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-12 ">
                <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@markstore')}}">
                            {{ csrf_field() }}

                            <table class="table table-bordered" id="maintable">
                                <tr>
                                    <td> Name </td>
                                    <td> Round </td>
                                    <td> Marks One </td>
                                    <td> Marks Two </td>
                                    <td> Marks Three </td>
                                    <td> SMarks Four </td>
                                    <td> Seasson </td>

                                </tr>

                                <tr>
                                    <td>
                                        <select name="user_id[]" id="user_id" class="form-control">

                                            @foreach($users as $user)
                                            <option value="{{$user->id}}">{{$user->name}} </option>
                                            @endforeach
                                        </select>
                                    </td>
                                    <td>
                                        <select name="round_id[]" id="round_id" class="form-control">
                                            <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>
                                    </td>



                                    <td>
                                        <input id="marks_1" type="text" class="form-control" name="marks_1[]">
                                    </td>
                                    <td>
                                        <input id="marks_2" type="text" class="form-control" name="marks_2[]">
                                    </td>
                                    <td>
                                        <input id="marks_3" type="text" class="form-control" name="marks_3[]">
                                    </td>
                                    <td>
                                        <input id="marks_4" type="text" class="form-control" name="marks_4[]">
                                    </td>
                                    <td>
                                        <input id="season" type="text" class="form-control" name="season[]">
                                    </td>

                                </tr>
                            </table>

                            <div class="form-group">
                                <div class="col-md-10">
                                    <button type="submit" class="btn btn-primary">
                                        Add Marks
                                    </button>

                                </div>
                                <div class="col-md-1">
                                    <input type="button" class="btn btn-primary" value="add new" id="addRows" />
                                </div>
                                <div class="col-md-1">
                                    <input type="button" class="btn btn-danger" value="Remove" id="deleteRows" />
                                </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')
@endsection