$attrs attributes * * @return string */ public static function arrayAttrToHtml($attrs) { $sttrsStr = array(); foreach ($attrs as $key => $val) { $sttrsStr[] = $key . '="' . DUPX_U::esc_attr($val) . '"'; } return implode(' ', $sttrsStr); } /** * Get header main * * @param string $htmlTitle Title * * @return void */ public static function getHeaderMain($htmlTitle) { ?>

' . '
' . '
' . DUPX_U::esc_html($fileContent) . '
' . '
' . ''; } else { $lightBoxContent = '

File not found.'; } return DUPX_U_Html::getLigthBox($linkLabelHtml, $titleContent, $lightBoxContent, $echo); } /** * getLightBoxIframe * * @param string $linkLabelHtml the link label * @param string $titleContent the title of the light box * @param string $url the url of the iframe * @param bool $autoUpdate if true the iframe is auto updated * @param bool $enableTargetDownload Download button enabled * @param bool $echo if true the light box is echoed * * @return string */ public static function getLightBoxIframe( $linkLabelHtml, $titleContent, $url, $autoUpdate = false, $enableTargetDownload = false, $echo = true ) { $classes = array('dup-lightbox-iframe'); $afterContent = '

'; if ($autoUpdate) { //$classes[] = 'auto-update'; $afterContent .= ''; } if ($enableTargetDownload) { $path = parse_url($url, PHP_URL_PATH); if (!empty($path)) { $urlPath = parse_url($url, PHP_URL_PATH); $fileName = basename($urlPath); } else { $fileName = parse_url($url, PHP_URL_HOST); } $afterContent .= ''; } $afterContent .= '
'; $lightBoxContent = ' '; return DUPX_U_Html::getLigthBox($linkLabelHtml, $titleContent, $lightBoxContent, $echo, $afterContent); } /** * Light box CSS * * @return void */ protected static function lightBoxCss() { ?>
class="" data-more-step="" style="max-height: px">
$attrs attributes of input * @param bool $pwdSimulation if true emulate password type * * @return void */ public static function inputPasswordToggle($name, $id = '', $classes = array(), $attrs = array(), $pwdSimulation = false) { if (!is_array($attrs)) { $attrs = array(); } if (!is_array($classes)) { if (empty($classes)) { $classes = array(); } else { $classes = array($classes); } } $idAttr = empty($id) ? '_id_' . $name : $id; $classes[] = 'input-password-group input-postfix-btn-group'; if ($pwdSimulation) { $attrs['type'] = 'text'; $attrs['class'] = 'pwd-simulation text-security-disc'; } else { $attrs['type'] = 'password'; } $attrs['name'] = $name; $attrs['id'] = $idAttr; $attrsHtml = array(); foreach ($attrs as $atName => $atValue) { $attrsHtml[] = $atName . '="' . DUPX_U::esc_attr($atValue) . '"'; } ?> /> $inputAttrs input attributes * @param array $switchAttrs switch attributes * * @return void */ public static function checkboxSwitch($inputAttrs = array(), $switchAttrs = array()) { $inputAttrs['type'] = 'checkbox'; if (!isset($switchAttrs['class'])) { $switchAttrs['class'] = array(); } $switchAttrs['class'] = implode(' ', array_merge(array('checkbox-switch'), (array) $switchAttrs['class'])); ?> > >