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_label = '<b>'.__('Group').'</b>';
$filter_groups = html_print_select_groups(false, 'AR', true, 'group_id', $group_id, '', '', '', true, false, true, '', false, 'width: auto;'); $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_label = '</td><td><b>'.__('Recursion').'</b>';
$filter_recursion = html_print_checkbox('recursion', 1, 0, true); $filter_recursion = html_print_checkbox('recursion', 1, 0, true).'</td>';
// Groups module. // Groups module.
$filter_module_groups_label = '<b>'.__('Module group').'</b>'; $filter_module_groups_label = '<b>'.__('Module group').'</b>';
$filter_module_groups = html_print_select_from_sql( $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; $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;'); 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 '</td><td>';
echo __('Overwrite'); echo __('Overwrite');
ui_print_help_tip(__('Check this box, if you want to overwrite existing same days.'), false); 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']); $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, false,
'LW', 'LW',
true, true,
@ -182,7 +182,7 @@ $table->data[1][1] = html_print_select_groups(
true, true,
'', '',
$is_central_policies_on_node $is_central_policies_on_node
); ).'</div>';
$table->colspan[1][1] = 2; $table->colspan[1][1] = 2;
$table->data[2][0] = __('Command'); $table->data[2][0] = __('Command');

View File

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

View File

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

View File

@ -241,7 +241,7 @@ if ($returnAllGroup === false && $id_group_filter == 0) {
$returnAllGroup = true; $returnAllGroup = true;
} }
$table->data[1][1] = html_print_select_groups( $table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'], $config['id_user'],
$access, $access,
$returnAllGroup, $returnAllGroup,
@ -260,11 +260,11 @@ $table->data[1][1] = html_print_select_groups(
false, false,
'id_grupo', 'id_grupo',
$strict_user $strict_user
); ).'</div>';
$table->data[2][0] = '<b>'.__('Group').'</b>'; $table->data[2][0] = '<b>'.__('Group').'</b>';
$display_all_group = (users_is_admin() || users_can_manage_group_all('AR')); $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'], $config['id_user'],
'AR', 'AR',
$display_all_group, $display_all_group,
@ -274,7 +274,7 @@ $table->data[2][1] = html_print_select_groups(
'', '',
'', '',
true true
); ).'</div>';
$types = get_event_types(); $types = get_event_types();
// Expand standard array to add not_normal (not exist in the array, used only for searches) // 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; $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); 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 "<td style='width:25%;'>";
echo __('Group Recursion').'&nbsp;'; echo __('Group Recursion').'&nbsp;';
html_print_checkbox('recursion', 1, $recursion, false, false, 'this.form.submit()'); 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][0] = __('Group:');
$table->data[1][1] = html_print_select_groups( $table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
$config['id_user'], $config['id_user'],
'RW', 'RW',
true, true,
@ -146,7 +146,7 @@ $table->data[1][1] = html_print_select_groups(
'', '',
'', '',
true true
); ).'</div>';
$backgrounds_list = list_files( $backgrounds_list = list_files(
$config['homedir'].'/images/console/background/', $config['homedir'].'/images/console/background/',
'jpg', '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[0] .= '<input type="text" name="subject" size="35" value="'.$subject.'">';
$data[1] = __('Group').'<br>'; $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] .= 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] = __('Modal screen').'<br>';
$data[2] .= html_print_checkbox_extended('modal', 1, $modal, false, '', 'style="margin-top: 5px;margin-bottom: 7px;"', true); $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 // Group
echo '<tr id="tr-group"><td class="datos2">'.__('Group').'</td><td class="datos2">'; echo '<tr id="tr-group"><td class="datos2">'.__('Group').'</td><td class="datos2">';
echo '<div class="w250px">';
html_print_select_groups( html_print_select_groups(
$config['id_user'], $config['id_user'],
'AR', 'AR',
@ -796,6 +797,7 @@ if ($create_alert || $update_alert) {
'id_grupo', 'id_grupo',
false false
); );
echo '</div>';
echo '</td></tr>'; echo '</td></tr>';
// Trap type // Trap type

View File

@ -453,6 +453,14 @@ select:-internal-list-box {
width: 120px; width: 120px;
max-width: 120px; max-width: 120px;
} }
.w240px {
width: 240px;
max-width: 240px;
}
.w250px {
width: 250px;
max-width: 250px;
}
.mw120px { .mw120px {
min-width: 120px; min-width: 120px;
} }
@ -477,6 +485,9 @@ select:-internal-list-box {
.nowrap { .nowrap {
white-space: nowrap; white-space: nowrap;
} }
.inline {
display: inline-block;
}
.w10p { .w10p {
width: 10%; width: 10%;
} }
@ -593,11 +604,6 @@ select:-internal-list-box {
.flex-start { .flex-start {
justify-content: flex-start; justify-content: flex-start;
} }
.nowrap {
flex-wrap: nowrap;
}
.padding-2 { .padding-2 {
padding: 2em; 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()); $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'], $config['id_user'],
'RR', 'RR',
true, true,
@ -241,7 +241,7 @@ if (empty($export_btn) || $show_form) {
true, true,
'', '',
false false
); ).'</div>';
// Agent selector. // Agent selector.
$table->data[1][0] = '<b>'.__('Source agent').'</b>'; $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][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'], $config['id_user'],
// Privilege.
'AR', 'AR',
// ReturnAllGroup.
true, true,
// Name.
'id_group_map', 'id_group_map',
// Selected.
$id_group_map, $id_group_map,
// Script.
'', '',
// Nothing.
'', '',
// Nothing_value.
'', '',
// Return.
true true
); ).'</div>';
$table->data[2][0] = __('Node radius'); $table->data[2][0] = __('Node radius');
$table->data[2][1] = html_print_input_text( $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_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'][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'], $config['id_user'],
'AR', 'AR',
true, true,
@ -343,7 +352,7 @@ if ($not_found) {
'', '',
'', '',
true true
); ).'</div>';
$table->data['source_data_group'][1] .= html_print_image( $table->data['source_data_group'][1] .= html_print_image(
'images/error.png', 'images/error.png',
true, true,

View File

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