fixed visual error

This commit is contained in:
marcos 2021-03-18 09:53:39 +01:00
parent 572f8c9908
commit b6a7598c33
2 changed files with 29 additions and 4 deletions

View File

@ -472,6 +472,11 @@ class HTML
bool $return=false,
bool $direct=false
) {
global $config;
if ($config['style'] === 'pandora_black') {
$text_color = 'style="color: white"';
}
$output = '';
if ($input['hidden'] == 1) {
$class = ' hidden';
@ -488,7 +493,7 @@ class HTML
$toggle = (bool) $input['toggle'];
if (isset($input['label']) === true) {
$output .= '<span>'.$input['label'].'</span>';
$output .= '<span '.$text_color.'>'.$input['label'].'</span>';
}
// Print independent block of inputs.
@ -559,7 +564,7 @@ class HTML
}
if (isset($input['label']) === true) {
$output .= '<label>'.$input['label'].'</label>';
$output .= '<label '.$text_color.'>'.$input['label'].'</label>';
}
$output .= self::printInput($input['arguments']);

View File

@ -701,6 +701,7 @@ function html_print_select(
static $idcounter = [];
global $config;
// If duplicate names exist, it will start numbering. Otherwise it won't
if (isset($idcounter[$name])) {
$idcounter[$name]++;
@ -741,7 +742,14 @@ function html_print_select(
if ($style === false) {
$styleText = ' ';
if ($config['style'] === 'pandora_black') {
$styleText = 'style="color: white"';
}
} else {
if ($config['style'] === 'pandora_black') {
$style .= ' color: white';
}
$styleText = 'style="'.$style.'"';
}
@ -2581,11 +2589,18 @@ function html_print_input_number(array $settings):string
'step',
];
global $config;
$text_color = '';
if ($config['style'] === 'pandora_black') {
$text_color = 'style="color: white"';
}
$output = '';
if (isset($settings) === true && is_array($settings) === true) {
// Check Name is necessary.
if (isset($settings['name']) === true) {
$output = '<input type="number" ';
$output = '<input '.$text_color.' type="number" ';
// Check Max length.
if (isset($settings['maxlength']) === false) {
@ -4328,16 +4343,21 @@ function html_print_link_with_params($text, $params=[], $type='text', $style='')
*/
function html_print_input($data, $wrapper='div', $input_only=false)
{
global $config;
if (is_array($data) === false) {
return '';
}
if ($config['style'] === 'pandora_black') {
$style = 'style="color: white"';
}
$output = '';
if ($data['label'] && $input_only === false) {
$output = '<'.$wrapper.' id="'.$wrapper.'-'.$data['name'].'" ';
$output .= ' class="'.$data['input_class'].'">';
$output .= '<label class="'.$data['label_class'].'">';
$output .= '<label '.$style.' class="'.$data['label_class'].'">';
$output .= $data['label'];
$output .= '</label>';