'; $html .= '
'; $html .= '
'; $html .= '

'; $html .= self::$icon . ' ' . self::$title_text; $html .= '

'; $html .= self::$iconAction; $html .= '
'; $html .= self::$subtitle; $html .= '
'; $html .= '
'; if(self::$otherBtn) { $html .= self::otherBtn(self::$otherBtn); } if(self::$goBack) { $html .= self::goBack(self::$goBack); } $html .= '
'; $html .= ''; return $html; } public static function goBack($goBack) { global $volver_lg; $html = ''; $html .= '' . $volver_lg . ''; $html .= ''; return $html; } public static function otherBtn (...$otherBtn) { $html = ''; foreach(self::$otherBtn as $btn) { $html .= $btn; } return $html; } public static function navigationButton() {//Los breadcrum de la navegacion $html = ''; return $html; } public static function Input($id, $type, $nombre = FALSE, $required = FALSE, $other = FALSE) { global $campo_obligatorio_lg; $required = $required ? 'required' : FALSE; if(!$nombre) { $placeholder = !empty(self::$placeHolder) ? self::getPlaceHolder() : FALSE; } else { $placeholder = $nombre; } /* $yelling = $type == 'date' ? FALSE : 'onkeyup="yelling(this)"'; */ $html = '
'; $html .= ''; $html .= ''; $html .= $required ? '
' . $campo_obligatorio_lg . '
' : FALSE; $html .= ''; $html .= '
'; return $html; } public static function ToggleSwitch ($id, $nombre) { $html = '
'; $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; return $html; } public static function StockSelect($con, $id, $label = FALSE, $select = FALSE, $other = FALSE, $grupo = FALSE, $usuarioSession = FALSE, $firstOption = NULL) { //$con es la conexion //$id es el id y name //$label por si se quiere asignar el label con nombre //$select es el valor de comparacion para asignar un selected //$other es para asignar otras cosas como funciones global $elige_lg; global $campo_obligatorio_lg; $INT = "#*INT$"; $GRUPO_CONDICION = "#$grupo$"; $USUARIO_SESSION = "#$usuarioSession$"; $firstOption = $firstOption ? $firstOption : $elige_lg; $html = '
'; $label = $label ? '' : FALSE; $html .= $label; $html .= ''; $html .= '
' . $campo_obligatorio_lg . '
'; $html .= '
'; return $html; } public static function EstadoSelect($con, $id, $label = FALSE, $select = FALSE, $other = FALSE) { global $estado_lg; global $lg; $html = '
'; $label = $label ? '' : FALSE; $html .= $label; $html .= ''; $html .= '
'; return $html; } //OBSOLETAS public static function TitleSection ($icon, $titulo, $volver = NULL, $volver_texto = FALSE) { $html = '
'; $html .= '

'; $html .= '' . $titulo; $html .= '

'; if($volver){ $html .= '
'; $html .= ''; $html .= '' . $volver_texto . ''; $html .= ''; $html .= '
'; } $html .= '
'; return $html; } //OBSOLETAS public static function MainTitle($titulo, $icon = FALSE, $subtitulo = FALSE){ $iconTAG = $icon ? '' : ''; $html = '

'; $html .= $iconTAG . $titulo; $html .= '

'; if($subtitulo){ $html .= '
' . $subtitulo . '
'; } return $html; } //OBSOLETAS public static function Back($volver, $volver_texto){ //window.location.href= //history.back() $html = '
'; $html .= ''; $html .= '' . $volver_texto . ''; $html .= ''; $html .= '
'; return $html; } //No se encuentra uso para esta funcion - Mb 15/01/2021 public static function buscarContacto($placeholder, $control_input , $cliente = NULL, $titulo){ $html = '
'; $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; $html .= ''; $html .= $cliente; $html .= '
'; $html .= '
'; $html .= '
'; $html .= ''; echo $html; } //OBSOLETAS public static function inputsClientes($id, $label, $type, $value = NULL, $required = NULL, $required_text = NULL){ $html = '
'; $html .= ''; $html .= ''; if($required){ $html .= '
'; $html .= $required_text; $html .= '
'; } $html .= '
'; echo $html; } public static function inputSinIcono($id, $label, $tipo_input, $otras = FALSE, $required = FALSE, $mensaje_invalid = FALSE){ //$id = label for, id input, name input //$label = titulo de input //$tipo_input = el tipo de input (number, text, date, hidden) //$otras = cualquier campo necesario del input como value, acciones js, placeholder //required = si es necesario el campo, y el mensaje //style = add a class; global $campo_obligatorio_lg; $html = ''; /* $yelling = $tipo_input == 'text' ? 'onkeyup="yelling(this)"' : FALSE; */ $html .= ''; if($required){ $mensaje_invalid = $mensaje_invalid ? $mensaje_invalid : $campo_obligatorio_lg; $html .= '
' . $mensaje_invalid . '
'; } return $html; } public static function inputConIcono ($id, $icon, $tipo_input, $otras = FALSE, $required = FALSE, $label = FALSE) { global $campo_obligatorio_lg; $required = $required ? 'required' : ''; $invalid_tooltip = ''; $d_none = 'd-none'; if($required) { $required = 'required'; $invalid_tooltip = '
' . $campo_obligatorio_lg . '
'; } if($label) { $d_none = 'd-block'; } $html = ''; $html .= '
'; if($icon) { $html .= '
'; $html .= '' . $icon . ''; $html .= '
'; } $html .= ''; $html .= $invalid_tooltip; $html .= '
'; return $html; } public static function TextArea($id, $placeholder, $value = FALSE){ $value = $value ? $value : FALSE; $html = '
'; $html .= '
'; $html .= ''; $html .= '
'; $html .= ''; $html .= '
'; return $html; } public static function ButtonModal($title, $target, $icon){ $html = ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; return $html; } public static function ButtonLink($link, $icono, $tooltip = FALSE) { $tooltip = $tooltip ? 'data-toggle="tooltip" data-placement="top" data-title="' . $tooltip . '"' : ''; $html = '' . $icono . ''; return $html; } //Observaciones Tasaciones //No se encuentra uso para esta funcion - Mb 15/01/2021 public static function observaciones($con, $observaciones_lg, $codigo_tas = FALSE, $tas_value, $vehiculo, $guardar_lg, $seccion_vacia_lg){ $schema = new Schema($con); $html = '
'; $html .= '
'; $html .= '
'; $html .= ''; $html .= '
'; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; echo $html; } public static function ListadoIVA($con, $id, $label = FALSE, $select = FALSE){ global $elige_lg; $html = '
'; if($label) { $html .= ''; } $html .= ''; $html .= '
'; return $html; } public static function rebu() { global $sin_rebu_lg; $html = '
'; $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; return $html; } public static function select_precio ($id = FALSE, $top = FALSE, $min = FALSE, $label = FALSE) { global $precio_hasta_lg; global $elige_lg; $id = !$id ? 'precio_hasta' : $id; $top = !$top ? 1000000 : $top; $min = !$min ? 1000: $min; $label = $label ? '' : FALSE; $optionName = $label ? $elige_lg : $precio_hasta_lg; $html = '
'; $html .= $label; $html .= ''; $html .= '
'; return $html; } public static function range($id = FALSE, $label = FALSE, $value = FALSE, $max = FALSE) { $html = '
'; $html .= ''; $html .= ''; $html .= ''; $html .= '
'; return $html; } public static function select_ano ($id = FALSE, $label = FALSE, $select = FALSE) { global $ano_matriculacion_lg; global $elige_lg; $id = $id ? $id : 'anio'; $label = $label ? '' : FALSE; $optionName = $label ? $elige_lg : $ano_matriculacion_lg; $html = '
'; $html .= $label; $html .= ''; $html .= '
'; return $html; } public static function select_km ($input_name = FALSE) { global $km_hasta_lg; $input_name = $input_name ? $input_name : 'kmHasta'; $html = '
'; $html .= ''; $html .= '
'; return $html; } public static function select_si_no($id, $label, $select = NULL, $required = FALSE) { global $lg; global $elige_lg; global $si_lg; global $no_lg; global $campo_obligatorio_lg; $required = $required ? 'required' : ''; $html = '
'; $html .= ''; $html .= ''; $html .= '
' . $campo_obligatorio_lg . '
'; $html .= '
'; return $html; } public static function sub_titulo ($titulo, $style = FALSE) { $html = '
' . $titulo . '
'; return $html; } public static function input_file ($accept = FALSE, $style = FALSE) { global $vacio_lg; $style = $style ? $style : 'col-12'; $accept = $accept ? $accept : 'accept="image/jpeg,image/gif,image/png,application/pdf"'; $html = '
'; $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; return $html; } public static function mensaje_informativo ($mensaje_principal, $mensaje_secundario = FALSE, $tipo_mesaje = FALSE) { if ($tipo_mesaje) { $color = 'danger'; $icono = 'exclamation-circle'; } else { $color = 'success'; $icono = 'check-circle'; } $mensaje_secundario = $mensaje_secundario ? ' - ' . $mensaje_secundario : ''; $html = ''; return $html; } public static function input_radio_buttons_style ($style = FALSE, ...$other) { //$style == css para los labels //...$other = es lo que se mete desde fuera , todo el input y en funcion de cuantos de meten se generaran lo botones $html = '
'; for($i = 0; $i < count($other); $i++) { $active = strpos($other[$i], 'checked') ? 'active' : ''; $style = $style ? $style : 'btn-secondary btn-sm'; $html .= ''; } $html .= '
'; return $html; } public static function img_no_disponible ($style = FALSE) { // Se tiene que meter en un row $style = $style ? $style : 'bg-light'; $html = '
'; $html .= '
'; $html .= ''; $html .= '
'; $html .= '
'; $html .= '
'; $html .= '
'; $html .= ''; $html .= '
'; $html .= '
'; $html .= '
'; $html .= '
'; $html .= ''; $html .= '
'; $html .= '
'; return $html; } public static function img_disponible ($ruta, $id, $card_title, $otras_funcionalidades = FALSE, $style = FALSE, $view_modal = FALSE) { //$card_title = titulo de la imagen //$otras_funcionalidades = otros botones de acción //$ruta = ruta en funcion de donde se encuentra el archivo //$id = codigo de la imagen $id_for_modal = str_split($id,9); $style = $style ? $style : 'col-sm-4 col-md-6 col-12 mb-3'; $html = '
'; $html .= '
'; $html .= '
'; $html .= '
' . $card_title . '
'; $html .= $otras_funcionalidades ? $otras_funcionalidades : ''; $html .= '
'; $html .= '
'; $html .= '' . $card_title . ''; $html .= '
'; $html .= '
'; $html .= '
'; $html .= ''; return $html; } public static function iframe_disponible ($ruta, $id, $card_title, $style = FALSE) { $id_for_modal = str_split($id,9); $style = $style ? $style : 'col-12 mb-3'; $html = '
'; $html .= '
'; $html .= '
'; $html .= ''; $html .= '
' . $card_title . '
'; $html .= '
'; $html .= '
'; $html .= '
'; $html .= ''; return $html; } public static function img_sortable ($ruta, $id, $card_title, $otras_funcionalidades = FALSE, $style = FALSE) { $id_for_modal = str_split($id,9); $style = $style ? $style : 'col-sm-4 col-md-6 col-12 mb-3'; $html = '
'; $html .= '
'; $html .= '
'; $html .= '
' . $card_title . '
'; $html .= $otras_funcionalidades ? $otras_funcionalidades : ''; $html .= '
'; $html .= '
'; $html .= ' ' . $card_title . ''; $html .= '
'; $html .= '
'; $html .= '
'; return $html; } public static function Tooltip($descripcion) { return ''; } }