Metaconsole view reports change

This commit is contained in:
Jonathan 2023-03-21 09:52:21 +01:00
parent 01e152a6e3
commit 82dd6ebb37
5 changed files with 277 additions and 653 deletions

View File

@ -1047,17 +1047,6 @@ $class = 'databox filters';
?> ?>
<table id="table_item_edit_reporting" class="<?php echo $class; ?>" id="" border="0" cellpadding="4" cellspacing="4" width="100%"> <table id="table_item_edit_reporting" class="<?php echo $class; ?>" id="" border="0" cellpadding="4" cellspacing="4" width="100%">
<?php
if (defined('METACONSOLE')) {
echo '<thead>
<tr>
<th align=center colspan=5>
'.__('Item Editor').'
</th>
</tr>
</thead>';
}
?>
<tbody> <tbody>
<tr id="row_type" class="datos"> <tr id="row_type" class="datos">
<td class="bolder w220px"> <td class="bolder w220px">

View File

@ -201,139 +201,86 @@ if (($agentFilter == 0) && ($moduleFilter == 0) && ($typeFilter == 0)) {
$urlFilter = '&agent_filter='.$agentFilter.'&module_filter='.$moduleFilter.'&type_filter='.$typeFilter; $urlFilter = '&agent_filter='.$agentFilter.'&module_filter='.$moduleFilter.'&type_filter='.$typeFilter;
if (!defined('METACONSOLE')) { $table = new stdClass();
$table = new stdClass(); $table->width = '100%';
$table->width = '100%'; $table->class = 'filter-table-adv';
$table->class = 'filter-table-adv'; $table->size[0] = '33%';
$table->size[0] = '33%'; $table->size[1] = '33%';
$table->size[1] = '33%'; $table->size[1] = '33%';
$table->size[1] = '33%'; $table->data[0][0] = html_print_label_input_block(
$table->data[0][0] = html_print_label_input_block( __('Agents'),
__('Agents'), html_print_select(
html_print_select(
$agents,
'agent_filter',
$agentFilter,
'',
__('All'),
0,
true,
false,
true,
'',
false,
'width:100%'
)
);
$table->data[0][1] = html_print_label_input_block(
__('Modules'),
html_print_select(
$modules,
'module_filter',
$moduleFilter,
'',
__('All'),
0,
true,
false,
true,
'',
false,
'width:100%'
)
);
$table->data[0][2] = html_print_label_input_block(
__('Type'),
html_print_select(
$types,
'type_filter',
$typeFilter,
'',
__('All'),
0,
true,
false,
true,
'',
false,
'width:100%'
)
);
$form = '<form method="post" action ="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=filter&id_report='.$idReport.'">';
$form .= html_print_table($table, true);
$form .= html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Filter'),
'filter',
false,
[
'class' => 'mini',
'icon' => 'search',
'mode' => 'secondary',
],
true
),
],
true
);
$form .= html_print_input_hidden('action', 'filter', true);
$form .= '</form>';
ui_toggle($form, __('Filters'), '', '', false);
} else {
$table = new stdClass();
$table->width = '96%';
$table->class = 'databox_filters';
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->data[0][0] = __('Agents');
$table->data[0][1] = html_print_select(
$agents, $agents,
'agent_filter', 'agent_filter',
$agentFilter, $agentFilter,
'', '',
__('All'), __('All'),
0, 0,
true true,
); false,
$table->data[0][2] = __('Modules'); true,
$table->data[0][3] = html_print_select( '',
false,
'width:100%'
)
);
$table->data[0][1] = html_print_label_input_block(
__('Modules'),
html_print_select(
$modules, $modules,
'module_filter', 'module_filter',
$moduleFilter, $moduleFilter,
'', '',
__('All'), __('All'),
0, 0,
true true,
); false,
$table->data[0][4] = __('Type'); true,
$table->data[0][5] = html_print_select( '',
false,
'width:100%'
)
);
$table->data[0][2] = html_print_label_input_block(
__('Type'),
html_print_select(
$types, $types,
'type_filter', 'type_filter',
$typeFilter, $typeFilter,
'', '',
__('All'), __('All'),
0, 0,
true true,
);
$table->style[6] = 'text-align:right;';
$table->data[0][6] = html_print_submit_button(
__('Filter'),
'filter',
false, false,
'class="sub upd"', true,
true '',
).html_print_input_hidden('action', 'filter', true); false,
'width:100%'
)
);
$form = '<form method="post" action ="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=filter&id_report='.$idReport.'">';
$form .= html_print_table($table, true);
$form .= html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Filter'),
'filter',
false,
[
'class' => 'mini',
'icon' => 'search',
'mode' => 'secondary',
],
true
),
],
true
);
$form .= html_print_input_hidden('action', 'filter', true);
$form .= '</form>';
$filters = '<form class="filters_form" method="post" action ="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab= ui_toggle($form, __('Filters'), '', '', false);
list_items&action=filter&id_report='.$idReport.'">';
$filters .= html_print_table($table, true);
$filters .= '</form>';
ui_toggle($filters, __('Show Options'));
}
$where = '1=1'; $where = '1=1';
if ($typeFilter != '0') { if ($typeFilter != '0') {
@ -412,16 +359,9 @@ $table->style[0] = 'text-align: right;';
if ($items) { if ($items) {
$table->width = '100%'; $table->width = '100%';
if (defined('METACONSOLE')) { $table->class = 'info_table';
$table->width = '100%'; $arrow_up = 'images/sort_up_black.png';
$table->class = 'databox data'; $arrow_down = 'images/sort_down_black.png';
$arrow_up = 'images/sort_up.png';
$arrow_down = 'images/sort_down.png';
} else {
$table->class = 'info_table';
$arrow_up = 'images/sort_up_black.png';
$arrow_down = 'images/sort_down_black.png';
}
$table->size = []; $table->size = [];
$table->size[0] = '5px'; $table->size[0] = '5px';
@ -717,90 +657,65 @@ foreach ($items as $item) {
} }
} }
if (defined('METACONSOLE')) { if ($items != false) {
if ($items != false) { ui_pagination(
ui_pagination($countItems, 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter); $countItems,
html_print_table($table); 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter
ui_pagination($countItems, 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter); );
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items&id_report=".$idReport."' html_print_table($table);
method='post' onSubmit='return added_ids_deleted_items_to_hidden_input();'>"; ui_pagination(
echo "<div class='right w100p'>"; $countItems,
'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter
);
if (check_acl($config['id_user'], 0, 'RM')) { echo "<form id='form_delete' action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items&id_report=".$idReport."'
html_print_input_hidden('ids_items_to_delete', ''); method='post' onSubmit='return added_ids_deleted_items_to_hidden_input();'>";
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete right mrgn_btn_15px"');
}
echo '</div>'; echo '<div class="action-buttons w100p">';
echo '</form>'; html_print_input_hidden('ids_items_to_delete', '');
} $ActionButtons[] = html_print_submit_button(
} else { __('Delete'),
if ($items != false) { 'delete_btn',
ui_pagination( false,
$countItems, [
'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter 'class' => 'sub ok',
); 'icon' => 'next',
html_print_table($table); ],
ui_pagination( true
$countItems, );
'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter html_print_action_buttons(
); implode('', $ActionButtons),
['type' => 'form_action']
echo "<form id='form_delete' action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items&id_report=".$idReport."' );
method='post' onSubmit='return added_ids_deleted_items_to_hidden_input();'>"; echo '</div>';
echo '</form>';
echo '<div class="action-buttons w100p">';
html_print_input_hidden('ids_items_to_delete', '');
$ActionButtons[] = html_print_submit_button(
__('Delete'),
'delete_btn',
false,
[
'class' => 'sub ok',
'icon' => 'next',
],
true
);
html_print_action_buttons(
implode('', $ActionButtons),
['type' => 'form_action']
);
echo '</div>';
echo '</form>';
}
} }
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'filter-table-adv';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data[1][0] = html_print_label_input_block(
if (defined('METACONSOLE')) { __('Sort selected items from position: '),
$table->colspan[0][0] = 3; html_print_select_style(
$table->size = [];
$table->size[0] = '25%';
$table->size[1] = '25%';
$table->size[2] = '25%';
$table->size[3] = '25%';
$table->class = 'databox data';
$table->head[0] = __('Sort items');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
$table->data[1][0] = __('Sort selected items from position: ');
$table->data[1][1] = html_print_select_style(
[ [
'before' => __('Move before to'), 'before' => __('Move before to'),
'after' => __('Move after to'), 'after' => __('Move after to'),
], ],
'move_to', 'move_to',
'', '',
'', 'width:100%',
'', '',
'', '',
0, 0,
true true,
); )
$table->data[1][2] = html_print_input_text_extended( );
$table->data[1][2] = html_print_label_input_block(
__('Position'),
html_print_input_text_extended(
'position_to_sort', 'position_to_sort',
1, 1,
'text-position_to_sort', 'text-position_to_sort',
@ -811,93 +726,42 @@ if (defined('METACONSOLE')) {
"only_numbers('position_to_sort');", "only_numbers('position_to_sort');",
'', '',
true true
); ).html_print_input_hidden('ids_items_to_sort', '', true)
$table->data[1][2] .= html_print_input_hidden('ids_items_to_sort', '', true); );
$table->data[1][3] = html_print_submit_button(__('Sort'), 'sort_submit', false, 'class="sub upd"', true);
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=sort_items&id_report=".$idReport."' $form = "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=sort_items&id_report=".$idReport."' method='post' onsubmit='return added_ids_sorted_items_to_hidden_input();'>";
method='post' onsubmit='return added_ids_sorted_items_to_hidden_input();'>"; $form .= html_print_table($table, true);
html_print_table($table); $form .= html_print_div(
echo '</form>'; [
} else { 'class' => 'action-buttons',
$table->class = 'filter-table-adv'; 'content' => html_print_submit_button(
$table->size[0] = '50%'; __('Sort'),
$table->size[1] = '50%'; 'sort_submit',
$table->data[1][0] = html_print_label_input_block(
__('Sort selected items from position: '),
html_print_select_style(
[
'before' => __('Move before to'),
'after' => __('Move after to'),
],
'move_to',
'',
'width:100%',
'',
'',
0,
true,
)
);
$table->data[1][2] = html_print_label_input_block(
__('Position'),
html_print_input_text_extended(
'position_to_sort',
1,
'text-position_to_sort',
'',
3,
10,
false, false,
"only_numbers('position_to_sort');", [
'', 'class' => 'mini',
'icon' => 'search',
'mode' => 'secondary',
],
true true
).html_print_input_hidden('ids_items_to_sort', '', true) ),
); ],
true
);
$form .= html_print_input_hidden('action', 'sort_items', true);
$form .= '</form>';
$form = "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=sort_items&id_report=".$idReport."' method='post' onsubmit='return added_ids_sorted_items_to_hidden_input();'>"; ui_toggle($form, __('Sort items'), '', '', false);
$form .= html_print_table($table, true);
$form .= html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Sort'),
'sort_submit',
false,
[
'class' => 'mini',
'icon' => 'search',
'mode' => 'secondary',
],
true
),
],
true
);
$form .= html_print_input_hidden('action', 'sort_items', true);
$form .= '</form>';
ui_toggle($form, __('Sort items'), '', '', false);
}
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'filter-table-adv';
$table->size[0] = '50%';
$table->size[1] = '50%';
if (defined('METACONSOLE')) { $table->data[0][0] = html_print_label_input_block(
$table->colspan[0][0] = 3; __('Delete selected items from position: '),
$table->size = []; html_print_select_style(
$table->size[0] = '25%';
$table->size[1] = '25%';
$table->size[2] = '25%';
$table->size[3] = '25%';
$table->class = 'databox data';
$table->head[0] = __('Delete items');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
$table->data[1][0] = __('Delete selected items from position: ');
$table->data[1][1] = html_print_select_style(
[ [
'above' => __('Delete above to'), 'above' => __('Delete above to'),
'below' => __('Delete below to'), 'below' => __('Delete below to'),
@ -909,8 +773,11 @@ if (defined('METACONSOLE')) {
'', '',
0, 0,
true true
); )
$table->data[1][2] = html_print_input_text_extended( );
$table->data[0][1] = html_print_label_input_block(
__('Poisition'),
html_print_input_text_extended(
'position_to_delete', 'position_to_delete',
1, 1,
'text-position_to_delete', 'text-position_to_delete',
@ -921,75 +788,33 @@ if (defined('METACONSOLE')) {
"only_numbers('position_to_delete');", "only_numbers('position_to_delete');",
'', '',
true true
); )
$table->data[1][2] .= html_print_input_hidden('ids_items_to_delete', '', true); );
$table->data[1][3] = html_print_submit_button(__('Delete'), 'delete_submit', false, 'class="sub upd"', true);
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items_pos&id_report=".$idReport."' $form = "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items_pos&id_report=".$idReport."'
method='post'>"; method='post'>";
html_print_table($table); $form .= html_print_input_hidden('ids_items_to_delete', '', true);
echo '</form>'; $form .= html_print_table($table, true);
} else { $form .= html_print_div(
$table->class = 'filter-table-adv'; [
$table->size[0] = '50%'; 'class' => 'action-buttons',
$table->size[1] = '50%'; 'content' => html_print_submit_button(
__('Delete'),
$table->data[0][0] = html_print_label_input_block( 'delete_submit',
__('Delete selected items from position: '),
html_print_select_style(
[
'above' => __('Delete above to'),
'below' => __('Delete below to'),
],
'delete_m',
'',
'',
'',
'',
0,
true
)
);
$table->data[0][1] = html_print_label_input_block(
__('Poisition'),
html_print_input_text_extended(
'position_to_delete',
1,
'text-position_to_delete',
'',
3,
10,
false, false,
"only_numbers('position_to_delete');", [
'', 'class' => 'mini',
'icon' => 'delete',
'mode' => 'secondary',
],
true true
) ),
); ],
true
);
$form .= '</form>';
ui_toggle($form, __('Delete items'), '', '', false);
$form = "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items_pos&id_report=".$idReport."'
method='post'>";
$form .= html_print_input_hidden('ids_items_to_delete', '', true);
$form .= html_print_table($table, true);
$form .= html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Delete'),
'delete_submit',
false,
[
'class' => 'mini',
'icon' => 'delete',
'mode' => 'secondary',
],
true
),
],
true
);
$form .= '</form>';
ui_toggle($form, __('Delete items'), '', '', false);
}
?> ?>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -70,21 +70,13 @@ $table->head = [];
$table->data = []; $table->data = [];
$table->size = []; $table->size = [];
if (is_metaconsole() === true) {
$table->class = 'databox filters'; $table->class = 'filter-table-adv databox';
$table->head[0] = __('Main data'); $table->size[0] = '50%';
$table->head_colspan[0] = 4; $table->size[1] = '50%';
$table->headstyle[0] = 'text-align: center'; $table->size[2] = '50%';
$table->size[0] = '15%'; $table->size[3] = '50%';
$table->size[1] = '90%';
$table->style[0] = 'font-weight: bold; vertical-align: top;';
} else {
$table->class = 'filter-table-adv databox';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->size[2] = '50%';
$table->size[3] = '50%';
}
$write_groups = users_get_groups_for_select( $write_groups = users_get_groups_for_select(
false, false,
@ -95,35 +87,20 @@ $write_groups = users_get_groups_for_select(
'id_grupo' 'id_grupo'
); );
if (is_metaconsole() === true) { $table->data[0][0] = html_print_label_input_block(
$table->data['name'][0] = __('Name'); __('Name'),
$table->data['name'][1] = html_print_input_text( html_print_input_text(
'name', 'name',
$reportName, $reportName,
__('Name'), __('Name'),
80, false,
100, 100,
true, true,
false, false,
true true
); )
);
$table->data['group'][0] = __('Group');
} else {
$table->data[0][0] = html_print_label_input_block(
__('Name'),
html_print_input_text(
'name',
$reportName,
__('Name'),
false,
100,
true,
false,
true
)
);
}
// If the report group is not among the // If the report group is not among the
// RW groups (special permission) we add it. // RW groups (special permission) we add it.
@ -137,9 +114,10 @@ if (users_can_manage_group_all('RW') === true) {
$return_all_group = true; $return_all_group = true;
} }
if (is_metaconsole() === true) {
$table->data['group'][1] = '<div class="w290px inline">'; $table->data[0][1] = html_print_label_input_block(
$table->data['group'][1] .= html_print_input( __('Group'),
html_print_input(
[ [
'type' => 'select_groups', 'type' => 'select_groups',
'id_user' => $config['id_user'], 'id_user' => $config['id_user'],
@ -153,53 +131,23 @@ if (is_metaconsole() === true) {
'return' => true, 'return' => true,
'required' => true, 'required' => true,
] ]
); )
$table->data['group'][1] .= '</div>'; );
} else {
$table->data[0][1] = html_print_label_input_block(
__('Group'),
html_print_input(
[
'type' => 'select_groups',
'id_user' => $config['id_user'],
'privilege' => 'AR',
'returnAllGroup' => $return_all_group,
'name' => 'id_group',
'selected' => $idGroupReport,
'script' => '',
'nothing' => '',
'nothing_value' => '',
'return' => true,
'required' => true,
]
)
);
}
if (is_metaconsole() === true) {
$table->data['description'][0] = __('Description'); $table->colspan[1][0] = 2;
$table->data['description'][1] = html_print_textarea( $table->data[1][0] = html_print_label_input_block(
__('Description'),
html_print_textarea(
'description', 'description',
2, 2,
80, 1,
$description, $description,
'', '',
true true
); )
} else { );
$table->colspan[1][0] = 2;
$table->data[1][0] = html_print_label_input_block(
__('Description'),
html_print_textarea(
'description',
2,
1,
$description,
'',
true
)
);
}
if ($report_id_user == $config['id_user'] if ($report_id_user == $config['id_user']
|| is_user_admin($config['id_user']) || is_user_admin($config['id_user'])
@ -210,13 +158,12 @@ if ($report_id_user == $config['id_user']
'group_edit' => __('The next group can edit the report'), 'group_edit' => __('The next group can edit the report'),
'user_edit' => __('Only the user and admin user can edit the report'), 'user_edit' => __('Only the user and admin user can edit the report'),
]; ];
if (is_metaconsole() === true) { $table->data[2][0] = html_print_label_input_block(
$table->data['access'][0] = __('Write Access'); __('Write Access').ui_print_help_tip(
$table->data['access'][0] .= ui_print_help_tip(
__('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'), __('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'),
true true
); ),
$table->data['access'][1] = html_print_select( html_print_select(
$type_access, $type_access,
'type_access', 'type_access',
$type_access_selected, $type_access_selected,
@ -224,16 +171,18 @@ if ($report_id_user == $config['id_user']
'', '',
0, 0,
true true
); )
);
$class = ' invisible_important '; $options['div_class'] = 'invisible_important';
if ($type_access_selected == 'group_edit') { $options['div_id'] = 'group_edit';
$class = ''; if ($type_access_selected == 'group_edit') {
} $options['div_class'] = '';
}
$table->data['access'][1] .= '<span class="access_subform'.$class.'" id="group_edit">'; $table->data[2][1] = html_print_label_input_block(
$table->data['access'][1] .= '<div class="w290px inline">'; __('Group'),
$table->data['access'][1] .= html_print_select_groups( html_print_select_groups(
false, false,
'RW', 'RW',
false, false,
@ -243,48 +192,9 @@ if ($report_id_user == $config['id_user']
'', '',
'', '',
true true
); ),
$table->data['access'][1] .= '</div>'; $options
$table->data['access'][1] .= '</span>'; );
} else {
$table->data[2][0] = html_print_label_input_block(
__('Write Access').ui_print_help_tip(
__('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'),
true
),
html_print_select(
$type_access,
'type_access',
$type_access_selected,
'change_type_access(this)',
'',
0,
true
)
);
$options['div_class'] = 'invisible_important';
$options['div_id'] = 'group_edit';
if ($type_access_selected == 'group_edit') {
$options['div_class'] = '';
}
$table->data[2][1] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
'RW',
false,
'id_group_edit',
$id_group_edit,
false,
'',
'',
true
),
$options
);
}
} }
if ($enterpriseEnable) { if ($enterpriseEnable) {
@ -293,68 +203,41 @@ if ($enterpriseEnable) {
$non_interactive_check = $non_interactive; $non_interactive_check = $non_interactive;
} }
if (is_metaconsole() === true) { $table->data[2][1] = html_print_label_input_block(
$table->data['interactive_report'][0] = __('Non interactive report'); __('Non interactive report'),
$table->data['interactive_report'][1] .= html_print_checkbox_switch( html_print_checkbox_switch(
'non_interactive', 'non_interactive',
1, 1,
$non_interactive_check, $non_interactive_check,
true true
); )
} else { );
$table->data[2][1] = html_print_label_input_block(
__('Non interactive report'),
html_print_checkbox_switch(
'non_interactive',
1,
$non_interactive_check,
true
)
);
}
} }
if (enterprise_installed() === true) { if (enterprise_installed() === true) {
if (is_metaconsole() === true) { $table->data[3][0] = html_print_label_input_block(
$table->data['cover'][0] = __('Generate cover page in PDF render'); __('Generate cover page in PDF render'),
$table->data['cover'][1] = html_print_checkbox_switch( html_print_checkbox_switch(
'cover_page_render', 'cover_page_render',
1, 1,
$cover_page_render, $cover_page_render,
true true
); )
);
$table->data['index'][0] = __('Generate index in PDF render'); $table->data[3][1] = html_print_label_input_block(
$table->data['index'][1] = html_print_checkbox_switch( __('Generate index in PDF render'),
html_print_checkbox_switch(
'index_render', 'index_render',
1, 1,
$index_render, $index_render,
true true
); )
} else { );
$table->data[3][0] = html_print_label_input_block(
__('Generate cover page in PDF render'),
html_print_checkbox_switch(
'cover_page_render',
1,
$cover_page_render,
true
)
);
$table->data[3][1] = html_print_label_input_block(
__('Generate index in PDF render'),
html_print_checkbox_switch(
'index_render',
1,
$index_render,
true
)
);
}
} }
echo '<form class="" method="post">'; echo '<form class="" method="post">';
html_print_table($table); html_print_table($table);

View File

@ -713,13 +713,14 @@ switch ($action) {
$table_aux = new stdClass(); $table_aux = new stdClass();
$table_aux->width = '100%'; $table_aux->width = '100%';
if (is_metaconsole()) { $table_aux->class = 'filter-table-adv';
$table_aux->class = 'databox filters'; $table_aux->size[0] = '30%';
$table_aux->size[1] = '30%';
$table_aux->size[2] = '30%';
$table_aux->colspan[0][0] = 4; $table_aux->data[0][0] = html_print_label_input_block(
$table_aux->data[0][0] = '<b>'.__('Group').'</b>'; __('Group'),
html_print_select_groups(
$table_aux->data[0][1] = html_print_select_groups(
false, false,
$access, $access,
true, true,
@ -737,116 +738,56 @@ switch ($action) {
false, false,
false, false,
'id_grupo' 'id_grupo'
).'<br>'; )
);
$table_aux->data[0][2] = '<b>'.__('Free text for search: '); $table_aux->data[0][1] = html_print_label_input_block(
$table_aux->data[0][2] .= ui_print_help_tip( __('Free text for search: ').ui_print_help_tip(
__('Search by report name or description, list matches.'), __('Search by report name or description, list matches.'),
true true
); ),
$table_aux->data[0][2] .= '</b>'; html_print_input_text(
$table_aux->data[0][3] = html_print_input_text(
__('search'), __('search'),
$search, $search,
'', '',
30, 30,
'', '',
true true
); )
} else { );
$table_aux->class = 'filter-table-adv';
$table_aux->size[0] = '30%';
$table_aux->size[1] = '30%';
$table_aux->size[2] = '30%';
$table_aux->data[0][0] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
$access,
true,
'id_group',
$id_group,
'',
'',
'',
true,
false,
true,
'',
false,
'',
false,
false,
'id_grupo'
)
);
$table_aux->data[0][1] = html_print_label_input_block(
__('Free text for search: ').ui_print_help_tip(
__('Search by report name or description, list matches.'),
true
),
html_print_input_text(
__('search'),
$search,
'',
30,
'',
true
)
);
}
if (is_metaconsole()) {
$table_aux->data[0][6] = html_print_submit_button(
__('Search'),
'search_submit',
false,
'class="sub upd"',
true
);
}
$url_rb = 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder'; $url_rb = 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder';
if (is_metaconsole()) { $searchForm = '<form action="'.$url_rb.'&id_group='.$id_group.'&pure='.$pure.'" method="post">';
$filter = '<form action="'.$url_rb.'&id_group='.$id_group.'&pure='.$pure.'" method="post">'; $searchForm .= html_print_table($table_aux, true);
$filter .= html_print_table($table_aux, true); $searchForm .= html_print_div(
$filter .= '</form>'; [
ui_toggle($filter, __('Show Option')); 'class' => 'action-buttons',
} else { 'content' => html_print_submit_button(
$searchForm = '<form action="'.$url_rb.'&id_group='.$id_group.'&pure='.$pure.'" method="post">'; __('Filter'),
$searchForm .= html_print_table($table_aux, true); 'search_submit',
$searchForm .= html_print_div( false,
[ [
'class' => 'action-buttons', 'mode' => 'mini',
'content' => html_print_submit_button( 'icon' => 'search',
__('Filter'), ],
'search_submit', true
false, ),
[ ],
'mode' => 'mini', true
'icon' => 'search', );
], $searchForm .= '</form>';
true
),
],
true
);
$searchForm .= '</form>';
ui_toggle( ui_toggle(
$searchForm, $searchForm,
'<span class="subsection_header_title">'.__('Filters').'</span>', '<span class="subsection_header_title">'.__('Filters').'</span>',
'filter_form', 'filter_form',
'', '',
false, false,
false, false,
'', '',
'white-box-content', 'white-box-content',
'box-flat white_table_graph fixed_filter_bar' 'box-flat white_table_graph fixed_filter_bar'
); );
}
ui_require_jquery_file('pandora.controls'); ui_require_jquery_file('pandora.controls');
ui_require_jquery_file('ajaxqueue'); ui_require_jquery_file('ajaxqueue');

View File

@ -184,7 +184,7 @@ if (empty($messages) === true) {
$table->size[3] = '80px'; $table->size[3] = '80px';
$table->size[4] = '60px'; $table->size[4] = '60px';
$table->head[5] = html_print_checkbox('all_delete_messages', 0, false, true, false); $table->head[5] = html_print_checkbox('all_delete_messages', 0, false, true, false, 'check_all_checkboxes()');
$table->head[0] = __('Status'); $table->head[0] = __('Status');
if ($show_sent === true) { if ($show_sent === true) {
$table->head[1] = __('Destination'); $table->head[1] = __('Destination');
@ -351,28 +351,14 @@ if (empty($messages) === false) {
<script type="text/javascript"> <script type="text/javascript">
$( document ).ready(function() { function check_all_checkboxes() {
if ($("input[name=all_delete_messages]").prop("checked")) {
$("[name^='delete_multiple']").prop("checked", true);
}
else {
$("[name^='delete_multiple']").prop("checked", false);
}
}
$('[id^=checkbox-delete_multiple_messages]').change(function(){
if($(this).parent().parent().hasClass('checkselected')){
$(this).parent().parent().removeClass('checkselected');
}
else{
$(this).parent().parent().addClass('checkselected');
}
});
$('[id^=checkbox-all_delete_messages]').change(function(){
if ($("#checkbox-all_delete_messages").prop("checked")) {
$('[id^=checkbox-delete_multiple_messages]').parent().parent().addClass('checkselected');
$(".check_delete_messages").prop("checked", true);
}
else{
$('[id^=checkbox-delete_multiple_messages]').parent().parent().removeClass('checkselected');
$(".check_delete_messages").prop("checked", false);
}
});
});
</script> </script>