[Vtigercrm-commits] [vtiger-commits] r10811 - in /vtigercrm/branches/5.0.3: Smarty/templates/DetailView.tpl modules/Calendar/EditView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sat Apr 28 09:26:18 EDT 2007
Author: richie
Date: Sat Apr 28 07:26:09 2007
New Revision: 10811
Log:
patch autofill account_id for create activity for contact has been integrated. Fixes #3653 --minnie
Modified:
vtigercrm/branches/5.0.3/Smarty/templates/DetailView.tpl
vtigercrm/branches/5.0.3/modules/Calendar/EditView.php
Modified: vtigercrm/branches/5.0.3/Smarty/templates/DetailView.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/DetailView.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/DetailView.tpl Sat Apr 28 07:26:09 2007
@@ -394,17 +394,19 @@
<tr><td> </td></tr>
<tr><td align="left" class="genHeaderSmall">{$APP.LBL_ACTIONS}</td></tr>
<tr><td align="left" style="padding-left:10px;">
- <a href="index.php?module=Calendar&action=EditView&return_module={$MODULE}&return_action=DetailView&activity_mode=Events&return_id={$ID}&parent_id={$ID}&parenttab={$CATEGORY}" class="webMnu"><img src="{$IMAGE_PATH}AddEvent.gif" hspace="5" align="absmiddle" border="0"/></a>
- <a href="index.php?module=Calendar&action=EditView&return_module={$MODULE}&return_action=DetailView&activity_mode=Events&return_id={$ID}&parent_id={$ID}&parenttab={$CATEGORY}" class="webMnu">{$APP.LBL_ADD_NEW} {$APP.Event}</a>
+ {if $MODULE eq 'Contacts'}
+ {assign var=subst value="contact_id"}
+ {assign var=acc value="&account_id=$accountid"}
+ {else}
+ {assign var=subst value="parent_id"}
+ {assign var=acc value=""}
+ {/if}
+ <a href="index.php?module=Calendar&action=EditView&return_module={$MODULE}&return_action=DetailView&activity_mode=Events&return_id={$ID}&{$subst}={$ID}{$acc}&parenttab={$CATEGORY}" class="webMnu"><img src="{$IMAGE_PATH}AddEvent.gif" hspace="5" align="absmiddle" border="0"/></a>
+ <a href="index.php?module=Calendar&action=EditView&return_module={$MODULE}&return_action=DetailView&activity_mode=Events&return_id={$ID}&{$subst}={$ID}{$acc}&parenttab={$CATEGORY}" class="webMnu">{$APP.LBL_ADD_NEW} {$APP.Event}</a>
</td></tr>
<tr><td align="left" style="padding-left:10px;">
- {if $MODULE eq 'Contacts'}
- {assign var=subst value="contact_id"}
- {else}
- {assign var=subst value="parent_id"}
- {/if}
- <a href="index.php?module=Calendar&action=EditView&return_module={$MODULE}&return_action=DetailView&activity_mode=Task&return_id={$ID}&{$subst}={$ID}&parenttab={$CATEGORY}" class="webMnu"><img src="{$IMAGE_PATH}AddToDo.gif" hspace="5" align="absmiddle" border="0"/></a>
- <a href="index.php?module=Calendar&action=EditView&return_module={$MODULE}&return_action=DetailView&activity_mode=Task&return_id={$ID}&{$subst}={$ID}&parenttab={$CATEGORY}" class="webMnu">{$APP.LBL_ADD_NEW} {$APP.Todo}</a></td></tr>
+ <a href="index.php?module=Calendar&action=EditView&return_module={$MODULE}&return_action=DetailView&activity_mode=Task&return_id={$ID}&{$subst}={$ID}{$acc}&parenttab={$CATEGORY}" class="webMnu"><img src="{$IMAGE_PATH}AddToDo.gif" hspace="5" align="absmiddle" border="0"/></a>
+ <a href="index.php?module=Calendar&action=EditView&return_module={$MODULE}&return_action=DetailView&activity_mode=Task&return_id={$ID}&{$subst}={$ID}{$acc}&parenttab={$CATEGORY}" class="webMnu">{$APP.LBL_ADD_NEW} {$APP.Todo}</a></td></tr>
</table>
<br>
{/if}
Modified: vtigercrm/branches/5.0.3/modules/Calendar/EditView.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/EditView.php (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/EditView.php Sat Apr 28 07:26:09 2007
@@ -130,6 +130,8 @@
$smarty->assign("CONTACTSID",$_REQUEST['contact_id']);
$contact_name = getContactName($_REQUEST['contact_id']);
$smarty->assign("CONTACTSNAME",$contact_name);
+ $account_id = $_REQUEST['account_id'];
+ $account_name = getAccountName($account_id);
}
}
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
@@ -166,6 +168,14 @@
}
}
}
+// jread.topik. patch account_id for create contact
+if (strlen($account_name) > 0)
+{
+ $fldlabel_sel['parent_id'][1]='selected';
+ $secondvalue['parent_id'] = $account_id;
+ $value['parent_id'] = $account_name;
+}
+
$format = ($current_user->hour_format == '')?'am/pm':$current_user->hour_format;
$stdate = key($value['date_start']);
$enddate = key($value['due_date']);
More information about the vtigercrm-commits
mailing list