

										<div class="panel panel-info">
                                            <div class="panel-heading">
                                             <a data-toggle="collapse" data-parent="#accordion" href="#General">Datos Usuario</a>
                                            </div>
											<!-- DATOS GENERALES -->
                                            <div id="General" class="panel-collapse collapse in">
                                                <div class="panel-body">
                                                    <div class="form-group-sm <?php if(form_error('nombre')){echo 'has-error';} ?>">
                                                      <label class="control-label col-lg-2">Nombre: </label>
                                                      <div class="col-lg-4">
														<input class="form-control" type="text" name="nombre" value="<?php echo set_value('nombre',$usuario['nombre']); ?>" size="20" autofocus />                                               
                                                      </div>
                                                    </div>
                                                    <div class="form-group-sm <?php if(form_error('apellido')){echo 'has-error';} ?>">
                                                      <label class="control-label col-lg-2">Apellido: </label>
                                                      <div class="col-lg-4">
														<input class="form-control" type="text" name="apellido" value="<?php echo set_value('apellido',$usuario['apellido']); ?>" size="20" />
                                                      </div>                                                      
                                                    </div>
                                                    <div class="form-group-sm <?php if(form_error('username')){echo 'has-error';} ?>">
                                                      <label class="control-label col-lg-2">Usuario: </label>
                                                      <div class="col-lg-4">
														<input class="form-control" type="text" name="username" value="<?php echo set_value('username',$usuario['username']); ?>" size="20" />                                                      </div>
                                                    </div>
                                                    <div class="form-group-sm <?php if(form_error('email')){echo 'has-error';} ?>">
                                                      <label class="control-label col-lg-2" >E-Mail:</label>
                                                      <div class="col-lg-4">
														<input class="form-control" type="text" name="email" value="<?php echo set_value('email',$usuario['email']); ?>" size="20" />
                                                      </div>                                                      
                                                    </div>
													<? if (($this->uri->segment(2)== "nuevo") or ($this->uri->segment(2)== "nuevo_consultor") or ($this->uri->segment(2)== "nuevo_profesional") or ($this->uri->segment(2)== "nuevo_cliente") or ($this->uri->segment(2)== "nuevo_cliente_front")) {?>
                                                    <div class="form-group-sm <?php if(form_error('password')){echo 'has-error';} ?>">
                                                      <label class="control-label col-lg-2">Contraseña: </label>
                                                      <div class="col-lg-4">
														<input class="form-control" type="password" name="password" value="<?php echo set_value('password'); ?>" size="20" />
													  </div>
                                                    </div>
                                                    <div class="form-group-sm <?php if(form_error('password_conf')){echo 'has-error';} ?>">
                                                      <label class="control-label col-lg-2">Confirmar Contraseña: </label>
                                                      <div class="col-lg-4">
														<input class="form-control" type="password" name="password_conf" value="<?php echo set_value('password_conf'); ?>" size="20" />
													  </div>
                                                    </div>													
													<? }?>		
                                                    <div class="form-group-sm <?php if(form_error('idioma')){echo 'has-error';} ?>">
                                                      <label class="control-label col-lg-2">Idioma: </label>
                                                      <div class="col-lg-4">
                                                        <select class="form-control" id="idioma" name="idioma">
                                                            <option value="ES" <?php echo set_select('idioma', 'ES',($usuario['idioma'] == 'ES' ? TRUE : FALSE)); ?> >ES</option>
                                                            <option value="PT" <?php echo set_select('idioma', 'PT',($usuario['idioma'] == 'PT' ? TRUE : FALSE)); ?> >PT</option>
                                                        </select>                 
                                                      </div>									
                                                    </div>
                                                    <div class="form-group-sm <?php if(form_error('id_pais')){echo 'has-error';} ?>">
                                                      <label class="control-label col-lg-2">País: </label>
                                                      <div class="col-lg-4">
														<select class="form-control" id="id_pais" name="id_pais">
															<option value="" <?php echo set_select('id_pais',"",(""==$usuario['id_pais'] ? TRUE : FALSE)); ?> >
															<?php foreach($paises as $pais) : ?>
															<option value="<?=$pais['id_country']?>" <?php echo set_select('id_pais',$pais['id_country'],($pais['id_country']==$usuario['id_pais'] ? TRUE : FALSE)); ?> ><?=$pais['printable_name'].' ('.$pais['iso'].')'?></option>
															<?php endforeach; ?>
														</select>
                                                      </div>									
                                                    </div>
                                                    <div class="col-lg-12"> <hr class="divider" /></div>
                                                    <div class="form-group">
                                                      <label class="control-label col-lg-2">Tipo de Usuario: </label>
                                                      <div class="col-lg-4">
                                                        <p class="form-control-static"> <?=$usuario['usuario_tipos']?></p>
                                                      </div>
                                                      <label class="control-label col-lg-2" >Perfiles:</label>
                                                      <div class="col-lg-4">
													  <? if (!empty($perfiles)) { ?>
														<select multiple="multiple" class="form-control" id="perfiles" name="perfiles[]">
															<?php 
															$usuario_perfiles = explode(',', $usuario['usuario_perfiles_id']);
															foreach($perfiles as $perfil) : 
															$chequeado = (in_array($perfil['id'],$usuario_perfiles) ? TRUE : FALSE);
															?>
															<option value="<?=$perfil['id']?>" <?php echo set_select('perfiles[]',$perfil['id'],$chequeado); ?> ><?=$perfil['nombre']?></option>
															<?php endforeach; ?>
														</select>
														<? } else { ?>
															<p class="form-control-static"> <?=$usuario['usuario_perfiles']?></p>
														<? } ?>
													  </div>
                                                      
                                                    </div>                                                   
                                                   <div class="col-lg-12"> <hr class="divider" /></div>                                                     
                                                   <div class="form-group-sm">
                                                      <label class="control-label col-lg-2">Último Acceso: </label>
                                                      <div class="col-lg-4">
                                                        <p class="form-control-static"> <?=$usuario['fecha_acceso']?></p>
                                                      </div>
                                                      <label class="control-label col-lg-2" >Ip Último Acceso:</label>
                                                      <div class="col-lg-4">
                                                        <p class="form-control-static"> <?=$usuario['ip_acceso']?></p>
                                                      </div>                                                      
                                                   </div>
                                                   <div class="form-group-sm">
                                                      <label class="control-label col-lg-2">Activo:</label>
                                                      <div class="col-lg-4">
                                                        <p class="form-control-static"><?php echo ($usuario['activo'])?"Si":"No"; ?></p>
                                                      </div>
                                                      <label class="control-label col-lg-2" >Bloqueado</label>
                                                      <div class="col-lg-4">
                                                        <p class="form-control-static"> <?php echo ($usuario['bloqueado'])?"Si":"No"; ?></p>
                                                      </div>                                                      
                                                    </div>
                                                    <div class="form-group-sm">
                                                      <label class="control-label col-lg-2">Vencimiento de Clave:</label>
                                                      <div class="col-lg-4">
                                                        <p class="form-control-static"> <?=$usuario['fecha_vencimiento_password']?></p>
                                                      </div>
                                                      <label class="control-label col-lg-2" >Requiere cambio Clave?:</label>
                                                      <div class="col-lg-4">
                                                        <p class="form-control-static">  <?php echo ($usuario['cambio_password'])?"Si":"No"; ?></p>
                                                      </div>                                                      
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
<!-- Multiselect JavaScript -->
<script src="/eapv2/public/bootstrap/bower_components/multiselect/js/bootstrap-multiselect.js"></script>
<script type="text/javascript">
$(function(){
			$('#perfiles').multiselect({
				nonSelectedText: 'Seleccione un Perfil',
				nSelectedText: ' Perfiles',
				allSelectedText: 'Todos',
				numberDisplayed: 2
				
				/*onDropdownHide: function(event) {
					var str = "";
					$( "#perfiles option:selected" ).each(function() {
					  str += $( this ).text() + ",";
					});
					$( "#usuario_perfiles" ).text( str );			
				}
				*/
			});
			
});
</script>


