Index: trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php
===================================================================
--- trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php	(revision 208)
+++ trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php	(revision 283)
@@ -58,5 +58,5 @@
 			// Imprime o NavBar
 			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
-			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('List Managers');
+			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Managers');
 			$GLOBALS['phpgw']->common->phpgw_header();
 
@@ -115,5 +115,5 @@
 					$p->set_var('link_edit',$this->row_action('edit','edit_managers',$array_managers[manager_lid],$array_managers[context]));
 					$p->set_var('link_delete',$this->row_action('delete','delete_managers',$array_managers[manager_lid],$array_managers[context]));
-					$p->set_var('link_copy',"<a href='#' onClick='javascript:copy_manager(\"".$array_managers['manager_lid']."\");'>Copiar</a>");
+					$p->set_var('link_copy',"<a href='#' onClick='javascript:copy_manager(\"".$array_managers['manager_lid']."\");'>".lang('Copy')."</a>");
 					$p->fp('rows','row',True);
 				}
@@ -141,5 +141,5 @@
 			// Imprime o NavBar
 			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
-			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Add Managers');
+			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Create manager');
 			$GLOBALS['phpgw']->common->phpgw_header();
 			
@@ -180,4 +180,5 @@
 				'context'				=> $_POST['context'],
 				'app_list'				=> $applications_list,
+				'manager_created'		=> lang('Manager successfully created!'),
 				'options_contexts'		=> $options_context
 			);
@@ -279,5 +280,5 @@
 			// Imprime o NavBar
 			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
-			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Edit Managers');
+			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Edit Manager');
 			$GLOBALS['phpgw']->common->phpgw_header();
 
@@ -304,13 +305,12 @@
 				'type'						=> "edit",
 				'display_manager_select' 	=> 'none',
-				'input_manager_lid_disabled'=> 'disabled',
+				'input_manager_lid_disabled'	=> 'disabled',
 				'error_messages'			=> $_POST['error_messages'] == '' ? '' : '<script language="JavaScript1.3">alert("'.$_POST['error_messages'].'");</script>',
 				'manager_lid'				=> $_POST['manager_lid'],
 				'hidden_manager_lid'		=> $_POST['manager_lid'],
 				'context'					=> $_POST['context'],
-				
+				'manager_salved'		=> lang('Manager successfully salved!'),
 				'input_context_fields'		=> $input_context_fields,
 				'options_contexts'			=> $options_context,
-				
 				'hidden_manager_lid'		=> $hidden_manager_lid,
 				'app_list'					=> $applications_list
@@ -340,79 +340,4 @@
 			echo $p->fp('out','form');
 		}
-		
-		/*
-		function validate()
-		{
-			return 'OK';
-			
-			$accounts = CreateObject('phpgwapi.accounts');
-			$errors = array();
-			
-			
-			// verifica se o manager existe. caso retorne 1 existe e eh uma conta de usuario.
-			$manager_lid_exists = $accounts->exists($_POST['ea_select_managers']);
-			if ($manager_lid_exists != 1)
-			{
-				$_POST['error_messages'] = lang("Manager LID don't exist.");
-				if ($_POST['type'] == 'add')	
-					$this->add_managers();
-				elseif ($_POST['type'] == 'edit')
-					$this->edit_managers();
-				return;
-			}
-			
-			
-			// Verifica se o contexto existe.
-			$dn			= $GLOBALS['phpgw_info']['server']['ldap_root_dn'];
-			$passwd		= $GLOBALS['phpgw_info']['server']['ldap_root_pw'];
-			$ldap_conn	= ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']);
-			ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3);
-			ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0);
-			ldap_bind($ldap_conn,$dn,$passwd);
-	
-			$contexts = split("%", $_POST['context']);
-			
-			foreach ($contexts as $index=>$context)
-			{
-				$sr=@ldap_list($ldap_conn, $context, "cn=*");
-				if (!$sr)
-				{
-					$_POST['error_messages'] = lang("Context don't exist") . ": $context";
-					ldap_close($ldap_conn);
-					if ($_POST['type'] == 'add')	
-						$this->add_managers();
-					elseif ($_POST['type'] == 'edit')
-						$this->edit_managers();
-					return;
-				}
-			}
-			
-			if ($_POST['type'] == 'add')
-			{
-				//Verifica se ja existe o manager com aquele contexto cadastrado
-				$query = "SELECT manager_lid FROM phpgw_expressoadmin WHERE manager_lid = '" . $_POST['ea_select_manager'] . "' AND context = '" . $_POST['context'] . "'"; 				
-				$GLOBALS['phpgw']->db->query($query);
-				$num_registros = 0;
-				while($GLOBALS['phpgw']->db->next_record())
-				{
-					$tmp[] = $GLOBALS['phpgw']->db->row();
-					$num_registros++;
-				}
-				if ($num_registros != 0)
-				{
-					$_POST['error_messages'] = lang('Este Gerente, neste contexto já exite !!');
-					$this->add_managers();
-					return;
-				}
-			}
-			
-			if ($_POST['type'] == 'add')
-				ExecMethod('expressoAdmin1_2.bomanagers.add_managers');
-			elseif ($_POST['type'] == 'edit')
-				ExecMethod('expressoAdmin1_2.bomanagers.edit_managers');
-			
-			return true;
-		}
-		*/
 		
 		function make_lang($ram_lang)
