diff --git a/pandora_console/godmode/setup/gis.php b/pandora_console/godmode/setup/gis.php index 4fd2c75540..aa497db1f1 100755 --- a/pandora_console/godmode/setup/gis.php +++ b/pandora_console/godmode/setup/gis.php @@ -33,10 +33,29 @@ print_page_header (__('Map conections GIS'), "", false, "setup_gis_index", true) $action = get_parameter('action'); -if ($action == 'delete_connection') { - $idConnectionMap = get_parameter('id_connection_map'); +switch ($action) { + case 'save_edit_map_connection': + if(!$errorfill) + echo '

'.__('Successfully updated').'

'; + else + echo '

'.__('Could not be updated').'

'; + break; + case 'save_map_connection': + if(!$errorfill) + echo '

'.__('Successfully created').'

'; + else + echo '

'.__('Could not be created').'

'; + break; + case 'delete_connection': + $idConnectionMap = get_parameter('id_connection_map'); - deleteMapConnection($idConnectionMap); + $result = deleteMapConnection($idConnectionMap); + + if($result === false) + echo '

'.__('Could not be deleted').'

'; + else + echo '

'.__('Successfully deleted').'

'; + break; } $table->width = '500px'; diff --git a/pandora_console/godmode/setup/gis_step_2.php b/pandora_console/godmode/setup/gis_step_2.php index 11e5ce7be4..aed844fb33 100755 --- a/pandora_console/godmode/setup/gis_step_2.php +++ b/pandora_console/godmode/setup/gis_step_2.php @@ -109,8 +109,8 @@ switch ($action) { $mapConnection_Image_url= get_parameter('url'); $bb_left= get_parameter('bb_left'); $bb_right= get_parameter('bb_right'); - $bb_bottom= get_parameter('bb_bottom'); $bb_top= get_parameter('bb_top'); + $bb_bottom= get_parameter('bb_bottom'); $image_height= get_parameter('image_height'); $image_width= get_parameter('image_width'); $mapConnectionData = array('type' => 'Static_Image', @@ -124,7 +124,7 @@ switch ($action) { ); break; } - + //TODO VALIDATE PARAMETERS if ($mapConnection_name != "" && $mapConnection_type != ""){ saveMapConnection($mapConnection_name, $mapConnection_group, @@ -133,7 +133,11 @@ switch ($action) { $mapConnection_defaultAltitude, $mapConnection_centerLatitude, $mapConnection_centerLongitude, $mapConnection_centerAltitude, $mapConnectionData, $idConnectionMap); + + $errorfill = false; } + else + $errorfill = true; require_once('gis.php'); return;