Bulks masive visual action buttons
This commit is contained in:
parent
0ae7630714
commit
665976e011
|
@ -270,7 +270,7 @@ $agents_with_templates_json = json_encode($agents_with_templates_json);
|
|||
|
||||
echo "<input type='hidden' id='hidden-agents_with_templates' value='$agents_with_templates_json'>";
|
||||
|
||||
attachActionButton('add', 'create', $table->width);
|
||||
attachActionButton('add', 'create', $table->width, false, $SelectAction);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ $table->data[2][3] = '';
|
|||
echo '<form method="post" id="form_alerts" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=add_alerts">';
|
||||
html_print_table($table);
|
||||
|
||||
attachActionButton('add', 'add', $table->width);
|
||||
attachActionButton('add', 'add', $table->width, false, $SelectAction);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ array_push($table->data, $data);
|
|||
|
||||
html_print_table($table);
|
||||
|
||||
attachActionButton('create_profiles', 'update', $table->width);
|
||||
attachActionButton('create_profiles', 'update', $table->width, false, $SelectAction);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ echo '<legend><span>'.__('To agent(s)').'</span></legend>';
|
|||
html_print_table($table);
|
||||
echo '</fieldset>';
|
||||
|
||||
attachActionButton('do_operation', 'copy', $table->width);
|
||||
attachActionButton('do_operation', 'copy', $table->width, false, $SelectAction);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
@ -298,7 +298,7 @@ $agents_with_templates_json = json_encode($agents_with_templates_json);
|
|||
|
||||
echo "<input type='hidden' id='hidden-agents_with_templates' value='".$agents_with_templates_json."'>";
|
||||
|
||||
attachActionButton('delete', 'delete', $table->width);
|
||||
attachActionButton('delete', 'delete', $table->width, false, $SelectAction);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ $params = [
|
|||
echo get_table_inputs_masive_agents($params);
|
||||
|
||||
if (is_metaconsole() === true || is_management_allowed() === true) {
|
||||
attachActionButton('delete', 'delete', '100%');
|
||||
attachActionButton('delete', 'delete', '100%', false, $SelectAction);
|
||||
}
|
||||
|
||||
echo '</form>';
|
||||
|
|
|
@ -358,7 +358,7 @@ $table->data[2][3] = html_print_select([], 'module[]', '', false, '', '', true,
|
|||
echo '<form method="post" id="form_alerts" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_alerts" >';
|
||||
html_print_table($table);
|
||||
|
||||
attachActionButton('delete', 'delete', $table->width);
|
||||
attachActionButton('delete', 'delete', $table->width, false, $SelectAction);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
@ -583,7 +583,7 @@ $table->data['form_agents_3'][3] = html_print_select(
|
|||
echo '<form method="post" id="form_modules" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_modules" >';
|
||||
html_print_table($table);
|
||||
|
||||
attachActionButton('delete', 'delete', $table->width);
|
||||
attachActionButton('delete', 'delete', $table->width, false, $SelectAction);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ array_push($table->data, $data);
|
|||
|
||||
html_print_table($table);
|
||||
|
||||
attachActionButton('delete_profiles', 'delete', $table->width);
|
||||
attachActionButton('delete_profiles', 'delete', $table->width, false, $SelectAction);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
@ -1257,7 +1257,7 @@ echo '<h3 class="error invisible" id="message"> </h3>';
|
|||
|
||||
html_print_input_hidden('id_agente', $id_agente);
|
||||
|
||||
attachActionButton('update_agents', 'update', $table->width);
|
||||
attachActionButton('update_agents', 'update', $table->width, false, $SelectAction);
|
||||
|
||||
// Shown and hide div.
|
||||
echo '</div></form>';
|
||||
|
|
|
@ -1265,7 +1265,7 @@ $table->data['edit1'][1] = '<table width="100%">';
|
|||
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_modules" id="form_edit">';
|
||||
html_print_table($table);
|
||||
|
||||
attachActionButton('update', 'update', $table->width);
|
||||
attachActionButton('update', 'update', $table->width, false, $SelectAction);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
@ -391,7 +391,7 @@ echo '<form method="POST" id="form-massive_plugin_edition"
|
|||
|
||||
html_print_table($table);
|
||||
|
||||
attachActionButton('update', 'update', $table->width);
|
||||
attachActionButton('update', 'update', $table->width, false, $SelectAction);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
@ -556,7 +556,7 @@ echo sprintf(
|
|||
);
|
||||
echo '</div>';
|
||||
|
||||
attachActionButton('edit_users', 'update', '100%');
|
||||
attachActionButton('edit_users', 'update', '100%', false, $SelectAction);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
@ -443,29 +443,26 @@ if (is_management_allowed() === false) {
|
|||
);
|
||||
}
|
||||
|
||||
echo '<br />';
|
||||
echo '<form method="post" id="form_options" action="'.$url.'">';
|
||||
echo '<table border="0"><tr><td>';
|
||||
echo __('Action');
|
||||
echo '</td><td>';
|
||||
html_print_select(
|
||||
$tip = '';
|
||||
if ($option === 'edit_agents' || $option === 'edit_modules') {
|
||||
$tip = ui_print_help_tip(__('The blank fields will not be updated'), true);
|
||||
}
|
||||
|
||||
$SelectAction = '<form method="post" id="form_options" action="'.$url.'">';
|
||||
$SelectAction .= '<span class="mrgn_lft_10px mrgn_right_10px">'._('Action').'</span>';
|
||||
$SelectAction .= html_print_select(
|
||||
$options,
|
||||
'option',
|
||||
$option,
|
||||
'this.form.submit()',
|
||||
'',
|
||||
0,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
);
|
||||
if ($option === 'edit_agents' || $option === 'edit_modules') {
|
||||
ui_print_help_tip(__('The blank fields will not be updated'));
|
||||
}
|
||||
).$tip;
|
||||
|
||||
echo '</td></tr></table>';
|
||||
echo '</form>';
|
||||
echo '<br />';
|
||||
$SelectAction .= '</form>';
|
||||
|
||||
switch ($option) {
|
||||
case 'delete_alerts':
|
||||
|
|
|
@ -50,13 +50,23 @@ echo '<form action="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2" method="
|
|||
switch ($action) {
|
||||
case 'create_connection_map':
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
ui_print_standard_header(
|
||||
__('Create new map connection'),
|
||||
'',
|
||||
false,
|
||||
'map_connection_tab',
|
||||
true,
|
||||
$buttons
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Setup'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Setup').' - '.__('Gis'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$mapConnection_name = '';
|
||||
|
@ -77,13 +87,23 @@ switch ($action) {
|
|||
|
||||
case 'edit_connection_map':
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
ui_print_standard_header(
|
||||
__('Edit map connection'),
|
||||
'',
|
||||
false,
|
||||
'map_connection_tab',
|
||||
true,
|
||||
$buttons
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Setup'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Setup').' - '.__('Gis'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$idConnectionMap = get_parameter('id_connection_map');
|
||||
|
|
|
@ -43,7 +43,8 @@ function attachActionButton(
|
|||
string $action,
|
||||
string $buttonAction,
|
||||
string $tableWidth,
|
||||
bool $return=false
|
||||
bool $return=false,
|
||||
string $SelectAction=''
|
||||
) {
|
||||
switch ($buttonAction) {
|
||||
case 'add':
|
||||
|
@ -88,7 +89,7 @@ function attachActionButton(
|
|||
['icon' => $class],
|
||||
true
|
||||
),
|
||||
[],
|
||||
['right_content' => $SelectAction],
|
||||
$return
|
||||
);
|
||||
}
|
||||
|
|
|
@ -75,6 +75,10 @@ function menu_print_menu(&$menu)
|
|||
} else {
|
||||
$sec2 = 'operation/gis_maps/gis_map';
|
||||
}
|
||||
} else if ($sec2 === 'enterprise/godmode/servers/manage_export_form') {
|
||||
$sec2 = 'enterprise/godmode/servers/manage_export';
|
||||
} else if ($sec2 === 'godmode/setup/gis_step_2') {
|
||||
$sec2 = 'godmode/setup/setup§ion=gis';
|
||||
} else if ($sec2 === 'operation/gis_maps/render_view') {
|
||||
$map_id = (int) get_parameter('map_id');
|
||||
if (empty($map_id) === false) {
|
||||
|
|
Loading…
Reference in New Issue