@extends('template')

@section('nav')
        <!-- nav Bar !-->
<div class="navbar-fixed">
    <ul id="dropdown1" class="dropdown-content" style="top : 20px">
        <li><a href="/auth/logout" class="logout">Logout</a></li>
    </ul>
    <nav>
        <div class="nav-wrapper">
            <a href="#" class="brand-logo center ">Creation Examen</a>
            <ul class="right hide-on-med-and-down">
                <li><a class="dropdown-button" href="#!"
                       data-activates="dropdown1">{{ \Illuminate\Support\Facades\Auth::user()->login  }}<i
                                class="material-icons right">more_vert</i></a></li>
            </ul>
        </div>
    </nav>
</div>
<!-- nav Bar !-->
@endsection

@section('contenu')
    <div id="progress" class="progress" style="display:none">
        <div class="indeterminate"></div>
    </div>
    <!-- Form !-->
    <div class="container">
        <form action="add" method="post">

            {!! csrf_field() !!}

            <div class="row">
                <div class="col s12 m9 l10">

                    <!-- Date et Niveau !-->
                    <div id="Date_Niveau" class="section scrollspy">
                        <br>
                        <br>
                        <br>
                        <!-- Date  !-->
                        <h4 class="light-blue-text text-darken-1 center">Date de l'examen</h4>
                        <input id="date" name="date" type="date" class="datepicker" data-position="top" data-delay="50"
                               data-tooltip="Date de la session">
                        <!-- Date  !-->
                        <br>
                        <br>
                        <!-- Type !-->
                        <h4 class="light-blue-text text-darken-1 center">Type</h4>

                        <div class="input-field col s12">

                            <select name="id_Stage">
                                <option value="" disabled selected>Choisir Type</option>
                                @foreach ($stages as $stage)
                                    <option value={!! $stage->id_Stage !!} >{!! $stage->nom !!}</option>
                                @endforeach
                            </select>
                        </div>
                        <!-- Type !-->  
                    </div>
                    <!-- Max de places !-->
                    <h4 class="light-blue-text text-darken-1 center">Nombre de place</h4>
                    <div class="input-field col s12">
                         <input id="max_Place" type="number" class="validate" name="max_Place">
                         <label for="max_Place">Max Places</label>
                    </div>
                    <!-- Max de places !-->
                     <!-- Choix de Jury !-->
                        <h4 class="light-blue-text text-darken-1 center">Choix du Jury</h4>

                        <div class="input-field col s12">

                            <select name="id_Jury">
                                <option value="" disabled selected>Choisir un Jury</option>
                                @foreach ($jurys as $jury)
                                    <option value={!! $jury->id_Enseignant !!} >{!! $jury->nom !!}</option>
                                @endforeach
                            </select>
                        </div>
                        <!-- Type !-->  

                    <div class="row center">
                        <input type="submit" class="waves-effect waves-light btn" onclick="show()"/>
                    </div>
                </div>

            </div>
        </form>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $('.scrollspy').scrollSpy();
        });
        $('.datepicker').pickadate({
            selectMonths: true, // Creates a dropdown to control month
            selectYears: 15 // Creates a dropdown of 15 years to control year
        });
        $(document).ready(function () {
            $('.tooltipped').tooltip({delay: 50});
        });
        $(document).ready(function () {
            $('select').material_select();
        });


    </script>
    <script type="text/javascript">
        function show() {
            document.getElementById('progress').style.display = 'block';
        }
    </script>
@stop

