{% extends '::base-admin.html.twig' %}

{% block main %} 
    <!-- BEGIN PAGE CONTENT -->
    <div class="page-content" style="min-height: 800px">
        <div class="container">
            <!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
            <div class="modal fade" id="portlet-config" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                            <h4 class="modal-title">Modal title</h4>
                        </div>
                        <div class="modal-body">
                            Widget settings form goes here
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn blue">Save changes</button>
                            <button type="button" class="btn default" data-dismiss="modal">Close</button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal-dialog -->
            </div>
            <!-- /.modal -->
            <!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
            <!-- BEGIN PAGE BREADCRUMB -->
            <ul class="page-breadcrumb breadcrumb">
                <li>
                    <a href="{{ path('welcome') }}">Tableau de bord</a><i class="fa fa-circle"></i>
                </li>
                <li>
                    <a href="{{ path('ad_absencesajustifier') }}">Absences à justifer</a>
                    <i class="fa fa-circle"></i>
                </li>
                <li class="active">
                    Justification
                </li>
            </ul>
            <!-- END PAGE BREADCRUMB -->
            <!-- BEGIN PAGE CONTENT INNER -->
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet light">
                        <div class="portlet-title">
                            <div class="caption">
                                <i class="icon-note font-green-sharp"></i>
                                <span class="caption-subject font-green-sharp bold uppercase">Détails de l'absence</span>
                            </div>
                            <div class="tools">
                                <a href="javascript:;" class="collapse">
                                </a>
                                <a href="#portlet-config" data-toggle="modal" class="config">
                                </a>
                            </div>
                        </div>
                        <div class="portlet-body">
                            <header class="panel-heading" style="border-left: 6px solid rgb(238, 130, 238); margin-bottom: 20px;background: ghostwhite;margin-left: 11px;">
                                <h3><b>Absence de {{ entity.demande.salarie.civilite }} {{ entity.demande.salarie.nomprenom }}</b></h3>
                                <h4><b>Formulée le : {{ entity.dateCreation|date('d-m-Y')  }}</b></h4>
                                <h4><b>Motif : {{ entity.demande.motif }}</b></h4>
                                <ul>
                                    <li><b>date de départ</b> :  {{ entity.demande.dateDebut|date('d-m-Y')  }}</li>
                                    <li><b>date de Fin</b> : {{ entity.demande.dateFin|date('d-m-Y')  }}</li>
                                </ul>
                            </header>
                            <!-- BEGIN FORM-->
                            {{ form_start(form,{'attr': {'class':'form-horizontal form-bordered form-label-stripped'}}) }}  
                            <div class="form-body" id="form-demande">

                                <div class="row">
                                    {#<div class="col-md-12">
                                       <div class="form-group">

                                           <label class="control-label col-md-2">Delais max pour justification </label>
                                           <div class="col-md-9">
                                               <input id="nbJours" name="nbJours" min="1" type="text" class="form-control" value="{{ entity.dateMax|date('d-m-Y') }}" readonly="true" />
                                               <span class="help-block"></span>
                                           </div>

                                       </div>
                                   </div>#}
                                    <!--/span-->

                                    <div class="form-group">
                                        <label class="control-label col-md-2">Statut</label>
                                        <div class="col-md-8">
                                            <input  min="1" type="datetime" class="form-control" value="{{ entity.statut }}" readonly="true" />
                                            <span class="help-block"></span> 
                                        </div>
                                        <span class="help-block"></span>
                                    </div>                                    
                                    <div class="form-group">
                                        <label class="control-label col-md-2">Justificatif</label>
                                        <div class="col-md-8">
                                            {{ form_widget(form.justificatif.file, {'attr': {'class': 'form-control'}}) }}
                                            <span class="help-block">
                                                Merci de scanner et joindre la pièce justificative de l'absence maladie </span>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-2">Nom du fichier </label>
                                        <div class="col-md-8">
                                            {{ form_widget(form.justificatif.name, {'attr': {'class': 'form-control'}}) }}
                                            <span style="display:none">
                                                {{ form_widget(form.justificatif.ajouterPar, {'attr': {'class': 'form-control',}}) }}
                                            </span>
                                        </div>
                                    </div>   
                                    <div class="form-group">
                                            <label class="control-label col-md-2">la Justification a t-elle été faite dans les délais (48h)?</label>
                                        
                                        <div class="col-md-8">
                                            <br/>
                                            {{ form_widget(form.justifieAtemps, {'attr': {'class': 'form-control'}}) }}
                                            <span style="display:none">
                                            </span>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                           <label class="control-label col-md-2">Cette absence est-elle justifiable?</label>
                                           <div class="col-md-8">
                                            <br/>
                                            {{ form_widget(form.absenceJustifiable, {'attr': {'class': 'form-control'}}) }}
                                            <span style="display:none">
                                            </span>
                                        </div>            
                                   </div>       
                                    {{ form_rest(form) }}         
                                </div>                              
                            </div>
                            <hr/>
                            <div class="form-actions" style="background: rgba(249, 249, 249, 0.8) none repeat scroll 0% 0%;">
                                <div class="row">
                                    <div class="col-md-offset-10 col-md-3 pull-right">
                                        <a href="{{ path('ad_absencesajustifier')}}" class="btn red">Annuler</a>
                                        <input type="submit" class="btn green" value="Confirmer"/>
                                    </div>
                                </div>
                            </div>

                            <!-- END FORM-->
                        </div>
                    </div>
                </div>
            </div>
            <!-- END PAGE CONTAINER-->
        </div>
        <!-- BEGIN PAGE CONTENT -->
    </div>
    <!-- END PAGE CONTENT -->
    <style>
        th,td{
            text-align: center;
        }
    </style>

{% endblock %}
