 <?php include_once PUBLIC_PATH. '/files_to_include/header_content.php'; ?>
<!-- =============================================== -->

  <!-- Left side column. contains the sidebar -->
  <aside class="main-sidebar" id="aside_menu" >
      <section class="sidebar">
          <ul class="sidebar-menu">
            <?php include_once PUBLIC_PATH. '/files_to_include/menu.php'; ?>
          </ul>
      </section>
  </aside>
   <!-- Content Wrapper. Contains page content -->
   <div class="content-wrapper " style="background-color: white; td{border: solid  2px #000; }">
   

    <!-- Main content -->
    <section class="content">
          
           <div class="row">
                <div class="col-lg-offset-1 col-lg-11">
                <div class="col-lg-12">
                   
                    <h3 class="page-header"><i class="fa fa-eye" style="color:blue;"></i> Consulter un utilisateur</h3>
                    <a href='<?php echo $this->url(array('controller'=>'Utilisateur','action'=>'index'),null, true);?>'>Retour à la liste</a>
                    <div class="clearfix"></div>
                    <br>
                </div>
                <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                <li ><a href="#civilite" id="civil" data-toggle="tab">Civilité</a></li>
              <li ><a href="#parametre" data-toggle="tab">Paramètres</a></li>
            </ul>
           <div class="tab-content">
               <div class="tab-pane" id="civilite">
                <form class="form-horizontal" id="createuser">
                  <div class="form-group">
                      <div class="col-sm-4">
                    <label for="nom" class="control-label">Nom / Surname</label><label style="color:red;">&nbsp; *&nbsp;</label>
                      </div>
                    <div class="col-sm-8">
                        <input type="text" class="form-control" id="nom" value="<?= $this->utilisateur->getIdpersonne()->getNom(); ?>"  readonly="true">
                    </div>
                  </div>
                  <div class="form-group">
                      <div class="col-sm-4">
                    <label for="nom" class="control-label">Prenoms / Christian Names</label>
                      </div>
                   

                    <div class="col-sm-8">
                        <input type="text" class="form-control" id="prenom" value="<?= $this->utilisateur->getIdpersonne()->getPrenom(); ?>"  readonly="true">
                    </div>
                  </div>
                  <div class="form-group">
                    <div class="col-sm-4">
                    <label for="nom" class="control-label">Sexe / Sex</label><label style="color:red;">&nbsp; *&nbsp;</label>
                      </div>
                    <div class="col-sm-8">
                        
                     <select id="sexe" name="sexe" class="form-control selectpicker">
                        <?php if ($this->utilisateur->getIdpersonne()->getSexe() == "M")
                            { ?>
                         <option selected="true" value="M">Homme</option>
                         <option  value="F">Femme</option>
                        <?php    }
                            else { ?>
                                <option selected="true" value="F">Femme</option>
                         <option  value="M">Homme</option>
                        <?php  
                            }
                         ?>
                          
                    </select>
                    </div>
                  </div>
                    <div class="form-group" id="fille">
                      <div class="col-sm-4">
                    <label for="nom" class="control-label">Nom jeune fille / Maiden</label><label style="color:red;">&nbsp; *&nbsp;</label>
                      </div>
                    <div  class="col-sm-8">
                        <input type="text" class="form-control" id="nomJeune" value="<?= $this->utilisateur->getIdpersonne()->getNomjeunefille(); ?>"  readonly="">
                    </div>
                  </div>
                  <div class="form-group">
                      
                      <div class="col-sm-4">
                    <label for="nom" class="control-label">Né(e) le / Born on</label><label style="color:red;">&nbsp; *&nbsp;</label>
                      </div>
                    <div  class="col-sm-8">
                        <input id="date" class="form-control picker" placeholder="Date de Naissance" required="" value="<?php echo $this->utilisateur->getIdpersonne()->getDatenaissance()->format("d-m-Y");?>"  readonly="true"/>
                    </div>
                  </div>
                     <div class="form-group">
                         <div class="col-sm-4">
                    <label for="lieu" class="control-label">Lieu Naissance/Place of birth</label>
                         </div>
                    <div class="col-sm-8">
                        <input type="text" class="form-control" id="lieu" value="<?= $this->utilisateur->getIdpersonne()->getLieunaissance(); ?>"  readonly="true">
                    </div>
                  </div>
                    <div class="form-group">
                     <div class="col-sm-4">
                    <label for="nom" class="control-label">Nationalité / Nationality</label><label style="color:red;">&nbsp; *&nbsp;</label>
                      </div>
                   
                    <div class="col-sm-8">
                        <input type="text" class="form-control" id="nationalite" value="<?= $this->utilisateur->getIdpersonne()->getNationalite(); ?>"  readonly="true">
                    </div>
                  </div>
                    
                  <div class="form-group">
                       <div class="col-sm-4">
                    <label for="nom" class="control-label">Telephone / Phone</label><label style="color:red;">&nbsp; *&nbsp;</label>
                      </div>
                 

                    <div class="col-sm-8">
                        <input type="tel" class="form-control" id="telephone" value="<?= $this->utilisateur->getIdpersonne()->getTelephone(); ?>" readonly="true">
                    </div>
                  </div>
                   
                  <div class="form-group">
                      <div class="col-sm-4">
                    <label for="nom" class="control-label">Passport ou carte d'identié N°</label><label style="color:red;">&nbsp; *&nbsp;</label>
                      </div>
                    

                    <div class="col-sm-8">
                        <input type="text" class="form-control" id="cni" value="<?= $this->utilisateur->getIdpersonne()->getNumcarte(); ?>"  readonly="true">
                    </div>
                  </div>
                     <div class="form-group">
                         <div class="col-sm-4">
                      <label for="delivre" class="control-label">Délivré le / Delivered on the</label>
                      </div>
                    <div  class="col-sm-4">
                       <?php 
                       if(is_object($this->utilisateur->getIdpersonne()->getDatedelivrancecni())){ ?>
                        <input id="delivrer" class="form-control picker" placeholder="Date de Naissance" readonly="true" value="<?php echo $this->utilisateur->getIdpersonne()->getDatedelivrancecni()->format("d-m-Y");?>"  />
                           
                       <?php }else{ ?>
                        <input class="form-control picker" placeholder="Délivré le / Delivered on the" required="" id="delivrer" readonly="true"/> 
                       <?php }
                       ?>
                        
                    </div>
                       <div  class="col-sm-4">
                           <input type="text" class="form-control" id="delivrerLieu" value="<?= $this->utilisateur->getIdpersonne()->getLieudelivrancecni(); ?>"  readonly="true">
                    </div>
                  </div>
                
                 
              
              </div>
              <!-- /.tab-pane -->
              
              <!-- /.tab-pane -->

              <div class="tab-pane" id="parametre">
                <div class="form-horizontal">
                  <div class="form-group">
                     <div class="col-sm-4">
                    <label for="login" class="control-label">Profil</label><label style="color:red;">&nbsp; *&nbsp;</label>
                      </div>

                    <div class="col-sm-8">
                      <select class='form-control selectpicker'  data-live-search="true" id="profil">
                        
                           <?php
                     foreach($this->profils as $profil){
                           if (is_object($this->utilisateur->getIdprofil()) && $profil ===$this->utilisateur->getIdprofil() )
                            { ?>
                         <option selected="true" value="<?= $this->utilisateur->getIdprofil()->getIdprofil();?>"><?php echo $this->utilisateur->getIdprofil()->getNom();?></option>
                        <?php    }
                            else { ?>
                                <option  value="<?= $profil->getIdprofil();?>"><?php echo $profil->getNom();?></option>
                        <?php  
                            }
                        }
                         ?>   
                          
                            
                              
                    </select>
                    </div>
                  </div>
                  <div class="form-group">
                      <div class="col-sm-4">
                    <label for="login" class="control-label">Login</label><label style="color:red;">&nbsp; *&nbsp;</label>
                      </div>

                    <div class="col-sm-8">
                        <?php if (is_object($this->utilisateur->getIdprofil()))
                            { ?>
                        <input type="text" class="form-control" id="login" value="<?= $this->utilisateur->getLogin(); ?>" readonly="true" >
                        <?php    }
                            else { ?>
                         <input type="text" class="form-control" id="login"  readonly="true" >
                        <?php  
                            }
                         ?>   
                    </div>
                  </div>
                  <div class="form-group">
                      <div class="col-sm-4">
                          <label for="password" class="control-label">Password</label>
                      </div>

                    <div class="col-sm-8">
                        <input type="password" class="form-control" id="password" placeholder="Password" readonly="">
                    </div>
                  </div>
<!--                  <div class="form-group">
                    <label for="password" class="col-sm-2 control-label">Confirmer password</label>

                    <div class="col-sm-10">
                        <input type="password" class="form-control" id="confirmation" placeholder="Confirm Password">
                    </div>
                  </div>-->
                  
                </div>
                   <input type="hidden" id="iduser" value="<?php echo $this->utilisateur->getIdutilisateur();?>"/>
                </form>
              </div>
              <!-- /.tab-pane -->
            </div>
            <!-- /.tab-content -->
          </div>
            </div>
          
          <!-- /.nav-tabs-custom -->
        </div>
     

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
 <?php include_once PUBLIC_PATH. '/files_to_include/footer_content.php'; ?>
  
   	 <script src="<?php echo $this->baseUrl('script/jquery.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/bootstrap.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/app.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/i18next-1.7.1.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/metisMenu.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/sb-admin-2.js');?>"></script>
    <script src="<?php echo $this->baseUrl("script/jquery.dataTables.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/dataTables.bootstrap.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/dataTables.buttons.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/pdfmake.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/vfs_fonts.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/buttons.html5.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/jquery.toast.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl('script/loadingoverlay.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl("script/jquery.datetimepicker.full.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/bootstrap.select.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/moment.js");?>"></script>
    <!-- FastClick -->
<script src="<?php echo $this->baseUrl('script/fastclick.js');?>"></script>
<!-- AdminLTE App -->
<script src="<?php echo $this->baseUrl('script/adminlte.min.js');?>"></script>
<script src="<?php echo $this->baseUrl('script/demo.js');?>"></script>
    <script type="text/javascript">
       
      
       

    jQuery.datetimepicker.setLocale('fr');
            $(".picker").datetimepicker({
                 format: 'd-m-Y H:i:s'
      });
      $('#civil').click();
    
	</script>

</body>

</html>