Index: trunk/expressoMail1_2/preferences.php
===================================================================
--- trunk/expressoMail1_2/preferences.php	(revision 689)
+++ trunk/expressoMail1_2/preferences.php	(revision 1035)
@@ -77,4 +77,37 @@
 		else
 			$GLOBALS['phpgw']->template->set_var('checked_auto_save_draft','');
+
+
+        if($GLOBALS['phpgw_info']['server']['use_assinar_criptografar'])
+		{
+		if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto'])
+			{
+			$GLOBALS['phpgw']->template->set_var('checked_use_signature_digital_cripto','checked');
+			$GLOBALS['phpgw']->template->set_var('display_digital','');
+			$GLOBALS['phpgw']->template->set_var('display_cripto','');
+			}
+		else
+			{
+			$GLOBALS['phpgw']->template->set_var('checked_use_signature_digital','');
+			$GLOBALS['phpgw']->template->set_var('display_digital','style="display: none;"');
+			$GLOBALS['phpgw']->template->set_var('display_cripto','style="display: none;"');
+			}
+
+		if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'])
+			$GLOBALS['phpgw']->template->set_var('checked_use_signature_digital','checked');
+		else
+			$GLOBALS['phpgw']->template->set_var('checked_use_signature_digital','');
+		if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'])
+			$GLOBALS['phpgw']->template->set_var('checked_use_signature_cripto','checked');
+		else
+			$GLOBALS['phpgw']->template->set_var('checked_use_signature_cripto','');
+		}
+		else
+		{
+			$GLOBALS['phpgw']->template->set_var('display_digital','style="display: none;"');
+			$GLOBALS['phpgw']->template->set_var('display_cripto','style="display: none;"');
+			$GLOBALS['phpgw']->template->set_var('display_digital_cripto','style="display: none;"');
+		}
+
 
 		// Insert new expressoMail preference use_signature: defines if the signature will be automatically inserted
@@ -223,4 +256,19 @@
 			$GLOBALS['phpgw']->preferences->add('expressoMail','auto_save_draft',$_POST['auto_save_draft']);	
 
+        if($GLOBALS['phpgw_info']['server']['use_assinar_criptografar'])
+		{
+		if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto'])
+			$GLOBALS['phpgw']->preferences->change('expressoMail','use_signature_digital_cripto',$_POST['use_signature_digital_cripto']);
+		else
+			$GLOBALS['phpgw']->preferences->add('expressoMail','use_signature_digital_cripto',$_POST['use_signature_digital_cripto']);
+		if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'])
+			$GLOBALS['phpgw']->preferences->change('expressoMail','use_signature_digital',$_POST['use_signature_digital']);
+		else
+			$GLOBALS['phpgw']->preferences->add('expressoMail','use_signature_digital',$_POST['use_signature_digital']);
+		if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'])
+			$GLOBALS['phpgw']->preferences->change('expressoMail','use_signature_cripto',$_POST['use_signature_cripto']);
+		else
+			$GLOBALS['phpgw']->preferences->add('expressoMail','use_signature_cripto',$_POST['use_signature_cripto']);
+		}
 		// Insert new expressoMail preference use_signature: defines if the signature will be automatically inserted
 		// at the e-mail body
@@ -312,9 +360,14 @@
 	$GLOBALS['phpgw']->template->set_var('lang_type_signature',lang('Signature type'));
 	$GLOBALS['phpgw']->template->set_var('big',lang('Big'));
+    //$GLOBALS['phpgw']->template->set_var('lang_use_signature_digital_cripto',lang('Possibilitar <b>assinar/criptografar</b> digitalmente a mensagem?'));
+	$GLOBALS['phpgw']->template->set_var('lang_use_signature_digital_cripto',lang('Enable digitally sign/cipher the message?'));
+	$GLOBALS['phpgw']->template->set_var('lang_use_signature_digital',lang('Always sign message digitally?'));
+	$GLOBALS['phpgw']->template->set_var('lang_use_signature_cripto',lang('Always cipher message digitally?'));
+	$GLOBALS['phpgw']->template->set_var('lang_use_signature',lang('Insert signature automatically in new messages?'));
+	$GLOBALS['phpgw']->template->set_var('lang_signature',lang('Signature'));
 	$GLOBALS['phpgw']->template->set_var('lang_Would_you_like_to_keep_archived_messages_?',lang('Would you like to keep archived messages?'));
 	$GLOBALS['phpgw']->template->set_var('lang_Yes',lang('Yes'));
 	$GLOBALS['phpgw']->template->set_var('lang_No',lang('No'));
 	$GLOBALS['phpgw']->template->set_var('lang_Would_you_like_to_use_local_messages_?',lang('Would you like to use local messages?'));
-	$GLOBALS['phpgw']->template->set_var('lang_use_signature',lang('Insert signature automatically in new messages?'));
 
 	$boemailadmin	= CreateObject('emailadmin.bo');
