From d8230dba9437389791fb9a7dd8e48274f23ae4f2 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 16 Feb 2023 12:35:02 +0100 Subject: [PATCH] Minor change in buttons --- pandora_console/include/functions_html.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 735801616c..d51e83c940 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -3449,7 +3449,8 @@ function html_print_button($label='OK', $name='', $disabled=false, $script='', $ $output = ''; $classes = ''; $fixedId = ''; - + $iconStyle = ''; + $spanStyle = 'margin-top: 4px;'; if (empty($name) === true) { $name = 'unnamed'; } @@ -3477,6 +3478,10 @@ function html_print_button($label='OK', $name='', $disabled=false, $script='', $ $classes .= ' '.$value; } else if ($attribute === 'fixed_id') { $fixedId = $value; + } else if ($attribute === 'icon_style') { + $iconStyle = $value; + } else if ($attribute === 'span_style') { + $spanStyle .= $value; } else if ($attribute === 'rawAttributes') { $buttonType = ($attr_array['type'] ?? 'button'); $buttonAttributes = $value; @@ -3492,7 +3497,7 @@ function html_print_button($label='OK', $name='', $disabled=false, $script='', $ if (empty($iconToUse) === false || (isset($buttonMode) === true && $buttonMode !== 'onlyIcon')) { $iconDiv = html_print_div( [ - 'style' => '', + 'style' => $iconStyle, 'class' => sprintf( 'subIcon %s %s', $iconToUse, @@ -3510,7 +3515,7 @@ function html_print_button($label='OK', $name='', $disabled=false, $script='', $ $mainId = ((empty($fixedId) === false) ? $fixedId : 'button-'.$name); if ($imageButton === false) { - $content = ''.$label.''; + $content = ''.$label.''; $content .= $iconDiv; } else { $content = $iconDiv;