fixed styles

This commit is contained in:
daniel 2023-03-05 13:46:27 +01:00
parent ff3b7001c3
commit 08dca1a83c
12 changed files with 386 additions and 281 deletions

View File

@ -122,36 +122,39 @@ $files = list_files('images/', '@groups.svg', 1, 0);
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filters'; $table->class = 'databox filter-table-adv';
if (is_metaconsole() === true) { $table->size = [];
$table->head[0] = ($id_group > 0) ? __('Update group') : __('Create group'); $table->size[0] = '50%';
$table->head_colspan[0] = 4; $table->size[1] = '50%';
$table->headstyle[0] = 'text-align: center';
}
$table->style[0] = 'font-weight: bold';
$table->data = []; $table->data = [];
$table->data[0][0] = __('Name');
$table->data[0][1] = html_print_input_text('name', $name, '', 35, 100, true); $table->data[0][0] = html_print_label_input_block(
$table->data[1][0] = __('Icon'); __('Name'),
$table->data[1][1] = html_print_select($files, 'icon', $icon, '', 'None', '', true); html_print_input_text('name', $name, '', 35, 100, true)
$table->data[1][1] .= ' <span id="icon_preview">'; );
$input_icon = html_print_select($files, 'icon', $icon, '', 'None', '', true);
$input_icon .= ' <span id="icon_preview">';
if (empty($icon) === false) { if (empty($icon) === false) {
$table->data[1][1] .= html_print_image('images/'.$icon, true); $input_icon .= html_print_image('images/'.$icon, true);
} }
$table->data[1][1] .= '</span>'; $input_icon .= '</span>';
$table->data[2][0] = __('Parent');
$table->data[0][1] = html_print_label_input_block(
__('Icon'),
'<div>'.$input_icon.'</div>'
);
if ($id_group > 0) { if ($id_group > 0) {
// The user can access to the parent, but she want to edit the group. // The user can access to the parent, but she want to edit the group.
if ((bool) check_acl($config['id_user'], $id_parent, 'AR') === false) { if ((bool) check_acl($config['id_user'], $id_parent, 'AR') === false) {
$acl_parent = false; $acl_parent = false;
$table->data[2][1] = __('You have not access to the parent.').html_print_input_hidden('id_parent', $id_parent, true); $input_parent = __('You have not access to the parent.').html_print_input_hidden('id_parent', $id_parent, true);
} else { } else {
$table->data[2][1] = '<div class="w250px inline">'; $input_parent = '<div class="w250px inline">';
$table->data[2][1] .= html_print_select_groups( $input_parent .= html_print_select_groups(
false, false,
'AR', 'AR',
false, false,
@ -169,11 +172,11 @@ if ($id_group > 0) {
false, false,
$id_group $id_group
); );
$table->data[2][1] .= '</div>'; $input_parent .= '</div>';
} }
} else { } else {
$table->data[2][1] = '<div class="w250px inline">'; $input_parent = '<div class="w250px inline">';
$table->data[2][1] .= html_print_input( $input_parent .= html_print_input(
[ [
'type' => 'select_groups', 'type' => 'select_groups',
'name' => 'id_parent', 'name' => 'id_parent',
@ -184,66 +187,101 @@ if ($id_group > 0) {
'nothing_value' => -1, 'nothing_value' => -1,
] ]
); );
$table->data[2][1] .= '</div>'; $input_parent .= '</div>';
} }
if ($acl_parent === true) { if ($acl_parent === true) {
$table->data[2][1] .= ' <span id="parent_preview">'; $input_parent .= ' <span id="parent_preview">';
$table->data[2][1] .= html_print_image('images/'.(($id_parent !== 0) ? groups_get_icon($id_parent) : 'unknown@groups.svg'), true); $input_parent .= html_print_image('images/'.(($id_parent !== 0) ? groups_get_icon($id_parent) : 'unknown@groups.svg'), true);
$table->data[2][1] .= '</span>'; $input_parent .= '</span>';
} }
$i = 3; $table->data[1][0] = html_print_label_input_block(
__('Parent'),
'<div>'.$input_parent.'</div>'
);
if ((bool) $config['enterprise_installed'] === true) { if ((bool) $config['enterprise_installed'] === true) {
$i = 4; $table->data[1][1] .= html_print_label_input_block(
$table->data[3][0] = __('Group Password'); __('Group Password'),
$table->data[3][1] = html_print_input_password('group_pass', $group_pass, '', 16, 255, true); html_print_input_password('group_pass', $group_pass, '', 16, 255, true)
);
} }
$table->data[$i][0] = __('Alerts').ui_print_help_tip(__('Enable alert use in this group.'), true); $table->data[2][0] = html_print_label_input_block(
$table->data[$i][1] = html_print_checkbox_switch('alerts_enabled', 1, ! $alerts_disabled, true); __('Alerts').ui_print_help_tip(__('Enable alert use in this group.'), true),
$i++; html_print_checkbox_switch('alerts_enabled', 1, ! $alerts_disabled, true)
);
$table->data[$i][0] = __('Propagate ACL').ui_print_help_tip(__('Propagate the same ACL security into the child subgroups.'), true); $table->data[2][1] = html_print_label_input_block(
$table->data[$i][1] = html_print_checkbox_switch('propagate', 1, $propagate, true); __('Propagate ACL').ui_print_help_tip(__('Propagate the same ACL security into the child subgroups.'), true),
$i++; html_print_checkbox_switch('propagate', 1, $propagate, true)
);
$table->data[$i][0] = __('Custom ID'); $table->data[3][0] = html_print_label_input_block(
$table->data[$i][1] = html_print_input_text('custom_id', $custom_id, '', 16, 255, true); __('Custom ID'),
$i++; html_print_input_text('custom_id', $custom_id, '', 16, 255, true)
);
$table->data[$i][0] = __('Description'); $table->data[3][1] = html_print_label_input_block(
$table->data[$i][1] = html_print_input_text('description', $description, '', 60, 255, true); __('Description'),
$i++; html_print_input_text('description', $description, '', 60, 255, true)
);
$table->data[$i][0] = __('Contact').ui_print_help_tip(__('Contact information accessible through the _groupcontact_ macro'), true); $table->data[4][0] = html_print_label_input_block(
$table->data[$i][1] = html_print_textarea('contact', 4, 40, $contact, "class='min-height-0px'", true); __('Contact').ui_print_help_tip(__('Contact information accessible through the _groupcontact_ macro'), true),
$i++; html_print_textarea('contact', 4, 40, $contact, "class='min-height-0px'", true)
);
$table->data[$i][0] = __('Other').ui_print_help_tip(__('Information accessible through the _group_other_ macro'), true); $table->data[4][1] = html_print_label_input_block(
$table->data[$i][1] = html_print_textarea('other', 4, 40, $other, "class='min-height-0px'", true); __('Other').ui_print_help_tip(__('Information accessible through the _group_other_ macro'), true),
$i++; html_print_textarea('other', 4, 40, $other, "class='min-height-0px'", true)
);
$table->data[$i][0] = __('Max agents allowed').'&nbsp;'.ui_print_help_tip(__('Set the maximum of agents allowed for this group. 0 is unlimited.'), true); $table->data[5][0] = html_print_label_input_block(
$table->data[$i][1] = html_print_input_text('max_agents', $max_agents, '', 10, 255, true); __('Max agents allowed').ui_print_help_tip(__('Set the maximum of agents allowed for this group. 0 is unlimited.'), true),
$i++; html_print_input_text('max_agents', $max_agents, '', 10, 255, true)
);
$sec = (is_metaconsole() === true) ? 'advanced' : 'gagente'; $sec = (is_metaconsole() === true) ? 'advanced' : 'gagente';
echo '<form name="grupo" method="post" action="index.php?sec='.$sec.'&sec2=godmode/groups/group_list&pure='.$config['pure'].'" >'; echo '<form name="grupo" class="max_floating_element_size" method="post" action="index.php?sec='.$sec.'&sec2=godmode/groups/group_list&pure='.$config['pure'].'" >';
html_print_table($table); html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_button(__('Back'), 'button_back', false, '', 'class="sub cancel"'); $buttons = '';
if ($id_group) { if ($id_group) {
html_print_input_hidden('update_group', 1); $buttons .= html_print_input_hidden('update_group', 1, true);
html_print_input_hidden('id_group', $id_group); $buttons .= html_print_input_hidden('id_group', $id_group, true);
html_print_submit_button(__('Update'), 'updbutton', false, 'class="sub upd"'); $buttons .= html_print_submit_button(
__('Update'),
'updbutton',
false,
['icon' => 'upd'],
true
);
} else { } else {
html_print_input_hidden('create_group', 1); $buttons .= html_print_input_hidden('create_group', 1);
html_print_submit_button(__('Create'), 'crtbutton', false, 'class="sub wand"'); $buttons .= html_print_submit_button(
__('Create'),
'crtbutton',
false,
['icon' => 'next'],
true
);
} }
echo '</div>'; $buttons .= html_print_button(
__('Back'),
'button_back',
false,
'',
['icon' => 'cancel'],
true
);
html_print_action_buttons(
$buttons
);
echo '</form>'; echo '</form>';
?> ?>

View File

@ -362,12 +362,6 @@ switch ($tab) {
// Header. // Header.
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
agents_meta_print_header(); agents_meta_print_header();
html_print_div(
[
'class' => 'notify',
'content' => __('Edit or delete groups can cause problems with synchronization'),
]
);
} else { } else {
// Header. // Header.
ui_print_standard_header( ui_print_standard_header(
@ -764,6 +758,8 @@ if ($tab == 'tree') {
$search = (string) get_parameter('search', ''); $search = (string) get_parameter('search', '');
$block_size = $config['block_size']; $block_size = $config['block_size'];
$tablePagination = '';
if (empty($search) === false) { if (empty($search) === false) {
$search_name = 'AND t.nombre LIKE "%'.$search.'%"'; $search_name = 'AND t.nombre LIKE "%'.$search.'%"';
} }
@ -784,23 +780,58 @@ if ($tab == 'tree') {
} }
$form = "<form method='post' action=''>"; $form = "<form method='post' action=''>";
$form .= "<table class='databox filters bolder' width='100%'>"; $form .= "<table class='filter-table-adv' width='100%'>";
$form .= '<tr><td>'.__('Search').'&nbsp;&nbsp;&nbsp;'; $form .= '<tr><td>'.html_print_label_input_block(
$form .= html_print_input_text( __('Search'),
html_print_input_text(
'search', 'search',
$search, $search,
'', '',
30, 30,
30, 30,
true true
); )
$form .= '</td><td style="text-align: right">'; );
$form .= "<input name='find' type='submit' class='sub search' value='".__('Search')."'>"; $form .= '</td>';
$form .= '</tr>'; $form .= '</tr>';
$form .= '</table>'; $form .= '</table>';
$buttons = html_print_submit_button(
__('Filter'),
'find',
false,
[
'icon' => 'search',
'mode' => 'mini',
],
true
);
$form .= html_print_div(
[
'class' => 'action-buttons',
'content' => $buttons,
],
true
);
$form .= '</form>'; $form .= '</form>';
echo $form; ui_toggle(
$form,
'<span class="subsection_header_title">'.__('Filters').'</span>',
'filter_form',
'',
true,
false,
'',
'white-box-content',
'box-flat white_table_graph fixed_filter_bar'
);
if (is_metaconsole() === true) {
ui_print_info_message(
__('Edit or delete groups can cause problems with synchronization')
);
}
$groups_sql = sprintf( $groups_sql = sprintf(
'SELECT t.*, 'SELECT t.*,
@ -945,24 +976,15 @@ if ($tab == 'tree') {
} }
} }
echo ui_pagination(
$groups_count,
false,
$offset,
$block_size,
true,
'offset',
true
);
html_print_table($table); html_print_table($table);
echo ui_pagination( $tablePagination = ui_pagination(
$groups_count, $groups_count,
false, false,
$offset, $offset,
$block_size, $block_size,
true, true,
'offset', 'offset',
true, false,
'pagination-bottom' 'pagination-bottom'
); );
} else { } else {
@ -975,17 +997,32 @@ if ($tab == 'tree') {
} }
} }
$button_form = '';
if ($is_management_allowed === true if ($is_management_allowed === true
&& (bool) check_acl($config['id_user'], 0, 'PM') === true && (bool) check_acl($config['id_user'], 0, 'PM') === true
) { ) {
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/groups/configure_group">'; $button_form = '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/groups/configure_group">';
echo '<div class="action-buttons w100p">'; $button_form .= html_print_submit_button(
html_print_submit_button(__('Create group'), 'crt', false, 'class="sub next"'); __('Create group'),
echo '</div>'; 'crt',
echo '</form>'; false,
['icon' => 'next'],
true
);
$button_form .= '</form>';
} }
html_print_action_buttons(
$button_form,
[
'type' => 'data_table',
'class' => 'fixed_action_buttons',
'right_content' => $tablePagination,
]
);
ui_require_javascript_file('TreeController', 'include/javascript/tree/'); ui_require_javascript_file('TreeController', 'include/javascript/tree/');
$tab = 'group_edition'; $tab = 'group_edition';

View File

@ -5157,7 +5157,7 @@ $(document).ready (function () {
$('#checkbox-fullscale').trigger('change'); $('#checkbox-fullscale').trigger('change');
$("#submit-create_item").click(function () { $("#button-create_item").click(function () {
var type = $('#type').val(); var type = $('#type').val();
var name = $('#text-name').val(); var name = $('#text-name').val();

View File

@ -38,56 +38,49 @@ $email_tag = io_safe_input(strip_tags(io_safe_output(((string) get_parameter('em
$phone_tag = io_safe_input(strip_tags(io_safe_output(((string) get_parameter('phone_tag'))))); $phone_tag = io_safe_input(strip_tags(io_safe_output(((string) get_parameter('phone_tag')))));
$tab = (string) get_parameter('tab', 'list'); $tab = (string) get_parameter('tab', 'list');
if (defined('METACONSOLE')) { if (is_metaconsole() === true) {
$sec = 'advanced'; $sec = 'advanced';
$url = 'index.php?sec='.$sec.'&sec2=advanced/component_management&tab=tags';
} else { } else {
$sec = 'gmodules'; $sec = 'gmodules';
$url = 'index.php?sec='.$sec.'&sec2=godmode/tag/tag&tab=list';
} }
if (defined('METACONSOLE')) { $buttons = [
$buttons = [ 'list' => [
'list' => [ 'active' => false,
'active' => false, 'text' => '<a href="'.$url.'">'.html_print_image(
'text' => '<a href="index.php?sec='.$sec.'&sec2=advanced/component_management&tab=tags">'.html_print_image( 'images/list.png',
'images/list.png', true,
true, [
[ 'title' => __('List tags'),
'title' => __('List tags'), 'class' => 'invert_filter',
'class' => 'invert_filter', ]
] ).'</a>',
).'</a>', ],
], ];
];
$buttons[$tab]['active'] = true; $buttons[$tab]['active'] = true;
// Print header
ui_meta_print_header(__('Tags'), '', $buttons);
} else {
$buttons = [
'list' => [
'active' => false,
'text' => '<a href="index.php?sec='.$sec.'&sec2=godmode/tag/tag&tab=list">'.html_print_image(
'images/list.png',
true,
[
'title' => __('List tags'),
'class' => 'invert_filter',
]
).'</a>',
],
];
$buttons[$tab]['active'] = true; // Header.
// Header ui_print_standard_header(
ui_print_page_header( __('Tags configuration'),
__('Tags configuration'), 'images/tag.png',
'images/tag.png', false,
false, '',
['class' => 'invert_filter'], true,
true, $buttons,
$buttons [
); [
} 'link' => '',
'label' => __('Profile'),
],
[
'link' => '',
'label' => __('Manage tags'),
],
]
);
// Two actions can performed in this page: update and create tags // Two actions can performed in this page: update and create tags
// Update tag: update an existing tag // Update tag: update an existing tag
@ -188,99 +181,90 @@ else {
} }
// Create/Update tag form // Create/Update tag form.
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/tag/edit_tag&action='.$action.'&id_tag='.$id_tag.'" enctype="multipart/form-data">'; echo '<form method="post" class="max_floating_element_size" action="index.php?sec='.$sec.'&sec2=godmode/tag/edit_tag&action='.$action.'&id_tag='.$id_tag.'" enctype="multipart/form-data">';
echo "<table border=0 cellpadding=4 cellspacing=4 class='databox filter-table-adv' width=100%>";
echo '<tr>';
echo '<td>';
echo html_print_label_input_block(
__('Name'),
html_print_input_text('name_tag', $name_tag, '', 50, 255, true)
);
echo '</td>';
echo '<td>';
echo html_print_label_input_block(
__('Description'),
html_print_input_text(
'description_tag',
$description_tag,
'',
50,
255,
true
)
);
echo '</td>';
echo '</tr>';
echo '<div align=left class="pandora_form w100p">'; echo '<tr>';
echo '<td colspan="2">';
echo html_print_label_input_block(
__('Url').ui_print_help_tip(
__('Hyperlink to help information that has to exist previously.'),
true
),
html_print_input_text('url_tag', $url_tag, '', 50, 255, true)
);
echo '</td>';
echo '</tr>';
echo "<table border=0 cellpadding=4 cellspacing=4 class='databox filters' width=100%>"; echo '<tr>';
if (defined('METACONSOLE')) { echo '<td>';
echo html_print_label_input_block(
__('Email').ui_print_help_tip(
__('Associated Email direction to use later in alerts associated to Tags.'),
true
),
html_print_textarea('email_tag', 5, 20, $email_tag, '', true)
);
echo '</td>';
echo '<td>';
echo html_print_label_input_block(
__('Phone').ui_print_help_tip(
__('Associated phone number to use later in alerts associated to Tags.'),
true
),
html_print_textarea('phone_tag', 5, 20, $phone_tag, '', true)
);
echo '</td>';
echo '</tr>';
echo '</table>';
$buttons = '';
if ($action == 'update') { if ($action == 'update') {
echo "<th colspan=8 class='center'>".__('Update Tag').'</th>'; $buttons .= html_print_input_hidden('update_tag', 1, true);
$buttons .= html_print_submit_button(
__('Update'),
'update_button',
false,
['icon' => 'next'],
true
);
} }
if ($action == 'new') { if ($action == 'new') {
echo "<th colspan=8 class='center'>".__('Create Tag').'</th>'; $buttons .= html_print_input_hidden('create_tag', 1, true);
$buttons .= html_print_submit_button(
__('Create'),
'create_button',
false,
['icon' => 'next'],
true
);
} }
}
echo '<tr>'; html_print_action_buttons(
echo "<td align='left'>"; $buttons
echo '<b>'.__('Name').'</b>'; );
echo '</td>';
echo "<td align='left'>";
html_print_input_text('name_tag', $name_tag);
echo '</td>';
echo '</tr>';
echo '<tr>';
echo "<td align='left'>";
echo '<b>'.__('Description').'</b>';
echo '</td>';
echo "<td align='left'>";
html_print_input_text('description_tag', $description_tag);
echo '</td>';
echo '</tr>';
echo '<tr>';
echo "<td align='left'>";
echo '<b>'.__('Url').'</b>';
echo ui_print_help_tip(
__('Hyperlink to help information that has to exist previously.'),
true
);
echo '</td>';
echo "<td align='left'>";
html_print_input_text('url_tag', $url_tag);
echo '</td>';
echo '</tr>';
echo '<tr>';
echo "<td align='left'>";
echo '<b>'.__('Email').'</b>';
echo ui_print_help_tip(
__('Associated Email direction to use later in alerts associated to Tags.'),
true
);
echo '</td>';
echo "<td align='left'>";
html_print_textarea('email_tag', 5, 20, $email_tag);
echo '</td>';
echo '</tr>';
echo '<tr>';
echo "<td align='left'>";
echo '<b>'.__('Phone').'</b>';
echo ui_print_help_tip(
__('Associated phone number to use later in alerts associated to Tags.'),
true
);
echo '</td>';
echo "<td align='left'>";
html_print_textarea('phone_tag', 5, 20, $phone_tag);
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</div>'; echo '</form>';
echo "<table border=0 cellpadding=0 cellspacing=0 class='' width=100%>";
echo '<tr>';
if ($action == 'update') {
echo "<td align='center'>";
html_print_input_hidden('update_tag', 1);
echo '</td>';
echo '<td align=right>';
html_print_submit_button(__('Update'), 'update_button', false, 'class="sub next"');
echo '</td>';
}
if ($action == 'new') {
echo '<td align=center>';
html_print_input_hidden('create_tag', 1);
echo '</td>';
echo '<td align=right>';
html_print_submit_button(__('Create'), 'create_button', false, 'class="sub next"');
echo '</td>';
}
echo '</tr>';
echo '</table>';
echo '</form>';

View File

@ -140,13 +140,19 @@ $buttons[$tab]['active'] = true;
if (is_metaconsole() === false) { if (is_metaconsole() === false) {
// Header. // Header.
ui_print_page_header( ui_print_standard_header(
__('Tags configuration'), __('Tags configuration'),
'images/tag.png', 'images/tag.png',
false, false,
'', '',
true, true,
$buttons $buttons,
[
[
'link' => '',
'label' => __('Module tags'),
],
]
); );
} }
@ -211,36 +217,63 @@ $result = tags_search_tag(false, $filter);
// Filter form. // Filter form.
$table = new StdClass(); $table = new StdClass();
$table->class = 'databox filters';
$table->width = '100%'; $table->width = '100%';
$table->size = [];
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->class = 'filter-table-adv';
$table->data = []; $table->data = [];
$row = []; $row = [];
$name_input = __('Name').' / '.__('Description'); $table->data[0][0] = html_print_label_input_block(
$name_input .= '&nbsp;&nbsp;'; __('Name').' / '.__('Description'),
$name_input .= html_print_input_text('tag_name', $tag_name, '', 30, 255, true); html_print_input_text(
$row[] = $name_input; 'tag_name',
$tag_name,
$filter_button = html_print_submit_button(__('Filter'), 'filter_button', false, 'class="sub search"', true); '',
$row[] = $filter_button; 30,
255,
$table->data[] = $row; true
)
);
$table->data[0][1] = '';
$filter_form = '<form method="POST" action="index.php?sec='.$sec.'&sec2=godmode/tag/tag&tag_name="'.$tag_name.'>'; $filter_form = '<form method="POST" action="index.php?sec='.$sec.'&sec2=godmode/tag/tag&tag_name="'.$tag_name.'>';
$filter_form .= html_print_table($table, true); $filter_form .= html_print_table($table, true);
$filter_form .= html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Filter'),
'filter_button',
false,
[
'icon' => 'search',
'mode' => 'mini',
],
true
),
],
true
);
$filter_form .= '</form>'; $filter_form .= '</form>';
ui_toggle(
$filter_form,
'<span class="subsection_header_title">'.__('Filters').'</span>',
'filter_form',
'',
true,
false,
'',
'white-box-content',
'box-flat white_table_graph fixed_filter_bar'
);
$tablePagination = '';
$buttons_form = '';
// End of filter form. // End of filter form.
if (empty($result) === false) { if (empty($result) === false) {
if (is_metaconsole() === false) {
echo $filter_form;
} else {
ui_toggle($filter_form, __('Show Options'));
}
// Prepare pagination.
ui_pagination($total_tags, $url);
// Display tags previously filtered or not. // Display tags previously filtered or not.
$rowPair = true; $rowPair = true;
$iterator = 0; $iterator = 0;
@ -398,32 +431,45 @@ if (empty($result) === false) {
} }
html_print_table($table); html_print_table($table);
ui_pagination($total_tags, $url, 0, 0, false, 'offset', true, 'pagination-bottom'); $tablePagination = ui_pagination(
$total_tags,
$url,
0,
0,
true,
'offset',
false,
''
);
} else { } else {
if (is_metaconsole() === true) { if (empty($tag_name) === true) {
ui_toggle($filter_form, __('Show Options'));
ui_print_info_message(['no_close' => true, 'message' => __('No tags defined')]);
} else if ($filter_performed) {
echo $filter_form;
} else {
include $config['homedir'].'/general/first_task/tags.php'; include $config['homedir'].'/general/first_task/tags.php';
return; return;
} }
} }
if ($is_management_allowed === true) { if ($is_management_allowed === true) {
echo '<table border=0 cellpadding=0 cellspacing=0 width=100%>'; $buttons_form .= '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/tag/edit_tag&action=new">';
echo '<tr>'; $buttons_form .= html_print_input_hidden('create_tag', '1', true);
echo '<td align=right>'; $buttons_form .= html_print_submit_button(
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/tag/edit_tag&action=new">'; __('Create tag'),
html_print_input_hidden('create_tag', '1', true); 'create_button',
html_print_submit_button(__('Create tag'), 'create_button', false, 'class="sub next"'); false,
echo '</form>'; ['icon' => 'next'],
echo '</td>'; true
echo '</tr>'; );
echo '</table>'; $buttons_form .= '</form>';
} }
html_print_action_buttons(
$buttons_form,
[
'type' => 'data_table',
'class' => 'fixed_action_buttons',
'right_content' => $tablePagination,
]
);
?> ?>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -789,7 +789,7 @@ function showMsg(data) {
} }
$(document).ready(function() { $(document).ready(function() {
$("#submit-create").click(function() { $("#button-create").click(function() {
showForm(); showForm();
}); });
}); });

View File

@ -853,7 +853,7 @@ class CredentialStore extends Wizard
[ [
'id' => $this->tableId, 'id' => $this->tableId,
'class' => 'info_table', 'class' => 'info_table',
'style' => 'width: 100%', 'style' => 'width: 99%',
'columns' => $columns, 'columns' => $columns,
'column_names' => $column_names, 'column_names' => $column_names,
'ajax_url' => $this->ajaxController, 'ajax_url' => $this->ajaxController,
@ -865,6 +865,7 @@ class CredentialStore extends Wizard
'direction' => 'asc', 'direction' => 'asc',
], ],
'search_button_class' => 'sub filter float-right', 'search_button_class' => 'sub filter float-right',
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
'form' => [ 'form' => [
'inputs' => [ 'inputs' => [
[ [
@ -902,14 +903,15 @@ class CredentialStore extends Wizard
echo $modal.$msg.$aux; echo $modal.$msg.$aux;
// Create button. // Create button.
echo '<div class="w100p flex-content-right">'; html_print_action_buttons(
html_print_submit_button( html_print_submit_button(
__('Add key'), __('Add key'),
'create', 'create',
false, false,
'class="sub next"' ['icon' => 'next'],
true
)
); );
echo '</div>';
echo $this->loadJS(); echo $this->loadJS();
@ -1752,8 +1754,7 @@ class CredentialStore extends Wizard
} }
$(document).ready(function(){ $(document).ready(function(){
$("#button-create").on('click', function(){
$("#submit-create").on('click', function(){
show_form(); show_form();
}); });
}); });

View File

@ -936,7 +936,7 @@ class HTML
$cb_function = $data['cb_function']; $cb_function = $data['cb_function'];
$cb_args = $data['cb_args']; $cb_args = $data['cb_args'];
$output_head = '<form class="discovery" onsubmit="'.$form['onsubmit'].'" enctype="'.$form['enctype'].'" action="'.$form['action'].'" method="'.$form['method']; $output_head = '<form class="discovery '.$form['class'].'" onsubmit="'.$form['onsubmit'].'" enctype="'.$form['enctype'].'" action="'.$form['action'].'" method="'.$form['method'];
$output_head .= '" id="'.$form['id'].'" '.$form['extra'].'>'; $output_head .= '" id="'.$form['id'].'" '.$form['extra'].'>';
if (isset($form['title']) === true && empty($form['title']) === false) { if (isset($form['title']) === true && empty($form['title']) === false) {

View File

@ -1248,7 +1248,7 @@ class SatelliteAgent extends HTML
$('body').append('<div id="dialog"></div>'); $('body').append('<div id="dialog"></div>');
$("#submit-create").on('click', function() { $("#button-create").on('click', function() {
show_form(); show_form();
}); });

View File

@ -3221,6 +3221,7 @@ function html_print_input_image($name, $src, $value, $style='', $return=false, $
'onkeydown', 'onkeydown',
'onkeyup', 'onkeyup',
'class', 'class',
'form',
]; ];
foreach ($attrs as $attribute) { foreach ($attrs as $attribute) {

View File

@ -2766,7 +2766,7 @@ td.cellBig {
} }
.info_box_container:not(.info_box_information) { .info_box_container:not(.info_box_information) {
z-index: 1; z-index: 2;
} }
.info_box_container.info_box_information { .info_box_container.info_box_information {
@ -11504,3 +11504,7 @@ input[type="text"]:has(+ .inputbuton) {
border-start-end-radius: 0px; border-start-end-radius: 0px;
border-right: 0px; border-right: 0px;
} }
.notzindex {
z-index: 0;
}

View File

@ -1010,12 +1010,6 @@ $url_down_last = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&am
$url_up_last_status_change = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=last_status_change&amp;sort=up'; $url_up_last_status_change = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=last_status_change&amp;sort=up';
$url_down_last_status_change = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=last_status_change&amp;sort=down'; $url_down_last_status_change = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=last_status_change&amp;sort=down';
// Prepare pagination.
ui_pagination(
$total_agents,
ui_get_url_refresh(['group_id' => $group_id, 'recursion' => $recursion, 'search' => $search, 'sort_field' => $sortField, 'sort' => $sort, 'status' => $status])
);
// Show data. // Show data.
$tableAgents = new stdClass(); $tableAgents = new stdClass();
$tableAgents->cellpadding = 0; $tableAgents->cellpadding = 0;