2010-05-17 Sergio Martin <sergio.martin@artica.es>

* godmode/setup/gis_step_2.php
	godmode/setup/gis.php: Created error and
	successfuly messages when create, update or
	delete a map connection for bug 2994197



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2736 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2010-05-17 08:13:41 +00:00
parent 804158a672
commit f2bc4f573c
2 changed files with 28 additions and 5 deletions

View File

@ -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 '<h3 class="suc">'.__('Successfully updated').'</h3>';
else
echo '<h3 class="error">'.__('Could not be updated').'</h3>';
break;
case 'save_map_connection':
if(!$errorfill)
echo '<h3 class="suc">'.__('Successfully created').'</h3>';
else
echo '<h3 class="error">'.__('Could not be created').'</h3>';
break;
case 'delete_connection':
$idConnectionMap = get_parameter('id_connection_map');
deleteMapConnection($idConnectionMap);
$result = deleteMapConnection($idConnectionMap);
if($result === false)
echo '<h3 class="error">'.__('Could not be deleted').'</h3>';
else
echo '<h3 class="suc">'.__('Successfully deleted').'</h3>';
break;
}
$table->width = '500px';

View File

@ -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;