/**
  * 
  * @param array $default valores por defecto
  * @return string html
  */
 public function render($default = "")
 {
     $this->_element->setNombre($this->_nombre);
     $this->_element->populate($this->_listar());
     $this->_element->setOptionId("usu_c_email");
     $this->_element->setOptionName("usu_c_email");
     return $this->_element->render($this->_nombre, $default);
 }
 /**
  * 
  * @param array $default valores por defecto
  * @return string html
  */
 public function render($default = "")
 {
     $lista = $this->_listar();
     if (count($lista) > 0) {
         $this->_element->setNombre($this->_nombre);
         $this->_element->populate($lista);
         $this->_element->setOptionId("arch_ia_id");
         $this->_element->setOptionName("nombre_completo");
         return $this->_element->render($this->_nombre, $default);
     } else {
         return "<div class=\"alert alert-warning\"> No hay archivos asociados a la emergencia </div>";
     }
 }
 /**
  * 
  * @param array $default valores por defecto
  * @return string html
  */
 public function render($default = array())
 {
     $this->_element->addAtributos(array("multiple" => "true", "class" => "form-control select2-tags", "data-placeholder" => "Seleccione una opciĆ³n"));
     $this->_element->setNombre($this->_nombre);
     $this->_element->populate($this->_listar());
     $this->_element->setOptionId("com_ia_id");
     $this->_element->setOptionName("com_c_nombre");
     return $this->_element->render($this->_nombre, $default);
 }
 /**
  * 
  * @param array $default valores por defecto
  * @return string html
  */
 public function render($default = array())
 {
     $this->_element->setNombre($this->_nombre);
     $this->_element->populate($this->_listar());
     $this->_element->setOptionId("value");
     $this->_element->setOptionName("option");
     return $this->_element->render($this->_nombre, $default);
 }
/**
 * Retorna elemento de formulario Select
 * @param int $id_region identificador de region
 */
function formElementSelectComuna($input_nombre, $input_valor, $id_region)
{
    $_ci =& get_instance();
    $_ci->load->model("comuna_model", "_comuna_model");
    $form_select = new Cosof_Form_Select();
    $form_select->setNombre($input_nombre);
    $form_select->populate($_ci->_comuna_model->listarComunasPorRegion($id_region));
    $form_select->setOptionId("com_ia_id");
    $form_select->addAtributos(array("class" => "form-control"));
    $form_select->setOptionName("com_c_nombre");
    return $form_select->render($input_nombre, $input_valor);
}
 /**
  * 
  * @param array $default valores por defecto
  * @return string html
  */
 public function render($default = array())
 {
     $this->_element->setNombre($this->_nombre);
     $lista = $this->_listar();
     $this->_element->populate($lista);
     $this->_element->setOptionId("reg_ia_id");
     $this->_element->setOptionName("reg_c_nombre");
     if ((count($default) == 0 or is_null($default) or $default == "") && count($lista) == 1) {
         $default = $lista[0]["reg_ia_id"];
     }
     return $this->_element->render($this->_nombre, $default);
 }