[Vtigercrm-commits] [vtiger-commits] r10919 - in /vtigercrm/branches/5.0.3: Smarty/templates/ComposeEmail.tpl include/utils/EditViewUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon May 14 15:20:59 EDT 2007
Author: richie
Date: Mon May 14 13:20:49 2007
New Revision: 10919
Log:
* Fixed the issue in mail
Modified:
vtigercrm/branches/5.0.3/Smarty/templates/ComposeEmail.tpl
vtigercrm/branches/5.0.3/include/utils/EditViewUtils.php
Modified: vtigercrm/branches/5.0.3/Smarty/templates/ComposeEmail.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/ComposeEmail.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/ComposeEmail.tpl Mon May 14 13:20:49 2007
@@ -26,8 +26,7 @@
<script type="text/javascript" src="include/fckeditor/fckeditor.js"></script>
</head>
<body marginheight="0" marginwidth="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
-<form name="EditView" method="POST" ENCTYPE="multipart/form-data" action="index.php">
-<input type="hidden" name="form">
+<form name="EditView" method="POST" ENCTYPE="multipart/form-data" action="index.php" onSubmit="return email_validate(this.form,'');">
<input type="hidden" name="send_mail">
<input type="hidden" name="contact_id" value="{$CONTACT_ID}">
<input type="hidden" name="user_id" value="{$USER_ID}">
@@ -38,7 +37,7 @@
<input type="hidden" name="mode" value="{$MODE}">
<input type="hidden" name="action">
<input type="hidden" name="popupaction" value="create">
-<input type="hidden" name="hidden_toid">
+<input type="hidden" name="hidden_toid" id="hidden_toid">
<table class="small mailClient" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
@@ -60,7 +59,7 @@
<tr>
<td class="mailSubHeader" align="right"><b>{$MOD.LBL_TO}</b></td>
<td class="cellText" style="padding: 5px;">
- <input name="{$elements.2.0}" type="hidden" value="{$IDLISTS}">
+ <input name="{$elements.2.0}" id="{$elements.2.0}" type="hidden" value="{$IDLISTS}">
<input type="hidden" name="saved_toid" value="{$TO_MAIL}">
<input id="parent_name" name="parent_name" readonly class="txtBox" type="text" value="{$TO_MAIL}" style="width:99%">
</td>
@@ -78,7 +77,7 @@
<span class="mailClientCSSButton">
<img src="{$IMAGE_PATH}select.gif" alt="{$APP.LBL_SELECT}" title="{$APP.LBL_SELECT}" LANGUAGE=javascript onclick='return window.open("index.php?module="+ document.EditView.parent_type.value +"&action=Popup&html=Popup_picker&form=HelpDeskEditView&popuptype=set_return_emails","test","width=640,height=602,resizable=0,scrollbars=0,top=150,left=200");' align="absmiddle" style='cursor:hand;cursor:pointer'>
- </span><span class="mailClientCSSButton" ><input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="{$APP.LBL_CLEAR}" title="{$APP.LBL_CLEAR}" LANGUAGE=javascript onClick="this.form.parent_id.value=''; this.form.hidden_toid.value='';this.form.parent_name.value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
+ </span><span class="mailClientCSSButton" ><img src="{$IMAGE_PATH}clear_field.gif" alt="{$APP.LBL_CLEAR}" title="{$APP.LBL_CLEAR}" LANGUAGE=javascript onClick="$('parent_id').value=''; $('hidden_toid').value='';$('parent_name').value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
</span>
</td>
</tr>
@@ -132,7 +131,6 @@
<tr>
<td colspan="3" align="center" valign="top" height="320">
{if $WEBMAIL eq 'true' or $RET_ERROR eq 1}
- <input type="hidden" name="from_add" value="{$from_add}">
<textarea style="display: none;" class="detailedViewTextBox" id="description" name="description" cols="90" rows="8">{$DESCRIPTION}</textarea>
{else}
<textarea style="display: none;" class="detailedViewTextBox" id="description" name="description" cols="90" rows="16">{$elements.3.0}</textarea> {/if}
@@ -162,6 +160,10 @@
{literal}
function email_validate(oform,mode)
{
+ if(trim(mode) == '')
+ {
+ return false;
+ }
if(oform.parent_name.value.replace(/^\s+/g, '').replace(/\s+$/g, '').length==0)
{
//alert('No recipients were specified');
@@ -220,10 +222,13 @@
if(mode == 'send')
{
server_check()
- }else
+ }else if(mode == 'save')
{
oform.action.value='Save';
oform.submit();
+ }else
+ {
+ return false;
}
}
//function to extract the mailaddress inside < > symbols.......for the bug fix #3752
Modified: vtigercrm/branches/5.0.3/include/utils/EditViewUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/EditViewUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/EditViewUtils.php Mon May 14 13:20:49 2007
@@ -525,8 +525,10 @@
}
if($value!='')
$filename=' [ '.$value. ' ]';
- $fieldvalue[] = $filename;
- $fieldvalue[] = $value;
+ if($filename != '')
+ $fieldvalue[] = $filename;
+ if($value != '')
+ $fieldvalue[] = $value;
}
$editview_label[]=$mod_strings[$fieldlabel];
}
More information about the vtigercrm-commits
mailing list