[Vtigercrm-commits] [vtiger-commits] r5941 - in /vtigercrm/trunk: Smarty/templates/Emails.tpl modules/Emails/EditView.php modules/Emails/mailsend.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sat May 13 06:24:07 EDT 2006
Author: don
Date: Sat May 13 04:24:01 2006
New Revision: 5941
Log:
send forward email has been integrated
Modified:
vtigercrm/trunk/Smarty/templates/Emails.tpl
vtigercrm/trunk/modules/Emails/EditView.php
vtigercrm/trunk/modules/Emails/mailsend.php
Modified: vtigercrm/trunk/Smarty/templates/Emails.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Emails.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Emails.tpl Sat May 13 04:24:01 2006
@@ -220,10 +220,18 @@
<script>
function OpenCompose(id,mode)
{ldelim}
- if(id != '')
- url = 'index.php?module=Emails&action=EmailsAjax&file=EditView&record='+id;
- else
- url = 'index.php?module=Emails&action=EmailsAjax&file=EditView';
+ switch(mode)
+ {ldelim}
+ case 'edit':
+ url = 'index.php?module=Emails&action=EmailsAjax&file=EditView&record='+id;
+ break;
+ case 'create':
+ url = 'index.php?module=Emails&action=EmailsAjax&file=EditView';
+ break;
+ case 'forward':
+ url = 'index.php?module=Emails&action=EmailsAjax&file=EditView&record='+id+'&forward=true';
+ break;
+ {rdelim}
openPopUp('xComposeEmail',this,url,'createemailWin',775,652,'menubar=no,toolbar=no,location=no,status=no,resizable=no');
{rdelim}
</script>
Modified: vtigercrm/trunk/modules/Emails/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/EditView.php (original)
+++ vtigercrm/trunk/modules/Emails/EditView.php Sat May 13 04:24:01 2006
@@ -55,15 +55,20 @@
$focus->id = $_REQUEST['record'];
$focus->mode = 'edit';
$focus->retrieve_entity_info($_REQUEST['record'],"Emails");
- $query = 'select idlists,from_email,to_email,cc_email,bcc_email from emaildetails where emailid ='.$focus->id;
- $result = $adb->query($query);
- $smarty->assign('FROM_MAIL',$adb->query_result($result,0,'from_email'));
- $to_email = ereg_replace('###',',',$adb->query_result($result,0,'to_email'));
- $smarty->assign('TO_MAIL',$to_email);
- $smarty->assign('CC_MAIL',ereg_replace('###',',',$adb->query_result($result,0,'cc_email')));
- $smarty->assign('BCC_MAIL',ereg_replace('###',',',$adb->query_result($result,0,'bcc_email')));
- $smarty->assign('IDLISTS',ereg_replace('###',',',$adb->query_result($result,0,'idlists')));
-
+ if(isset($_REQUEST['forward']) && $_REQUEST['forward'] != '')
+ {
+ $focus->mode = '';
+ }else
+ {
+ $query = 'select idlists,from_email,to_email,cc_email,bcc_email from emaildetails where emailid ='.$focus->id;
+ $result = $adb->query($query);
+ $smarty->assign('FROM_MAIL',$adb->query_result($result,0,'from_email'));
+ $to_email = ereg_replace('###',',',$adb->query_result($result,0,'to_email'));
+ $smarty->assign('TO_MAIL',$to_email);
+ $smarty->assign('CC_MAIL',ereg_replace('###',',',$adb->query_result($result,0,'cc_email')));
+ $smarty->assign('BCC_MAIL',ereg_replace('###',',',$adb->query_result($result,0,'bcc_email')));
+ $smarty->assign('IDLISTS',ereg_replace('###',',',$adb->query_result($result,0,'idlists')));
+ }
$log->info("Entity info successfully retrieved for EditView.");
$focus->name=$focus->column_fields['name'];
}
Modified: vtigercrm/trunk/modules/Emails/mailsend.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/mailsend.php (original)
+++ vtigercrm/trunk/modules/Emails/mailsend.php Sat May 13 04:24:01 2006
@@ -107,7 +107,7 @@
{
//handle the mail send to users
$emailadd = $adb->query_result($adb->query("select email1 from users where id=$mycrmid"),0,'email1');
- $mail_status = send_mail('Emails',$emailadd,$current_user->user_name,'',$focus->column_fields['subject'],$focus->column_fields['description'],'','','all',$focus->id);
+ $mail_status = send_mail('Emails',$emailadd,$current_user->user_name,'',$focus->column_fields['subject'],$_REQUEST['description'],'','','all',$focus->id);
$all_to_emailids []= $emailadd;
$mail_status_str .= $emailadd."=".$mail_status."&&&";
}
More information about the vtigercrm-commits
mailing list