fixed styles
This commit is contained in:
parent
ff3b7001c3
commit
08dca1a83c
|
@ -122,36 +122,39 @@ $files = list_files('images/', '@groups.svg', 1, 0);
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
if (is_metaconsole() === true) {
|
||||
$table->head[0] = ($id_group > 0) ? __('Update group') : __('Create group');
|
||||
$table->head_colspan[0] = 4;
|
||||
$table->headstyle[0] = 'text-align: center';
|
||||
}
|
||||
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
|
||||
$table->class = 'databox filter-table-adv';
|
||||
$table->size = [];
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
$table->data = [];
|
||||
$table->data[0][0] = __('Name');
|
||||
$table->data[0][1] = html_print_input_text('name', $name, '', 35, 100, true);
|
||||
$table->data[1][0] = __('Icon');
|
||||
$table->data[1][1] = html_print_select($files, 'icon', $icon, '', 'None', '', true);
|
||||
$table->data[1][1] .= ' <span id="icon_preview">';
|
||||
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Name'),
|
||||
html_print_input_text('name', $name, '', 35, 100, true)
|
||||
);
|
||||
|
||||
$input_icon = html_print_select($files, 'icon', $icon, '', 'None', '', true);
|
||||
$input_icon .= ' <span id="icon_preview">';
|
||||
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>';
|
||||
$table->data[2][0] = __('Parent');
|
||||
$input_icon .= '</span>';
|
||||
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Icon'),
|
||||
'<div>'.$input_icon.'</div>'
|
||||
);
|
||||
|
||||
if ($id_group > 0) {
|
||||
// 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) {
|
||||
$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 {
|
||||
$table->data[2][1] = '<div class="w250px inline">';
|
||||
$table->data[2][1] .= html_print_select_groups(
|
||||
$input_parent = '<div class="w250px inline">';
|
||||
$input_parent .= html_print_select_groups(
|
||||
false,
|
||||
'AR',
|
||||
false,
|
||||
|
@ -169,11 +172,11 @@ if ($id_group > 0) {
|
|||
false,
|
||||
$id_group
|
||||
);
|
||||
$table->data[2][1] .= '</div>';
|
||||
$input_parent .= '</div>';
|
||||
}
|
||||
} else {
|
||||
$table->data[2][1] = '<div class="w250px inline">';
|
||||
$table->data[2][1] .= html_print_input(
|
||||
$input_parent = '<div class="w250px inline">';
|
||||
$input_parent .= html_print_input(
|
||||
[
|
||||
'type' => 'select_groups',
|
||||
'name' => 'id_parent',
|
||||
|
@ -184,66 +187,101 @@ if ($id_group > 0) {
|
|||
'nothing_value' => -1,
|
||||
]
|
||||
);
|
||||
$table->data[2][1] .= '</div>';
|
||||
$input_parent .= '</div>';
|
||||
}
|
||||
|
||||
if ($acl_parent === true) {
|
||||
$table->data[2][1] .= ' <span id="parent_preview">';
|
||||
$table->data[2][1] .= html_print_image('images/'.(($id_parent !== 0) ? groups_get_icon($id_parent) : 'unknown@groups.svg'), true);
|
||||
$table->data[2][1] .= '</span>';
|
||||
$input_parent .= ' <span id="parent_preview">';
|
||||
$input_parent .= html_print_image('images/'.(($id_parent !== 0) ? groups_get_icon($id_parent) : 'unknown@groups.svg'), true);
|
||||
$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) {
|
||||
$i = 4;
|
||||
$table->data[3][0] = __('Group Password');
|
||||
$table->data[3][1] = html_print_input_password('group_pass', $group_pass, '', 16, 255, true);
|
||||
$table->data[1][1] .= html_print_label_input_block(
|
||||
__('Group Password'),
|
||||
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[$i][1] = html_print_checkbox_switch('alerts_enabled', 1, ! $alerts_disabled, true);
|
||||
$i++;
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
__('Alerts').ui_print_help_tip(__('Enable alert use in this group.'), true),
|
||||
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[$i][1] = html_print_checkbox_switch('propagate', 1, $propagate, true);
|
||||
$i++;
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Propagate ACL').ui_print_help_tip(__('Propagate the same ACL security into the child subgroups.'), true),
|
||||
html_print_checkbox_switch('propagate', 1, $propagate, true)
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Custom ID');
|
||||
$table->data[$i][1] = html_print_input_text('custom_id', $custom_id, '', 16, 255, true);
|
||||
$i++;
|
||||
$table->data[3][0] = html_print_label_input_block(
|
||||
__('Custom ID'),
|
||||
html_print_input_text('custom_id', $custom_id, '', 16, 255, true)
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Description');
|
||||
$table->data[$i][1] = html_print_input_text('description', $description, '', 60, 255, true);
|
||||
$i++;
|
||||
$table->data[3][1] = html_print_label_input_block(
|
||||
__('Description'),
|
||||
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[$i][1] = html_print_textarea('contact', 4, 40, $contact, "class='min-height-0px'", true);
|
||||
$i++;
|
||||
$table->data[4][0] = html_print_label_input_block(
|
||||
__('Contact').ui_print_help_tip(__('Contact information accessible through the _groupcontact_ macro'), true),
|
||||
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[$i][1] = html_print_textarea('other', 4, 40, $other, "class='min-height-0px'", true);
|
||||
$i++;
|
||||
$table->data[4][1] = html_print_label_input_block(
|
||||
__('Other').ui_print_help_tip(__('Information accessible through the _group_other_ macro'), true),
|
||||
html_print_textarea('other', 4, 40, $other, "class='min-height-0px'", true)
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Max agents allowed').' '.ui_print_help_tip(__('Set the maximum of agents allowed for this group. 0 is unlimited.'), true);
|
||||
$table->data[$i][1] = html_print_input_text('max_agents', $max_agents, '', 10, 255, true);
|
||||
$i++;
|
||||
$table->data[5][0] = html_print_label_input_block(
|
||||
__('Max agents allowed').ui_print_help_tip(__('Set the maximum of agents allowed for this group. 0 is unlimited.'), true),
|
||||
html_print_input_text('max_agents', $max_agents, '', 10, 255, true)
|
||||
);
|
||||
|
||||
$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);
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
html_print_button(__('Back'), 'button_back', false, '', 'class="sub cancel"');
|
||||
|
||||
$buttons = '';
|
||||
if ($id_group) {
|
||||
html_print_input_hidden('update_group', 1);
|
||||
html_print_input_hidden('id_group', $id_group);
|
||||
html_print_submit_button(__('Update'), 'updbutton', false, 'class="sub upd"');
|
||||
$buttons .= html_print_input_hidden('update_group', 1, true);
|
||||
$buttons .= html_print_input_hidden('id_group', $id_group, true);
|
||||
$buttons .= html_print_submit_button(
|
||||
__('Update'),
|
||||
'updbutton',
|
||||
false,
|
||||
['icon' => 'upd'],
|
||||
true
|
||||
);
|
||||
} else {
|
||||
html_print_input_hidden('create_group', 1);
|
||||
html_print_submit_button(__('Create'), 'crtbutton', false, 'class="sub wand"');
|
||||
$buttons .= html_print_input_hidden('create_group', 1);
|
||||
$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>';
|
||||
|
||||
?>
|
||||
|
|
|
@ -362,12 +362,6 @@ switch ($tab) {
|
|||
// Header.
|
||||
if (is_metaconsole() === true) {
|
||||
agents_meta_print_header();
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'notify',
|
||||
'content' => __('Edit or delete groups can cause problems with synchronization'),
|
||||
]
|
||||
);
|
||||
} else {
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
|
@ -764,6 +758,8 @@ if ($tab == 'tree') {
|
|||
$search = (string) get_parameter('search', '');
|
||||
$block_size = $config['block_size'];
|
||||
|
||||
$tablePagination = '';
|
||||
|
||||
if (empty($search) === false) {
|
||||
$search_name = 'AND t.nombre LIKE "%'.$search.'%"';
|
||||
}
|
||||
|
@ -784,23 +780,58 @@ if ($tab == 'tree') {
|
|||
}
|
||||
|
||||
$form = "<form method='post' action=''>";
|
||||
$form .= "<table class='databox filters bolder' width='100%'>";
|
||||
$form .= '<tr><td>'.__('Search').' ';
|
||||
$form .= html_print_input_text(
|
||||
$form .= "<table class='filter-table-adv' width='100%'>";
|
||||
$form .= '<tr><td>'.html_print_label_input_block(
|
||||
__('Search'),
|
||||
html_print_input_text(
|
||||
'search',
|
||||
$search,
|
||||
'',
|
||||
30,
|
||||
30,
|
||||
true
|
||||
);
|
||||
$form .= '</td><td style="text-align: right">';
|
||||
$form .= "<input name='find' type='submit' class='sub search' value='".__('Search')."'>";
|
||||
)
|
||||
);
|
||||
$form .= '</td>';
|
||||
$form .= '</tr>';
|
||||
$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>';
|
||||
|
||||
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(
|
||||
'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);
|
||||
echo ui_pagination(
|
||||
$tablePagination = ui_pagination(
|
||||
$groups_count,
|
||||
false,
|
||||
$offset,
|
||||
$block_size,
|
||||
true,
|
||||
'offset',
|
||||
true,
|
||||
false,
|
||||
'pagination-bottom'
|
||||
);
|
||||
} else {
|
||||
|
@ -975,17 +997,32 @@ if ($tab == 'tree') {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
$button_form = '';
|
||||
if ($is_management_allowed === true
|
||||
&& (bool) check_acl($config['id_user'], 0, 'PM') === true
|
||||
) {
|
||||
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/groups/configure_group">';
|
||||
echo '<div class="action-buttons w100p">';
|
||||
html_print_submit_button(__('Create group'), 'crt', false, 'class="sub next"');
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
$button_form = '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/groups/configure_group">';
|
||||
$button_form .= html_print_submit_button(
|
||||
__('Create group'),
|
||||
'crt',
|
||||
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/');
|
||||
|
||||
$tab = 'group_edition';
|
||||
|
|
|
@ -5157,7 +5157,7 @@ $(document).ready (function () {
|
|||
|
||||
$('#checkbox-fullscale').trigger('change');
|
||||
|
||||
$("#submit-create_item").click(function () {
|
||||
$("#button-create_item").click(function () {
|
||||
var type = $('#type').val();
|
||||
var name = $('#text-name').val();
|
||||
|
||||
|
|
|
@ -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')))));
|
||||
$tab = (string) get_parameter('tab', 'list');
|
||||
|
||||
if (defined('METACONSOLE')) {
|
||||
if (is_metaconsole() === true) {
|
||||
$sec = 'advanced';
|
||||
$url = 'index.php?sec='.$sec.'&sec2=advanced/component_management&tab=tags';
|
||||
} else {
|
||||
$sec = 'gmodules';
|
||||
$url = 'index.php?sec='.$sec.'&sec2=godmode/tag/tag&tab=list';
|
||||
}
|
||||
|
||||
if (defined('METACONSOLE')) {
|
||||
$buttons = [
|
||||
'list' => [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec='.$sec.'&sec2=advanced/component_management&tab=tags">'.html_print_image(
|
||||
'images/list.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('List tags'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>',
|
||||
],
|
||||
];
|
||||
$buttons = [
|
||||
'list' => [
|
||||
'active' => false,
|
||||
'text' => '<a href="'.$url.'">'.html_print_image(
|
||||
'images/list.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('List tags'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>',
|
||||
],
|
||||
];
|
||||
|
||||
$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;
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
// Header
|
||||
ui_print_page_header(
|
||||
__('Tags configuration'),
|
||||
'images/tag.png',
|
||||
false,
|
||||
['class' => 'invert_filter'],
|
||||
true,
|
||||
$buttons
|
||||
);
|
||||
}
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Tags configuration'),
|
||||
'images/tag.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Profile'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Manage tags'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Two actions can performed in this page: update and create tags
|
||||
// Update tag: update an existing tag
|
||||
|
@ -188,99 +181,90 @@ else {
|
|||
}
|
||||
|
||||
|
||||
// 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">';
|
||||
// Create/Update tag form.
|
||||
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%>";
|
||||
if (defined('METACONSOLE')) {
|
||||
echo '<tr>';
|
||||
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') {
|
||||
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') {
|
||||
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>';
|
||||
echo "<td align='left'>";
|
||||
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>';
|
||||
html_print_action_buttons(
|
||||
$buttons
|
||||
);
|
||||
|
||||
echo '</div>';
|
||||
|
||||
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>';
|
||||
echo '</form>';
|
||||
|
|
|
@ -140,13 +140,19 @@ $buttons[$tab]['active'] = true;
|
|||
|
||||
if (is_metaconsole() === false) {
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
ui_print_standard_header(
|
||||
__('Tags configuration'),
|
||||
'images/tag.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Module tags'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -211,36 +217,63 @@ $result = tags_search_tag(false, $filter);
|
|||
|
||||
// Filter form.
|
||||
$table = new StdClass();
|
||||
$table->class = 'databox filters';
|
||||
$table->width = '100%';
|
||||
$table->size = [];
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
$table->class = 'filter-table-adv';
|
||||
$table->data = [];
|
||||
|
||||
$row = [];
|
||||
|
||||
$name_input = __('Name').' / '.__('Description');
|
||||
$name_input .= ' ';
|
||||
$name_input .= html_print_input_text('tag_name', $tag_name, '', 30, 255, true);
|
||||
$row[] = $name_input;
|
||||
|
||||
$filter_button = html_print_submit_button(__('Filter'), 'filter_button', false, 'class="sub search"', true);
|
||||
$row[] = $filter_button;
|
||||
|
||||
$table->data[] = $row;
|
||||
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Name').' / '.__('Description'),
|
||||
html_print_input_text(
|
||||
'tag_name',
|
||||
$tag_name,
|
||||
'',
|
||||
30,
|
||||
255,
|
||||
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 .= 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>';
|
||||
|
||||
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.
|
||||
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.
|
||||
$rowPair = true;
|
||||
$iterator = 0;
|
||||
|
@ -398,32 +431,45 @@ if (empty($result) === false) {
|
|||
}
|
||||
|
||||
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 {
|
||||
if (is_metaconsole() === 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 {
|
||||
if (empty($tag_name) === true) {
|
||||
include $config['homedir'].'/general/first_task/tags.php';
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_management_allowed === true) {
|
||||
echo '<table border=0 cellpadding=0 cellspacing=0 width=100%>';
|
||||
echo '<tr>';
|
||||
echo '<td align=right>';
|
||||
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/tag/edit_tag&action=new">';
|
||||
html_print_input_hidden('create_tag', '1', true);
|
||||
html_print_submit_button(__('Create tag'), 'create_button', false, 'class="sub next"');
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
$buttons_form .= '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/tag/edit_tag&action=new">';
|
||||
$buttons_form .= html_print_input_hidden('create_tag', '1', true);
|
||||
$buttons_form .= html_print_submit_button(
|
||||
__('Create tag'),
|
||||
'create_button',
|
||||
false,
|
||||
['icon' => 'next'],
|
||||
true
|
||||
);
|
||||
$buttons_form .= '</form>';
|
||||
}
|
||||
|
||||
html_print_action_buttons(
|
||||
$buttons_form,
|
||||
[
|
||||
'type' => 'data_table',
|
||||
'class' => 'fixed_action_buttons',
|
||||
'right_content' => $tablePagination,
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -789,7 +789,7 @@ function showMsg(data) {
|
|||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#submit-create").click(function() {
|
||||
$("#button-create").click(function() {
|
||||
showForm();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -853,7 +853,7 @@ class CredentialStore extends Wizard
|
|||
[
|
||||
'id' => $this->tableId,
|
||||
'class' => 'info_table',
|
||||
'style' => 'width: 100%',
|
||||
'style' => 'width: 99%',
|
||||
'columns' => $columns,
|
||||
'column_names' => $column_names,
|
||||
'ajax_url' => $this->ajaxController,
|
||||
|
@ -865,6 +865,7 @@ class CredentialStore extends Wizard
|
|||
'direction' => 'asc',
|
||||
],
|
||||
'search_button_class' => 'sub filter float-right',
|
||||
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
|
||||
'form' => [
|
||||
'inputs' => [
|
||||
[
|
||||
|
@ -902,14 +903,15 @@ class CredentialStore extends Wizard
|
|||
echo $modal.$msg.$aux;
|
||||
|
||||
// Create button.
|
||||
echo '<div class="w100p flex-content-right">';
|
||||
html_print_submit_button(
|
||||
__('Add key'),
|
||||
'create',
|
||||
false,
|
||||
'class="sub next"'
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
__('Add key'),
|
||||
'create',
|
||||
false,
|
||||
['icon' => 'next'],
|
||||
true
|
||||
)
|
||||
);
|
||||
echo '</div>';
|
||||
|
||||
echo $this->loadJS();
|
||||
|
||||
|
@ -1752,8 +1754,7 @@ class CredentialStore extends Wizard
|
|||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#submit-create").on('click', function(){
|
||||
$("#button-create").on('click', function(){
|
||||
show_form();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -936,7 +936,7 @@ class HTML
|
|||
$cb_function = $data['cb_function'];
|
||||
$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'].'>';
|
||||
|
||||
if (isset($form['title']) === true && empty($form['title']) === false) {
|
||||
|
|
|
@ -1248,7 +1248,7 @@ class SatelliteAgent extends HTML
|
|||
|
||||
$('body').append('<div id="dialog"></div>');
|
||||
|
||||
$("#submit-create").on('click', function() {
|
||||
$("#button-create").on('click', function() {
|
||||
show_form();
|
||||
});
|
||||
|
||||
|
|
|
@ -3221,6 +3221,7 @@ function html_print_input_image($name, $src, $value, $style='', $return=false, $
|
|||
'onkeydown',
|
||||
'onkeyup',
|
||||
'class',
|
||||
'form',
|
||||
];
|
||||
|
||||
foreach ($attrs as $attribute) {
|
||||
|
|
|
@ -2766,7 +2766,7 @@ td.cellBig {
|
|||
}
|
||||
|
||||
.info_box_container:not(.info_box_information) {
|
||||
z-index: 1;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.info_box_container.info_box_information {
|
||||
|
@ -11504,3 +11504,7 @@ input[type="text"]:has(+ .inputbuton) {
|
|||
border-start-end-radius: 0px;
|
||||
border-right: 0px;
|
||||
}
|
||||
|
||||
.notzindex {
|
||||
z-index: 0;
|
||||
}
|
||||
|
|
|
@ -1010,12 +1010,6 @@ $url_down_last = 'index.php?sec=view&sec2=operation/agentes/estado_agente&am
|
|||
$url_up_last_status_change = 'index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=last_status_change&sort=up';
|
||||
$url_down_last_status_change = 'index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=last_status_change&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.
|
||||
$tableAgents = new stdClass();
|
||||
$tableAgents->cellpadding = 0;
|
||||
|
|
Loading…
Reference in New Issue