Index: /trunk/contactcenter/setup/setup.inc.php
===================================================================
--- /trunk/contactcenter/setup/setup.inc.php	(revision 5298)
+++ /trunk/contactcenter/setup/setup.inc.php	(revision 6140)
@@ -38,4 +38,5 @@
 	$setup_info['contactcenter']['hooks'][] = 'config_validate';
 	$setup_info['contactcenter']['hooks'][] = 'sidebox_menu';
+	$setup_info['contactcenter']['hooks'][] = 'settings';
 	
 	/* ContactCenter Tables */
Index: /trunk/contactcenter/inc/hook_preferences.inc.php
===================================================================
--- /trunk/contactcenter/inc/hook_preferences.inc.php	(revision 1409)
+++ /trunk/contactcenter/inc/hook_preferences.inc.php	(revision 6140)
@@ -17,6 +17,6 @@
 	$title = $appname;
 	$file = Array(
-		'Preferences'   => $GLOBALS['phpgw']->link('/index.php','menuaction=contactcenter.ui_preferences.index'),
-		'Grant Access'  => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
+		'Preferences'	=> $GLOBALS['phpgw']->link('/preferences/preferences.php','appname='.$appname),
+		'Grant Access'	=> $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
 		//'Edit Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app='.$appname . '&cats_level=True&global_cats=True')
 	);
Index: /trunk/contactcenter/inc/class.ui_preferences.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.ui_preferences.inc.php	(revision 5912)
+++ /trunk/contactcenter/inc/class.ui_preferences.inc.php	(revision 6140)
@@ -20,101 +20,5 @@
 			'set_preferences' => true,
 		);
-		
-		function index()
-		{
-			$GLOBALS['phpgw_info']['flags']['app_header'] = lang('ContactCenter').' - '.lang('Preferences');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
 
-			$GLOBALS['phpgw']->template->set_file(array('pref' => 'preferences.tpl'));
-
-			/* Get Saved Preferences */
-			$actual = $this->get_preferences();
-			
-			/* Get the catalog options */
-			$pCatalog = CreateObject('contactcenter.bo_people_catalog');
-			$types = $pCatalog->get_all_connections_types();
-			
-			if (is_array($types))
-			{
-				$options_email = '';
-				foreach($types as $id => $name)
-				{
-					$options_email .= '<option value="'.$id.'"';
-					
-					if ($actual['personCardEmail'] == $id)
-					{
-						$options_email .= ' selected ';
-					}
-				
-					$options_email .= '>'.$name."</option>\n";
-				}
-			
-				$options_phone = '';
-				foreach($types as $id => $name)
-				{
-					$options_phone .= '<option value="'.$id.'"';
-					
-					if ($actual['personCardPhone'] == $id)
-					{
-						$options_phone .= ' selected ';
-					}
-				
-					$options_phone .= '>'.$name."</option>\n";
-				}
-			}
-			else
-			{
-				$options_email = '';
-				$options_phone = '';
-			}
-			
-			if ($actual['displayConnector'] or !$actual['displayConnectorDefault'])
-			{
-				$GLOBALS['phpgw']->template->set_var('displayConnector', 'checked');
-			}
-			else
-			{
-				$GLOBALS['phpgw']->template->set_var('displayConnector', '');
-			}
-			
-			if ($actual['empNum'])
-			{
-				$GLOBALS['phpgw']->template->set_var('empNum', 'checked');
-			}
-			else
-			{
-				$GLOBALS['phpgw']->template->set_var('empNum', '');
-			}
-
-			if ($actual['cell'])
-			{
-				$GLOBALS['phpgw']->template->set_var('cell', 'checked');
-			}
-			else
-			{
-				$GLOBALS['phpgw']->template->set_var('cell', '');
-			}
-
-			if ($actual['department'])
-			{
-				$GLOBALS['phpgw']->template->set_var('department', 'checked');
-			}
-			else
-			{
-				$GLOBALS['phpgw']->template->set_var('department', '');
-			}
-
-			$GLOBALS['phpgw']->template->set_var('personCardEmail', $options_email);
-			$GLOBALS['phpgw']->template->set_var('personCardPhone', $options_phone);
-
-			/* Translate the fields */
-			$this->translate('pref');
-
-			$GLOBALS['phpgw']->template->set_var('form_action', $GLOBALS['phpgw']->link('/index.php', 'menuaction=contactcenter.ui_preferences.set_preferences'));
-
-			$GLOBALS['phpgw']->template->pparse('out', 'pref');
-		}
-		
 		function translate($handle)
 		{
Index: /trunk/contactcenter/inc/hook_settings.inc.php
===================================================================
--- /trunk/contactcenter/inc/hook_settings.inc.php	(revision 6140)
+++ /trunk/contactcenter/inc/hook_settings.inc.php	(revision 6140)
@@ -0,0 +1,54 @@
+<?php
+/**************************************************************************\
+* eGroupWare - Contactcenter Preferences                                   *
+* http://www.expressolivre.org                                             *	
+* Modified by Alexandre Correia <alexandrecorreia@celepar.pr.gov.br> 	   *
+* --------------------------------------------                             *
+*  This program is free software; you can redistribute it and/or modify it *
+*  under the terms of the GNU General Public License as published by the   *
+*  Free Software Foundation; either version 2 of the License, or (at your  *
+*  option)                                                                 *
+\**************************************************************************/
+
+if(!isset($GLOBALS['phpgw_info'])){
+	$GLOBALS['phpgw_info']['flags'] = array(
+		'currentapp' => 'contactcenter',
+		'nonavbar'   => true,
+		'noheader'   => true
+	);
+}
+
+require_once '../header.inc.php';
+
+$pCatalog			= CreateObject('contactcenter.bo_people_catalog');
+$typesConnections	= $pCatalog->get_all_connections_types();
+
+$preferences	= CreateObject('contactcenter.ui_preferences');
+$actual 		= $preferences->get_preferences();
+
+// Section Cards Visualization Preferences;
+create_section("Cards Visualization Preferences");
+
+$defaultConnections = array();
+if(is_array($typesConnections))
+{
+	foreach( $typesConnections as $key => $value)
+	{
+		$defaultConnections[$key] = $value;
+	}
+}
+
+// Default Person Email Type
+create_select_box('Default Person Email Type', 'personCardEmail', $defaultConnections);
+//Default Person Telephone Type
+create_select_box('Default Person Telephone Type', 'personCardPhone', $defaultConnections);
+
+// Section Connector Setup;
+create_section("Connector Setup");
+create_check_box('Display Connector Client-Server Status Information?','displayConnector',$actual['displayConnector']);
+
+// Section Display Preferences;
+create_section("Display Preferences");
+create_check_box('Registration','empNum', $actual['empNum']);
+create_check_box('Cellphone','cell',$actual['cell']);
+create_check_box('Sector','department',$actual['department']);
Index: unk/contactcenter/templates/classic/preferences.tpl
===================================================================
--- /trunk/contactcenter/templates/classic/preferences.tpl	(revision 2)
+++ 	(revision )
@@ -1,66 +1,0 @@
-<!--
-	ContactCenter Preferences TPL File
-	Copyright (C) 2004 - Raphael Derosso Pereira 
-	(raphaelpereira@users.sourceforge.net)
-	
-	This file is licensed under the terms of th GNU GPL
-	version 2 or above
--->
-
-<form method="POST" action="{form_action}">
-<div id="cc_pref_cards" style="width: 100%; border: 0px solid black">
-	<p align="center" style="font-weight: bold; font-size: medium; border: 0px solid black">{lang_Cards_Visualization_Preferences}</p>
-	<table align="center" style="width: 400px">
-		<tr class="th">
-			<td style="text-align: center; font-weight: bold">{lang_Option}</td>
-			<td style="text-align: center; font-weight: bold">{lang_Value}</td>
-		</tr>
-		<tr class="row_off">
-			<td>{lang_Default_Person_Email_Type}</td>
-			<td>
-				<select name="personCardEmail" style="width: 200px">
-					<option selected value="_NONE_">{lang_Choose_Email_Type...}</option>
-					{personCardEmail}
-				</select>
-			</td>
-		</tr>
-		<tr class="row_on">
-			<td>{lang_Default_Person_Telephone_Type}</td>
-			<td>
-				<select name="personCardPhone" style="width: 200px">
-					<option selected value="_NONE_">{lang_Choose_Telephone_Type...}</option>
-					{personCardPhone}
-				</select>
-			</td>
-		</tr>
-		<tr>
-			<td></td>
-			<td style="text-align: right;">
-				<input type="submit" name="save" value="{lang_Save}">
-				<input type="button" name="cancel" value="{lang_Cancel}" onclick="window.back()">
-			</td>
-		</tr>
-	</table>
-	<br>
-	<p align="center" style="font-weight: bold; font-size: medium; border: 0px solid black">{lang_Connector_Setup}</p>
-	<table align="center" style="width: 400px">
-		<tr class="th">
-			<td style="text-align: center; font-weight: bold; width: 200px">{lang_Option}</td>
-			<td style="text-align: center; font-weight: bold; width: 200px">{lang_Value}</td>
-		</tr>
-		<tr class="row_off">
-			<td>{lang_Display_Connector_Client-Server_Status_Information?}</td>
-			<td align="center">
-				<input type="checkbox" name="displayConnector" {displayConnector} />
-			</td>
-		</tr>
-		<tr>
-			<td></td>
-			<td style="text-align: right;">
-				<input type="submit" name="save" value="{lang_Save}">
-				<input type="button" name="cancel" value="{lang_Cancel}" onclick="window.back()">
-			</td>
-		</tr>
-	</table>
-</div>
-</form>
