<div class="row">
<div class="col-md-12">
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">Editer conge</h3>
</div>
<?php echo form_open('conge/edit/'.$conge['id']); ?>
<div class="box-body">
<div class="row clearfix">
<div class="col-md-6">
<label for="users_id" class="control-label">Utilisateur</label>
<div class="form-group">
<input type="text" value="<?php echo $user["nom"]." ".$user["prenom"]; ?>" class="form-control" id="users_id" />
</div>
<input type="hidden" value="<?php echo $conge['users_id']; ?>" name="users_id"/>
</div>
<div class="col-md-6">
<label for="datedebut" class="control-label"><span class="text-danger">*</span>Date debut</label>
<div class="form-group">
<input type="text" name="datedebut" value="<?php echo ($this->input->post('datedebut') ? $this->input->post('datedebut') : date("Y-m-d",strtotime($conge['datedebut']))); ?>" class="has-datepicker form-control" id="datedebut" />
<span class="text-danger"><?php echo form_error('datedebut');?></span>
</div>
</div>
<div class="col-md-6">
<label for="tempdebut" class="control-label"><span class="text-danger">*</span>Temp debut</label>
<div class="form-group">
<input type="text" name="tempdebut" value="<?php echo ($this->input->post('tempdebut') ? $this->input->post('tempdebut') : date("H:i",strtotime($conge['tempdebut']))); ?>" class="has-timepicker form-control" id="tempdebut" />
<span class="text-danger"><?php echo form_error('tempdebut');?></span>
</div>
</div>
<div class="col-md-6">
<label for="datefin" class="control-label"><span class="text-danger">*</span>Datefin</label>
<div class="form-group">
<input type="text" name="datefin" value="<?php echo ($this->input->post('datefin') ? $this->input->post('datefin') : date("Y-m-d ",strtotime($conge['datefin']))); ?>" class="has-datepicker form-control" id="datefin" />
<span class="text-danger"><?php echo form_error('datefin');?></span>
</div>
</div>
<div class="col-md-6">
<label for="tempfin" class="control-label"><span class="text-danger">*</span>Temp fin</label>
<div class="form-group">
<input type="text" name="tempfin" value="<?php echo ($this->input->post('tempfin') ? $this->input->post('tempfin') : date("H:i",strtotime($conge['tempfin']))); ?>" class="has-timepicker form-control" id="tempfin" />
<span class="text-danger"><?php echo form_error('tempfin');?></span>
</div>
</div>
<div class="col-md-6">
<label for="typeconge_id" class="control-label">Type conge</label>
<div class="form-group">
<select name="typeconge_id" class="form-control">
<option value="">select typeconge</option>
<?php
foreach($all_typeconge as $typeconge)
{
$selected = ($typeconge['id'] == $conge['typeconge_id']) ? ' selected="selected"' : "";
echo '<option value="'.$typeconge['id'].'" '.$selected.'>'.$typeconge['libelle'].'</option>';
}
?>
</select>
</div>
</div>
<div class="col-md-6">
<label for="description" class="control-label">Description</label>
<div class="form-group">
<textarea name="description" class="form-control" id="description"><?php echo ($this->input->post('description') ? $this->input->post('description') : $conge['description']); ?></textarea>
</div>
</div>
<div class="col-md-6">
<label for="interim_id" class="control-label">Interim</label>
<div class="form-group">
<select name="interim_id" class="form-control">
<option value="">select user</option>
<?php
foreach($all_users as $user)
{
$selected = ($user['id'] == $conge['interim_id']) ? ' selected="selected"' : "";
echo '<option value="'.$user['id'].'" '.$selected.'>'.$user['login'].'</option>';
}
?>
</select>
</div>
</div>
</div>
</div>
<div class="box-footer">
<button type="submit" class="btn btn-success">
<i class="fa fa-check"></i> Enregistrer
</button>
</div>
<?php echo form_close(); ?>
</div>
</div>
</div>