Index: /branches/2.2/contactcenter/inc/hook_settings.inc.php
===================================================================
--- /branches/2.2/contactcenter/inc/hook_settings.inc.php	(revision 5105)
+++ /branches/2.2/contactcenter/inc/hook_settings.inc.php	(revision 5105)
@@ -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: anches/2.2/contactcenter/templates/classic/preferences.tpl
===================================================================
--- /branches/2.2/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>
Index: anches/2.2/contactcenter/templates/default/preferences.tpl
===================================================================
--- /branches/2.2/contactcenter/templates/default/preferences.tpl	(revision 1600)
+++ 	(revision )
@@ -1,99 +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>
-	<br>
-	<p align="center" style="font-weight: bold; font-size: medium; border: 0px solid black">Preferências de Visualização</p>
-	<table align="center" style="width: 400px">
-		<tr class="th">
-			<td style="text-align: center; font-weight: bold; width: 200px">Campo</td>
-			<td style="text-align: center; font-weight: bold; width: 200px">{lang_Value}</td>
-		</tr>
-		<tr class="row_off">
-			<td>Matrícula</td>
-			<td align="center">
-				<input type="checkbox" name="empNum" {empNum} />
-			</td>
-		</tr>
-		<tr class="row_off">
-			<td>Celular</td>
-			<td align="center">
-				<input type="checkbox" name="cell" {cell} />
-			</td>
-		</tr>
-		<tr class="row_off">
-			<td>Setor</td>
-			<td align="center">
-				<input type="checkbox" name="department" {department} />
-			</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>
