{% extends 'base.html.twig' %}

{% form_theme form 'bootstrap_4_horizontal_layout.html.twig' %}

{% block stylesheets %}
    {{ parent() }}
    <!-- <link rel="stylesheet" href="{{ asset('choosen/docsupport/style.css') }}"> -->
    <link rel="stylesheet" href="{{ asset('choosen/docsupport/prism.css') }}">
    <link rel="stylesheet" href="{{ asset('choosen/chosen.css') }}">
{% endblock %}



{% block body %}
    <div class="row">
        <div class="col-md-8 offset-md-2">

            <div class="card">
                <div class="card-header">
                    Ajouter un nouveau patient
                </div>
                <div class="card-body">
                    {{ form_start(form, {'attr':{'class':'form-label-left'}}) }}
                    <div class="row">
                        <div class="col-md-6 col-sm-6">
                            {{ form_label(form.nom,"Nom", {'label_attr': {'class': 'col-sm-12 col-form-label'}}) }}
                            {{ form_widget(form.nom, {'attr': {'class': 'form-control'}}) }}
                            {{ form_errors(form.nom) }}
                        </div>

                        <div class="col-md-6 col-sm-6">
                            {{ form_label(form.prenoms,"Prenom", {'label_attr': {'class': 'col-sm-12 col-form-label'}}) }}
                            {{ form_widget(form.prenoms, {'attr': {'class': 'form-control'}}) }}
                            {{ form_errors(form.prenoms) }}
                        </div>

                        <div class="col-md-6 col-sm-6  form-group has-feedback">
                            {{ form_label(form.dnaiss,"Date naissance", {'label_attr': {'class': 'col-sm-12 col-form-label'}}) }}
                            {{ form_widget(form.dnaiss, {'attr': {'class': 'form-control'}}) }}
                            {{ form_errors(form.dnaiss) }}
                        </div>
                        
                        <div class="col-md-6 col-sm-6  form-group has-feedback">
                            {{ form_label(form.lnaiss,"Lieu naissance", {'label_attr': {'class': 'col-sm-12 col-form-label'}}) }}
                            {{ form_widget(form.lnaiss, {'attr': {'class': 'form-control'}}) }}
                            {{ form_errors(form.lnaiss) }}
                        </div>

                        <div class="col-md-6 col-sm-6  form-group has-feedback">
                            {{ form_label(form.contact,"Contact", {'label_attr': {'class': 'col-sm-12 col-form-label'}}) }}
                            {{ form_widget(form.contact, {'attr': {'class': 'form-control'}}) }}
                            {{ form_errors(form.contact) }}
                        </div>
                        <div class="col-md-6 col-sm-6  form-group has-feedback">
                            {{ form_label(form.adresse,"Quartier", {'label_attr': {'class': 'col-sm-12 col-form-label'}}) }}
                            {{ form_widget(form.adresse, {'attr': {'class': 'form-control'}}) }}
                            {{ form_errors(form.adresse) }}
                        </div>

                        <div class="col-md-6 col-sm-6  form-group has-feedback">
                            {{ form_label(form.genre,"Genre", {'label_attr': {'class': 'col-sm-12 col-form-label'}}) }}
                            {{ form_widget(form.genre, {'attr': {'class': 'form-control'}}) }}
                            {{ form_errors(form.genre) }}
                        </div>
                        
                        <div class="col-md-6 col-sm-6  form-group has-feedback">
                            {{ form_label(form.gsanguin,"Groupe sanguin", {'label_attr': {'class': 'col-sm-12 col-form-label'}}) }}
                            {{ form_widget(form.gsanguin, {'attr': {'class': 'form-control'}}) }}
                            {{ form_errors(form.gsanguin) }}
                        </div>

                        <div class="col-md-6 col-sm-6  form-group has-feedback">
                            {{ form_label(form.typePiece,"Type piece", {'label_attr': {'class': 'col-sm-12 col-form-label'}}) }}
                            {{ form_widget(form.typePiece , {'attr': {'class': 'form-control'}}) }}
                            {{ form_errors(form.typePiece ) }}
                        </div>
                        <div class="col-md-6 col-sm-6  form-group has-feedback">
                            {{ form_label(form.cni,"Numero piece", {'label_attr': {'class': 'col-sm-12 col-form-label'}}) }}
                            {{ form_widget(form.cni , {'attr': {'class': 'form-control'}}) }}
                            {{ form_errors(form.cni ) }}
                        </div>

                        <div class="col-md-6 col-sm-6  form-group has-feedback">
                            {{ form_label(form.pays,"Pays de residence", {'label_attr': {'class': 'col-sm-12 col-form-label'}}) }}
                            {{ form_widget(form.pays , {'attr': {'class': 'form-control'}}) }}
                            {{ form_errors(form.pays ) }}
                        </div>
                        <div class="col-md-6 col-sm-6  form-group has-feedback">
                            {{ form_label(form.profession,"Profession", {'label_attr': {'class': 'col-sm-12 col-form-label'}}) }}
                            {{ form_widget(form.profession , {'attr': {'class': 'form-control'}}) }}
                            {{ form_errors(form.profession ) }}
                        </div>


                        
                    </div>


                        <div class="col-md-10  form-group has-feedback">
                            <div class="col-md-9 col-sm-9">
                                <button type="submit" class="btn btn-success"> Enegistrer le patient </button>
                            </div>
                        </div>
                    {{ form_end(form) }}
                </div>
            </div>





            {#<div class="x_panel">
                <div class="x_title">
                    <h2> Nouveau patient <small> ::. Renseignez les informations du patient</small></h2>
                    
                    <div class="clearfix"></div>
                </div>
                <div class="x_content">
                    
                </div>
            </div>#}
        </div>
    </div>


{% endblock %}


{% block javascripts %}
    {{ parent() }}
    <script src="{{ asset('choosen/docsupport/jquery-3.2.1.min.js') }}" type="text/javascript"></script>
    <script src="{{ asset('choosen/chosen.jquery.js') }}" type="text/javascript"></script>
    <script src="{{ asset('choosen/docsupport/prism.js') }}" type="text/javascript" charset="utf-8"></script>
    <script src="{{ asset('choosen/docsupport/init.js') }}" type="text/javascript" charset="utf-8"></script>
{% endblock %}
