Minor fixes

This commit is contained in:
Jose Gonzalez 2023-03-08 15:01:41 +01:00
parent bc501ec552
commit 1d3d2fc5fd
4 changed files with 129 additions and 81 deletions

View File

@ -2330,7 +2330,10 @@ 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(
$table->data[1][0] = html_print_div(
[
'class' => '',
'content' => html_print_extended_select_for_downtime_cron(
'cron_hour'.$adv_mode_name,
$hours,
$hour,
@ -2344,9 +2347,15 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*',
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(
$table->data[1][1] = html_print_div(
[
'class' => '',
'content' => html_print_extended_select_for_downtime_cron(
'cron_minute'.$adv_mode_name,
$minutes,
$minute,
@ -2360,9 +2369,15 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*',
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(
$table->data[1][2] = html_print_div(
[
'class' => '',
'content' => html_print_extended_select_for_downtime_cron(
'cron_mday'.$adv_mode_name,
$mdays,
$mday,
@ -2376,9 +2391,15 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*',
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(
$table->data[1][3] = html_print_div(
[
'class' => '',
'content' => html_print_extended_select_for_downtime_cron(
'cron_month'.$adv_mode_name,
$months,
$month,
@ -2392,9 +2413,15 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*',
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(
$table->data[1][4] = html_print_div(
[
'class' => '',
'content' => html_print_extended_select_for_downtime_cron(
'cron_wday'.$adv_mode_name,
$wdays,
$wday,
@ -2408,6 +2435,9 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*',
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 = '<label class="'.$labelClass.'">';
$output = '<label class="'.$labelClass.'"'.$labelStyle.'>';
$output .= '<input class="'.$inputClass.'" name="'.$name.'" type="checkbox" value="'.$value.'" '.($checked ? 'checked="checked"' : '');
$output .= (empty($id) === true) ? ' id="checkbox-'.$id_aux.'"' : ' id="'.$id.'"';
$output .= (empty($script) === false) ? ' onclick="'.$script.'"' : '';
@ -6629,34 +6664,32 @@ function html_print_extended_select_for_downtime_cron(
$disabled,
'font-size: xx-small;'.$select_style
);
echo ' <a href="javascript:">'.html_print_image(
echo ' <a style="margin: 7px" href="javascript:">'.html_print_image(
'images/edit.svg',
true,
[
'class' => $uniq_name.'_toggler main_menu_icon invert_filter',
'alt' => __('Custom'),
'title' => __('Custom'),
'style' => 'width: 18px;',
// 'style' => 'margin: 7px;',
]
).'</a>';
echo '</div>';
$help_tooltip = ($text_help !== '') ? ui_print_help_tip(__($text_help), true) : '';
echo '<div id="'.$uniq_name.'_manual" class="w100p inline_line">';
html_print_input_text($uniq_name.'_text', $selected, '', 20);
html_print_input_text($uniq_name.'_text', $selected, '', 20, 20, false, false, false, '', 'w100p');
html_print_input_hidden($name, $selected, false, $uniq_name);
echo ' <a href="javascript:">'.$help_tooltip.'&nbsp'.html_print_image(
echo ' <a href="javascript:">'.html_print_image(
'images/logs@svg.svg',
true,
[
'class' => $uniq_name.'_toggler main_menu_icon invert_filter',
'alt' => __('List'),
'title' => __('List'),
'style' => 'width: 18px;',
'style' => 'margin: 7px;',
]
).'</a>';
echo ($text_help !== '') ? ui_print_help_tip(__($text_help), true, '', false, 'margin: 13px 0 0 5px;') : '';
echo '</div>';
$select_init_func = (is_numeric($selected) === true || $selected === '*') ? 'post_process_select_init' : 'post_process_select_init_inv';

View File

@ -2508,6 +2508,10 @@ function ui_print_help_tip(
$style='',
$blink=false
) {
if (empty($img) === true) {
$img = 'images/info@svg.svg';
}
$output = '<a href="javascript:" class="tip" style="'.$style.'" >';
$output .= html_print_image(
$img,

View File

@ -11542,3 +11542,12 @@ ul.tag-editor {
.max-width-100p {
max-width: 100% !important;
}
/* Datatables overrides */
.ui-dialog .ui-dialog-titlebar-close {
right: 1em !important;
}
.ui-dialog .ui-dialog-titlebar {
display: block !important;
}

View File

@ -530,6 +530,7 @@ table.filter-table-adv td {
vertical-align: top;
}
div.filter-table-adv-manual > div,
table.filter-table-adv td > div {
display: flex;
flex-direction: column;
@ -537,6 +538,7 @@ table.filter-table-adv td > div {
align-items: normal;
}
div.filter-table-adv-manual > div label,
table.filter-table-adv td > div label {
color: #161628;
font-size: 13px;