function get_input() { //Esto es para eliminar un notice en php 5.0.4 if (!isset($this->estado)) { $this->estado = null; } if ($this->es_solo_lectura()) { $html = toba_form::hidden($this->id_form, $this->seleccionado() ? $this->valor : $this->valor_no_seteado); if ($this->seleccionado()) { $html .= toba_recurso::imagen_toba('nucleo/efcheck_on.gif', true, 16, 16); } else { $html .= toba_recurso::imagen_toba('nucleo/efcheck_off.gif', true, 16, 16); } } else { $js = ''; if ($this->cuando_cambia_valor != '') { $js = "onchange=\"{$this->get_cuando_cambia_valor()}\""; } $tab = $this->padre->get_tab_index(); $extra = " tabindex='{$tab}'"; $html = toba_form::checkbox($this->id_form, $this->estado, $this->valor, $this->clase_css, $extra . ' ' . $js); } $html .= $this->get_html_iconos_utilerias(); return $html; }
function get_input() { //-- Si tiene un estado, ponerlo como única opción $this->opciones = array(); if (isset($this->descripcion_estado)) { $this->opciones[$this->estado] = $this->descripcion_estado; } $html = ""; //El estado que puede contener muchos datos debe ir en un unico string $estado = $this->get_estado_para_input(); if ($this->es_solo_lectura()) { $html .= toba_form::select("", $estado, $this->opciones, $this->clase_css, "disabled"); $html .= toba_form::hidden($this->id_form, $estado); return $html; } else { $tab = $this->padre->get_tab_index(); $extra = " tabindex='{$tab}'"; $js = ''; if ($this->cuando_cambia_valor != '') { $js = "onchange=\"{$this->get_cuando_cambia_valor()}\""; } $html .= toba_form::select($this->id_form, $estado, $this->opciones, 'ef-combo', $js . $this->input_extra . $extra, $this->categorias); } $html .= $this->get_html_iconos_utilerias(); return $html; }
static function enviar_csrf_hidden() { $tm = toba::memoria(); if ($tm->existe_dato_operacion(apex_sesion_csrt)) { $valor = $tm->get_dato_operacion(apex_sesion_csrt); echo toba_form::hidden(apex_sesion_csrt, $valor); } }
function generar_html() { //Genero la interface echo "\n\n<!-- ***************** Inicio EI FIRMA (\t" . $this->_id[1] . " )\t***********\t-->\n\n"; echo toba_form::hidden($this->_submit, ''); //echo toba_form::hidden($this->_id_post_codigo, ''); // Aca viaja el codigo echo $this->get_html_barra_editor(); $this->generar_html_barra_sup(null, true, "ei-form-barra-sup"); $this->generar_applet(); }
function generar_html() { //Genero la interface echo "\n\n<!-- ***************** Inicio EI CODIGO (\t" . $this->_id[1] . " )\t***********\t-->\n\n"; echo toba_form::hidden($this->_submit, ''); echo toba_form::hidden($this->_id_post_codigo, ''); // Aca viaja el codigo echo $this->get_html_barra_editor(); $this->generar_html_barra_sup(null, true, "ei-form-barra-sup"); echo "<textarea id='code'>"; echo $this->get_datos(); echo "</textarea>"; }
function generar_layout() { $firmador = get_firmador(); $url_firmador = toba_recurso::url_proyecto() . "/firmador_pdf/firmador.jar"; $url_firmador = $firmador->get_url_base_actual() . $url_firmador; $url_descarga = toba::vinculador()->get_url(null, "30000064", array('accion' => "descargar"), array(), true); $url_descarga = $firmador->get_url_base_actual() . $url_descarga; $url_subir = toba::vinculador()->get_url(null, "30000064", array('accion' => "subir"), array(), true); $url_subir = $firmador->get_url_base_actual() . $url_subir; $url_pdf = toba::vinculador()->get_url(null, "30000064", array('accion' => "descargar"), array(), false); //No necesita url_encode $url_pdf = $firmador->get_url_base_actual() . $url_pdf; $firmador->generar_applet($url_firmador, $url_descarga, $url_subir, "Prueba"); $firmador->generar_visor_pdf(dirname($url_firmador) . '/pdfobject.min.js', $url_pdf, "800px", "400px"); echo toba_form::hidden("firmador_codigo", $firmador->generar_sesion()); }
function generar_html() { echo "\n<table class='ei-base ei-esquema-base'>\n"; echo "<tr><td style='padding:0'>\n"; echo $this->get_html_barra_editor(); $this->generar_html_barra_sup(null, true, "ei-esquema-barra-sup"); $colapsado = isset($this->_colapsado) && $this->_colapsado ? "style='display:none'" : ""; echo "<div {$colapsado} id='cuerpo_{$this->objeto_js}'>"; //Campo de sincronizacion con JS echo toba_form::hidden($this->_submit, ''); $this->s__path = toba_dir() . '/temp/' . uniqid() . '.png'; try { $this->_conf->imagen__generar($this->s__path); } catch (JpGraphException $e) { throw new toba_error("TOBA EI GRAFICO: Error en la librería jpgraph. \n\t\t\t\tEl error reportado fue el siguiente: '" . $e->getMessage() . "'. Si este\n\t\t\t\tes un error de fuentes intente definir el path de las fuentes en\n\t\t\t\tsu sistema a través de la entrada fonts_path en el archivo instancia.ini.\n\t\t\t\tEjemplo: 'fonts_path = /usr/share/fonts/truetype/msttcorefonts/'"); } $destino = array($this->_id); $url = toba::vinculador()->get_url(null, null, array(), array('servicio' => 'mostrar_imagen', 'objetos_destino' => $destino)); echo "<img src='{$url}' {$this->_ancho} {$this->_alto} border='0'>"; //$this->generar_botones(); echo "</div></td></tr>\n"; echo "</table>\n"; }
function generar_html() { $ancho = ''; if (isset($this->_ancho)) { $ancho = "width ='{$this->_ancho}'"; } echo "\n<table class='ei-base ei-esquema-base' {$ancho}>\n"; echo "<tr><td style='padding:0'>\n"; echo $this->get_html_barra_editor(); $this->generar_html_barra_sup(null, true, "ei-esquema-barra-sup"); $colapsado = isset($this->_colapsado) && $this->_colapsado ? "style='display:none'" : ""; echo "<div {$colapsado} id='cuerpo_{$this->objeto_js}'>"; //Campo de sincronizacion con JS echo toba_form::hidden($this->_submit, ''); if (isset($this->_contenido)) { //Se arma el archivo .dot toba::logger()->debug($this->get_txt() . " [ Diagrama ]:\n{$this->_contenido}", 'toba'); $this->generar_esquema($this->_contenido, $this->_info_esquema['formato'], $this->_info_esquema['dirigido'], $this->_ancho, $this->_alto, $this->_incluir_mapa, $this->objeto_js); } $this->generar_botones(); echo "</div></td></tr>\n"; echo "</table>\n"; }
protected function generar_campos_hidden() { parent::generar_campos_hidden(); echo toba_form::hidden($this->_submit . '__nodos_invisibles', ''); echo toba_form::hidden($this->_submit . '__nodos_visibles', ''); }
function generar_html() { //Genero la interface echo "\n\n<!-- ***************** Inicio EI FORMULARIO (\t" . $this->_id[1] . " )\t***********\t-->\n\n"; //Campo de sincroniacion con JS echo toba_form::hidden($this->_submit, ''); echo toba_form::hidden($this->_submit . '_implicito', ''); $ancho = ''; if (isset($this->_info_formulario["ancho"])) { $ancho = convertir_a_medida_tabla($this->_info_formulario["ancho"]); } echo "<table class='{$this->_estilos}' {$ancho}>"; echo "<tr><td style='padding:0'>"; echo $this->get_html_barra_editor(); $this->generar_html_barra_sup(null, true, "ei-form-barra-sup"); $this->generar_formulario(); echo "</td></tr>\n"; echo "</table>\n"; $this->_flag_out = true; }
function generar_html() { //Campos de comunicación con J echo toba_form::hidden($this->_submit, ''); echo toba_form::hidden($this->_submit . '__seleccionar_semana', ''); echo toba_form::hidden($this->_submit . '__seleccionar_dia', ''); echo toba_form::hidden($this->_submit . '__cambiar_mes', ''); $this->_calendario->updateCalendar($this->_mes_actual['mes'], $this->_mes_actual['anio']); $this->_calendario->enableDatePicker($this->_rango_anios[0], $this->_rango_anios[1]); $this->_calendario->enableDayLinks(); $this->_calendario->enableWeekLinks(); echo "<div class='ei-base ei-calendario-base'>\n"; echo $this->get_html_barra_editor(); $this->generar_html_barra_sup(null, true, "ei-calendario-barra-sup"); echo "<div id='cuerpo_{$this->objeto_js}'>\n"; echo $this->_calendario->showMonth($this->objeto_js, $this->_eventos, $this->get_html_barra_editor()); echo "</div></div>\n"; }
protected function generar_campos_hidden() { parent::generar_campos_hidden(); echo toba_form::hidden($this->_submit . '__nodos_deseleccionados', ''); echo toba_form::hidden($this->_submit . '__nodos_seleccionados', ''); }
function get_input() { $estado = $this->get_estado_para_input(); $html = ''; if ($this->es_solo_lectura()) { $html .= toba_form::hidden($this->id_form, $estado); } $callback = "onchange=\"{$this->get_cuando_cambia_valor()}\""; //--- Se guarda el callback en el <div> asi puede ser recuperada en caso de que se borren las opciones $html .= "<div id='opciones_{$this->id_form}' {$callback}>\n"; $html .= "<table>\n"; if (!is_array($this->opciones)) { $datos = array(); } else { $datos = $this->opciones; } $i = 0; $tab_index = "tabindex='" . $this->padre->get_tab_index() . "'"; foreach ($datos as $clave => $valor) { if ($i % $this->cantidad_columnas == 0) { $html .= "<tr>\n"; } $id = $this->id_form . $i; $html .= "\t<td><label class='{$this->clase_css}' for='{$id}'>"; $es_actual = strval($estado) == strval($clave); if (!$this->es_solo_lectura()) { $sel = $es_actual ? "checked" : ""; if (!$this->permitir_html) { $clave = texto_plano($clave); } $html .= "<input type='radio' id='{$id}' name='{$this->id_form}' value='{$clave}' {$sel} {$callback} {$tab_index} />"; $tab_index = ''; } else { //--- Caso solo lectura $img = $es_actual ? 'efradio_on.gif' : 'efradio_off.gif'; $html .= toba_recurso::imagen_toba('nucleo/' . $img, true, 16, 16); } if (!$this->permitir_html) { $valor = texto_plano($valor); } $html .= "{$valor}</label></td>\n"; $i++; if ($i % $this->cantidad_columnas == 0) { $html .= "</tr>\n"; } } $sobran = $i % $this->cantidad_columnas; if ($sobran > 0) { $html .= str_repeat("\t<td></td>\n", $sobran); $html .= "</tr>\n"; } $html .= "</table>"; $html .= "</div>\n"; $html .= $this->get_html_iconos_utilerias(); return $html; }
protected function generar_campos_hidden() { echo toba_form::hidden($this->_submit, ''); echo toba_form::hidden($this->_submit . '__apertura_datos', ''); echo toba_form::hidden($this->_submit . '__seleccion', ''); }
/** * @ignore */ protected function generar_formulario() { $this->_carga_opciones_ef->cargar(); $this->_rango_tabs = toba_manejador_tabs::instancia()->reservar(100); $this->_colspan = 0; //Ancho y Scroll $estilo = ''; $ancho = isset($this->_info_filtro["ancho"]) ? $this->_info_filtro["ancho"] : "auto"; $alto_maximo = "auto"; if (isset($this->_colapsado) && $this->_colapsado) { $estilo .= "display:none;"; } //Campo de comunicacion con JS echo toba_form::hidden("{$this->objeto_js}_listafilas", ''); echo toba_form::hidden("{$this->objeto_js}__parametros", ''); echo "<div class='ei-cuerpo ei-filtro-base' id='cuerpo_{$this->objeto_js}' style='{$estilo}'>"; $this->generar_layout($ancho); echo "\n</div>"; }
/** * Genera el html de todo el componente, incluyendo hiddens necesarios para el correcto funcionamiento del componente */ function generar_html() { echo "\n<!-- ################################## Inicio CI ( " . $this->_id[1] . " ) ######################## -->\n\n"; $ancho = isset($this->_info_ci["ancho"]) ? "style='width:{$this->_info_ci["ancho"]};'" : ''; echo "<table class='ei-base ci-base' {$ancho} id='{$this->objeto_js}_cont'><tr><td style='padding:0;'>\n"; echo $this->controlador->get_html_barra_editor(); $class_extra = ''; if ($this->_info_ci['tipo_navegacion'] == self::NAVEGACION_TAB_HORIZONTAL) { $class_extra = 'ci-barra-sup-tabs'; } $this->generar_html_barra_sup(null, true, "ci-barra-sup {$class_extra}"); $colapsado = isset($this->_colapsado) && $this->_colapsado ? "style='display:none'" : ""; echo "<div {$colapsado} id='cuerpo_{$this->objeto_js}'>\n"; //-->Listener de eventos if (count($this->_eventos) > 0 || count($this->_eventos_usuario_utilizados) > 0) { echo toba_form::hidden($this->_submit, ''); echo toba_form::hidden($this->_submit . "__param", ''); } //--> Cuerpo del CI $alto = isset($this->_info_ci["alto"]) ? "style='_height:" . $this->_info_ci["alto"] . ";min-height:" . $this->_info_ci["alto"] . "'" : ""; echo "<div class='ci-cuerpo' {$alto}>\n"; $this->generar_html_cuerpo(); echo "</div>\n"; //--> Botonera if ($this->botonera_abajo()) { $this->generar_botones('ci-botonera ci-botonera-abajo'); } if ($this->_utilizar_impresion_html) { $this->generar_utilidades_impresion_html(); } echo "\n</div>"; echo "</td></tr></table>"; echo "\n<!-- ################################### Fin CI ( " . $this->_id[1] . " ) ######################## -->\n\n"; }
/** * @ignore */ protected function generar_parametros_post() { //Campos de sincronizacion con JS echo toba_form::hidden($this->_submit, ''); echo toba_form::hidden($this->_param_extra, ''); echo toba_form::hidden($this->_param_mapext, ''); }
protected function generar_input_ef($ef) { $this->_efs_generados[] = $ef; $id = $this->_elemento_formulario[$ef]->get_id_form(); echo toba_form::hidden($id, ''); }
/** * @ignore */ protected function generar_formulario() { //--- Si no se cargaron datos, se cargan ahora if (!isset($this->_datos)) { $this->carga_inicial(); } $this->_colspan = 0; if ($this->_info_formulario['filas_numerar']) { $this->_colspan++; } //Ancho y Scroll $estilo = ''; $ancho = isset($this->_info_formulario["ancho"]) ? $this->_info_formulario["ancho"] : "auto"; if ($this->_info_formulario["scroll"]) { $alto_maximo = isset($this->_info_formulario["alto"]) ? $this->_info_formulario["alto"] : "auto"; if ($ancho != 'auto' || $alto_maximo != 'auto') { $estilo .= "overflow: auto; width: {$ancho}; height: {$alto_maximo}; border: 1px inset; margin: 0px; padding: 0px;"; } } else { $alto_maximo = "auto"; } if (isset($this->_colapsado) && $this->_colapsado) { $estilo .= "display:none;"; } //Campo de comunicacion con JS echo toba_form::hidden("{$this->objeto_js}_listafilas", ''); echo toba_form::hidden("{$this->objeto_js}__parametros", ''); echo "<div class='ei-cuerpo ei-ml-base' id='cuerpo_{$this->objeto_js}' style='{$estilo}'>"; $this->generar_layout($ancho); echo "\n</div>"; }
function generar_html() { echo toba_form::hidden($this->_submit, ''); echo toba_form::hidden($this->_submit . "__seleccion", ''); $dir = opendir($this->_dir_actual); $archivos = array(); $carpetas = array(); $hay_padre = false; //Es el directorio relativo inicial? $es_el_relativo = false; if (isset($this->_path_absoluto)) { $es_el_relativo = realpath($this->_path_absoluto) == realpath($this->_dir_actual); } if ($dir === false) { return; } //Filtra Archivos y directorios while (($archivo = readdir($dir)) !== false) { $ruta = $this->_dir_actual . "/" . $archivo; $info = pathinfo($ruta); if (!isset($info['extension'])) { $info['extension'] = ''; } $es_padre = $archivo == '..'; if ($es_padre && !$es_el_relativo) { $hay_padre = true; } $es_actual = $archivo == '.'; if (!$es_padre && !$es_actual && is_dir($ruta) && !in_array($archivo, $this->_ocultos)) { $carpetas[] = $archivo; } elseif (in_array($info['extension'], $this->_extensiones)) { $archivos[] = $archivo; } } closedir($dir); sort($archivos); sort($carpetas); $path = pathinfo($this->_dir_actual); echo "<div class='ei-base ei-archivos-base'>\n"; echo $this->get_html_barra_editor(); $titulo = $this->_info['titulo']; if (!isset($titulo)) { $path_relativo = $this->get_path_relativo() != '' ? 'php/' . $this->get_path_relativo() : 'php'; $titulo = "<span title='{$this->_dir_actual}'>{$path_relativo}</span>"; } $this->generar_html_barra_sup($titulo, false, "ei-arch-barra-sup"); echo "<div id='cuerpo_{$this->objeto_js}'>\n"; $img_crear_carpeta = toba_recurso::imagen_toba('nucleo/carpeta_nueva_24.gif', true); $img_crear_archivo = toba_recurso::imagen_toba('nucleo/archivo_nuevo.gif', true); echo "<span style='float: right'>"; if ($this->crear_carpetas) { echo "<a href='#' onclick='{$this->objeto_js}.crear_carpeta()' title='Crear carpeta'>{$img_crear_carpeta}</a>"; } if ($this->crear_archivos && !$this->solo_carpetas) { echo "<a href='#' onclick='{$this->objeto_js}.crear_archivo()' title='Crear archivo'>{$img_crear_archivo}</a>"; } echo "</span>\n"; if ($hay_padre) { $img_subir = toba_recurso::imagen_toba('nucleo/subir.gif', true); echo "<span class='ei-archivos-listado'>\n\t\t\t\t\t<a href='#' onclick='{$this->objeto_js}.ir_a_carpeta(\"..\")' title='Subir de carpeta'>{$img_subir}</a>\n\t\t\t\t </span>\n"; } $img_carpeta = toba_recurso::imagen_toba('nucleo/carpeta.gif', true); echo "<div style='clear:left'>"; foreach ($carpetas as $carpeta) { echo "<div class='ei-archivos-carpeta'>{$img_carpeta} \n\t\t\t\t<a href='#' onclick='{$this->objeto_js}.ir_a_carpeta(\"{$carpeta}\")' \n\t\t\t\t\ttitle='Entrar a la carpeta'>{$carpeta}</a></div>\n"; } if (!$this->solo_carpetas) { $img_archivo = toba_recurso::imagen_toba('nucleo/php_22.gif', true); foreach ($archivos as $archivo) { echo "<div class='ei-archivos-archivo'>{$img_archivo} \n\t\t\t\t\t\t<a href='#' onclick='{$this->objeto_js}.seleccionar_archivo(\"{$archivo}\")' \n\t\t\t\t\t\t title='Seleccionar el archivo'>{$archivo}</a>\n</div>"; } } echo "</div>"; echo "</div>\n"; echo "</div>\n"; }
protected function html_cuadro_celda_evento($id_fila, $clave_fila, $pre_columnas) { foreach ($this->_cuadro->get_eventos_sobre_fila() as $id => $evento) { $grafico_evento = !($pre_columnas xor $evento->tiene_alineacion_pre_columnas()); //Decido si se debe graficar el boton en este lugar (logica explicada en html_cuadro_cabecera_columna_evento) if ($grafico_evento) { $parametros = $this->get_parametros_interaccion($id_fila, $clave_fila); $clase_alineamiento = $evento->es_seleccion_multiple() ? 'col-cen-s1' : ''; //coloco centrados los checkbox si es multiple echo "<td class='ei-cuadro-fila-evt {$clase_alineamiento}' width='1%'>\n"; if ($evento->posee_accion_respuesta_popup()) { $descripcion_popup = toba_js::sanear_string($this->_cuadro->get_descripcion_resp_popup($id_fila)); echo toba_form::hidden($this->_cuadro->get_id_form() . $id_fila . '_descripcion', toba_js::sanear_string($this->_cuadro->get_descripcion_resp_popup($id_fila))); //Podemos hacer esto porque no vuelve nada! } echo $this->get_invocacion_evento_fila($evento, $id_fila, $clave_fila, false, $parametros); //ESto hay que ver como lo modifico para que de bien echo "</td>\n"; } } //Se agrega la clave a la lista de enviadas $this->_cuadro->agregar_clave_enviada($clave_fila); }
function get_input() { $js = ''; $html = ''; $tab = $this->padre->get_tab_index(); $extra = " tabindex='{$tab}'"; if (!isset($this->estado)) { $this->estado = ""; } if (!isset($this->descripcion_estado) || $this->descripcion_estado == '') { $this->descripcion_estado = $this->get_descripcion_valor(); } $estado = is_array($this->estado) ? implode(apex_qs_separador, $this->estado) : $this->estado; $html .= "<span class='{$this->clase_css}'>"; if ($this->cuando_cambia_valor != '') { $js = "onchange=\"{$this->get_cuando_cambia_valor()}\""; } $extra .= $this->get_estilo_visualizacion_pixeles(); $extra .= $this->get_info_placeholder(); if ($this->editable) { $disabled = $this->es_solo_lectura() ? "disabled" : ""; $html .= toba_form::hidden($this->id_form . "_desc", $estado); $html .= toba_form::text($this->id_form, $this->descripcion_estado, false, "", $this->tamano, "ef-input", $extra . ' ' . $disabled . ' ' . $js); $extra = ''; } else { $html .= toba_form::hidden($this->id_form, $estado, $js); $html .= toba_form::text($this->id_form . "_desc", $this->descripcion_estado, false, "", $this->tamano, "ef-input", " {$extra} disabled "); } if (isset($this->id_vinculo)) { $display = $this->es_solo_lectura() ? "visibility:hidden" : ""; $html .= "<a id='{$this->id_form}_vinculo' style='{$display}' {$extra}"; $html .= " onclick=\"{$this->objeto_js()}.abrir_vinculo();\""; $html .= " href='#'>" . $this->get_imagen_abrir() . "</a>"; } if ($this->no_oblig_puede_borrar) { $display = $this->es_solo_lectura() ? "visibility:hidden" : ""; $html .= "<a id='{$this->id_form}_borrar' style='{$display}' {$extra}"; $html .= " onclick=\"{$this->objeto_js()}.set_estado(null, null);\""; $html .= " href='#'>" . $this->get_imagen_limpiar() . "</a>"; } $html .= $this->get_html_iconos_utilerias(); $html .= "</span>\n"; return $html; }