Updates style width group selector

This commit is contained in:
fbsanchez 2020-09-28 18:04:46 +02:00
parent d152ba2980
commit f69166bd53
14 changed files with 50 additions and 28 deletions

View File

@ -389,8 +389,8 @@ function mainAgentsModules()
$filter_groups_label = '<b>'.__('Group').'</b>';
$filter_groups = html_print_select_groups(false, 'AR', true, 'group_id', $group_id, '', '', '', true, false, true, '', false, 'width: auto;');
$filter_recursion_label = '<b>'.__('Recursion').'</b>';
$filter_recursion = html_print_checkbox('recursion', 1, 0, true);
$filter_recursion_label = '</td><td><b>'.__('Recursion').'</b>';
$filter_recursion = html_print_checkbox('recursion', 1, 0, true).'</td>';
// Groups module.
$filter_module_groups_label = '<b>'.__('Module group').'</b>';
$filter_module_groups = html_print_select_from_sql(

View File

@ -296,7 +296,9 @@ if (!users_can_manage_group_all('LM')) {
$can_manage_group_all = true;
}
echo '<div class="inline w250px">';
html_print_select_groups(false, 'LM', $can_manage_group_all, 'id_group', $id_group, false, '', 0, false, false, true, '', false, 'width:100px;');
echo '</div>';
echo '</td><td>';
echo __('Overwrite');
ui_print_help_tip(__('Check this box, if you want to overwrite existing same days.'), false);

View File

@ -168,7 +168,7 @@ $table->data[1][0] = __('Group');
$own_info = get_user_info($config['id_user']);
$table->data[1][1] = html_print_select_groups(
$table->data[1][1] = '<div class="w250px inline">'.html_print_select_groups(
false,
'LW',
true,
@ -182,7 +182,7 @@ $table->data[1][1] = html_print_select_groups(
true,
'',
$is_central_policies_on_node
);
).'</div>';
$table->colspan[1][1] = 2;
$table->data[2][0] = __('Command');

View File

@ -218,7 +218,7 @@ $table->data['command'][1] = html_print_textarea(
$table->colspan['group'][1] = 3;
$table->data['group'][0] = __('Group');
$table->data['group'][1] = html_print_select_groups(
$table->data['group'][1] = '<div class="w250px inline">'.html_print_select_groups(
false,
'LM',
true,
@ -232,7 +232,7 @@ $table->data['group'][1] = html_print_select_groups(
true,
'',
$is_central_policies_on_node
);
).'</div>';
$table->colspan['description'][1] = 3;
$table->data['description'][0] = __('Description');

View File

@ -1096,7 +1096,7 @@ if ($step == 2) {
}
$table->data[0][1] .= '&nbsp;';
$table->data[0][1] .= html_print_select_groups(
$table->data[0][1] .= '<div class="w250px inline">'.html_print_select_groups(
false,
'AR',
$display_all_group,
@ -1110,7 +1110,7 @@ if ($step == 2) {
true,
'',
$is_central_policies_on_node
);
).'</div>';
$table->data[1][0] = __('Description');

View File

@ -241,7 +241,7 @@ if ($returnAllGroup === false && $id_group_filter == 0) {
$returnAllGroup = true;
}
$table->data[1][1] = html_print_select_groups(
$table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'],
$access,
$returnAllGroup,
@ -260,11 +260,11 @@ $table->data[1][1] = html_print_select_groups(
false,
'id_grupo',
$strict_user
);
).'</div>';
$table->data[2][0] = '<b>'.__('Group').'</b>';
$display_all_group = (users_is_admin() || users_can_manage_group_all('AR'));
$table->data[2][1] = html_print_select_groups(
$table->data[2][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'],
'AR',
$display_all_group,
@ -274,7 +274,7 @@ $table->data[2][1] = html_print_select_groups(
'',
'',
true
);
).'</div>';
$types = get_event_types();
// Expand standard array to add not_normal (not exist in the array, used only for searches)

View File

@ -307,8 +307,9 @@ if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'VR')) {
$return_all_group = true;
}
echo '<div class="w250px inline">';
html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false);
echo '</div>';
echo "<td style='width:25%;'>";
echo __('Group Recursion').'&nbsp;';
html_print_checkbox('recursion', 1, $recursion, false, false, 'this.form.submit()');

View File

@ -136,7 +136,7 @@ if ($action == 'new') {
$table->data[1][0] = __('Group:');
$table->data[1][1] = html_print_select_groups(
$table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'],
'RW',
true,
@ -146,7 +146,7 @@ $table->data[1][1] = html_print_select_groups(
'',
'',
true
);
).'</div>';
$backgrounds_list = list_files(
$config['homedir'].'/images/console/background/',
'jpg',

View File

@ -176,7 +176,9 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
$data[0] .= '<input type="text" name="subject" size="35" value="'.$subject.'">';
$data[1] = __('Group').'<br>';
$data[1] .= '<div class="w250px">';
$data[1] .= html_print_select_groups($config['id_user'], 'ER', users_can_manage_group_all(), 'id_group', $id_group, '', '', 0, true, false, false, '');
$data[1] .= '</div>';
$data[2] = __('Modal screen').'<br>';
$data[2] .= html_print_checkbox_extended('modal', 1, $modal, false, '', 'style="margin-top: 5px;margin-bottom: 7px;"', true);

View File

@ -776,6 +776,7 @@ if ($create_alert || $update_alert) {
// Group
echo '<tr id="tr-group"><td class="datos2">'.__('Group').'</td><td class="datos2">';
echo '<div class="w250px">';
html_print_select_groups(
$config['id_user'],
'AR',
@ -796,6 +797,7 @@ if ($create_alert || $update_alert) {
'id_grupo',
false
);
echo '</div>';
echo '</td></tr>';
// Trap type

View File

@ -453,6 +453,14 @@ select:-internal-list-box {
width: 120px;
max-width: 120px;
}
.w240px {
width: 240px;
max-width: 240px;
}
.w250px {
width: 250px;
max-width: 250px;
}
.mw120px {
min-width: 120px;
}
@ -477,6 +485,9 @@ select:-internal-list-box {
.nowrap {
white-space: nowrap;
}
.inline {
display: inline-block;
}
.w10p {
width: 10%;
}
@ -593,11 +604,6 @@ select:-internal-list-box {
.flex-start {
justify-content: flex-start;
}
.nowrap {
flex-wrap: nowrap;
}
.padding-2 {
padding: 2em;
}

View File

@ -227,7 +227,7 @@ if (empty($export_btn) || $show_form) {
$groups = users_get_groups($config['id_user'], 'RR', users_can_manage_group_all());
$table->data[0][1] = html_print_select_groups(
$table->data[0][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'],
'RR',
true,
@ -241,7 +241,7 @@ if (empty($export_btn) || $show_form) {
true,
'',
false
);
).'</div>';
// Agent selector.
$table->data[1][0] = '<b>'.__('Source agent').'</b>';

View File

@ -266,17 +266,26 @@ if ($not_found) {
);
$table->data[1][0] = __('Group');
$table->data[1][1] = html_print_select_groups(
$table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
// Id_user.
$config['id_user'],
// Privilege.
'AR',
// ReturnAllGroup.
true,
// Name.
'id_group_map',
// Selected.
$id_group_map,
// Script.
'',
// Nothing.
'',
// Nothing_value.
'',
// Return.
true
);
).'</div>';
$table->data[2][0] = __('Node radius');
$table->data[2][1] = html_print_input_text(
@ -333,7 +342,7 @@ if ($not_found) {
$table->data['source_data_ip_mask'][1] = html_print_input_text('ip_mask', $ip_mask, '', 20, 255, true, $disabled_source);
$table->data['source_data_group'][0] = __('Source group');
$table->data['source_data_group'][1] = html_print_select_groups(
$table->data['source_data_group'][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'],
'AR',
true,
@ -343,7 +352,7 @@ if ($not_found) {
'',
'',
true
);
).'</div>';
$table->data['source_data_group'][1] .= html_print_image(
'images/error.png',
true,

View File

@ -306,7 +306,7 @@ $table->data[1][1] = html_print_select(
false
);
$table->data[1][1] .= '&nbsp;&nbsp;'.__('OR').'&nbsp;&nbsp;';
$table->data[1][1] .= html_print_select_groups(
$table->data[1][1] .= '<div class="w250px">'.html_print_select_groups(
$config['id_user'],
'AR',
$return_all_groups,
@ -316,7 +316,7 @@ $table->data[1][1] .= html_print_select_groups(
__('Select group'),
'',
true
);
).'</div>';
$table->data[2][0] = __('Subject');
$table->data[2][1] = html_print_input_text(