diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index be9ed5d1a8..b120b4d128 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -2330,84 +2330,114 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*', $adv_mode_name = '_'.$adv_mode_name; } - $table->data[0][0] = html_print_extended_select_for_downtime_cron( - 'cron_hour'.$adv_mode_name, - $hours, - $hour, - '', - __('Any'), - '*', - false, - true, - false, - false, - false, - 0, - 'Valid values: [0-23], [0-23]-[0-23], *, or step value (example: */3, 10/5)' + $table->data[1][0] = html_print_div( + [ + 'class' => '', + 'content' => html_print_extended_select_for_downtime_cron( + 'cron_hour'.$adv_mode_name, + $hours, + $hour, + '', + __('Any'), + '*', + false, + true, + false, + false, + false, + 0, + 'Valid values: [0-23], [0-23]-[0-23], *, or step value (example: */3, 10/5)' + ), + ], + true ); - $table->data[1][1] = html_print_extended_select_for_downtime_cron( - 'cron_minute'.$adv_mode_name, - $minutes, - $minute, - '', - __('Any'), - '*', - false, - true, - false, - false, - false, - 0, - 'Valid values: [0-59], [0-59]-[0-59], *, or step value (example: */5, 10/1)' + $table->data[1][1] = html_print_div( + [ + 'class' => '', + 'content' => html_print_extended_select_for_downtime_cron( + 'cron_minute'.$adv_mode_name, + $minutes, + $minute, + '', + __('Any'), + '*', + false, + true, + false, + false, + false, + 0, + 'Valid values: [0-59], [0-59]-[0-59], *, or step value (example: */5, 10/1)' + ), + ], + true ); - $table->data[1][2] = html_print_extended_select_for_downtime_cron( - 'cron_mday'.$adv_mode_name, - $mdays, - $mday, - '', - __('Any'), - '*', - false, - true, - false, - false, - false, - 0, - 'Valid values: [1-31], [1-31]-[1-31], *, or step value (example: */5, 7/2)' + $table->data[1][2] = html_print_div( + [ + 'class' => '', + 'content' => html_print_extended_select_for_downtime_cron( + 'cron_mday'.$adv_mode_name, + $mdays, + $mday, + '', + __('Any'), + '*', + false, + true, + false, + false, + false, + 0, + 'Valid values: [1-31], [1-31]-[1-31], *, or step value (example: */5, 7/2)' + ), + ], + true ); - $table->data[1][3] = html_print_extended_select_for_downtime_cron( - 'cron_month'.$adv_mode_name, - $months, - $month, - '', - __('Any'), - '*', - false, - true, - false, - false, - false, - 0, - 'Valid values: [1-12], [1-12]-[1-12], *, or step value (example: */3, 9/1)' + $table->data[1][3] = html_print_div( + [ + 'class' => '', + 'content' => html_print_extended_select_for_downtime_cron( + 'cron_month'.$adv_mode_name, + $months, + $month, + '', + __('Any'), + '*', + false, + true, + false, + false, + false, + 0, + 'Valid values: [1-12], [1-12]-[1-12], *, or step value (example: */3, 9/1)' + ), + ], + true ); - $table->data[1][4] = html_print_extended_select_for_downtime_cron( - 'cron_wday'.$adv_mode_name, - $wdays, - $wday, - '', - __('Any'), - '*', - false, - true, - false, - false, - false, - 0, - 'Valid values: [0-6], [0-6]-[0-6], *, or step value (example: */2, 3/1)' + $table->data[1][4] = html_print_div( + [ + 'class' => '', + 'content' => html_print_extended_select_for_downtime_cron( + 'cron_wday'.$adv_mode_name, + $wdays, + $wday, + '', + __('Any'), + '*', + false, + true, + false, + false, + false, + 0, + 'Valid values: [0-6], [0-6]-[0-6], *, or step value (example: */2, 3/1)' + ), + ], + true ); } @@ -4186,7 +4216,7 @@ function html_print_switch_radio_button(array $switches, array $attributes=[], b * @param string $checked Set the button to be marked (optional, unmarked by default). * @param boolean $disabled Disable the button (optional, button enabled by default). * @param string $script Script to execute when onClick event is triggered (optional). - * @param string $attributes Optional HTML attributes. It's a free string which will be inserted into the HTML tag, use it carefully (optional). + * @param mixed $attributes Optional HTML attributes. It's a free string which will be inserted into the HTML tag, use it carefully (optional). * @param boolean $return Whether to return an output string or echo now (optional, echo by default). * @param string $id Custom id. * @param string $customAttributes Custom Attribute for customized checkbox. @@ -4217,6 +4247,7 @@ function html_print_checkbox_extended( $inputClass = 'custom_checkbox_input'; $labelClass = 'custom_checkbox'; + $labelStyle = ' '; if (is_array($attributes) === true) { $tmpAttributes = []; @@ -4230,6 +4261,10 @@ function html_print_checkbox_extended( $labelClass .= ' '.$value; break; + case 'label_style': + $labelStyle .= 'style="'.$value.'"'; + break; + default: $tmpAttributes[] = $key.'="'.$value.'"'; break; @@ -4241,7 +4276,7 @@ function html_print_checkbox_extended( $id_aux = preg_replace('/[^a-z0-9\:\;\-\_]/i', '', $name.($idcounter[$name] ? $idcounter[$name] : '')); - $output = '