@@ -40,13 +40,13 @@ discard block |
||
40 | 40 | |
41 | 41 | |
42 | 42 | function additionalDetailsLead($fields) { |
43 | - static $mod_strings; |
|
44 | - if(empty($mod_strings)) { |
|
45 | - global $current_language; |
|
46 | - $mod_strings = return_module_language($current_language, 'Leads'); |
|
47 | - } |
|
43 | + static $mod_strings; |
|
44 | + if(empty($mod_strings)) { |
|
45 | + global $current_language; |
|
46 | + $mod_strings = return_module_language($current_language, 'Leads'); |
|
47 | + } |
|
48 | 48 | |
49 | - $overlib_string = ''; |
|
49 | + $overlib_string = ''; |
|
50 | 50 | if(!empty($fields['ID'])) { |
51 | 51 | $overlib_string .= '<input type="hidden" value="'. $fields['ID']; |
52 | 52 | $overlib_string .= '">'; |
@@ -55,39 +55,39 @@ discard block |
||
55 | 55 | $overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName=' . SugarThemeRegistry::current()->name .'&imageName=Leads.gif"/> '.$mod_strings['LBL_CONTACT'].'</h2>'; |
56 | 56 | |
57 | 57 | if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) || |
58 | - !empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) || |
|
59 | - !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) |
|
60 | - $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
61 | - if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
62 | - if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
63 | - if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
64 | - if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
65 | - if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
66 | - if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) |
|
67 | - $overlib_string .= '<br>'; |
|
68 | - if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
69 | - if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
70 | - if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
71 | - if(!empty($fields['LEAD_SOURCE'])) $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>'; |
|
58 | + !empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) || |
|
59 | + !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) |
|
60 | + $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
61 | + if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
62 | + if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
63 | + if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
64 | + if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
65 | + if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
66 | + if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) |
|
67 | + $overlib_string .= '<br>'; |
|
68 | + if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
69 | + if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
70 | + if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
71 | + if(!empty($fields['LEAD_SOURCE'])) $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>'; |
|
72 | 72 | |
73 | - if(!empty($fields['EMAIL2'])) |
|
74 | - $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . |
|
75 | - "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" . |
|
76 | - "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" . |
|
77 | - "={$fields['FIRST_NAME']} {$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" . |
|
78 | - "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") . |
|
79 | - "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>"; |
|
73 | + if(!empty($fields['EMAIL2'])) |
|
74 | + $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . |
|
75 | + "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" . |
|
76 | + "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" . |
|
77 | + "={$fields['FIRST_NAME']} {$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" . |
|
78 | + "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") . |
|
79 | + "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>"; |
|
80 | 80 | |
81 | - if(!empty($fields['DESCRIPTION'])) { |
|
82 | - $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
|
83 | - if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
84 | - } |
|
81 | + if(!empty($fields['DESCRIPTION'])) { |
|
82 | + $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
|
83 | + if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
84 | + } |
|
85 | 85 | |
86 | - return array('fieldToAddTo' => 'NAME', |
|
87 | - 'string' => $overlib_string, |
|
88 | - 'editLink' => "index.php?action=EditView&module=Leads&return_module=Leads&record={$fields['ID']}", |
|
89 | - 'viewLink' => "index.php?action=DetailView&module=Leads&return_module=Leads&record={$fields['ID']}"); |
|
86 | + return array('fieldToAddTo' => 'NAME', |
|
87 | + 'string' => $overlib_string, |
|
88 | + 'editLink' => "index.php?action=EditView&module=Leads&return_module=Leads&record={$fields['ID']}", |
|
89 | + 'viewLink' => "index.php?action=DetailView&module=Leads&return_module=Leads&record={$fields['ID']}"); |
|
90 | 90 | } |
91 | 91 | |
92 | - ?> |
|
92 | + ?> |
|
93 | 93 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -41,46 +41,46 @@ discard block |
||
41 | 41 | |
42 | 42 | function additionalDetailsLead($fields) { |
43 | 43 | static $mod_strings; |
44 | - if(empty($mod_strings)) { |
|
44 | + if (empty($mod_strings)) { |
|
45 | 45 | global $current_language; |
46 | 46 | $mod_strings = return_module_language($current_language, 'Leads'); |
47 | 47 | } |
48 | 48 | |
49 | 49 | $overlib_string = ''; |
50 | - if(!empty($fields['ID'])) { |
|
51 | - $overlib_string .= '<input type="hidden" value="'. $fields['ID']; |
|
50 | + if (!empty($fields['ID'])) { |
|
51 | + $overlib_string .= '<input type="hidden" value="'.$fields['ID']; |
|
52 | 52 | $overlib_string .= '">'; |
53 | 53 | } |
54 | 54 | |
55 | - $overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName=' . SugarThemeRegistry::current()->name .'&imageName=Leads.gif"/> '.$mod_strings['LBL_CONTACT'].'</h2>'; |
|
55 | + $overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName='.SugarThemeRegistry::current()->name.'&imageName=Leads.gif"/> '.$mod_strings['LBL_CONTACT'].'</h2>'; |
|
56 | 56 | |
57 | - if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) || |
|
57 | + if (!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) || |
|
58 | 58 | !empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) || |
59 | 59 | !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) |
60 | - $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
61 | - if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
62 | - if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
63 | - if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
64 | - if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
65 | - if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
66 | - if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) |
|
60 | + $overlib_string .= '<b>'.$mod_strings['LBL_PRIMARY_ADDRESS'].'</b><br>'; |
|
61 | + if (!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'].'<br>'; |
|
62 | + if (!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'].', '; |
|
63 | + if (!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'].' '; |
|
64 | + if (!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'].' '; |
|
65 | + if (!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'].'<br>'; |
|
66 | + if (strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) |
|
67 | 67 | $overlib_string .= '<br>'; |
68 | - if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
69 | - if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
70 | - if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
71 | - if(!empty($fields['LEAD_SOURCE'])) $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>'; |
|
68 | + if (!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'.$mod_strings['LBL_MOBILE_PHONE'].'</b> <span class="phone">'.$fields['PHONE_MOBILE'].'</span><br>'; |
|
69 | + if (!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'.$mod_strings['LBL_HOME_PHONE'].'</b> <span class="phone">'.$fields['PHONE_HOME'].'</span><br>'; |
|
70 | + if (!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'.$mod_strings['LBL_OTHER_PHONE'].'</b> <span class="phone">'.$fields['PHONE_OTHER'].'</span><br>'; |
|
71 | + if (!empty($fields['LEAD_SOURCE'])) $overlib_string .= '<b>'.$mod_strings['LBL_LEAD_SOURCE'].'</b> '.$fields['LEAD_SOURCE'].'<br>'; |
|
72 | 72 | |
73 | - if(!empty($fields['EMAIL2'])) |
|
74 | - $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . |
|
75 | - "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" . |
|
76 | - "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" . |
|
77 | - "={$fields['FIRST_NAME']} {$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" . |
|
78 | - "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") . |
|
73 | + if (!empty($fields['EMAIL2'])) |
|
74 | + $overlib_string .= '<b>'.$mod_strings['LBL_OTHER_EMAIL_ADDRESS'].'</b> '. |
|
75 | + "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&". |
|
76 | + "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names". |
|
77 | + "={$fields['FIRST_NAME']} {$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&". |
|
78 | + "to_email_addrs=".urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>"). |
|
79 | 79 | "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>"; |
80 | 80 | |
81 | - if(!empty($fields['DESCRIPTION'])) { |
|
82 | - $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
|
83 | - if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
81 | + if (!empty($fields['DESCRIPTION'])) { |
|
82 | + $overlib_string .= '<b>'.$mod_strings['LBL_DESCRIPTION'].'</b> '.substr($fields['DESCRIPTION'], 0, 300); |
|
83 | + if (strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | return array('fieldToAddTo' => 'NAME', |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -56,31 +58,54 @@ discard block |
||
56 | 58 | |
57 | 59 | if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) || |
58 | 60 | !empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) || |
59 | - !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) |
|
60 | - $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
61 | - if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
62 | - if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
63 | - if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
64 | - if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
65 | - if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
66 | - if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) |
|
67 | - $overlib_string .= '<br>'; |
|
68 | - if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
69 | - if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
70 | - if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
71 | - if(!empty($fields['LEAD_SOURCE'])) $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>'; |
|
61 | + !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) { |
|
62 | + $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
63 | + } |
|
64 | + if(!empty($fields['PRIMARY_ADDRESS_STREET'])) { |
|
65 | + $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
66 | + } |
|
67 | + if(!empty($fields['PRIMARY_ADDRESS_CITY'])) { |
|
68 | + $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
69 | + } |
|
70 | + if(!empty($fields['PRIMARY_ADDRESS_STATE'])) { |
|
71 | + $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
72 | + } |
|
73 | + if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) { |
|
74 | + $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
75 | + } |
|
76 | + if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) { |
|
77 | + $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
78 | + } |
|
79 | + if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) { |
|
80 | + $overlib_string .= '<br>'; |
|
81 | + } |
|
82 | + if(!empty($fields['PHONE_MOBILE'])) { |
|
83 | + $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
84 | + } |
|
85 | + if(!empty($fields['PHONE_HOME'])) { |
|
86 | + $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
87 | + } |
|
88 | + if(!empty($fields['PHONE_OTHER'])) { |
|
89 | + $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
90 | + } |
|
91 | + if(!empty($fields['LEAD_SOURCE'])) { |
|
92 | + $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>'; |
|
93 | + } |
|
72 | 94 | |
73 | - if(!empty($fields['EMAIL2'])) |
|
74 | - $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . |
|
95 | + if(!empty($fields['EMAIL2'])) { |
|
96 | + $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . |
|
75 | 97 | "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" . |
76 | 98 | "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" . |
77 | 99 | "={$fields['FIRST_NAME']} {$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" . |
78 | 100 | "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") . |
79 | 101 | "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>"; |
102 | + } |
|
80 | 103 | |
81 | 104 | if(!empty($fields['DESCRIPTION'])) { |
82 | 105 | $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
83 | - if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
106 | + if(strlen($fields['DESCRIPTION']) > 300) { |
|
107 | + $overlib_string .= '...'; |
|
108 | + } |
|
84 | 109 | } |
85 | 110 | |
86 | 111 | return array('fieldToAddTo' => 'NAME', |
@@ -46,13 +46,13 @@ discard block |
||
46 | 46 | 'form'=>array( |
47 | 47 | 'hidden'=>array( |
48 | 48 | '<input type="hidden" name="opportunity_id" value="{$smarty.request.opportunity_id}">', |
49 | - '<input type="hidden" name="case_id" value="{$smarty.request.case_id}">', |
|
50 | - '<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">', |
|
51 | - '<input type="hidden" name="email_id" value="{$smarty.request.email_id}">', |
|
52 | - '<input type="hidden" name="inbound_email_id" value="{$smarty.request.inbound_email_id}">' |
|
49 | + '<input type="hidden" name="case_id" value="{$smarty.request.case_id}">', |
|
50 | + '<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">', |
|
51 | + '<input type="hidden" name="email_id" value="{$smarty.request.email_id}">', |
|
52 | + '<input type="hidden" name="inbound_email_id" value="{$smarty.request.inbound_email_id}">' |
|
53 | 53 | ) |
54 | 54 | ), |
55 | - 'maxColumns' => '2', |
|
55 | + 'maxColumns' => '2', |
|
56 | 56 | 'widths' => array( |
57 | 57 | array('label' => '10', 'field' => '30'), |
58 | 58 | array('label' => '10', 'field' => '30'), |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | 'copyData' => true, |
106 | 106 | 'required' => true, |
107 | 107 | 'select' => "account_name", |
108 | - 'default_action' => 'create', |
|
108 | + 'default_action' => 'create', |
|
109 | 109 | 'relationship' => 'accounts_contacts', |
110 | 110 | 'templateMeta' => array( |
111 | 111 | 'form'=>array( |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
230 | 230 | ), |
231 | 231 | array ( |
232 | - 'date_start', |
|
232 | + 'date_start', |
|
233 | 233 | array ( |
234 | 234 | 'name' => 'duration_hours', |
235 | 235 | 'label' => 'LBL_DURATION', |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | <span class="dateFormat">{sugar_translate label="LBL_HOURS_MINUTES" module="Calls"}', |
251 | 251 | 'displayParams' => |
252 | 252 | array ( |
253 | - 'required' => true, |
|
253 | + 'required' => true, |
|
254 | 254 | ), |
255 | 255 | ), |
256 | 256 | ), |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
289 | 289 | ), |
290 | 290 | array ( |
291 | - 'date_start', |
|
292 | - array ( |
|
291 | + 'date_start', |
|
292 | + array ( |
|
293 | 293 | 'name' => 'duration_hours', |
294 | 294 | 'label' => 'LBL_DURATION', |
295 | 295 | 'customCode' => '{literal} |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | <span class="dateFormat">{sugar_translate label="LBL_HOURS_MINUTES" module="Calls"}', |
310 | 310 | 'displayParams' => |
311 | 311 | array ( |
312 | - 'required' => true, |
|
312 | + 'required' => true, |
|
313 | 313 | ), |
314 | 314 | ), |
315 | 315 | ), |
@@ -344,8 +344,8 @@ discard block |
||
344 | 344 | array ( |
345 | 345 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
346 | 346 | ), |
347 | - array ( |
|
348 | - 'status', 'priority' |
|
347 | + array ( |
|
348 | + 'status', 'priority' |
|
349 | 349 | ), |
350 | 350 | |
351 | 351 | array ( |
@@ -58,41 +58,41 @@ discard block |
||
58 | 58 | array('label' => '10', 'field' => '30'), |
59 | 59 | ), |
60 | 60 | ), |
61 | - 'panels' =>array ( |
|
62 | - 'LNK_NEW_CONTACT' => array ( |
|
63 | - array ( |
|
64 | - array ( |
|
61 | + 'panels' =>array( |
|
62 | + 'LNK_NEW_CONTACT' => array( |
|
63 | + array( |
|
64 | + array( |
|
65 | 65 | 'name' => 'first_name', |
66 | 66 | 'customCode' => '{html_options name="Contactssalutation" options=$fields.salutation.options selected=$fields.salutation.value} <input name="Contactsfirst_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">', |
67 | 67 | ), |
68 | 68 | 'title', |
69 | 69 | ), |
70 | - array ( |
|
70 | + array( |
|
71 | 71 | |
72 | 72 | 'last_name', |
73 | 73 | 'department', |
74 | 74 | ), |
75 | - array ( |
|
75 | + array( |
|
76 | 76 | array('name' => 'primary_address_street', 'label' => 'LBL_PRIMARY_ADDRESS'), |
77 | 77 | 'phone_work', |
78 | 78 | ), |
79 | - array ( |
|
79 | + array( |
|
80 | 80 | array('name'=>'primary_address_city', 'label' => 'LBL_CITY'), |
81 | 81 | 'phone_mobile', |
82 | 82 | ), |
83 | - array ( |
|
83 | + array( |
|
84 | 84 | array('name'=>'primary_address_state', 'label' => 'LBL_STATE'), |
85 | 85 | 'phone_other', |
86 | 86 | ), |
87 | - array ( |
|
87 | + array( |
|
88 | 88 | array('name'=>'primary_address_postalcode', 'label' => 'LBL_POSTAL_CODE'), |
89 | 89 | 'phone_fax', |
90 | 90 | ), |
91 | - array ( |
|
91 | + array( |
|
92 | 92 | array('name'=>'primary_address_country', 'label' => 'LBL_COUNTRY'), |
93 | 93 | 'lead_source', |
94 | 94 | ), |
95 | - array ( |
|
95 | + array( |
|
96 | 96 | 'email1' |
97 | 97 | ), |
98 | 98 | array( |
@@ -123,13 +123,13 @@ discard block |
||
123 | 123 | array('label' => '10', 'field' => '30'), |
124 | 124 | ), |
125 | 125 | ), |
126 | - 'panels' =>array ( |
|
127 | - 'LNK_NEW_ACCOUNT' => array ( |
|
128 | - array ( |
|
126 | + 'panels' =>array( |
|
127 | + 'LNK_NEW_ACCOUNT' => array( |
|
128 | + array( |
|
129 | 129 | 'name', |
130 | 130 | 'phone_office', |
131 | 131 | ), |
132 | - array ( |
|
132 | + array( |
|
133 | 133 | 'website', |
134 | 134 | ), |
135 | 135 | array( |
@@ -152,21 +152,21 @@ discard block |
||
152 | 152 | array('label' => '10', 'field' => '30'), |
153 | 153 | ), |
154 | 154 | ), |
155 | - 'panels' =>array ( |
|
156 | - 'LNK_NEW_OPPORTUNITY' => array ( |
|
157 | - array ( |
|
155 | + 'panels' =>array( |
|
156 | + 'LNK_NEW_OPPORTUNITY' => array( |
|
157 | + array( |
|
158 | 158 | 'name', |
159 | 159 | 'currency_id' |
160 | 160 | ), |
161 | - array ( |
|
161 | + array( |
|
162 | 162 | 'sales_stage', |
163 | 163 | 'amount' |
164 | 164 | ), |
165 | - array ( |
|
165 | + array( |
|
166 | 166 | 'date_closed', |
167 | 167 | '' |
168 | 168 | ), |
169 | - array ( |
|
169 | + array( |
|
170 | 170 | 'description' |
171 | 171 | ), |
172 | 172 | ) |
@@ -191,13 +191,13 @@ discard block |
||
191 | 191 | array('label' => '10', 'field' => '30'), |
192 | 192 | ), |
193 | 193 | ), |
194 | - 'panels' =>array ( |
|
195 | - 'LNK_NEW_NOTE' => array ( |
|
196 | - array ( |
|
194 | + 'panels' =>array( |
|
195 | + 'LNK_NEW_NOTE' => array( |
|
196 | + array( |
|
197 | 197 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
198 | 198 | ), |
199 | - array ( |
|
200 | - array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90) ), |
|
199 | + array( |
|
200 | + array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90)), |
|
201 | 201 | ), |
202 | 202 | ) |
203 | 203 | ), |
@@ -223,14 +223,14 @@ discard block |
||
223 | 223 | array('label' => '10', 'field' => '30'), |
224 | 224 | ), |
225 | 225 | ), |
226 | - 'panels' =>array ( |
|
227 | - 'LNK_NEW_CALL' => array ( |
|
228 | - array ( |
|
226 | + 'panels' =>array( |
|
227 | + 'LNK_NEW_CALL' => array( |
|
228 | + array( |
|
229 | 229 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
230 | 230 | ), |
231 | - array ( |
|
231 | + array( |
|
232 | 232 | 'date_start', |
233 | - array ( |
|
233 | + array( |
|
234 | 234 | 'name' => 'duration_hours', |
235 | 235 | 'label' => 'LBL_DURATION', |
236 | 236 | 'customCode' => '{literal} |
@@ -249,13 +249,13 @@ discard block |
||
249 | 249 | {html_options name="Callsduration_minutes" options=$minutes_values selected=$fields.duration_minutes.value} |
250 | 250 | <span class="dateFormat">{sugar_translate label="LBL_HOURS_MINUTES" module="Calls"}', |
251 | 251 | 'displayParams' => |
252 | - array ( |
|
252 | + array( |
|
253 | 253 | 'required' => true, |
254 | 254 | ), |
255 | 255 | ), |
256 | 256 | ), |
257 | - array ( |
|
258 | - array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90) ), |
|
257 | + array( |
|
258 | + array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90)), |
|
259 | 259 | ), |
260 | 260 | ) |
261 | 261 | ), |
@@ -282,14 +282,14 @@ discard block |
||
282 | 282 | array('label' => '10', 'field' => '30'), |
283 | 283 | ), |
284 | 284 | ), |
285 | - 'panels' =>array ( |
|
286 | - 'LNK_NEW_MEETING' => array ( |
|
287 | - array ( |
|
285 | + 'panels' =>array( |
|
286 | + 'LNK_NEW_MEETING' => array( |
|
287 | + array( |
|
288 | 288 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
289 | 289 | ), |
290 | - array ( |
|
290 | + array( |
|
291 | 291 | 'date_start', |
292 | - array ( |
|
292 | + array( |
|
293 | 293 | 'name' => 'duration_hours', |
294 | 294 | 'label' => 'LBL_DURATION', |
295 | 295 | 'customCode' => '{literal} |
@@ -308,13 +308,13 @@ discard block |
||
308 | 308 | {html_options name="Meetingsduration_minutes" options=$minutes_values selected=$fields.duration_minutes.value} |
309 | 309 | <span class="dateFormat">{sugar_translate label="LBL_HOURS_MINUTES" module="Calls"}', |
310 | 310 | 'displayParams' => |
311 | - array ( |
|
311 | + array( |
|
312 | 312 | 'required' => true, |
313 | 313 | ), |
314 | 314 | ), |
315 | 315 | ), |
316 | - array ( |
|
317 | - array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90) ), |
|
316 | + array( |
|
317 | + array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90)), |
|
318 | 318 | ), |
319 | 319 | ) |
320 | 320 | ), |
@@ -339,17 +339,17 @@ discard block |
||
339 | 339 | array('label' => '10', 'field' => '30'), |
340 | 340 | ), |
341 | 341 | ), |
342 | - 'panels' =>array ( |
|
343 | - 'LNK_NEW_TASK' => array ( |
|
344 | - array ( |
|
342 | + 'panels' =>array( |
|
343 | + 'LNK_NEW_TASK' => array( |
|
344 | + array( |
|
345 | 345 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
346 | 346 | ), |
347 | - array ( |
|
347 | + array( |
|
348 | 348 | 'status', 'priority' |
349 | 349 | ), |
350 | 350 | |
351 | - array ( |
|
352 | - array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90) ), |
|
351 | + array( |
|
352 | + array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90)), |
|
353 | 353 | ), |
354 | 354 | ) |
355 | 355 | ), |
@@ -1,177 +1,177 @@ |
||
1 | 1 | <?php |
2 | 2 | $viewdefs ['Leads'] = |
3 | 3 | array ( |
4 | - 'EditView' => |
|
5 | - array ( |
|
4 | + 'EditView' => |
|
5 | + array ( |
|
6 | 6 | 'templateMeta' => |
7 | 7 | array ( |
8 | - 'form' => |
|
9 | - array ( |
|
8 | + 'form' => |
|
9 | + array ( |
|
10 | 10 | 'hidden' => |
11 | 11 | array ( |
12 | - 0 => '<input type="hidden" name="prospect_id" value="{if isset($smarty.request.prospect_id)}{$smarty.request.prospect_id}{else}{$bean->prospect_id}{/if}">', |
|
13 | - 1 => '<input type="hidden" name="account_id" value="{if isset($smarty.request.account_id)}{$smarty.request.account_id}{else}{$bean->account_id}{/if}">', |
|
14 | - 2 => '<input type="hidden" name="contact_id" value="{if isset($smarty.request.contact_id)}{$smarty.request.contact_id}{else}{$bean->contact_id}{/if}">', |
|
15 | - 3 => '<input type="hidden" name="opportunity_id" value="{if isset($smarty.request.opportunity_id)}{$smarty.request.opportunity_id}{else}{$bean->opportunity_id}{/if}">', |
|
12 | + 0 => '<input type="hidden" name="prospect_id" value="{if isset($smarty.request.prospect_id)}{$smarty.request.prospect_id}{else}{$bean->prospect_id}{/if}">', |
|
13 | + 1 => '<input type="hidden" name="account_id" value="{if isset($smarty.request.account_id)}{$smarty.request.account_id}{else}{$bean->account_id}{/if}">', |
|
14 | + 2 => '<input type="hidden" name="contact_id" value="{if isset($smarty.request.contact_id)}{$smarty.request.contact_id}{else}{$bean->contact_id}{/if}">', |
|
15 | + 3 => '<input type="hidden" name="opportunity_id" value="{if isset($smarty.request.opportunity_id)}{$smarty.request.opportunity_id}{else}{$bean->opportunity_id}{/if}">', |
|
16 | 16 | ), |
17 | 17 | 'buttons' => |
18 | 18 | array ( |
19 | - 0 => 'SAVE', |
|
20 | - 1 => 'CANCEL', |
|
19 | + 0 => 'SAVE', |
|
20 | + 1 => 'CANCEL', |
|
21 | 21 | ), |
22 | - ), |
|
23 | - 'maxColumns' => '2', |
|
24 | - 'widths' => |
|
25 | - array ( |
|
22 | + ), |
|
23 | + 'maxColumns' => '2', |
|
24 | + 'widths' => |
|
25 | + array ( |
|
26 | 26 | 0 => |
27 | 27 | array ( |
28 | - 'label' => '10', |
|
29 | - 'field' => '30', |
|
28 | + 'label' => '10', |
|
29 | + 'field' => '30', |
|
30 | 30 | ), |
31 | 31 | 1 => |
32 | 32 | array ( |
33 | - 'label' => '10', |
|
34 | - 'field' => '30', |
|
33 | + 'label' => '10', |
|
34 | + 'field' => '30', |
|
35 | 35 | ), |
36 | - ), |
|
37 | - 'javascript' => '<script type="text/javascript" language="Javascript">function copyAddressRight(form) {ldelim} form.alt_address_street.value = form.primary_address_street.value;form.alt_address_city.value = form.primary_address_city.value;form.alt_address_state.value = form.primary_address_state.value;form.alt_address_postalcode.value = form.primary_address_postalcode.value;form.alt_address_country.value = form.primary_address_country.value;return true; {rdelim} function copyAddressLeft(form) {ldelim} form.primary_address_street.value =form.alt_address_street.value;form.primary_address_city.value = form.alt_address_city.value;form.primary_address_state.value = form.alt_address_state.value;form.primary_address_postalcode.value =form.alt_address_postalcode.value;form.primary_address_country.value = form.alt_address_country.value;return true; {rdelim} </script>', |
|
38 | - 'useTabs' => false, |
|
39 | - 'tabDefs' => |
|
40 | - array ( |
|
36 | + ), |
|
37 | + 'javascript' => '<script type="text/javascript" language="Javascript">function copyAddressRight(form) {ldelim} form.alt_address_street.value = form.primary_address_street.value;form.alt_address_city.value = form.primary_address_city.value;form.alt_address_state.value = form.primary_address_state.value;form.alt_address_postalcode.value = form.primary_address_postalcode.value;form.alt_address_country.value = form.primary_address_country.value;return true; {rdelim} function copyAddressLeft(form) {ldelim} form.primary_address_street.value =form.alt_address_street.value;form.primary_address_city.value = form.alt_address_city.value;form.primary_address_state.value = form.alt_address_state.value;form.primary_address_postalcode.value =form.alt_address_postalcode.value;form.primary_address_country.value = form.alt_address_country.value;return true; {rdelim} </script>', |
|
38 | + 'useTabs' => false, |
|
39 | + 'tabDefs' => |
|
40 | + array ( |
|
41 | 41 | 'LBL_CONTACT_INFORMATION' => |
42 | 42 | array ( |
43 | - 'newTab' => false, |
|
44 | - 'panelDefault' => 'expanded', |
|
43 | + 'newTab' => false, |
|
44 | + 'panelDefault' => 'expanded', |
|
45 | 45 | ), |
46 | 46 | 'LBL_PANEL_ADVANCED' => |
47 | 47 | array ( |
48 | - 'newTab' => false, |
|
49 | - 'panelDefault' => 'expanded', |
|
48 | + 'newTab' => false, |
|
49 | + 'panelDefault' => 'expanded', |
|
50 | 50 | ), |
51 | 51 | 'LBL_PANEL_ASSIGNMENT' => |
52 | 52 | array ( |
53 | - 'newTab' => false, |
|
54 | - 'panelDefault' => 'expanded', |
|
53 | + 'newTab' => false, |
|
54 | + 'panelDefault' => 'expanded', |
|
55 | + ), |
|
55 | 56 | ), |
56 | - ), |
|
57 | 57 | ), |
58 | 58 | 'panels' => |
59 | 59 | array ( |
60 | - 'LBL_CONTACT_INFORMATION' => |
|
61 | - array ( |
|
60 | + 'LBL_CONTACT_INFORMATION' => |
|
61 | + array ( |
|
62 | 62 | 0 => |
63 | 63 | array ( |
64 | - 0 => |
|
65 | - array ( |
|
64 | + 0 => |
|
65 | + array ( |
|
66 | 66 | 'name' => 'first_name', |
67 | 67 | 'customCode' => '{html_options name="salutation" id="salutation" options=$fields.salutation.options selected=$fields.salutation.value} <input name="first_name" id="first_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">', |
68 | - ), |
|
68 | + ), |
|
69 | 69 | ), |
70 | 70 | 1 => |
71 | 71 | array ( |
72 | - 0 => 'last_name', |
|
73 | - 1 => 'phone_work', |
|
72 | + 0 => 'last_name', |
|
73 | + 1 => 'phone_work', |
|
74 | 74 | ), |
75 | 75 | 2 => |
76 | 76 | array ( |
77 | - 0 => 'title', |
|
78 | - 1 => 'phone_mobile', |
|
77 | + 0 => 'title', |
|
78 | + 1 => 'phone_mobile', |
|
79 | 79 | ), |
80 | 80 | 3 => |
81 | 81 | array ( |
82 | - 0 => 'department', |
|
83 | - 1 => 'phone_fax', |
|
82 | + 0 => 'department', |
|
83 | + 1 => 'phone_fax', |
|
84 | 84 | ), |
85 | 85 | 4 => |
86 | 86 | array ( |
87 | - 0 => |
|
88 | - array ( |
|
87 | + 0 => |
|
88 | + array ( |
|
89 | 89 | 'name' => 'account_name', |
90 | 90 | 'type' => 'varchar', |
91 | 91 | 'validateDependency' => false, |
92 | 92 | 'customCode' => '<input name="account_name" id="EditView_account_name" {if ($fields.converted.value == 1)}disabled="true"{/if} size="30" maxlength="255" type="text" value="{$fields.account_name.value}">', |
93 | - ), |
|
94 | - 1 => 'website', |
|
93 | + ), |
|
94 | + 1 => 'website', |
|
95 | 95 | ), |
96 | 96 | 5 => |
97 | 97 | array ( |
98 | - 0 => |
|
99 | - array ( |
|
98 | + 0 => |
|
99 | + array ( |
|
100 | 100 | 'name' => 'primary_address_street', |
101 | 101 | 'hideLabel' => true, |
102 | 102 | 'type' => 'address', |
103 | 103 | 'displayParams' => |
104 | 104 | array ( |
105 | - 'key' => 'primary', |
|
106 | - 'rows' => 2, |
|
107 | - 'cols' => 30, |
|
108 | - 'maxlength' => 150, |
|
105 | + 'key' => 'primary', |
|
106 | + 'rows' => 2, |
|
107 | + 'cols' => 30, |
|
108 | + 'maxlength' => 150, |
|
109 | 109 | ), |
110 | - ), |
|
111 | - 1 => |
|
112 | - array ( |
|
110 | + ), |
|
111 | + 1 => |
|
112 | + array ( |
|
113 | 113 | 'name' => 'alt_address_street', |
114 | 114 | 'hideLabel' => true, |
115 | 115 | 'type' => 'address', |
116 | 116 | 'displayParams' => |
117 | 117 | array ( |
118 | - 'key' => 'alt', |
|
119 | - 'copy' => 'primary', |
|
120 | - 'rows' => 2, |
|
121 | - 'cols' => 30, |
|
122 | - 'maxlength' => 150, |
|
118 | + 'key' => 'alt', |
|
119 | + 'copy' => 'primary', |
|
120 | + 'rows' => 2, |
|
121 | + 'cols' => 30, |
|
122 | + 'maxlength' => 150, |
|
123 | + ), |
|
123 | 124 | ), |
124 | - ), |
|
125 | 125 | ), |
126 | 126 | 6 => |
127 | 127 | array ( |
128 | - 0 => 'email1', |
|
128 | + 0 => 'email1', |
|
129 | 129 | ), |
130 | 130 | 7 => |
131 | 131 | array ( |
132 | - 0 => 'description', |
|
132 | + 0 => 'description', |
|
133 | + ), |
|
133 | 134 | ), |
134 | - ), |
|
135 | - 'LBL_PANEL_ADVANCED' => |
|
136 | - array ( |
|
135 | + 'LBL_PANEL_ADVANCED' => |
|
136 | + array ( |
|
137 | 137 | 0 => |
138 | 138 | array ( |
139 | - 0 => 'status', |
|
140 | - 1 => 'lead_source', |
|
139 | + 0 => 'status', |
|
140 | + 1 => 'lead_source', |
|
141 | 141 | ), |
142 | 142 | 1 => |
143 | 143 | array ( |
144 | - 0 => |
|
145 | - array ( |
|
144 | + 0 => |
|
145 | + array ( |
|
146 | 146 | 'name' => 'status_description', |
147 | - ), |
|
148 | - 1 => |
|
149 | - array ( |
|
147 | + ), |
|
148 | + 1 => |
|
149 | + array ( |
|
150 | 150 | 'name' => 'lead_source_description', |
151 | - ), |
|
151 | + ), |
|
152 | 152 | ), |
153 | 153 | 2 => |
154 | 154 | array ( |
155 | - 0 => 'opportunity_amount', |
|
156 | - 1 => 'refered_by', |
|
155 | + 0 => 'opportunity_amount', |
|
156 | + 1 => 'refered_by', |
|
157 | 157 | ), |
158 | 158 | 3 => |
159 | 159 | array ( |
160 | - 0 => 'campaign_name', |
|
160 | + 0 => 'campaign_name', |
|
161 | 161 | ), |
162 | - ), |
|
163 | - 'LBL_PANEL_ASSIGNMENT' => |
|
164 | - array ( |
|
162 | + ), |
|
163 | + 'LBL_PANEL_ASSIGNMENT' => |
|
164 | + array ( |
|
165 | 165 | 0 => |
166 | 166 | array ( |
167 | - 0 => |
|
168 | - array ( |
|
167 | + 0 => |
|
168 | + array ( |
|
169 | 169 | 'name' => 'assigned_user_name', |
170 | 170 | 'label' => 'LBL_ASSIGNED_TO', |
171 | - ), |
|
171 | + ), |
|
172 | + ), |
|
172 | 173 | ), |
173 | - ), |
|
174 | 174 | ), |
175 | - ), |
|
175 | + ), |
|
176 | 176 | ); |
177 | 177 | ?> |
@@ -1,35 +1,35 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | $viewdefs ['Leads'] = |
3 | -array ( |
|
3 | +array( |
|
4 | 4 | 'EditView' => |
5 | - array ( |
|
5 | + array( |
|
6 | 6 | 'templateMeta' => |
7 | - array ( |
|
7 | + array( |
|
8 | 8 | 'form' => |
9 | - array ( |
|
9 | + array( |
|
10 | 10 | 'hidden' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 0 => '<input type="hidden" name="prospect_id" value="{if isset($smarty.request.prospect_id)}{$smarty.request.prospect_id}{else}{$bean->prospect_id}{/if}">', |
13 | 13 | 1 => '<input type="hidden" name="account_id" value="{if isset($smarty.request.account_id)}{$smarty.request.account_id}{else}{$bean->account_id}{/if}">', |
14 | 14 | 2 => '<input type="hidden" name="contact_id" value="{if isset($smarty.request.contact_id)}{$smarty.request.contact_id}{else}{$bean->contact_id}{/if}">', |
15 | 15 | 3 => '<input type="hidden" name="opportunity_id" value="{if isset($smarty.request.opportunity_id)}{$smarty.request.opportunity_id}{else}{$bean->opportunity_id}{/if}">', |
16 | 16 | ), |
17 | 17 | 'buttons' => |
18 | - array ( |
|
18 | + array( |
|
19 | 19 | 0 => 'SAVE', |
20 | 20 | 1 => 'CANCEL', |
21 | 21 | ), |
22 | 22 | ), |
23 | 23 | 'maxColumns' => '2', |
24 | 24 | 'widths' => |
25 | - array ( |
|
25 | + array( |
|
26 | 26 | 0 => |
27 | - array ( |
|
27 | + array( |
|
28 | 28 | 'label' => '10', |
29 | 29 | 'field' => '30', |
30 | 30 | ), |
31 | 31 | 1 => |
32 | - array ( |
|
32 | + array( |
|
33 | 33 | 'label' => '10', |
34 | 34 | 'field' => '30', |
35 | 35 | ), |
@@ -37,55 +37,55 @@ discard block |
||
37 | 37 | 'javascript' => '<script type="text/javascript" language="Javascript">function copyAddressRight(form) {ldelim} form.alt_address_street.value = form.primary_address_street.value;form.alt_address_city.value = form.primary_address_city.value;form.alt_address_state.value = form.primary_address_state.value;form.alt_address_postalcode.value = form.primary_address_postalcode.value;form.alt_address_country.value = form.primary_address_country.value;return true; {rdelim} function copyAddressLeft(form) {ldelim} form.primary_address_street.value =form.alt_address_street.value;form.primary_address_city.value = form.alt_address_city.value;form.primary_address_state.value = form.alt_address_state.value;form.primary_address_postalcode.value =form.alt_address_postalcode.value;form.primary_address_country.value = form.alt_address_country.value;return true; {rdelim} </script>', |
38 | 38 | 'useTabs' => false, |
39 | 39 | 'tabDefs' => |
40 | - array ( |
|
40 | + array( |
|
41 | 41 | 'LBL_CONTACT_INFORMATION' => |
42 | - array ( |
|
42 | + array( |
|
43 | 43 | 'newTab' => false, |
44 | 44 | 'panelDefault' => 'expanded', |
45 | 45 | ), |
46 | 46 | 'LBL_PANEL_ADVANCED' => |
47 | - array ( |
|
47 | + array( |
|
48 | 48 | 'newTab' => false, |
49 | 49 | 'panelDefault' => 'expanded', |
50 | 50 | ), |
51 | 51 | 'LBL_PANEL_ASSIGNMENT' => |
52 | - array ( |
|
52 | + array( |
|
53 | 53 | 'newTab' => false, |
54 | 54 | 'panelDefault' => 'expanded', |
55 | 55 | ), |
56 | 56 | ), |
57 | 57 | ), |
58 | 58 | 'panels' => |
59 | - array ( |
|
59 | + array( |
|
60 | 60 | 'LBL_CONTACT_INFORMATION' => |
61 | - array ( |
|
61 | + array( |
|
62 | 62 | 0 => |
63 | - array ( |
|
63 | + array( |
|
64 | 64 | 0 => |
65 | - array ( |
|
65 | + array( |
|
66 | 66 | 'name' => 'first_name', |
67 | 67 | 'customCode' => '{html_options name="salutation" id="salutation" options=$fields.salutation.options selected=$fields.salutation.value} <input name="first_name" id="first_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">', |
68 | 68 | ), |
69 | 69 | ), |
70 | 70 | 1 => |
71 | - array ( |
|
71 | + array( |
|
72 | 72 | 0 => 'last_name', |
73 | 73 | 1 => 'phone_work', |
74 | 74 | ), |
75 | 75 | 2 => |
76 | - array ( |
|
76 | + array( |
|
77 | 77 | 0 => 'title', |
78 | 78 | 1 => 'phone_mobile', |
79 | 79 | ), |
80 | 80 | 3 => |
81 | - array ( |
|
81 | + array( |
|
82 | 82 | 0 => 'department', |
83 | 83 | 1 => 'phone_fax', |
84 | 84 | ), |
85 | 85 | 4 => |
86 | - array ( |
|
86 | + array( |
|
87 | 87 | 0 => |
88 | - array ( |
|
88 | + array( |
|
89 | 89 | 'name' => 'account_name', |
90 | 90 | 'type' => 'varchar', |
91 | 91 | 'validateDependency' => false, |
@@ -94,14 +94,14 @@ discard block |
||
94 | 94 | 1 => 'website', |
95 | 95 | ), |
96 | 96 | 5 => |
97 | - array ( |
|
97 | + array( |
|
98 | 98 | 0 => |
99 | - array ( |
|
99 | + array( |
|
100 | 100 | 'name' => 'primary_address_street', |
101 | 101 | 'hideLabel' => true, |
102 | 102 | 'type' => 'address', |
103 | 103 | 'displayParams' => |
104 | - array ( |
|
104 | + array( |
|
105 | 105 | 'key' => 'primary', |
106 | 106 | 'rows' => 2, |
107 | 107 | 'cols' => 30, |
@@ -109,12 +109,12 @@ discard block |
||
109 | 109 | ), |
110 | 110 | ), |
111 | 111 | 1 => |
112 | - array ( |
|
112 | + array( |
|
113 | 113 | 'name' => 'alt_address_street', |
114 | 114 | 'hideLabel' => true, |
115 | 115 | 'type' => 'address', |
116 | 116 | 'displayParams' => |
117 | - array ( |
|
117 | + array( |
|
118 | 118 | 'key' => 'alt', |
119 | 119 | 'copy' => 'primary', |
120 | 120 | 'rows' => 2, |
@@ -124,48 +124,48 @@ discard block |
||
124 | 124 | ), |
125 | 125 | ), |
126 | 126 | 6 => |
127 | - array ( |
|
127 | + array( |
|
128 | 128 | 0 => 'email1', |
129 | 129 | ), |
130 | 130 | 7 => |
131 | - array ( |
|
131 | + array( |
|
132 | 132 | 0 => 'description', |
133 | 133 | ), |
134 | 134 | ), |
135 | 135 | 'LBL_PANEL_ADVANCED' => |
136 | - array ( |
|
136 | + array( |
|
137 | 137 | 0 => |
138 | - array ( |
|
138 | + array( |
|
139 | 139 | 0 => 'status', |
140 | 140 | 1 => 'lead_source', |
141 | 141 | ), |
142 | 142 | 1 => |
143 | - array ( |
|
143 | + array( |
|
144 | 144 | 0 => |
145 | - array ( |
|
145 | + array( |
|
146 | 146 | 'name' => 'status_description', |
147 | 147 | ), |
148 | 148 | 1 => |
149 | - array ( |
|
149 | + array( |
|
150 | 150 | 'name' => 'lead_source_description', |
151 | 151 | ), |
152 | 152 | ), |
153 | 153 | 2 => |
154 | - array ( |
|
154 | + array( |
|
155 | 155 | 0 => 'opportunity_amount', |
156 | 156 | 1 => 'refered_by', |
157 | 157 | ), |
158 | 158 | 3 => |
159 | - array ( |
|
159 | + array( |
|
160 | 160 | 0 => 'campaign_name', |
161 | 161 | ), |
162 | 162 | ), |
163 | 163 | 'LBL_PANEL_ASSIGNMENT' => |
164 | - array ( |
|
164 | + array( |
|
165 | 165 | 0 => |
166 | - array ( |
|
166 | + array( |
|
167 | 167 | 0 => |
168 | - array ( |
|
168 | + array( |
|
169 | 169 | 'name' => 'assigned_user_name', |
170 | 170 | 'label' => 'LBL_ASSIGNED_TO', |
171 | 171 | ), |
@@ -45,18 +45,18 @@ discard block |
||
45 | 45 | 'last_name'=> array('query_type'=>'default'), |
46 | 46 | 'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name'),'force_unifiedsearch'=>true), |
47 | 47 | 'account_name'=> array('query_type'=>'default','db_field'=>array('leads.account_name')), |
48 | - /*'acc_name_from_accounts' => array('query_type'=>'default','related_field'=>'account_name'),*/ |
|
48 | + /*'acc_name_from_accounts' => array('query_type'=>'default','related_field'=>'account_name'),*/ |
|
49 | 49 | 'lead_source'=> array('query_type'=>'default','operator'=>'=', 'options'=>'lead_source_dom', 'template_var' => 'LEAD_SOURCE_OPTIONS'), |
50 | 50 | 'do_not_call'=> array('query_type'=>'default', 'operator'=>'=', 'input_type' => 'checkbox'), |
51 | 51 | 'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','phone_home')), |
52 | - 'email'=> array( |
|
53 | - 'query_type' => 'default', |
|
54 | - 'operator' => 'subquery', |
|
55 | - 'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE', |
|
56 | - 'db_field' => array( |
|
57 | - 'id', |
|
58 | - ), |
|
59 | - ), |
|
52 | + 'email'=> array( |
|
53 | + 'query_type' => 'default', |
|
54 | + 'operator' => 'subquery', |
|
55 | + 'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE', |
|
56 | + 'db_field' => array( |
|
57 | + 'id', |
|
58 | + ), |
|
59 | + ), |
|
60 | 60 | 'favorites_only' => array( |
61 | 61 | 'query_type'=>'format', |
62 | 62 | 'operator' => 'subquery', |
@@ -75,20 +75,20 @@ discard block |
||
75 | 75 | 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
76 | 76 | 'assigned_user_id'=> array('query_type'=>'default'), |
77 | 77 | 'status'=> array('query_type'=>'default', 'options'=>'lead_status_dom', 'template_var' => 'STATUS_OPTIONS'), |
78 | - 'open_only' => array( |
|
79 | - 'query_type'=>'default', |
|
80 | - 'db_field'=>array('status'), |
|
81 | - 'operator'=>'not in', |
|
82 | - 'closed_values' => array('Dead', 'Recycled', 'Converted'), |
|
83 | - 'type'=>'bool', |
|
84 | - ), |
|
85 | - //Range Search Support |
|
86 | - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
87 | - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
88 | - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
89 | - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
90 | - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
78 | + 'open_only' => array( |
|
79 | + 'query_type'=>'default', |
|
80 | + 'db_field'=>array('status'), |
|
81 | + 'operator'=>'not in', |
|
82 | + 'closed_values' => array('Dead', 'Recycled', 'Converted'), |
|
83 | + 'type'=>'bool', |
|
84 | + ), |
|
85 | + //Range Search Support |
|
86 | + 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
87 | + 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
88 | + 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
89 | + 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
90 | + 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
91 | 91 | 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
92 | - //Range Search Support |
|
92 | + //Range Search Support |
|
93 | 93 | ); |
94 | 94 | ?> |
95 | 95 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -40,15 +40,15 @@ discard block |
||
40 | 40 | global $current_user; |
41 | 41 | $module_name = "Leads"; |
42 | 42 | $searchFields['Leads'] = |
43 | - array ( |
|
44 | - 'first_name' => array( 'query_type'=>'default'), |
|
43 | + array( |
|
44 | + 'first_name' => array('query_type'=>'default'), |
|
45 | 45 | 'last_name'=> array('query_type'=>'default'), |
46 | - 'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name'),'force_unifiedsearch'=>true), |
|
47 | - 'account_name'=> array('query_type'=>'default','db_field'=>array('leads.account_name')), |
|
46 | + 'search_name'=> array('query_type'=>'default', 'db_field'=>array('first_name', 'last_name'), 'force_unifiedsearch'=>true), |
|
47 | + 'account_name'=> array('query_type'=>'default', 'db_field'=>array('leads.account_name')), |
|
48 | 48 | /*'acc_name_from_accounts' => array('query_type'=>'default','related_field'=>'account_name'),*/ |
49 | - 'lead_source'=> array('query_type'=>'default','operator'=>'=', 'options'=>'lead_source_dom', 'template_var' => 'LEAD_SOURCE_OPTIONS'), |
|
49 | + 'lead_source'=> array('query_type'=>'default', 'operator'=>'=', 'options'=>'lead_source_dom', 'template_var' => 'LEAD_SOURCE_OPTIONS'), |
|
50 | 50 | 'do_not_call'=> array('query_type'=>'default', 'operator'=>'=', 'input_type' => 'checkbox'), |
51 | - 'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','phone_home')), |
|
51 | + 'phone'=> array('query_type'=>'default', 'db_field'=>array('phone_mobile', 'phone_work', 'phone_other', 'phone_fax', 'phone_home')), |
|
52 | 52 | 'email'=> array( |
53 | 53 | 'query_type' => 'default', |
54 | 54 | 'operator' => 'subquery', |
@@ -63,16 +63,16 @@ discard block |
||
63 | 63 | 'subquery' => 'SELECT favorites.parent_id FROM favorites |
64 | 64 | WHERE favorites.deleted = 0 |
65 | 65 | and favorites.parent_type = "'.$module_name.'" |
66 | - and favorites.assigned_user_id = "' .$current_user->id . '") OR NOT ({0}', |
|
66 | + and favorites.assigned_user_id = "' .$current_user->id.'") OR NOT ({0}', |
|
67 | 67 | 'db_field'=>array('id')), |
68 | 68 | 'assistant'=> array('query_type'=>'default'), |
69 | 69 | 'website'=> array('query_type'=>'default'), |
70 | - 'address_street'=> array('query_type'=>'default','db_field'=>array('primary_address_street','alt_address_street')), |
|
71 | - 'address_city'=> array('query_type'=>'default','db_field'=>array('primary_address_city','alt_address_city')), |
|
72 | - 'address_state'=> array('query_type'=>'default','db_field'=>array('primary_address_state','alt_address_state')), |
|
73 | - 'address_postalcode'=> array('query_type'=>'default','db_field'=>array('primary_address_postalcode','alt_address_postalcode')), |
|
74 | - 'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')), |
|
75 | - 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
70 | + 'address_street'=> array('query_type'=>'default', 'db_field'=>array('primary_address_street', 'alt_address_street')), |
|
71 | + 'address_city'=> array('query_type'=>'default', 'db_field'=>array('primary_address_city', 'alt_address_city')), |
|
72 | + 'address_state'=> array('query_type'=>'default', 'db_field'=>array('primary_address_state', 'alt_address_state')), |
|
73 | + 'address_postalcode'=> array('query_type'=>'default', 'db_field'=>array('primary_address_postalcode', 'alt_address_postalcode')), |
|
74 | + 'address_country'=> array('query_type'=>'default', 'db_field'=>array('primary_address_country', 'alt_address_country')), |
|
75 | + 'current_user_only'=> array('query_type'=>'default', 'db_field'=>array('assigned_user_id'), 'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
76 | 76 | 'assigned_user_id'=> array('query_type'=>'default'), |
77 | 77 | 'status'=> array('query_type'=>'default', 'options'=>'lead_status_dom', 'template_var' => 'STATUS_OPTIONS'), |
78 | 78 | 'open_only' => array( |
@@ -83,12 +83,12 @@ discard block |
||
83 | 83 | 'type'=>'bool', |
84 | 84 | ), |
85 | 85 | //Range Search Support |
86 | - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
87 | - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
88 | - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
89 | - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
90 | - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
91 | - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
86 | + 'range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
87 | + 'start_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
88 | + 'end_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
89 | + 'range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
90 | + 'start_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
91 | + 'end_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
92 | 92 | //Range Search Support |
93 | 93 | ); |
94 | 94 | ?> |
95 | 95 | \ No newline at end of file |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,217 +1,217 @@ |
||
1 | 1 | <?php |
2 | 2 | $viewdefs ['Leads'] = |
3 | 3 | array ( |
4 | - 'DetailView' => |
|
5 | - array ( |
|
4 | + 'DetailView' => |
|
5 | + array ( |
|
6 | 6 | 'templateMeta' => |
7 | 7 | array ( |
8 | - 'form' => |
|
9 | - array ( |
|
8 | + 'form' => |
|
9 | + array ( |
|
10 | 10 | 'buttons' => |
11 | 11 | array ( |
12 | - 0 => 'EDIT', |
|
13 | - 1 => 'DUPLICATE', |
|
14 | - 2 => 'DELETE', |
|
15 | - 3 => |
|
16 | - array ( |
|
12 | + 0 => 'EDIT', |
|
13 | + 1 => 'DUPLICATE', |
|
14 | + 2 => 'DELETE', |
|
15 | + 3 => |
|
16 | + array ( |
|
17 | 17 | 'customCode' => '{if $bean->aclAccess("edit") && !$DISABLE_CONVERT_ACTION}<input title="{$MOD.LBL_CONVERTLEAD_TITLE}" accessKey="{$MOD.LBL_CONVERTLEAD_BUTTON_KEY}" type="button" class="button" onClick="document.location=\'index.php?module=Leads&action=ConvertLead&record={$fields.id.value}\'" name="convert" value="{$MOD.LBL_CONVERTLEAD}">{/if}', |
18 | 18 | 'sugar_html' => |
19 | 19 | array ( |
20 | - 'type' => 'button', |
|
21 | - 'value' => '{$MOD.LBL_CONVERTLEAD}', |
|
22 | - 'htmlOptions' => |
|
23 | - array ( |
|
20 | + 'type' => 'button', |
|
21 | + 'value' => '{$MOD.LBL_CONVERTLEAD}', |
|
22 | + 'htmlOptions' => |
|
23 | + array ( |
|
24 | 24 | 'title' => '{$MOD.LBL_CONVERTLEAD_TITLE}', |
25 | 25 | 'accessKey' => '{$MOD.LBL_CONVERTLEAD_BUTTON_KEY}', |
26 | 26 | 'class' => 'button', |
27 | 27 | 'onClick' => 'document.location=\'index.php?module=Leads&action=ConvertLead&record={$fields.id.value}\'', |
28 | 28 | 'name' => 'convert', |
29 | 29 | 'id' => 'convert_lead_button', |
30 | - ), |
|
31 | - 'template' => '{if $bean->aclAccess("edit") && !$DISABLE_CONVERT_ACTION}[CONTENT]{/if}', |
|
30 | + ), |
|
31 | + 'template' => '{if $bean->aclAccess("edit") && !$DISABLE_CONVERT_ACTION}[CONTENT]{/if}', |
|
32 | 32 | ), |
33 | - ), |
|
34 | - 4 => 'FIND_DUPLICATES', |
|
35 | - 5 => |
|
36 | - array ( |
|
33 | + ), |
|
34 | + 4 => 'FIND_DUPLICATES', |
|
35 | + 5 => |
|
36 | + array ( |
|
37 | 37 | 'customCode' => '<input title="{$APP.LBL_MANAGE_SUBSCRIPTIONS}" class="button" onclick="this.form.return_module.value=\'Leads\'; this.form.return_action.value=\'DetailView\';this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Subscriptions\'; this.form.module.value=\'Campaigns\'; this.form.module_tab.value=\'Leads\';" type="submit" name="Manage Subscriptions" value="{$APP.LBL_MANAGE_SUBSCRIPTIONS}">', |
38 | 38 | 'sugar_html' => |
39 | 39 | array ( |
40 | - 'type' => 'submit', |
|
41 | - 'value' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}', |
|
42 | - 'htmlOptions' => |
|
43 | - array ( |
|
40 | + 'type' => 'submit', |
|
41 | + 'value' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}', |
|
42 | + 'htmlOptions' => |
|
43 | + array ( |
|
44 | 44 | 'title' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}', |
45 | 45 | 'class' => 'button', |
46 | 46 | 'id' => 'manage_subscriptions_button', |
47 | 47 | 'onclick' => 'this.form.return_module.value=\'Leads\'; this.form.return_action.value=\'DetailView\';this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Subscriptions\'; this.form.module.value=\'Campaigns\'; this.form.module_tab.value=\'Leads\';', |
48 | 48 | 'name' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}', |
49 | - ), |
|
49 | + ), |
|
50 | + ), |
|
50 | 51 | ), |
51 | - ), |
|
52 | - 'AOS_GENLET' => |
|
53 | - array ( |
|
52 | + 'AOS_GENLET' => |
|
53 | + array ( |
|
54 | 54 | 'customCode' => '<input type="button" class="button" onClick="showPopup();" value="{$APP.LBL_GENERATE_LETTER}">', |
55 | - ), |
|
55 | + ), |
|
56 | 56 | ), |
57 | 57 | 'headerTpl' => 'modules/Leads/tpls/DetailViewHeader.tpl', |
58 | - ), |
|
59 | - 'maxColumns' => '2', |
|
60 | - 'widths' => |
|
61 | - array ( |
|
58 | + ), |
|
59 | + 'maxColumns' => '2', |
|
60 | + 'widths' => |
|
61 | + array ( |
|
62 | 62 | 0 => |
63 | 63 | array ( |
64 | - 'label' => '10', |
|
65 | - 'field' => '30', |
|
64 | + 'label' => '10', |
|
65 | + 'field' => '30', |
|
66 | 66 | ), |
67 | 67 | 1 => |
68 | 68 | array ( |
69 | - 'label' => '10', |
|
70 | - 'field' => '30', |
|
69 | + 'label' => '10', |
|
70 | + 'field' => '30', |
|
71 | + ), |
|
71 | 72 | ), |
72 | - ), |
|
73 | - 'includes' => |
|
74 | - array ( |
|
73 | + 'includes' => |
|
74 | + array ( |
|
75 | 75 | 0 => |
76 | 76 | array ( |
77 | - 'file' => 'modules/Leads/Lead.js', |
|
77 | + 'file' => 'modules/Leads/Lead.js', |
|
78 | + ), |
|
78 | 79 | ), |
79 | - ), |
|
80 | - 'useTabs' => true, |
|
81 | - 'tabDefs' => |
|
82 | - array ( |
|
80 | + 'useTabs' => true, |
|
81 | + 'tabDefs' => |
|
82 | + array ( |
|
83 | 83 | 'LBL_CONTACT_INFORMATION' => |
84 | 84 | array ( |
85 | - 'newTab' => true, |
|
86 | - 'panelDefault' => 'expanded', |
|
85 | + 'newTab' => true, |
|
86 | + 'panelDefault' => 'expanded', |
|
87 | 87 | ), |
88 | 88 | 'LBL_PANEL_ADVANCED' => |
89 | 89 | array ( |
90 | - 'newTab' => true, |
|
91 | - 'panelDefault' => 'expanded', |
|
90 | + 'newTab' => true, |
|
91 | + 'panelDefault' => 'expanded', |
|
92 | 92 | ), |
93 | 93 | 'LBL_PANEL_ASSIGNMENT' => |
94 | 94 | array ( |
95 | - 'newTab' => true, |
|
96 | - 'panelDefault' => 'expanded', |
|
95 | + 'newTab' => true, |
|
96 | + 'panelDefault' => 'expanded', |
|
97 | + ), |
|
97 | 98 | ), |
98 | - ), |
|
99 | 99 | ), |
100 | 100 | 'panels' => |
101 | 101 | array ( |
102 | - 'LBL_CONTACT_INFORMATION' => |
|
103 | - array ( |
|
102 | + 'LBL_CONTACT_INFORMATION' => |
|
103 | + array ( |
|
104 | 104 | 0 => |
105 | 105 | array ( |
106 | - 0 => |
|
107 | - array ( |
|
106 | + 0 => |
|
107 | + array ( |
|
108 | 108 | 'name' => 'full_name', |
109 | 109 | 'label' => 'LBL_NAME', |
110 | - ), |
|
111 | - 1 => 'phone_work', |
|
110 | + ), |
|
111 | + 1 => 'phone_work', |
|
112 | 112 | ), |
113 | 113 | 1 => |
114 | 114 | array ( |
115 | - 0 => 'title', |
|
116 | - 1 => 'phone_mobile', |
|
115 | + 0 => 'title', |
|
116 | + 1 => 'phone_mobile', |
|
117 | 117 | ), |
118 | 118 | 2 => |
119 | 119 | array ( |
120 | - 0 => 'department', |
|
121 | - 1 => 'phone_fax', |
|
120 | + 0 => 'department', |
|
121 | + 1 => 'phone_fax', |
|
122 | 122 | ), |
123 | 123 | 3 => |
124 | 124 | array ( |
125 | - 0 => |
|
126 | - array ( |
|
125 | + 0 => |
|
126 | + array ( |
|
127 | 127 | 'name' => 'account_name', |
128 | - ), |
|
129 | - 1 => 'website', |
|
128 | + ), |
|
129 | + 1 => 'website', |
|
130 | 130 | ), |
131 | 131 | 4 => |
132 | 132 | array ( |
133 | - 0 => |
|
134 | - array ( |
|
133 | + 0 => |
|
134 | + array ( |
|
135 | 135 | 'name' => 'primary_address_street', |
136 | 136 | 'label' => 'LBL_PRIMARY_ADDRESS', |
137 | 137 | 'type' => 'address', |
138 | 138 | 'displayParams' => |
139 | 139 | array ( |
140 | - 'key' => 'primary', |
|
140 | + 'key' => 'primary', |
|
141 | + ), |
|
141 | 142 | ), |
142 | - ), |
|
143 | - 1 => |
|
144 | - array ( |
|
143 | + 1 => |
|
144 | + array ( |
|
145 | 145 | 'name' => 'alt_address_street', |
146 | 146 | 'label' => 'LBL_ALTERNATE_ADDRESS', |
147 | 147 | 'type' => 'address', |
148 | 148 | 'displayParams' => |
149 | 149 | array ( |
150 | - 'key' => 'alt', |
|
150 | + 'key' => 'alt', |
|
151 | + ), |
|
151 | 152 | ), |
152 | - ), |
|
153 | 153 | ), |
154 | 154 | 5 => |
155 | 155 | array ( |
156 | - 0 => 'email1', |
|
156 | + 0 => 'email1', |
|
157 | 157 | ), |
158 | 158 | 6 => |
159 | 159 | array ( |
160 | - 0 => 'description', |
|
160 | + 0 => 'description', |
|
161 | 161 | ), |
162 | 162 | 7 => |
163 | 163 | array ( |
164 | - 0 => |
|
165 | - array ( |
|
164 | + 0 => |
|
165 | + array ( |
|
166 | 166 | 'name' => 'assigned_user_name', |
167 | 167 | 'label' => 'LBL_ASSIGNED_TO', |
168 | - ), |
|
168 | + ), |
|
169 | + ), |
|
169 | 170 | ), |
170 | - ), |
|
171 | - 'LBL_PANEL_ADVANCED' => |
|
172 | - array ( |
|
171 | + 'LBL_PANEL_ADVANCED' => |
|
172 | + array ( |
|
173 | 173 | 0 => |
174 | 174 | array ( |
175 | - 0 => 'status', |
|
176 | - 1 => 'lead_source', |
|
175 | + 0 => 'status', |
|
176 | + 1 => 'lead_source', |
|
177 | 177 | ), |
178 | 178 | 1 => |
179 | 179 | array ( |
180 | - 0 => 'status_description', |
|
181 | - 1 => 'lead_source_description', |
|
180 | + 0 => 'status_description', |
|
181 | + 1 => 'lead_source_description', |
|
182 | 182 | ), |
183 | 183 | 2 => |
184 | 184 | array ( |
185 | - 0 => 'opportunity_amount', |
|
186 | - 1 => 'refered_by', |
|
185 | + 0 => 'opportunity_amount', |
|
186 | + 1 => 'refered_by', |
|
187 | 187 | ), |
188 | 188 | 3 => |
189 | 189 | array ( |
190 | - 0 => |
|
191 | - array ( |
|
190 | + 0 => |
|
191 | + array ( |
|
192 | 192 | 'name' => 'campaign_name', |
193 | 193 | 'label' => 'LBL_CAMPAIGN', |
194 | - ), |
|
194 | + ), |
|
195 | + ), |
|
195 | 196 | ), |
196 | - ), |
|
197 | - 'LBL_PANEL_ASSIGNMENT' => |
|
198 | - array ( |
|
197 | + 'LBL_PANEL_ASSIGNMENT' => |
|
198 | + array ( |
|
199 | 199 | 0 => |
200 | 200 | array ( |
201 | - 0 => |
|
202 | - array ( |
|
201 | + 0 => |
|
202 | + array ( |
|
203 | 203 | 'name' => 'date_modified', |
204 | 204 | 'label' => 'LBL_DATE_MODIFIED', |
205 | 205 | 'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}', |
206 | - ), |
|
207 | - 1 => |
|
208 | - array ( |
|
206 | + ), |
|
207 | + 1 => |
|
208 | + array ( |
|
209 | 209 | 'name' => 'date_entered', |
210 | 210 | 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}', |
211 | - ), |
|
211 | + ), |
|
212 | 212 | ), |
213 | - ), |
|
213 | + ), |
|
214 | + ), |
|
214 | 215 | ), |
215 | - ), |
|
216 | 216 | ); |
217 | 217 | ?> |
@@ -1,26 +1,26 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | $viewdefs ['Leads'] = |
3 | -array ( |
|
3 | +array( |
|
4 | 4 | 'DetailView' => |
5 | - array ( |
|
5 | + array( |
|
6 | 6 | 'templateMeta' => |
7 | - array ( |
|
7 | + array( |
|
8 | 8 | 'form' => |
9 | - array ( |
|
9 | + array( |
|
10 | 10 | 'buttons' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 0 => 'EDIT', |
13 | 13 | 1 => 'DUPLICATE', |
14 | 14 | 2 => 'DELETE', |
15 | 15 | 3 => |
16 | - array ( |
|
16 | + array( |
|
17 | 17 | 'customCode' => '{if $bean->aclAccess("edit") && !$DISABLE_CONVERT_ACTION}<input title="{$MOD.LBL_CONVERTLEAD_TITLE}" accessKey="{$MOD.LBL_CONVERTLEAD_BUTTON_KEY}" type="button" class="button" onClick="document.location=\'index.php?module=Leads&action=ConvertLead&record={$fields.id.value}\'" name="convert" value="{$MOD.LBL_CONVERTLEAD}">{/if}', |
18 | 18 | 'sugar_html' => |
19 | - array ( |
|
19 | + array( |
|
20 | 20 | 'type' => 'button', |
21 | 21 | 'value' => '{$MOD.LBL_CONVERTLEAD}', |
22 | 22 | 'htmlOptions' => |
23 | - array ( |
|
23 | + array( |
|
24 | 24 | 'title' => '{$MOD.LBL_CONVERTLEAD_TITLE}', |
25 | 25 | 'accessKey' => '{$MOD.LBL_CONVERTLEAD_BUTTON_KEY}', |
26 | 26 | 'class' => 'button', |
@@ -33,14 +33,14 @@ discard block |
||
33 | 33 | ), |
34 | 34 | 4 => 'FIND_DUPLICATES', |
35 | 35 | 5 => |
36 | - array ( |
|
36 | + array( |
|
37 | 37 | 'customCode' => '<input title="{$APP.LBL_MANAGE_SUBSCRIPTIONS}" class="button" onclick="this.form.return_module.value=\'Leads\'; this.form.return_action.value=\'DetailView\';this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Subscriptions\'; this.form.module.value=\'Campaigns\'; this.form.module_tab.value=\'Leads\';" type="submit" name="Manage Subscriptions" value="{$APP.LBL_MANAGE_SUBSCRIPTIONS}">', |
38 | 38 | 'sugar_html' => |
39 | - array ( |
|
39 | + array( |
|
40 | 40 | 'type' => 'submit', |
41 | 41 | 'value' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}', |
42 | 42 | 'htmlOptions' => |
43 | - array ( |
|
43 | + array( |
|
44 | 44 | 'title' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}', |
45 | 45 | 'class' => 'button', |
46 | 46 | 'id' => 'manage_subscriptions_button', |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | ), |
51 | 51 | ), |
52 | 52 | 'AOS_GENLET' => |
53 | - array ( |
|
53 | + array( |
|
54 | 54 | 'customCode' => '<input type="button" class="button" onClick="showPopup();" value="{$APP.LBL_GENERATE_LETTER}">', |
55 | 55 | ), |
56 | 56 | ), |
@@ -58,154 +58,154 @@ discard block |
||
58 | 58 | ), |
59 | 59 | 'maxColumns' => '2', |
60 | 60 | 'widths' => |
61 | - array ( |
|
61 | + array( |
|
62 | 62 | 0 => |
63 | - array ( |
|
63 | + array( |
|
64 | 64 | 'label' => '10', |
65 | 65 | 'field' => '30', |
66 | 66 | ), |
67 | 67 | 1 => |
68 | - array ( |
|
68 | + array( |
|
69 | 69 | 'label' => '10', |
70 | 70 | 'field' => '30', |
71 | 71 | ), |
72 | 72 | ), |
73 | 73 | 'includes' => |
74 | - array ( |
|
74 | + array( |
|
75 | 75 | 0 => |
76 | - array ( |
|
76 | + array( |
|
77 | 77 | 'file' => 'modules/Leads/Lead.js', |
78 | 78 | ), |
79 | 79 | ), |
80 | 80 | 'useTabs' => true, |
81 | 81 | 'tabDefs' => |
82 | - array ( |
|
82 | + array( |
|
83 | 83 | 'LBL_CONTACT_INFORMATION' => |
84 | - array ( |
|
84 | + array( |
|
85 | 85 | 'newTab' => true, |
86 | 86 | 'panelDefault' => 'expanded', |
87 | 87 | ), |
88 | 88 | 'LBL_PANEL_ADVANCED' => |
89 | - array ( |
|
89 | + array( |
|
90 | 90 | 'newTab' => true, |
91 | 91 | 'panelDefault' => 'expanded', |
92 | 92 | ), |
93 | 93 | 'LBL_PANEL_ASSIGNMENT' => |
94 | - array ( |
|
94 | + array( |
|
95 | 95 | 'newTab' => true, |
96 | 96 | 'panelDefault' => 'expanded', |
97 | 97 | ), |
98 | 98 | ), |
99 | 99 | ), |
100 | 100 | 'panels' => |
101 | - array ( |
|
101 | + array( |
|
102 | 102 | 'LBL_CONTACT_INFORMATION' => |
103 | - array ( |
|
103 | + array( |
|
104 | 104 | 0 => |
105 | - array ( |
|
105 | + array( |
|
106 | 106 | 0 => |
107 | - array ( |
|
107 | + array( |
|
108 | 108 | 'name' => 'full_name', |
109 | 109 | 'label' => 'LBL_NAME', |
110 | 110 | ), |
111 | 111 | 1 => 'phone_work', |
112 | 112 | ), |
113 | 113 | 1 => |
114 | - array ( |
|
114 | + array( |
|
115 | 115 | 0 => 'title', |
116 | 116 | 1 => 'phone_mobile', |
117 | 117 | ), |
118 | 118 | 2 => |
119 | - array ( |
|
119 | + array( |
|
120 | 120 | 0 => 'department', |
121 | 121 | 1 => 'phone_fax', |
122 | 122 | ), |
123 | 123 | 3 => |
124 | - array ( |
|
124 | + array( |
|
125 | 125 | 0 => |
126 | - array ( |
|
126 | + array( |
|
127 | 127 | 'name' => 'account_name', |
128 | 128 | ), |
129 | 129 | 1 => 'website', |
130 | 130 | ), |
131 | 131 | 4 => |
132 | - array ( |
|
132 | + array( |
|
133 | 133 | 0 => |
134 | - array ( |
|
134 | + array( |
|
135 | 135 | 'name' => 'primary_address_street', |
136 | 136 | 'label' => 'LBL_PRIMARY_ADDRESS', |
137 | 137 | 'type' => 'address', |
138 | 138 | 'displayParams' => |
139 | - array ( |
|
139 | + array( |
|
140 | 140 | 'key' => 'primary', |
141 | 141 | ), |
142 | 142 | ), |
143 | 143 | 1 => |
144 | - array ( |
|
144 | + array( |
|
145 | 145 | 'name' => 'alt_address_street', |
146 | 146 | 'label' => 'LBL_ALTERNATE_ADDRESS', |
147 | 147 | 'type' => 'address', |
148 | 148 | 'displayParams' => |
149 | - array ( |
|
149 | + array( |
|
150 | 150 | 'key' => 'alt', |
151 | 151 | ), |
152 | 152 | ), |
153 | 153 | ), |
154 | 154 | 5 => |
155 | - array ( |
|
155 | + array( |
|
156 | 156 | 0 => 'email1', |
157 | 157 | ), |
158 | 158 | 6 => |
159 | - array ( |
|
159 | + array( |
|
160 | 160 | 0 => 'description', |
161 | 161 | ), |
162 | 162 | 7 => |
163 | - array ( |
|
163 | + array( |
|
164 | 164 | 0 => |
165 | - array ( |
|
165 | + array( |
|
166 | 166 | 'name' => 'assigned_user_name', |
167 | 167 | 'label' => 'LBL_ASSIGNED_TO', |
168 | 168 | ), |
169 | 169 | ), |
170 | 170 | ), |
171 | 171 | 'LBL_PANEL_ADVANCED' => |
172 | - array ( |
|
172 | + array( |
|
173 | 173 | 0 => |
174 | - array ( |
|
174 | + array( |
|
175 | 175 | 0 => 'status', |
176 | 176 | 1 => 'lead_source', |
177 | 177 | ), |
178 | 178 | 1 => |
179 | - array ( |
|
179 | + array( |
|
180 | 180 | 0 => 'status_description', |
181 | 181 | 1 => 'lead_source_description', |
182 | 182 | ), |
183 | 183 | 2 => |
184 | - array ( |
|
184 | + array( |
|
185 | 185 | 0 => 'opportunity_amount', |
186 | 186 | 1 => 'refered_by', |
187 | 187 | ), |
188 | 188 | 3 => |
189 | - array ( |
|
189 | + array( |
|
190 | 190 | 0 => |
191 | - array ( |
|
191 | + array( |
|
192 | 192 | 'name' => 'campaign_name', |
193 | 193 | 'label' => 'LBL_CAMPAIGN', |
194 | 194 | ), |
195 | 195 | ), |
196 | 196 | ), |
197 | 197 | 'LBL_PANEL_ASSIGNMENT' => |
198 | - array ( |
|
198 | + array( |
|
199 | 199 | 0 => |
200 | - array ( |
|
200 | + array( |
|
201 | 201 | 0 => |
202 | - array ( |
|
202 | + array( |
|
203 | 203 | 'name' => 'date_modified', |
204 | 204 | 'label' => 'LBL_DATE_MODIFIED', |
205 | 205 | 'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}', |
206 | 206 | ), |
207 | 207 | 1 => |
208 | - array ( |
|
208 | + array( |
|
209 | 209 | 'name' => 'date_entered', |
210 | 210 | 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}', |
211 | 211 | ), |
@@ -47,131 +47,131 @@ |
||
47 | 47 | |
48 | 48 | $viewdefs ['Leads'] = |
49 | 49 | array ( |
50 | - 'QuickCreate' => |
|
51 | - array ( |
|
50 | + 'QuickCreate' => |
|
51 | + array ( |
|
52 | 52 | 'templateMeta' => |
53 | 53 | array ( |
54 | - 'form' => |
|
55 | - array ( |
|
54 | + 'form' => |
|
55 | + array ( |
|
56 | 56 | 'hidden' => |
57 | 57 | array ( |
58 | - 0 => '<input type="hidden" name="prospect_id" value="{if isset($smarty.request.prospect_id)}{$smarty.request.prospect_id}{else}{$bean->prospect_id}{/if}">', |
|
59 | - 1 => '<input type="hidden" name="contact_id" value="{if isset($smarty.request.contact_id)}{$smarty.request.contact_id}{else}{$bean->contact_id}{/if}">', |
|
60 | - 2 => '<input type="hidden" name="opportunity_id" value="{if isset($smarty.request.opportunity_id)}{$smarty.request.opportunity_id}{else}{$bean->opportunity_id}{/if}">', |
|
61 | - 3 => '<input type="hidden" name="account_id" value="{if isset($smarty.request.account_id)}{$smarty.request.account_id}{else}{$bean->account_id}{/if}">', |
|
58 | + 0 => '<input type="hidden" name="prospect_id" value="{if isset($smarty.request.prospect_id)}{$smarty.request.prospect_id}{else}{$bean->prospect_id}{/if}">', |
|
59 | + 1 => '<input type="hidden" name="contact_id" value="{if isset($smarty.request.contact_id)}{$smarty.request.contact_id}{else}{$bean->contact_id}{/if}">', |
|
60 | + 2 => '<input type="hidden" name="opportunity_id" value="{if isset($smarty.request.opportunity_id)}{$smarty.request.opportunity_id}{else}{$bean->opportunity_id}{/if}">', |
|
61 | + 3 => '<input type="hidden" name="account_id" value="{if isset($smarty.request.account_id)}{$smarty.request.account_id}{else}{$bean->account_id}{/if}">', |
|
62 | + ), |
|
62 | 63 | ), |
63 | - ), |
|
64 | - 'maxColumns' => '2', |
|
65 | - 'widths' => |
|
66 | - array ( |
|
64 | + 'maxColumns' => '2', |
|
65 | + 'widths' => |
|
66 | + array ( |
|
67 | 67 | 0 => |
68 | 68 | array ( |
69 | - 'label' => '10', |
|
70 | - 'field' => '30', |
|
69 | + 'label' => '10', |
|
70 | + 'field' => '30', |
|
71 | 71 | ), |
72 | 72 | 1 => |
73 | 73 | array ( |
74 | - 'label' => '10', |
|
75 | - 'field' => '30', |
|
74 | + 'label' => '10', |
|
75 | + 'field' => '30', |
|
76 | + ), |
|
76 | 77 | ), |
77 | - ), |
|
78 | - 'javascript' => '<script type="text/javascript" language="Javascript">function copyAddressRight(form) {ldelim} form.alt_address_street.value = form.primary_address_street.value;form.alt_address_city.value = form.primary_address_city.value;form.alt_address_state.value = form.primary_address_state.value;form.alt_address_postalcode.value = form.primary_address_postalcode.value;form.alt_address_country.value = form.primary_address_country.value;return true; {rdelim} function copyAddressLeft(form) {ldelim} form.primary_address_street.value =form.alt_address_street.value;form.primary_address_city.value = form.alt_address_city.value;form.primary_address_state.value = form.alt_address_state.value;form.primary_address_postalcode.value =form.alt_address_postalcode.value;form.primary_address_country.value = form.alt_address_country.value;return true; {rdelim} </script>', |
|
79 | - 'useTabs' => false, |
|
78 | + 'javascript' => '<script type="text/javascript" language="Javascript">function copyAddressRight(form) {ldelim} form.alt_address_street.value = form.primary_address_street.value;form.alt_address_city.value = form.primary_address_city.value;form.alt_address_state.value = form.primary_address_state.value;form.alt_address_postalcode.value = form.primary_address_postalcode.value;form.alt_address_country.value = form.primary_address_country.value;return true; {rdelim} function copyAddressLeft(form) {ldelim} form.primary_address_street.value =form.alt_address_street.value;form.primary_address_city.value = form.alt_address_city.value;form.primary_address_state.value = form.alt_address_state.value;form.primary_address_postalcode.value =form.alt_address_postalcode.value;form.primary_address_country.value = form.alt_address_country.value;return true; {rdelim} </script>', |
|
79 | + 'useTabs' => false, |
|
80 | 80 | ), |
81 | 81 | 'panels' => |
82 | 82 | array ( |
83 | - 'lbl_contact_information' => |
|
84 | - array ( |
|
83 | + 'lbl_contact_information' => |
|
84 | + array ( |
|
85 | 85 | 0 => |
86 | 86 | array ( |
87 | - 0 => |
|
88 | - array ( |
|
87 | + 0 => |
|
88 | + array ( |
|
89 | 89 | 'name' => 'first_name', |
90 | - ), |
|
91 | - 1 => |
|
92 | - array ( |
|
90 | + ), |
|
91 | + 1 => |
|
92 | + array ( |
|
93 | 93 | 'name' => 'status', |
94 | - ), |
|
94 | + ), |
|
95 | 95 | ), |
96 | 96 | 1 => |
97 | 97 | array ( |
98 | - 0 => |
|
99 | - array ( |
|
98 | + 0 => |
|
99 | + array ( |
|
100 | 100 | 'name' => 'last_name', |
101 | 101 | 'displayParams' => |
102 | 102 | array ( |
103 | - 'required' => true, |
|
103 | + 'required' => true, |
|
104 | + ), |
|
104 | 105 | ), |
105 | - ), |
|
106 | - 1 => |
|
107 | - array ( |
|
106 | + 1 => |
|
107 | + array ( |
|
108 | 108 | 'name' => 'phone_work', |
109 | - ), |
|
109 | + ), |
|
110 | 110 | ), |
111 | 111 | 2 => |
112 | 112 | array ( |
113 | - 0 => |
|
114 | - array ( |
|
113 | + 0 => |
|
114 | + array ( |
|
115 | 115 | 'name' => 'title', |
116 | - ), |
|
117 | - 1 => |
|
118 | - array ( |
|
116 | + ), |
|
117 | + 1 => |
|
118 | + array ( |
|
119 | 119 | 'name' => 'phone_mobile', |
120 | - ), |
|
120 | + ), |
|
121 | 121 | ), |
122 | 122 | 3 => |
123 | 123 | array ( |
124 | - 0 => |
|
125 | - array ( |
|
124 | + 0 => |
|
125 | + array ( |
|
126 | 126 | 'name' => 'department', |
127 | - ), |
|
128 | - 1 => |
|
129 | - array ( |
|
127 | + ), |
|
128 | + 1 => |
|
129 | + array ( |
|
130 | 130 | 'name' => 'phone_fax', |
131 | - ), |
|
131 | + ), |
|
132 | 132 | ), |
133 | 133 | 4 => |
134 | 134 | array ( |
135 | - 0 => |
|
136 | - array ( |
|
135 | + 0 => |
|
136 | + array ( |
|
137 | 137 | 'name' => 'account_name', |
138 | - ), |
|
139 | - 1 => |
|
140 | - array ( |
|
138 | + ), |
|
139 | + 1 => |
|
140 | + array ( |
|
141 | 141 | 'name' => 'do_not_call', |
142 | - ), |
|
142 | + ), |
|
143 | 143 | ), |
144 | 144 | 5 => |
145 | 145 | array ( |
146 | - 0 => |
|
147 | - array ( |
|
146 | + 0 => |
|
147 | + array ( |
|
148 | 148 | 'name' => 'email1', |
149 | - ), |
|
149 | + ), |
|
150 | 150 | ), |
151 | 151 | 6 => |
152 | 152 | array ( |
153 | - 0 => |
|
154 | - array ( |
|
153 | + 0 => |
|
154 | + array ( |
|
155 | 155 | 'name' => 'lead_source', |
156 | - ), |
|
157 | - 1 => |
|
158 | - array ( |
|
156 | + ), |
|
157 | + 1 => |
|
158 | + array ( |
|
159 | 159 | 'name' => 'refered_by', |
160 | - ), |
|
160 | + ), |
|
161 | 161 | ), |
162 | 162 | 7 => |
163 | 163 | array ( |
164 | - 0 => |
|
165 | - array ( |
|
164 | + 0 => |
|
165 | + array ( |
|
166 | 166 | 'name' => 'assigned_user_name', |
167 | - ), |
|
168 | - 1 => |
|
169 | - array ( |
|
167 | + ), |
|
168 | + 1 => |
|
169 | + array ( |
|
170 | 170 | 'name' => 'team_name', |
171 | - ), |
|
171 | + ), |
|
172 | 172 | ), |
173 | - ), |
|
173 | + ), |
|
174 | + ), |
|
174 | 175 | ), |
175 | - ), |
|
176 | 176 | ); |
177 | 177 | ?> |
178 | 178 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -46,15 +46,15 @@ discard block |
||
46 | 46 | ********************************************************************************/ |
47 | 47 | |
48 | 48 | $viewdefs ['Leads'] = |
49 | -array ( |
|
49 | +array( |
|
50 | 50 | 'QuickCreate' => |
51 | - array ( |
|
51 | + array( |
|
52 | 52 | 'templateMeta' => |
53 | - array ( |
|
53 | + array( |
|
54 | 54 | 'form' => |
55 | - array ( |
|
55 | + array( |
|
56 | 56 | 'hidden' => |
57 | - array ( |
|
57 | + array( |
|
58 | 58 | 0 => '<input type="hidden" name="prospect_id" value="{if isset($smarty.request.prospect_id)}{$smarty.request.prospect_id}{else}{$bean->prospect_id}{/if}">', |
59 | 59 | 1 => '<input type="hidden" name="contact_id" value="{if isset($smarty.request.contact_id)}{$smarty.request.contact_id}{else}{$bean->contact_id}{/if}">', |
60 | 60 | 2 => '<input type="hidden" name="opportunity_id" value="{if isset($smarty.request.opportunity_id)}{$smarty.request.opportunity_id}{else}{$bean->opportunity_id}{/if}">', |
@@ -63,14 +63,14 @@ discard block |
||
63 | 63 | ), |
64 | 64 | 'maxColumns' => '2', |
65 | 65 | 'widths' => |
66 | - array ( |
|
66 | + array( |
|
67 | 67 | 0 => |
68 | - array ( |
|
68 | + array( |
|
69 | 69 | 'label' => '10', |
70 | 70 | 'field' => '30', |
71 | 71 | ), |
72 | 72 | 1 => |
73 | - array ( |
|
73 | + array( |
|
74 | 74 | 'label' => '10', |
75 | 75 | 'field' => '30', |
76 | 76 | ), |
@@ -79,94 +79,94 @@ discard block |
||
79 | 79 | 'useTabs' => false, |
80 | 80 | ), |
81 | 81 | 'panels' => |
82 | - array ( |
|
82 | + array( |
|
83 | 83 | 'lbl_contact_information' => |
84 | - array ( |
|
84 | + array( |
|
85 | 85 | 0 => |
86 | - array ( |
|
86 | + array( |
|
87 | 87 | 0 => |
88 | - array ( |
|
88 | + array( |
|
89 | 89 | 'name' => 'first_name', |
90 | 90 | ), |
91 | 91 | 1 => |
92 | - array ( |
|
92 | + array( |
|
93 | 93 | 'name' => 'status', |
94 | 94 | ), |
95 | 95 | ), |
96 | 96 | 1 => |
97 | - array ( |
|
97 | + array( |
|
98 | 98 | 0 => |
99 | - array ( |
|
99 | + array( |
|
100 | 100 | 'name' => 'last_name', |
101 | 101 | 'displayParams' => |
102 | - array ( |
|
102 | + array( |
|
103 | 103 | 'required' => true, |
104 | 104 | ), |
105 | 105 | ), |
106 | 106 | 1 => |
107 | - array ( |
|
107 | + array( |
|
108 | 108 | 'name' => 'phone_work', |
109 | 109 | ), |
110 | 110 | ), |
111 | 111 | 2 => |
112 | - array ( |
|
112 | + array( |
|
113 | 113 | 0 => |
114 | - array ( |
|
114 | + array( |
|
115 | 115 | 'name' => 'title', |
116 | 116 | ), |
117 | 117 | 1 => |
118 | - array ( |
|
118 | + array( |
|
119 | 119 | 'name' => 'phone_mobile', |
120 | 120 | ), |
121 | 121 | ), |
122 | 122 | 3 => |
123 | - array ( |
|
123 | + array( |
|
124 | 124 | 0 => |
125 | - array ( |
|
125 | + array( |
|
126 | 126 | 'name' => 'department', |
127 | 127 | ), |
128 | 128 | 1 => |
129 | - array ( |
|
129 | + array( |
|
130 | 130 | 'name' => 'phone_fax', |
131 | 131 | ), |
132 | 132 | ), |
133 | 133 | 4 => |
134 | - array ( |
|
134 | + array( |
|
135 | 135 | 0 => |
136 | - array ( |
|
136 | + array( |
|
137 | 137 | 'name' => 'account_name', |
138 | 138 | ), |
139 | 139 | 1 => |
140 | - array ( |
|
140 | + array( |
|
141 | 141 | 'name' => 'do_not_call', |
142 | 142 | ), |
143 | 143 | ), |
144 | 144 | 5 => |
145 | - array ( |
|
145 | + array( |
|
146 | 146 | 0 => |
147 | - array ( |
|
147 | + array( |
|
148 | 148 | 'name' => 'email1', |
149 | 149 | ), |
150 | 150 | ), |
151 | 151 | 6 => |
152 | - array ( |
|
152 | + array( |
|
153 | 153 | 0 => |
154 | - array ( |
|
154 | + array( |
|
155 | 155 | 'name' => 'lead_source', |
156 | 156 | ), |
157 | 157 | 1 => |
158 | - array ( |
|
158 | + array( |
|
159 | 159 | 'name' => 'refered_by', |
160 | 160 | ), |
161 | 161 | ), |
162 | 162 | 7 => |
163 | - array ( |
|
163 | + array( |
|
164 | 164 | 0 => |
165 | - array ( |
|
165 | + array( |
|
166 | 166 | 'name' => 'assigned_user_name', |
167 | 167 | ), |
168 | 168 | 1 => |
169 | - array ( |
|
169 | + array( |
|
170 | 170 | 'name' => 'team_name', |
171 | 171 | ), |
172 | 172 | ), |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | |
44 | 44 | $listViewDefs ['Leads'] = |
45 | 45 | array ( |
46 | - 'NAME' => |
|
47 | - array ( |
|
46 | + 'NAME' => |
|
47 | + array ( |
|
48 | 48 | 'width' => '10%', |
49 | 49 | 'label' => 'LBL_LIST_NAME', |
50 | 50 | 'link' => true, |
@@ -52,180 +52,180 @@ discard block |
||
52 | 52 | 'default' => true, |
53 | 53 | 'related_fields' => |
54 | 54 | array ( |
55 | - 0 => 'first_name', |
|
56 | - 1 => 'last_name', |
|
57 | - 2 => 'salutation', |
|
55 | + 0 => 'first_name', |
|
56 | + 1 => 'last_name', |
|
57 | + 2 => 'salutation', |
|
58 | + ), |
|
58 | 59 | ), |
59 | - ), |
|
60 | - 'STATUS' => |
|
61 | - array ( |
|
60 | + 'STATUS' => |
|
61 | + array ( |
|
62 | 62 | 'width' => '7%', |
63 | 63 | 'label' => 'LBL_LIST_STATUS', |
64 | 64 | 'default' => true, |
65 | - ), |
|
66 | - 'ACCOUNT_NAME' => |
|
67 | - array ( |
|
65 | + ), |
|
66 | + 'ACCOUNT_NAME' => |
|
67 | + array ( |
|
68 | 68 | 'width' => '15%', |
69 | 69 | 'label' => 'LBL_LIST_ACCOUNT_NAME', |
70 | 70 | 'default' => true, |
71 | 71 | 'related_fields' => |
72 | 72 | array ( |
73 | - 0 => 'account_id', |
|
73 | + 0 => 'account_id', |
|
74 | + ), |
|
74 | 75 | ), |
75 | - ), |
|
76 | - 'PHONE_WORK' => |
|
77 | - array ( |
|
76 | + 'PHONE_WORK' => |
|
77 | + array ( |
|
78 | 78 | 'width' => '15%', |
79 | 79 | 'label' => 'LBL_LIST_PHONE', |
80 | 80 | 'default' => true, |
81 | - ), |
|
82 | - 'EMAIL1' => |
|
83 | - array ( |
|
81 | + ), |
|
82 | + 'EMAIL1' => |
|
83 | + array ( |
|
84 | 84 | 'width' => '16%', |
85 | 85 | 'label' => 'LBL_LIST_EMAIL_ADDRESS', |
86 | 86 | 'sortable' => false, |
87 | 87 | 'customCode' => '{$EMAIL1_LINK}{$EMAIL1}</a>', |
88 | 88 | 'default' => true, |
89 | - ), |
|
90 | - 'ASSIGNED_USER_NAME' => |
|
91 | - array ( |
|
89 | + ), |
|
90 | + 'ASSIGNED_USER_NAME' => |
|
91 | + array ( |
|
92 | 92 | 'width' => '5%', |
93 | 93 | 'label' => 'LBL_LIST_ASSIGNED_USER', |
94 | 94 | 'module' => 'Employees', |
95 | 95 | 'id' => 'ASSIGNED_USER_ID', |
96 | 96 | 'default' => true, |
97 | - ), |
|
98 | - 'TITLE' => |
|
99 | - array ( |
|
97 | + ), |
|
98 | + 'TITLE' => |
|
99 | + array ( |
|
100 | 100 | 'width' => '10%', |
101 | 101 | 'label' => 'LBL_TITLE', |
102 | 102 | 'default' => false, |
103 | - ), |
|
104 | - 'REFERED_BY' => |
|
105 | - array ( |
|
103 | + ), |
|
104 | + 'REFERED_BY' => |
|
105 | + array ( |
|
106 | 106 | 'width' => '10%', |
107 | 107 | 'label' => 'LBL_REFERED_BY', |
108 | 108 | 'default' => false, |
109 | - ), |
|
110 | - 'LEAD_SOURCE' => |
|
111 | - array ( |
|
109 | + ), |
|
110 | + 'LEAD_SOURCE' => |
|
111 | + array ( |
|
112 | 112 | 'width' => '10%', |
113 | 113 | 'label' => 'LBL_LEAD_SOURCE', |
114 | 114 | 'default' => false, |
115 | - ), |
|
116 | - 'DEPARTMENT' => |
|
117 | - array ( |
|
115 | + ), |
|
116 | + 'DEPARTMENT' => |
|
117 | + array ( |
|
118 | 118 | 'width' => '10%', |
119 | 119 | 'label' => 'LBL_DEPARTMENT', |
120 | 120 | 'default' => false, |
121 | - ), |
|
122 | - 'DO_NOT_CALL' => |
|
123 | - array ( |
|
121 | + ), |
|
122 | + 'DO_NOT_CALL' => |
|
123 | + array ( |
|
124 | 124 | 'width' => '10%', |
125 | 125 | 'label' => 'LBL_DO_NOT_CALL', |
126 | 126 | 'default' => false, |
127 | - ), |
|
128 | - 'PHONE_HOME' => |
|
129 | - array ( |
|
127 | + ), |
|
128 | + 'PHONE_HOME' => |
|
129 | + array ( |
|
130 | 130 | 'width' => '10%', |
131 | 131 | 'label' => 'LBL_HOME_PHONE', |
132 | 132 | 'default' => false, |
133 | - ), |
|
134 | - 'PHONE_MOBILE' => |
|
135 | - array ( |
|
133 | + ), |
|
134 | + 'PHONE_MOBILE' => |
|
135 | + array ( |
|
136 | 136 | 'width' => '10%', |
137 | 137 | 'label' => 'LBL_MOBILE_PHONE', |
138 | 138 | 'default' => false, |
139 | - ), |
|
140 | - 'PHONE_OTHER' => |
|
141 | - array ( |
|
139 | + ), |
|
140 | + 'PHONE_OTHER' => |
|
141 | + array ( |
|
142 | 142 | 'width' => '10%', |
143 | 143 | 'label' => 'LBL_OTHER_PHONE', |
144 | 144 | 'default' => false, |
145 | - ), |
|
146 | - 'PHONE_FAX' => |
|
147 | - array ( |
|
145 | + ), |
|
146 | + 'PHONE_FAX' => |
|
147 | + array ( |
|
148 | 148 | 'width' => '10%', |
149 | 149 | 'label' => 'LBL_FAX_PHONE', |
150 | 150 | 'default' => false, |
151 | - ), |
|
152 | - 'PRIMARY_ADDRESS_COUNTRY' => |
|
153 | - array ( |
|
151 | + ), |
|
152 | + 'PRIMARY_ADDRESS_COUNTRY' => |
|
153 | + array ( |
|
154 | 154 | 'width' => '10%', |
155 | 155 | 'label' => 'LBL_PRIMARY_ADDRESS_COUNTRY', |
156 | 156 | 'default' => false, |
157 | - ), |
|
158 | - 'PRIMARY_ADDRESS_STREET' => |
|
159 | - array ( |
|
157 | + ), |
|
158 | + 'PRIMARY_ADDRESS_STREET' => |
|
159 | + array ( |
|
160 | 160 | 'width' => '10%', |
161 | 161 | 'label' => 'LBL_PRIMARY_ADDRESS_STREET', |
162 | 162 | 'default' => false, |
163 | - ), |
|
164 | - 'PRIMARY_ADDRESS_CITY' => |
|
165 | - array ( |
|
163 | + ), |
|
164 | + 'PRIMARY_ADDRESS_CITY' => |
|
165 | + array ( |
|
166 | 166 | 'width' => '10%', |
167 | 167 | 'label' => 'LBL_PRIMARY_ADDRESS_CITY', |
168 | 168 | 'default' => false, |
169 | - ), |
|
170 | - 'PRIMARY_ADDRESS_STATE' => |
|
171 | - array ( |
|
169 | + ), |
|
170 | + 'PRIMARY_ADDRESS_STATE' => |
|
171 | + array ( |
|
172 | 172 | 'width' => '10%', |
173 | 173 | 'label' => 'LBL_PRIMARY_ADDRESS_STATE', |
174 | 174 | 'default' => false, |
175 | - ), |
|
176 | - 'PRIMARY_ADDRESS_POSTALCODE' => |
|
177 | - array ( |
|
175 | + ), |
|
176 | + 'PRIMARY_ADDRESS_POSTALCODE' => |
|
177 | + array ( |
|
178 | 178 | 'width' => '10%', |
179 | 179 | 'label' => 'LBL_PRIMARY_ADDRESS_POSTALCODE', |
180 | 180 | 'default' => false, |
181 | - ), |
|
182 | - 'ALT_ADDRESS_COUNTRY' => |
|
183 | - array ( |
|
181 | + ), |
|
182 | + 'ALT_ADDRESS_COUNTRY' => |
|
183 | + array ( |
|
184 | 184 | 'width' => '10%', |
185 | 185 | 'label' => 'LBL_ALT_ADDRESS_COUNTRY', |
186 | 186 | 'default' => false, |
187 | - ), |
|
188 | - 'ALT_ADDRESS_STREET' => |
|
189 | - array ( |
|
187 | + ), |
|
188 | + 'ALT_ADDRESS_STREET' => |
|
189 | + array ( |
|
190 | 190 | 'width' => '10%', |
191 | 191 | 'label' => 'LBL_ALT_ADDRESS_STREET', |
192 | 192 | 'default' => false, |
193 | - ), |
|
194 | - 'ALT_ADDRESS_CITY' => |
|
195 | - array ( |
|
193 | + ), |
|
194 | + 'ALT_ADDRESS_CITY' => |
|
195 | + array ( |
|
196 | 196 | 'width' => '10%', |
197 | 197 | 'label' => 'LBL_ALT_ADDRESS_CITY', |
198 | 198 | 'default' => false, |
199 | - ), |
|
200 | - 'ALT_ADDRESS_STATE' => |
|
201 | - array ( |
|
199 | + ), |
|
200 | + 'ALT_ADDRESS_STATE' => |
|
201 | + array ( |
|
202 | 202 | 'width' => '10%', |
203 | 203 | 'label' => 'LBL_ALT_ADDRESS_STATE', |
204 | 204 | 'default' => false, |
205 | - ), |
|
206 | - 'ALT_ADDRESS_POSTALCODE' => |
|
207 | - array ( |
|
205 | + ), |
|
206 | + 'ALT_ADDRESS_POSTALCODE' => |
|
207 | + array ( |
|
208 | 208 | 'width' => '10%', |
209 | 209 | 'label' => 'LBL_ALT_ADDRESS_POSTALCODE', |
210 | 210 | 'default' => false, |
211 | - ), |
|
212 | - 'CREATED_BY' => |
|
213 | - array ( |
|
211 | + ), |
|
212 | + 'CREATED_BY' => |
|
213 | + array ( |
|
214 | 214 | 'width' => '10%', |
215 | 215 | 'label' => 'LBL_CREATED', |
216 | 216 | 'default' => false, |
217 | - ), |
|
218 | - 'MODIFIED_BY_NAME' => |
|
219 | - array ( |
|
217 | + ), |
|
218 | + 'MODIFIED_BY_NAME' => |
|
219 | + array ( |
|
220 | 220 | 'width' => '5%', |
221 | 221 | 'label' => 'LBL_MODIFIED', |
222 | 222 | 'default' => false, |
223 | - ), |
|
224 | - 'DATE_ENTERED' => |
|
225 | - array ( |
|
223 | + ), |
|
224 | + 'DATE_ENTERED' => |
|
225 | + array ( |
|
226 | 226 | 'width' => '10%', |
227 | 227 | 'label' => 'LBL_DATE_ENTERED', |
228 | 228 | 'default' => true, |
229 | - ), |
|
229 | + ), |
|
230 | 230 | ); |
231 | 231 | ?> |
232 | 232 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -42,45 +42,45 @@ discard block |
||
42 | 42 | |
43 | 43 | |
44 | 44 | $listViewDefs ['Leads'] = |
45 | -array ( |
|
45 | +array( |
|
46 | 46 | 'NAME' => |
47 | - array ( |
|
47 | + array( |
|
48 | 48 | 'width' => '10%', |
49 | 49 | 'label' => 'LBL_LIST_NAME', |
50 | 50 | 'link' => true, |
51 | 51 | 'orderBy' => 'name', |
52 | 52 | 'default' => true, |
53 | 53 | 'related_fields' => |
54 | - array ( |
|
54 | + array( |
|
55 | 55 | 0 => 'first_name', |
56 | 56 | 1 => 'last_name', |
57 | 57 | 2 => 'salutation', |
58 | 58 | ), |
59 | 59 | ), |
60 | 60 | 'STATUS' => |
61 | - array ( |
|
61 | + array( |
|
62 | 62 | 'width' => '7%', |
63 | 63 | 'label' => 'LBL_LIST_STATUS', |
64 | 64 | 'default' => true, |
65 | 65 | ), |
66 | 66 | 'ACCOUNT_NAME' => |
67 | - array ( |
|
67 | + array( |
|
68 | 68 | 'width' => '15%', |
69 | 69 | 'label' => 'LBL_LIST_ACCOUNT_NAME', |
70 | 70 | 'default' => true, |
71 | 71 | 'related_fields' => |
72 | - array ( |
|
72 | + array( |
|
73 | 73 | 0 => 'account_id', |
74 | 74 | ), |
75 | 75 | ), |
76 | 76 | 'PHONE_WORK' => |
77 | - array ( |
|
77 | + array( |
|
78 | 78 | 'width' => '15%', |
79 | 79 | 'label' => 'LBL_LIST_PHONE', |
80 | 80 | 'default' => true, |
81 | 81 | ), |
82 | 82 | 'EMAIL1' => |
83 | - array ( |
|
83 | + array( |
|
84 | 84 | 'width' => '16%', |
85 | 85 | 'label' => 'LBL_LIST_EMAIL_ADDRESS', |
86 | 86 | 'sortable' => false, |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | 'default' => true, |
89 | 89 | ), |
90 | 90 | 'ASSIGNED_USER_NAME' => |
91 | - array ( |
|
91 | + array( |
|
92 | 92 | 'width' => '5%', |
93 | 93 | 'label' => 'LBL_LIST_ASSIGNED_USER', |
94 | 94 | 'module' => 'Employees', |
@@ -96,133 +96,133 @@ discard block |
||
96 | 96 | 'default' => true, |
97 | 97 | ), |
98 | 98 | 'TITLE' => |
99 | - array ( |
|
99 | + array( |
|
100 | 100 | 'width' => '10%', |
101 | 101 | 'label' => 'LBL_TITLE', |
102 | 102 | 'default' => false, |
103 | 103 | ), |
104 | 104 | 'REFERED_BY' => |
105 | - array ( |
|
105 | + array( |
|
106 | 106 | 'width' => '10%', |
107 | 107 | 'label' => 'LBL_REFERED_BY', |
108 | 108 | 'default' => false, |
109 | 109 | ), |
110 | 110 | 'LEAD_SOURCE' => |
111 | - array ( |
|
111 | + array( |
|
112 | 112 | 'width' => '10%', |
113 | 113 | 'label' => 'LBL_LEAD_SOURCE', |
114 | 114 | 'default' => false, |
115 | 115 | ), |
116 | 116 | 'DEPARTMENT' => |
117 | - array ( |
|
117 | + array( |
|
118 | 118 | 'width' => '10%', |
119 | 119 | 'label' => 'LBL_DEPARTMENT', |
120 | 120 | 'default' => false, |
121 | 121 | ), |
122 | 122 | 'DO_NOT_CALL' => |
123 | - array ( |
|
123 | + array( |
|
124 | 124 | 'width' => '10%', |
125 | 125 | 'label' => 'LBL_DO_NOT_CALL', |
126 | 126 | 'default' => false, |
127 | 127 | ), |
128 | 128 | 'PHONE_HOME' => |
129 | - array ( |
|
129 | + array( |
|
130 | 130 | 'width' => '10%', |
131 | 131 | 'label' => 'LBL_HOME_PHONE', |
132 | 132 | 'default' => false, |
133 | 133 | ), |
134 | 134 | 'PHONE_MOBILE' => |
135 | - array ( |
|
135 | + array( |
|
136 | 136 | 'width' => '10%', |
137 | 137 | 'label' => 'LBL_MOBILE_PHONE', |
138 | 138 | 'default' => false, |
139 | 139 | ), |
140 | 140 | 'PHONE_OTHER' => |
141 | - array ( |
|
141 | + array( |
|
142 | 142 | 'width' => '10%', |
143 | 143 | 'label' => 'LBL_OTHER_PHONE', |
144 | 144 | 'default' => false, |
145 | 145 | ), |
146 | 146 | 'PHONE_FAX' => |
147 | - array ( |
|
147 | + array( |
|
148 | 148 | 'width' => '10%', |
149 | 149 | 'label' => 'LBL_FAX_PHONE', |
150 | 150 | 'default' => false, |
151 | 151 | ), |
152 | 152 | 'PRIMARY_ADDRESS_COUNTRY' => |
153 | - array ( |
|
153 | + array( |
|
154 | 154 | 'width' => '10%', |
155 | 155 | 'label' => 'LBL_PRIMARY_ADDRESS_COUNTRY', |
156 | 156 | 'default' => false, |
157 | 157 | ), |
158 | 158 | 'PRIMARY_ADDRESS_STREET' => |
159 | - array ( |
|
159 | + array( |
|
160 | 160 | 'width' => '10%', |
161 | 161 | 'label' => 'LBL_PRIMARY_ADDRESS_STREET', |
162 | 162 | 'default' => false, |
163 | 163 | ), |
164 | 164 | 'PRIMARY_ADDRESS_CITY' => |
165 | - array ( |
|
165 | + array( |
|
166 | 166 | 'width' => '10%', |
167 | 167 | 'label' => 'LBL_PRIMARY_ADDRESS_CITY', |
168 | 168 | 'default' => false, |
169 | 169 | ), |
170 | 170 | 'PRIMARY_ADDRESS_STATE' => |
171 | - array ( |
|
171 | + array( |
|
172 | 172 | 'width' => '10%', |
173 | 173 | 'label' => 'LBL_PRIMARY_ADDRESS_STATE', |
174 | 174 | 'default' => false, |
175 | 175 | ), |
176 | 176 | 'PRIMARY_ADDRESS_POSTALCODE' => |
177 | - array ( |
|
177 | + array( |
|
178 | 178 | 'width' => '10%', |
179 | 179 | 'label' => 'LBL_PRIMARY_ADDRESS_POSTALCODE', |
180 | 180 | 'default' => false, |
181 | 181 | ), |
182 | 182 | 'ALT_ADDRESS_COUNTRY' => |
183 | - array ( |
|
183 | + array( |
|
184 | 184 | 'width' => '10%', |
185 | 185 | 'label' => 'LBL_ALT_ADDRESS_COUNTRY', |
186 | 186 | 'default' => false, |
187 | 187 | ), |
188 | 188 | 'ALT_ADDRESS_STREET' => |
189 | - array ( |
|
189 | + array( |
|
190 | 190 | 'width' => '10%', |
191 | 191 | 'label' => 'LBL_ALT_ADDRESS_STREET', |
192 | 192 | 'default' => false, |
193 | 193 | ), |
194 | 194 | 'ALT_ADDRESS_CITY' => |
195 | - array ( |
|
195 | + array( |
|
196 | 196 | 'width' => '10%', |
197 | 197 | 'label' => 'LBL_ALT_ADDRESS_CITY', |
198 | 198 | 'default' => false, |
199 | 199 | ), |
200 | 200 | 'ALT_ADDRESS_STATE' => |
201 | - array ( |
|
201 | + array( |
|
202 | 202 | 'width' => '10%', |
203 | 203 | 'label' => 'LBL_ALT_ADDRESS_STATE', |
204 | 204 | 'default' => false, |
205 | 205 | ), |
206 | 206 | 'ALT_ADDRESS_POSTALCODE' => |
207 | - array ( |
|
207 | + array( |
|
208 | 208 | 'width' => '10%', |
209 | 209 | 'label' => 'LBL_ALT_ADDRESS_POSTALCODE', |
210 | 210 | 'default' => false, |
211 | 211 | ), |
212 | 212 | 'CREATED_BY' => |
213 | - array ( |
|
213 | + array( |
|
214 | 214 | 'width' => '10%', |
215 | 215 | 'label' => 'LBL_CREATED', |
216 | 216 | 'default' => false, |
217 | 217 | ), |
218 | 218 | 'MODIFIED_BY_NAME' => |
219 | - array ( |
|
219 | + array( |
|
220 | 220 | 'width' => '5%', |
221 | 221 | 'label' => 'LBL_MODIFIED', |
222 | 222 | 'default' => false, |
223 | 223 | ), |
224 | 224 | 'DATE_ENTERED' => |
225 | - array ( |
|
225 | + array( |
|
226 | 226 | 'width' => '10%', |
227 | 227 | 'label' => 'LBL_DATE_ENTERED', |
228 | 228 | 'default' => true, |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $this->ss->assign('RETURN_MODULE', 'Emails'); |
155 | 155 | $this->ss->assign('RETURN_ACTION', 'EditView'); |
156 | 156 | if(isset($_REQUEST['start'])) { |
157 | - $this->ss->assign('START', $_REQUEST['start']); |
|
157 | + $this->ss->assign('START', $_REQUEST['start']); |
|
158 | 158 | } |
159 | 159 | } |
160 | 160 | //// END INBOUND EMAIL WORKFLOW |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | $template = 'modules/Leads/tpls/ShowDuplicates.tpl'; |
192 | 192 | if(file_exists('custom/' . $template)) |
193 | 193 | { |
194 | - $template = 'custom/' . $template; |
|
194 | + $template = 'custom/' . $template; |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | $saveLabel = string_format($app_strings['LBL_SAVE_OBJECT'], array($this->module)); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -56,13 +56,13 @@ discard block |
||
56 | 56 | global $current_language; |
57 | 57 | global $mod_strings; |
58 | 58 | |
59 | - if(!isset($_SESSION['SHOW_DUPLICATES'])) |
|
59 | + if (!isset($_SESSION['SHOW_DUPLICATES'])) |
|
60 | 60 | { |
61 | 61 | $GLOBALS['log']->error("Unauthorized access to this area."); |
62 | 62 | sugar_die("Unauthorized access to this area."); |
63 | 63 | } |
64 | 64 | |
65 | - parse_str($_SESSION['SHOW_DUPLICATES'],$_POST); |
|
65 | + parse_str($_SESSION['SHOW_DUPLICATES'], $_POST); |
|
66 | 66 | $post = array_map("securexss", $_POST); |
67 | 67 | foreach ($post as $k => $v) { |
68 | 68 | $_POST[$k] = $v; |
@@ -95,8 +95,8 @@ discard block |
||
95 | 95 | $duplicateLeads = array(); |
96 | 96 | $db = DBManagerFactory::getInstance(); |
97 | 97 | $result = $db->query($query); |
98 | - $i=0; |
|
99 | - while (($row=$db->fetchByAssoc($result)) != null) { |
|
98 | + $i = 0; |
|
99 | + while (($row = $db->fetchByAssoc($result)) != null) { |
|
100 | 100 | $duplicateLeads[$i] = $row; |
101 | 101 | $i++; |
102 | 102 | } |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | // Bug 25311 - Add special handling for when the form specifies many-to-many relationships |
122 | - if(!empty($_POST['Leadsrelate_to'])) { |
|
122 | + if (!empty($_POST['Leadsrelate_to'])) { |
|
123 | 123 | $input .= "<input type='hidden' name='relate_to' value='{$_POST['Leadsrelate_to']}'>\n"; |
124 | 124 | } |
125 | 125 | |
126 | - if(!empty($_POST['Leadsrelate_id'])) { |
|
126 | + if (!empty($_POST['Leadsrelate_id'])) { |
|
127 | 127 | $input .= "<input type='hidden' name='relate_id' value='{$_POST['Leadsrelate_id']}'>\n"; |
128 | 128 | } |
129 | 129 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $input .= $emailAddress->getEmailAddressWidgetDuplicatesView($lead); |
133 | 133 | |
134 | 134 | $get = ''; |
135 | - if(!empty($_POST['return_module'])) |
|
135 | + if (!empty($_POST['return_module'])) |
|
136 | 136 | { |
137 | 137 | $this->ss->assign('RETURN_MODULE', $_POST['return_module']); |
138 | 138 | } else { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | $get .= "&return_action="; |
143 | - if(!empty($_POST['return_action'])) |
|
143 | + if (!empty($_POST['return_action'])) |
|
144 | 144 | { |
145 | 145 | $this->ss->assign('RETURN_ACTION', $_POST['return_action']); |
146 | 146 | } else { |
@@ -149,38 +149,38 @@ discard block |
||
149 | 149 | |
150 | 150 | /////////////////////////////////////////////////////////////////////////////// |
151 | 151 | //// INBOUND EMAIL WORKFLOW |
152 | - if(isset($_REQUEST['inbound_email_id'])) { |
|
152 | + if (isset($_REQUEST['inbound_email_id'])) { |
|
153 | 153 | $this->ss->assign('INBOUND_EMAIL_ID', $_REQUEST['inbound_email_id']); |
154 | 154 | $this->ss->assign('RETURN_MODULE', 'Emails'); |
155 | 155 | $this->ss->assign('RETURN_ACTION', 'EditView'); |
156 | - if(isset($_REQUEST['start'])) { |
|
156 | + if (isset($_REQUEST['start'])) { |
|
157 | 157 | $this->ss->assign('START', $_REQUEST['start']); |
158 | 158 | } |
159 | 159 | } |
160 | 160 | //// END INBOUND EMAIL WORKFLOW |
161 | 161 | /////////////////////////////////////////////////////////////////////////////// |
162 | - if(!empty($_POST['popup'])) |
|
162 | + if (!empty($_POST['popup'])) |
|
163 | 163 | { |
164 | 164 | $input .= '<input type="hidden" name="popup" value="'.$_POST['popup'].'">'; |
165 | 165 | } else { |
166 | 166 | $input .= '<input type="hidden" name="popup" value="false">'; |
167 | 167 | } |
168 | 168 | |
169 | - if(!empty($_POST['to_pdf'])) |
|
169 | + if (!empty($_POST['to_pdf'])) |
|
170 | 170 | { |
171 | 171 | $input .= '<input type="hidden" name="to_pdf" value="'.$_POST['to_pdf'].'">'; |
172 | 172 | } else { |
173 | 173 | $input .= '<input type="hidden" name="to_pdf" value="false">'; |
174 | 174 | } |
175 | 175 | |
176 | - if(!empty($_POST['create'])) |
|
176 | + if (!empty($_POST['create'])) |
|
177 | 177 | { |
178 | 178 | $input .= '<input type="hidden" name="create" value="'.$_POST['create'].'">'; |
179 | 179 | } else { |
180 | 180 | $input .= '<input type="hidden" name="create" value="false">'; |
181 | 181 | } |
182 | 182 | |
183 | - if(!empty($_POST['return_id'])) |
|
183 | + if (!empty($_POST['return_id'])) |
|
184 | 184 | { |
185 | 185 | $this->ss->assign('RETURN_ID', $_POST['return_id']); |
186 | 186 | } |
@@ -189,9 +189,9 @@ discard block |
||
189 | 189 | |
190 | 190 | //Load the appropriate template |
191 | 191 | $template = 'modules/Leads/tpls/ShowDuplicates.tpl'; |
192 | - if(file_exists('custom/' . $template)) |
|
192 | + if (file_exists('custom/'.$template)) |
|
193 | 193 | { |
194 | - $template = 'custom/' . $template; |
|
194 | + $template = 'custom/'.$template; |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | $saveLabel = string_format($app_strings['LBL_SAVE_OBJECT'], array($this->module)); |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -85,7 +87,9 @@ discard block |
||
85 | 87 | $first = true; |
86 | 88 | foreach ($duplicates as $duplicate_id) |
87 | 89 | { |
88 | - if (!$first) $query .= ' OR '; |
|
90 | + if (!$first) { |
|
91 | + $query .= ' OR '; |
|
92 | + } |
|
89 | 93 | $first = false; |
90 | 94 | $query .= "id='$duplicate_id' "; |
91 | 95 | } |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -179,8 +181,7 @@ discard block |
||
179 | 181 | if($sugar_config['lead_conv_activity_opt'] == 'move') |
180 | 182 | { |
181 | 183 | $smarty->assign('convertModuleListOptions', get_select_options_with_id(array('None'=>$app_strings['LBL_NONE'], 'Contacts' => $app_list_strings["moduleListSingular"]['Contacts']), '')); |
182 | - } |
|
183 | - else if($sugar_config['lead_conv_activity_opt'] == 'copy') |
|
184 | + } else if($sugar_config['lead_conv_activity_opt'] == 'copy') |
|
184 | 185 | { |
185 | 186 | $smarty->assign('convertModuleListOptions', get_select_options_with_id(array('Contacts' => $app_list_strings["moduleListSingular"]['Contacts']), '')); |
186 | 187 | } |
@@ -212,17 +213,14 @@ discard block |
||
212 | 213 | if ($module == "Accounts" && $field == 'name') |
213 | 214 | { |
214 | 215 | $focus->name = $this->focus->account_name; |
215 | - } |
|
216 | - else if ($module == "Opportunities" && $field == 'amount') |
|
216 | + } else if ($module == "Opportunities" && $field == 'amount') |
|
217 | 217 | { |
218 | 218 | $focus->amount = unformat_number($this->focus->opportunity_amount); |
219 | - } |
|
220 | - else if ($module == "Opportunities" && $field == 'name') { |
|
219 | + } else if ($module == "Opportunities" && $field == 'name') { |
|
221 | 220 | if ($opportunityNameInLayout && !empty($this->focus->opportunity_name)){ |
222 | 221 | $focus->name = $this->focus->opportunity_name; |
223 | 222 | } |
224 | - } |
|
225 | - else if ($field == "id") |
|
223 | + } else if ($field == "id") |
|
226 | 224 | { |
227 | 225 | //If it is not a contact, don't copy the ID from the lead |
228 | 226 | if ($module == "Contacts") { |
@@ -232,25 +230,25 @@ discard block |
||
232 | 230 | { |
233 | 231 | //Special case where company and person have the same field with a different name |
234 | 232 | $focus->phone_office = $this->focus->phone_work; |
235 | - } |
|
236 | - else if (strpos($field, "billing_address") !== false && $focus->field_defs[$field]["type"] == "varchar") /* Bug 42219 fix */ |
|
233 | + } else if (strpos($field, "billing_address") !== false && $focus->field_defs[$field]["type"] == "varchar") { |
|
234 | + /* Bug 42219 fix */ |
|
237 | 235 | { |
238 | 236 | $tmp_field = str_replace("billing_", "primary_", $field); |
237 | + } |
|
239 | 238 | $focus->field_defs[$field]["type"] = "text"; |
240 | 239 | if (isset($this->focus->$tmp_field)) { |
241 | 240 | $focus->$field = $this->focus->$tmp_field; |
242 | 241 | } |
243 | - } |
|
244 | - |
|
245 | - else if (strpos($field, "shipping_address") !== false && $focus->field_defs[$field]["type"] == "varchar") /* Bug 42219 fix */ |
|
242 | + } else if (strpos($field, "shipping_address") !== false && $focus->field_defs[$field]["type"] == "varchar") { |
|
243 | + /* Bug 42219 fix */ |
|
246 | 244 | { |
247 | 245 | $tmp_field = str_replace("shipping_", "primary_", $field); |
246 | + } |
|
248 | 247 | if (isset($this->focus->$tmp_field)) { |
249 | 248 | $focus->$field = $this->focus->$tmp_field; |
250 | 249 | } |
251 | 250 | $focus->field_defs[$field]["type"] = "text"; |
252 | - } |
|
253 | - else if (isset($this->focus->$field)) |
|
251 | + } else if (isset($this->focus->$field)) |
|
254 | 252 | { |
255 | 253 | $focus->$field = $this->focus->$field; |
256 | 254 | } |
@@ -403,8 +401,7 @@ discard block |
||
403 | 401 | unset($_REQUEST["convert_create_Contacts"]); |
404 | 402 | unset($_POST["convert_create_Contacts"]); |
405 | 403 | } |
406 | - } |
|
407 | - elseif (!empty($_REQUEST["convert_create_Contacts"]) && $_REQUEST["convert_create_Contacts"] != "false" && !isset($_POST['ContinueContact'])) |
|
404 | + } elseif (!empty($_REQUEST["convert_create_Contacts"]) && $_REQUEST["convert_create_Contacts"] != "false" && !isset($_POST['ContinueContact'])) |
|
408 | 405 | { |
409 | 406 | require_once('modules/Contacts/ContactFormBase.php'); |
410 | 407 | $contactForm = new ContactFormBase(); |
@@ -425,8 +422,7 @@ discard block |
||
425 | 422 | $_REQUEST['account_id'] = $_REQUEST['selectedAccount']; |
426 | 423 | unset($_REQUEST["convert_create_Accounts"]); |
427 | 424 | unset($_POST["convert_create_Accounts"]); |
428 | - } |
|
429 | - elseif (!empty($_REQUEST["convert_create_Accounts"]) && $_REQUEST["convert_create_Accounts"] != "false" && empty($_POST['ContinueAccount'])) |
|
425 | + } elseif (!empty($_REQUEST["convert_create_Accounts"]) && $_REQUEST["convert_create_Accounts"] != "false" && empty($_POST['ContinueAccount'])) |
|
430 | 426 | { |
431 | 427 | require_once('modules/Accounts/AccountFormBase.php'); |
432 | 428 | $accountForm = new AccountFormBase(); |
@@ -445,8 +441,9 @@ discard block |
||
445 | 441 | { |
446 | 442 | //Save the new record |
447 | 443 | $bean = $beanList[$module]; |
448 | - if (empty($beans[$module])) |
|
449 | - $beans[$module] = new $bean(); |
|
444 | + if (empty($beans[$module])) { |
|
445 | + $beans[$module] = new $bean(); |
|
446 | + } |
|
450 | 447 | |
451 | 448 | $this->populateNewBean($module, $beans[$module], $beans['Contacts'], $lead); |
452 | 449 | // when creating a new contact, create the id for linking with other modules |
@@ -536,8 +533,7 @@ discard block |
||
536 | 533 | { |
537 | 534 | $id_field = $relObject->rhs_key; |
538 | 535 | $lead->$id_field = $bean->id; |
539 | - } |
|
540 | - else |
|
536 | + } else |
|
541 | 537 | { |
542 | 538 | $bean->$leadsRel->add($lead->id); |
543 | 539 | } |
@@ -550,8 +546,7 @@ discard block |
||
550 | 546 | { |
551 | 547 | $bean->account_id = $beans['Accounts']->id; |
552 | 548 | $bean->account_name = $beans['Accounts']->name; |
553 | - } |
|
554 | - else if (!empty($selects['Accounts'])) |
|
549 | + } else if (!empty($selects['Accounts'])) |
|
555 | 550 | { |
556 | 551 | $bean->account_id = $selects['Accounts']; |
557 | 552 | } |
@@ -591,8 +586,7 @@ discard block |
||
591 | 586 | $bean->load_relationship($meetingsRel); |
592 | 587 | $bean->$meetingsRel->add($current_user->id); |
593 | 588 | return $bean; |
594 | - } |
|
595 | - else |
|
589 | + } else |
|
596 | 590 | { |
597 | 591 | return false; |
598 | 592 | } |
@@ -611,8 +605,7 @@ discard block |
||
611 | 605 | <a href='index.php?module={$bean->module_dir}&action=DetailView&record={$bean->id}'> |
612 | 606 | {$bean->get_summary_text()} |
613 | 607 | </a></li>"; |
614 | - } |
|
615 | - else { |
|
608 | + } else { |
|
616 | 609 | global $app_list_strings; |
617 | 610 | if(!empty($app_list_strings['moduleListSingular'][$bean->module_dir])) { |
618 | 611 | $module_name = $app_list_strings['moduleListSingular'][$bean->module_dir]; |
@@ -652,7 +645,7 @@ discard block |
||
652 | 645 | $account_id = create_guid(); |
653 | 646 | if(!empty($beans['Accounts']->id)){ |
654 | 647 | $account_id = $beans['Accounts']->id; |
655 | - }else{ |
|
648 | + } else{ |
|
656 | 649 | $beans['Accounts']->id = $account_id; |
657 | 650 | } |
658 | 651 | $accountParentInfo = array('id'=>$account_id,'type'=>'Accounts'); |
@@ -683,8 +676,7 @@ discard block |
||
683 | 676 | } |
684 | 677 | } |
685 | 678 | } |
686 | - } |
|
687 | - else if ($sugar_config['lead_conv_activity_opt'] == 'move') { |
|
679 | + } else if ($sugar_config['lead_conv_activity_opt'] == 'move') { |
|
688 | 680 | // if to move activities, should be only one module selected |
689 | 681 | if ($_POST['lead_conv_ac_op_sel'] == $module) { |
690 | 682 | $this->moveActivity($activity, $bean); |
@@ -749,7 +741,9 @@ discard block |
||
749 | 741 | $lead |
750 | 742 | ) |
751 | 743 | { |
752 | - if (!$lead) return; |
|
744 | + if (!$lead) { |
|
745 | + return; |
|
746 | + } |
|
753 | 747 | |
754 | 748 | global $beanList, $db; |
755 | 749 | |
@@ -855,7 +849,10 @@ discard block |
||
855 | 849 | if(!isset($_REQUEST[$module . $field]) && isset($lead->$field) && $field != 'id') |
856 | 850 | { |
857 | 851 | $bean->$field = $lead->$field; |
858 | - if($field == 'date_entered') $bean->$field = gmdate($GLOBALS['timedate']->get_db_date_time_format()); //bug 41030 |
|
852 | + if($field == 'date_entered') { |
|
853 | + $bean->$field = gmdate($GLOBALS['timedate']->get_db_date_time_format()); |
|
854 | + } |
|
855 | + //bug 41030 |
|
859 | 856 | } |
860 | 857 | } |
861 | 858 | populateFromPost($module, $bean, true); |
@@ -872,10 +869,11 @@ discard block |
||
872 | 869 | $contact->$fieldDef['id_name'] = $bean->id ; |
873 | 870 | if ($fieldDef['id_name'] != $select) { |
874 | 871 | $rname = isset($fieldDef['rname']) ? $fieldDef['rname'] : ""; |
875 | - if (!empty($rname) && isset($bean->$rname)) |
|
876 | - $contact->$select = $bean->$rname; |
|
877 | - else |
|
878 | - $contact->$select = $bean->name; |
|
872 | + if (!empty($rname) && isset($bean->$rname)) { |
|
873 | + $contact->$select = $bean->$rname; |
|
874 | + } else { |
|
875 | + $contact->$select = $bean->name; |
|
876 | + } |
|
879 | 877 | } |
880 | 878 | } |
881 | 879 | } else if ($module != "Contacts"){ |
@@ -911,30 +909,33 @@ discard block |
||
911 | 909 | if(!isset($_REQUEST[$bean->module_dir . $field]) && strpos($field, "_address_") !== false) |
912 | 910 | { |
913 | 911 | $set = "primary"; |
914 | - if (strpos($field, "alt_") !== false || strpos($field, "shipping_") !== false) |
|
915 | - $set = "alt"; |
|
912 | + if (strpos($field, "alt_") !== false || strpos($field, "shipping_") !== false) { |
|
913 | + $set = "alt"; |
|
914 | + } |
|
916 | 915 | $type = ""; |
917 | 916 | |
918 | - if(strpos($field, "_address_street_2") !== false) |
|
919 | - $type = "_address_street_2"; |
|
920 | - else if(strpos($field, "_address_street_3") !== false) |
|
921 | - $type = "_address_street_3"; |
|
922 | - else if(strpos($field, "_address_street_4") !== false) |
|
923 | - $type = ""; |
|
924 | - else if(strpos($field, "_address_street") !== false) |
|
925 | - $type = "_address_street"; |
|
926 | - else if(strpos($field, "_address_city") !== false) |
|
927 | - $type = "_address_city"; |
|
928 | - else if(strpos($field, "_address_state") !== false) |
|
929 | - $type = "_address_state"; |
|
930 | - else if(strpos($field, "_address_postalcode") !== false) |
|
931 | - $type = "_address_postalcode"; |
|
932 | - else if(strpos($field, "_address_country") !== false) |
|
933 | - $type = "_address_country"; |
|
917 | + if(strpos($field, "_address_street_2") !== false) { |
|
918 | + $type = "_address_street_2"; |
|
919 | + } else if(strpos($field, "_address_street_3") !== false) { |
|
920 | + $type = "_address_street_3"; |
|
921 | + } else if(strpos($field, "_address_street_4") !== false) { |
|
922 | + $type = ""; |
|
923 | + } else if(strpos($field, "_address_street") !== false) { |
|
924 | + $type = "_address_street"; |
|
925 | + } else if(strpos($field, "_address_city") !== false) { |
|
926 | + $type = "_address_city"; |
|
927 | + } else if(strpos($field, "_address_state") !== false) { |
|
928 | + $type = "_address_state"; |
|
929 | + } else if(strpos($field, "_address_postalcode") !== false) { |
|
930 | + $type = "_address_postalcode"; |
|
931 | + } else if(strpos($field, "_address_country") !== false) { |
|
932 | + $type = "_address_country"; |
|
933 | + } |
|
934 | 934 | |
935 | 935 | $var = $set.$type; |
936 | - if (isset($contact->$var)) |
|
937 | - $bean->$field = $contact->$var; |
|
936 | + if (isset($contact->$var)) { |
|
937 | + $bean->$field = $contact->$var; |
|
938 | + } |
|
938 | 939 | } |
939 | 940 | } |
940 | 941 | } |
@@ -956,12 +957,10 @@ discard block |
||
956 | 957 | if (isset($dictionary[$from->object_name]['relationships']) && isset($dictionary[$from->object_name]['relationships'][$rel_name])) |
957 | 958 | { |
958 | 959 | $rel_def = $dictionary[$from->object_name]['relationships'][$rel_name]; |
959 | - } |
|
960 | - else if (isset($dictionary[$to->object_name]['relationships']) && isset($dictionary[$to->object_name]['relationships'][$rel_name])) |
|
960 | + } else if (isset($dictionary[$to->object_name]['relationships']) && isset($dictionary[$to->object_name]['relationships'][$rel_name])) |
|
961 | 961 | { |
962 | 962 | $rel_def = $dictionary[$to->object_name]['relationships'][$rel_name]; |
963 | - } |
|
964 | - else if (isset($dictionary[$rel_name]) && isset($dictionary[$rel_name]['relationships']) |
|
963 | + } else if (isset($dictionary[$rel_name]) && isset($dictionary[$rel_name]['relationships']) |
|
965 | 964 | && isset($dictionary[$rel_name]['relationships'][$rel_name])) |
966 | 965 | { |
967 | 966 | $rel_def = $dictionary[$rel_name]['relationships'][$rel_name]; |
@@ -970,8 +969,7 @@ discard block |
||
970 | 969 | if ($rel_def['lhs_module'] == $from->module_dir && $rel_def['rhs_module'] == $to->module_dir ) |
971 | 970 | { |
972 | 971 | return $field; |
973 | - } |
|
974 | - else if ($rel_def['rhs_module'] == $from->module_dir && $rel_def['lhs_module'] == $to->module_dir ) |
|
972 | + } else if ($rel_def['rhs_module'] == $from->module_dir && $rel_def['lhs_module'] == $to->module_dir ) |
|
975 | 973 | { |
976 | 974 | return $field; |
977 | 975 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | ) |
53 | 53 | { |
54 | 54 | parent::__construct($bean, $view_object_map); |
55 | - $this->medataDataFile = $this->fileName; |
|
55 | + $this->medataDataFile = $this->fileName; |
|
56 | 56 | if (file_exists("custom/$this->fileName")) |
57 | 57 | { |
58 | 58 | $this->medataDataFile = "custom/$this->fileName"; |
@@ -68,42 +68,42 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | - * @see SugarView::display() |
|
72 | - */ |
|
73 | - public function display() |
|
71 | + * @see SugarView::display() |
|
72 | + */ |
|
73 | + public function display() |
|
74 | 74 | { |
75 | 75 | if (!empty($_REQUEST['handle']) && $_REQUEST['handle'] == 'save') |
76 | 76 | { |
77 | - return $this->handleSave(); |
|
77 | + return $this->handleSave(); |
|
78 | 78 | } |
79 | 79 | |
80 | - global $beanList; |
|
80 | + global $beanList; |
|
81 | 81 | |
82 | - // get the EditView defs to check if opportunity_name exists, for a check below for populating data |
|
83 | - $opportunityNameInLayout = false; |
|
84 | - $editviewFile = 'modules/Leads/metadata/editviewdefs.php'; |
|
82 | + // get the EditView defs to check if opportunity_name exists, for a check below for populating data |
|
83 | + $opportunityNameInLayout = false; |
|
84 | + $editviewFile = 'modules/Leads/metadata/editviewdefs.php'; |
|
85 | 85 | $this->medataDataFile = $editviewFile; |
86 | 86 | if (file_exists("custom/{$editviewFile}")) |
87 | 87 | { |
88 | 88 | $this->medataDataFile = "custom/{$editviewFile}"; |
89 | 89 | } |
90 | - include($this->medataDataFile); |
|
91 | - foreach($viewdefs['Leads']['EditView']['panels'] as $panel_index => $section){ |
|
92 | - foreach($section as $row_array){ |
|
93 | - foreach($row_array as $cell){ |
|
94 | - if(isset($cell['name']) && $cell['name'] == 'opportunity_name'){ |
|
95 | - $opportunityNameInLayout = true; |
|
96 | - } |
|
97 | - } |
|
98 | - } |
|
99 | - } |
|
90 | + include($this->medataDataFile); |
|
91 | + foreach($viewdefs['Leads']['EditView']['panels'] as $panel_index => $section){ |
|
92 | + foreach($section as $row_array){ |
|
93 | + foreach($row_array as $cell){ |
|
94 | + if(isset($cell['name']) && $cell['name'] == 'opportunity_name'){ |
|
95 | + $opportunityNameInLayout = true; |
|
96 | + } |
|
97 | + } |
|
98 | + } |
|
99 | + } |
|
100 | 100 | |
101 | 101 | $this->medataDataFile = $this->fileName; |
102 | 102 | if (file_exists("custom/$this->fileName")) |
103 | 103 | { |
104 | 104 | $this->medataDataFile = "custom/$this->fileName"; |
105 | 105 | } |
106 | - $this->loadDefs(); |
|
106 | + $this->loadDefs(); |
|
107 | 107 | $this->getRecord(); |
108 | 108 | $this->checkForDuplicates($this->focus); |
109 | 109 | $smarty = new Sugar_Smarty(); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $smarty->assign("module", "Leads"); |
166 | 166 | $smarty->assign("view", "convertlead"); |
167 | 167 | $smarty->assign("bean", $this->focus); |
168 | - $smarty->assign("record_id", $this->focus->id); |
|
168 | + $smarty->assign("record_id", $this->focus->id); |
|
169 | 169 | global $mod_strings; |
170 | 170 | $smarty->assign('MOD', $mod_strings); |
171 | 171 | $smarty->display("modules/Leads/tpls/ConvertLeadHeader.tpl"); |
@@ -178,11 +178,11 @@ discard block |
||
178 | 178 | //Switch up list depending on copy or move |
179 | 179 | if($sugar_config['lead_conv_activity_opt'] == 'move') |
180 | 180 | { |
181 | - $smarty->assign('convertModuleListOptions', get_select_options_with_id(array('None'=>$app_strings['LBL_NONE'], 'Contacts' => $app_list_strings["moduleListSingular"]['Contacts']), '')); |
|
181 | + $smarty->assign('convertModuleListOptions', get_select_options_with_id(array('None'=>$app_strings['LBL_NONE'], 'Contacts' => $app_list_strings["moduleListSingular"]['Contacts']), '')); |
|
182 | 182 | } |
183 | 183 | else if($sugar_config['lead_conv_activity_opt'] == 'copy') |
184 | 184 | { |
185 | - $smarty->assign('convertModuleListOptions', get_select_options_with_id(array('Contacts' => $app_list_strings["moduleListSingular"]['Contacts']), '')); |
|
185 | + $smarty->assign('convertModuleListOptions', get_select_options_with_id(array('Contacts' => $app_list_strings["moduleListSingular"]['Contacts']), '')); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | |
@@ -207,49 +207,49 @@ discard block |
||
207 | 207 | $focus->fill_in_additional_detail_fields(); |
208 | 208 | foreach($focus->field_defs as $field => $def) |
209 | 209 | { |
210 | - if(isset($vdef[$ev->view]['copyData']) && $vdef[$ev->view]['copyData']) |
|
210 | + if(isset($vdef[$ev->view]['copyData']) && $vdef[$ev->view]['copyData']) |
|
211 | 211 | { |
212 | - if ($module == "Accounts" && $field == 'name') |
|
213 | - { |
|
214 | - $focus->name = $this->focus->account_name; |
|
215 | - } |
|
216 | - else if ($module == "Opportunities" && $field == 'amount') |
|
217 | - { |
|
218 | - $focus->amount = unformat_number($this->focus->opportunity_amount); |
|
219 | - } |
|
220 | - else if ($module == "Opportunities" && $field == 'name') { |
|
221 | - if ($opportunityNameInLayout && !empty($this->focus->opportunity_name)){ |
|
222 | - $focus->name = $this->focus->opportunity_name; |
|
223 | - } |
|
224 | - } |
|
225 | - else if ($field == "id") |
|
212 | + if ($module == "Accounts" && $field == 'name') |
|
213 | + { |
|
214 | + $focus->name = $this->focus->account_name; |
|
215 | + } |
|
216 | + else if ($module == "Opportunities" && $field == 'amount') |
|
217 | + { |
|
218 | + $focus->amount = unformat_number($this->focus->opportunity_amount); |
|
219 | + } |
|
220 | + else if ($module == "Opportunities" && $field == 'name') { |
|
221 | + if ($opportunityNameInLayout && !empty($this->focus->opportunity_name)){ |
|
222 | + $focus->name = $this->focus->opportunity_name; |
|
223 | + } |
|
224 | + } |
|
225 | + else if ($field == "id") |
|
226 | 226 | { |
227 | - //If it is not a contact, don't copy the ID from the lead |
|
228 | - if ($module == "Contacts") { |
|
229 | - $focus->$field = $this->focus->$field; |
|
227 | + //If it is not a contact, don't copy the ID from the lead |
|
228 | + if ($module == "Contacts") { |
|
229 | + $focus->$field = $this->focus->$field; |
|
230 | 230 | } |
231 | 231 | } else if (is_a($focus, "Company") && $field == 'phone_office') |
232 | - { |
|
233 | - //Special case where company and person have the same field with a different name |
|
234 | - $focus->phone_office = $this->focus->phone_work; |
|
235 | - } |
|
236 | - else if (strpos($field, "billing_address") !== false && $focus->field_defs[$field]["type"] == "varchar") /* Bug 42219 fix */ |
|
237 | - { |
|
238 | - $tmp_field = str_replace("billing_", "primary_", $field); |
|
239 | - $focus->field_defs[$field]["type"] = "text"; |
|
232 | + { |
|
233 | + //Special case where company and person have the same field with a different name |
|
234 | + $focus->phone_office = $this->focus->phone_work; |
|
235 | + } |
|
236 | + else if (strpos($field, "billing_address") !== false && $focus->field_defs[$field]["type"] == "varchar") /* Bug 42219 fix */ |
|
237 | + { |
|
238 | + $tmp_field = str_replace("billing_", "primary_", $field); |
|
239 | + $focus->field_defs[$field]["type"] = "text"; |
|
240 | 240 | if (isset($this->focus->$tmp_field)) { |
241 | - $focus->$field = $this->focus->$tmp_field; |
|
241 | + $focus->$field = $this->focus->$tmp_field; |
|
242 | + } |
|
242 | 243 | } |
243 | - } |
|
244 | 244 | |
245 | - else if (strpos($field, "shipping_address") !== false && $focus->field_defs[$field]["type"] == "varchar") /* Bug 42219 fix */ |
|
246 | - { |
|
247 | - $tmp_field = str_replace("shipping_", "primary_", $field); |
|
248 | - if (isset($this->focus->$tmp_field)) { |
|
245 | + else if (strpos($field, "shipping_address") !== false && $focus->field_defs[$field]["type"] == "varchar") /* Bug 42219 fix */ |
|
246 | + { |
|
247 | + $tmp_field = str_replace("shipping_", "primary_", $field); |
|
248 | + if (isset($this->focus->$tmp_field)) { |
|
249 | 249 | $focus->$field = $this->focus->$tmp_field; |
250 | 250 | } |
251 | - $focus->field_defs[$field]["type"] = "text"; |
|
252 | - } |
|
251 | + $focus->field_defs[$field]["type"] = "text"; |
|
252 | + } |
|
253 | 253 | else if (isset($this->focus->$field)) |
254 | 254 | { |
255 | 255 | $focus->$field = $this->focus->$field; |
@@ -272,18 +272,18 @@ discard block |
||
272 | 272 | |
273 | 273 | protected function getRecord() |
274 | 274 | { |
275 | - $this->focus = new Lead(); |
|
276 | - if (isset($_REQUEST['record'])) |
|
277 | - { |
|
278 | - $this->focus->retrieve($_REQUEST['record']); |
|
279 | - } |
|
275 | + $this->focus = new Lead(); |
|
276 | + if (isset($_REQUEST['record'])) |
|
277 | + { |
|
278 | + $this->focus->retrieve($_REQUEST['record']); |
|
279 | + } |
|
280 | 280 | } |
281 | 281 | |
282 | 282 | protected function loadDefs() |
283 | 283 | { |
284 | - $viewdefs = array(); |
|
285 | - include($this->medataDataFile); |
|
286 | - $this->defs = $viewdefs; |
|
284 | + $viewdefs = array(); |
|
285 | + include($this->medataDataFile); |
|
286 | + $this->defs = $viewdefs; |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | /** |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | } |
316 | 316 | "; |
317 | 317 | if ($validateSelect) { |
318 | - $jsOut .= " |
|
318 | + $jsOut .= " |
|
319 | 319 | removeFromValidate('ConvertLead', '{$viewdef['select']}');"; |
320 | 320 | } |
321 | 321 | |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | YAHOO.util.Event.onDOMReady(SUGAR.convert.toggle$module);"; |
349 | 349 | } else if (isset($viewdef['default_action']) && $viewdef['default_action'] == "create") |
350 | 350 | { |
351 | - $jsOut .= "\n SUGAR.convert.{$module}Enabled = true;"; |
|
351 | + $jsOut .= "\n SUGAR.convert.{$module}Enabled = true;"; |
|
352 | 352 | } |
353 | 353 | $jsOut .= " |
354 | 354 | YAHOO.util.Event.addListener('new$module', 'click', SUGAR.convert.toggle$module); |
@@ -441,14 +441,14 @@ discard block |
||
441 | 441 | foreach ($this->defs as $module => $vdef) |
442 | 442 | { |
443 | 443 | //Create a new record if "create" was selected |
444 | - if (!empty($_REQUEST["convert_create_$module"]) && $_REQUEST["convert_create_$module"] != "false") |
|
444 | + if (!empty($_REQUEST["convert_create_$module"]) && $_REQUEST["convert_create_$module"] != "false") |
|
445 | 445 | { |
446 | 446 | //Save the new record |
447 | 447 | $bean = $beanList[$module]; |
448 | - if (empty($beans[$module])) |
|
449 | - $beans[$module] = new $bean(); |
|
448 | + if (empty($beans[$module])) |
|
449 | + $beans[$module] = new $bean(); |
|
450 | 450 | |
451 | - $this->populateNewBean($module, $beans[$module], $beans['Contacts'], $lead); |
|
451 | + $this->populateNewBean($module, $beans[$module], $beans['Contacts'], $lead); |
|
452 | 452 | // when creating a new contact, create the id for linking with other modules |
453 | 453 | // and do not populate it with lead's old account_id |
454 | 454 | if ($module == 'Contacts') |
@@ -602,8 +602,8 @@ discard block |
||
602 | 602 | $beans |
603 | 603 | ) |
604 | 604 | { |
605 | - global $beanList; |
|
606 | - echo "<div><ul>"; |
|
605 | + global $beanList; |
|
606 | + echo "<div><ul>"; |
|
607 | 607 | foreach($beans as $bean) |
608 | 608 | { |
609 | 609 | $beanName = $bean->object_name; |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | } |
631 | 631 | } |
632 | 632 | |
633 | - echo "</ul></div>"; |
|
633 | + echo "</ul></div>"; |
|
634 | 634 | } |
635 | 635 | |
636 | 636 | protected function handleActivities( |
@@ -638,12 +638,12 @@ discard block |
||
638 | 638 | $beans |
639 | 639 | ) |
640 | 640 | { |
641 | - global $app_list_strings; |
|
641 | + global $app_list_strings; |
|
642 | 642 | global $sugar_config; |
643 | 643 | global $app_strings; |
644 | - $parent_types = $app_list_strings['record_type_display']; |
|
644 | + $parent_types = $app_list_strings['record_type_display']; |
|
645 | 645 | |
646 | - $activities = $this->getActivitiesFromLead($lead); |
|
646 | + $activities = $this->getActivitiesFromLead($lead); |
|
647 | 647 | |
648 | 648 | //if account is being created, we will specify the account as the parent bean |
649 | 649 | $accountParentInfo = array(); |
@@ -659,42 +659,42 @@ discard block |
||
659 | 659 | $accountParentInfo = array('id'=>$account_id,'type'=>'Accounts'); |
660 | 660 | } |
661 | 661 | |
662 | - foreach($beans as $module => $bean) |
|
663 | - { |
|
664 | - if (isset($parent_types[$module])) |
|
665 | - { |
|
662 | + foreach($beans as $module => $bean) |
|
663 | + { |
|
664 | + if (isset($parent_types[$module])) |
|
665 | + { |
|
666 | 666 | if (empty($bean->id)) |
667 | 667 | { |
668 | 668 | $bean->id = create_guid(); |
669 | - $bean->new_with_id = true; |
|
669 | + $bean->new_with_id = true; |
|
670 | 670 | } |
671 | 671 | if( isset($_POST['lead_conv_ac_op_sel']) && $_POST['lead_conv_ac_op_sel'] != 'None') |
672 | 672 | { |
673 | - foreach($activities as $activity) |
|
674 | - { |
|
675 | - if (!isset($sugar_config['lead_conv_activity_opt']) || $sugar_config['lead_conv_activity_opt'] == 'copy') { |
|
676 | - if (isset($_POST['lead_conv_ac_op_sel'])) { |
|
677 | - //if the copy to module(s) are defined, copy only to those module(s) |
|
678 | - if (is_array($_POST['lead_conv_ac_op_sel'])) { |
|
679 | - foreach ($_POST['lead_conv_ac_op_sel'] as $mod) { |
|
680 | - if ($mod == $module) { |
|
681 | - $this->copyActivityAndRelateToBean($activity, $bean, $accountParentInfo); |
|
682 | - break; |
|
683 | - } |
|
684 | - } |
|
685 | - } |
|
686 | - } |
|
687 | - } |
|
688 | - else if ($sugar_config['lead_conv_activity_opt'] == 'move') { |
|
689 | - // if to move activities, should be only one module selected |
|
690 | - if ($_POST['lead_conv_ac_op_sel'] == $module) { |
|
691 | - $this->moveActivity($activity, $bean); |
|
692 | - } |
|
693 | - } |
|
694 | - } |
|
673 | + foreach($activities as $activity) |
|
674 | + { |
|
675 | + if (!isset($sugar_config['lead_conv_activity_opt']) || $sugar_config['lead_conv_activity_opt'] == 'copy') { |
|
676 | + if (isset($_POST['lead_conv_ac_op_sel'])) { |
|
677 | + //if the copy to module(s) are defined, copy only to those module(s) |
|
678 | + if (is_array($_POST['lead_conv_ac_op_sel'])) { |
|
679 | + foreach ($_POST['lead_conv_ac_op_sel'] as $mod) { |
|
680 | + if ($mod == $module) { |
|
681 | + $this->copyActivityAndRelateToBean($activity, $bean, $accountParentInfo); |
|
682 | + break; |
|
683 | + } |
|
684 | + } |
|
685 | + } |
|
686 | + } |
|
687 | + } |
|
688 | + else if ($sugar_config['lead_conv_activity_opt'] == 'move') { |
|
689 | + // if to move activities, should be only one module selected |
|
690 | + if ($_POST['lead_conv_ac_op_sel'] == $module) { |
|
691 | + $this->moveActivity($activity, $bean); |
|
692 | + } |
|
693 | + } |
|
694 | + } |
|
695 | 695 | } |
696 | - } |
|
697 | - } |
|
696 | + } |
|
697 | + } |
|
698 | 698 | } |
699 | 699 | |
700 | 700 | /** |
@@ -746,46 +746,46 @@ discard block |
||
746 | 746 | * @param Lead $lead Lead to get activities from |
747 | 747 | * @return Array of Activity SugarBeans . |
748 | 748 | */ |
749 | - protected function getActivitiesFromLead( |
|
750 | - $lead |
|
751 | - ) |
|
752 | - { |
|
753 | - if (!$lead) return; |
|
754 | - |
|
755 | - global $beanList, $db; |
|
756 | - |
|
757 | - $activitesList = array("Calls", "Tasks", "Meetings", "Emails", "Notes"); |
|
758 | - $activities = array(); |
|
759 | - |
|
760 | - foreach($activitesList as $module) |
|
761 | - { |
|
762 | - $beanName = $beanList[$module]; |
|
763 | - $activity = new $beanName(); |
|
764 | - $query = "SELECT id FROM {$activity->table_name} WHERE parent_id = '{$lead->id}' AND parent_type = 'Leads' AND deleted = 0"; |
|
765 | - $result = $db->query($query,true); |
|
749 | + protected function getActivitiesFromLead( |
|
750 | + $lead |
|
751 | + ) |
|
752 | + { |
|
753 | + if (!$lead) return; |
|
754 | + |
|
755 | + global $beanList, $db; |
|
756 | + |
|
757 | + $activitesList = array("Calls", "Tasks", "Meetings", "Emails", "Notes"); |
|
758 | + $activities = array(); |
|
759 | + |
|
760 | + foreach($activitesList as $module) |
|
761 | + { |
|
762 | + $beanName = $beanList[$module]; |
|
763 | + $activity = new $beanName(); |
|
764 | + $query = "SELECT id FROM {$activity->table_name} WHERE parent_id = '{$lead->id}' AND parent_type = 'Leads' AND deleted = 0"; |
|
765 | + $result = $db->query($query,true); |
|
766 | 766 | while($row = $db->fetchByAssoc($result)) |
767 | 767 | { |
768 | - $activity = new $beanName(); |
|
769 | - $activity->retrieve($row['id']); |
|
770 | - $activity->fixUpFormatting(); |
|
771 | - $activities[] = $activity; |
|
768 | + $activity = new $beanName(); |
|
769 | + $activity->retrieve($row['id']); |
|
770 | + $activity->fixUpFormatting(); |
|
771 | + $activities[] = $activity; |
|
772 | 772 | } |
773 | - } |
|
773 | + } |
|
774 | 774 | |
775 | - return $activities; |
|
776 | - } |
|
775 | + return $activities; |
|
776 | + } |
|
777 | 777 | |
778 | - protected function copyActivityAndRelateToBean( |
|
779 | - $activity, |
|
780 | - $bean, |
|
778 | + protected function copyActivityAndRelateToBean( |
|
779 | + $activity, |
|
780 | + $bean, |
|
781 | 781 | $parentArr = array() |
782 | - ) |
|
783 | - { |
|
784 | - global $beanList; |
|
782 | + ) |
|
783 | + { |
|
784 | + global $beanList; |
|
785 | 785 | |
786 | - $newActivity = clone $activity; |
|
787 | - $newActivity->id = create_guid(); |
|
788 | - $newActivity->new_with_id = true; |
|
786 | + $newActivity = clone $activity; |
|
787 | + $newActivity->id = create_guid(); |
|
788 | + $newActivity->new_with_id = true; |
|
789 | 789 | |
790 | 790 | //set the parent id and type if it was passed in, otherwise use blank to wipe it out |
791 | 791 | $parentID = ''; |
@@ -801,13 +801,13 @@ discard block |
||
801 | 801 | |
802 | 802 | } |
803 | 803 | |
804 | - //Special case to prevent duplicated tasks from appearing under Contacts multiple times |
|
805 | - if ($newActivity->module_dir == "Tasks" && $bean->module_dir != "Contacts") |
|
806 | - { |
|
804 | + //Special case to prevent duplicated tasks from appearing under Contacts multiple times |
|
805 | + if ($newActivity->module_dir == "Tasks" && $bean->module_dir != "Contacts") |
|
806 | + { |
|
807 | 807 | $newActivity->contact_id = $newActivity->contact_name = ""; |
808 | - } |
|
808 | + } |
|
809 | 809 | |
810 | - if ($rel = $this->findRelationship($newActivity, $bean)) |
|
810 | + if ($rel = $this->findRelationship($newActivity, $bean)) |
|
811 | 811 | { |
812 | 812 | if (isset($newActivity->$rel)) |
813 | 813 | { |
@@ -828,14 +828,14 @@ discard block |
||
828 | 828 | $newActivity->parent_id = $parentID; |
829 | 829 | $newActivity->parent_type = $parentType; |
830 | 830 | |
831 | - $newActivity->update_date_modified = false; //bug 41747 |
|
832 | - $newActivity->save(); |
|
831 | + $newActivity->update_date_modified = false; //bug 41747 |
|
832 | + $newActivity->save(); |
|
833 | 833 | $newActivity->$rel->add($bean); |
834 | 834 | if ($newActivity->module_dir == "Notes" && $newActivity->filename) { |
835 | - UploadFile::duplicate_file($activity->id, $newActivity->id, $newActivity->filename); |
|
836 | - } |
|
837 | - } |
|
838 | - } |
|
835 | + UploadFile::duplicate_file($activity->id, $newActivity->id, $newActivity->filename); |
|
836 | + } |
|
837 | + } |
|
838 | + } |
|
839 | 839 | |
840 | 840 | /** |
841 | 841 | * Populates the passed in Bean fron the contact and the $_REQUEST |
@@ -843,103 +843,103 @@ discard block |
||
843 | 843 | * @param SugarBean $bean SugarBean to be populated. |
844 | 844 | * @param Contact $contact Contact to relate the bean to. |
845 | 845 | */ |
846 | - protected function populateNewBean( |
|
847 | - $module, |
|
848 | - $bean, |
|
849 | - $contact, |
|
850 | - $lead |
|
851 | - ) |
|
852 | - { |
|
853 | - //Copy data from the contact to new bean |
|
854 | - foreach($bean->field_defs as $field => $def) |
|
855 | - { |
|
856 | - if(!isset($_REQUEST[$module . $field]) && isset($lead->$field) && $field != 'id') |
|
857 | - { |
|
858 | - $bean->$field = $lead->$field; |
|
859 | - if($field == 'date_entered') $bean->$field = gmdate($GLOBALS['timedate']->get_db_date_time_format()); //bug 41030 |
|
860 | - } |
|
861 | - } |
|
846 | + protected function populateNewBean( |
|
847 | + $module, |
|
848 | + $bean, |
|
849 | + $contact, |
|
850 | + $lead |
|
851 | + ) |
|
852 | + { |
|
853 | + //Copy data from the contact to new bean |
|
854 | + foreach($bean->field_defs as $field => $def) |
|
855 | + { |
|
856 | + if(!isset($_REQUEST[$module . $field]) && isset($lead->$field) && $field != 'id') |
|
857 | + { |
|
858 | + $bean->$field = $lead->$field; |
|
859 | + if($field == 'date_entered') $bean->$field = gmdate($GLOBALS['timedate']->get_db_date_time_format()); //bug 41030 |
|
860 | + } |
|
861 | + } |
|
862 | 862 | populateFromPost($module, $bean, true); |
863 | - //Try to link to the new contact |
|
864 | - $contactRel = ""; |
|
865 | - if (!empty($vdef['ConvertLead']['select'])) |
|
866 | - { |
|
867 | - $select = $vdef['ConvertLead']['select']; |
|
868 | - $fieldDef = $contact->field_defs[$select]; |
|
869 | - if (!empty($fieldDef['id_name'])) |
|
870 | - { |
|
871 | - $bean->id = create_guid(); |
|
872 | - $bean->new_with_id = true; |
|
863 | + //Try to link to the new contact |
|
864 | + $contactRel = ""; |
|
865 | + if (!empty($vdef['ConvertLead']['select'])) |
|
866 | + { |
|
867 | + $select = $vdef['ConvertLead']['select']; |
|
868 | + $fieldDef = $contact->field_defs[$select]; |
|
869 | + if (!empty($fieldDef['id_name'])) |
|
870 | + { |
|
871 | + $bean->id = create_guid(); |
|
872 | + $bean->new_with_id = true; |
|
873 | 873 | $idName = $fieldDef['id_name']; |
874 | - $contact->$idName = $bean->id ; |
|
875 | - if ($idName != $select) { |
|
876 | - $rname = isset($fieldDef['rname']) ? $fieldDef['rname'] : ""; |
|
877 | - if (!empty($rname) && isset($bean->$rname)) |
|
878 | - $contact->$select = $bean->$rname; |
|
879 | - else |
|
880 | - $contact->$select = $bean->name; |
|
881 | - } |
|
882 | - } |
|
883 | - } else if ($module != "Contacts"){ |
|
884 | - $contactRel = $this->findRelationship($contact, $bean); |
|
885 | - if (!empty($contactRel)) |
|
886 | - { |
|
887 | - $bean->id = create_guid(); |
|
888 | - $bean->new_with_id = true; |
|
889 | - $contact->load_relationship ($contactRel) ; |
|
890 | - $relObject = $contact->$contactRel->getRelationshipObject(); |
|
891 | - if ($relObject->relationship_type == "one-to-many" && $contact->$contactRel->_get_bean_position()) |
|
892 | - { |
|
893 | - $id_field = $relObject->rhs_key; |
|
894 | - $bean->$id_field = $contact->id; |
|
895 | - } else { |
|
896 | - $contact->$contactRel->add($bean); |
|
897 | - } |
|
898 | - //Set the parent of activites to the new Contact |
|
899 | - if (isset($bean->field_defs['parent_id']) && isset($bean->field_defs['parent_type'])) |
|
900 | - { |
|
901 | - $bean->parent_id = $contact->id; |
|
902 | - $bean->parent_type = "Contacts"; |
|
903 | - } |
|
904 | - } |
|
905 | - } |
|
906 | - } |
|
907 | - |
|
908 | - protected function copyAddressFields($bean, $contact) |
|
909 | - { |
|
910 | - //Copy over address info from the contact to any beans with address not set |
|
911 | - foreach($bean->field_defs as $field => $def) |
|
912 | - { |
|
913 | - if(!isset($_REQUEST[$bean->module_dir . $field]) && strpos($field, "_address_") !== false) |
|
914 | - { |
|
915 | - $set = "primary"; |
|
916 | - if (strpos($field, "alt_") !== false || strpos($field, "shipping_") !== false) |
|
917 | - $set = "alt"; |
|
918 | - $type = ""; |
|
919 | - |
|
920 | - if(strpos($field, "_address_street_2") !== false) |
|
921 | - $type = "_address_street_2"; |
|
922 | - else if(strpos($field, "_address_street_3") !== false) |
|
923 | - $type = "_address_street_3"; |
|
924 | - else if(strpos($field, "_address_street_4") !== false) |
|
925 | - $type = ""; |
|
926 | - else if(strpos($field, "_address_street") !== false) |
|
927 | - $type = "_address_street"; |
|
928 | - else if(strpos($field, "_address_city") !== false) |
|
929 | - $type = "_address_city"; |
|
930 | - else if(strpos($field, "_address_state") !== false) |
|
931 | - $type = "_address_state"; |
|
932 | - else if(strpos($field, "_address_postalcode") !== false) |
|
933 | - $type = "_address_postalcode"; |
|
934 | - else if(strpos($field, "_address_country") !== false) |
|
935 | - $type = "_address_country"; |
|
936 | - |
|
937 | - $var = $set.$type; |
|
938 | - if (isset($contact->$var)) |
|
939 | - $bean->$field = $contact->$var; |
|
940 | - } |
|
941 | - } |
|
942 | - } |
|
874 | + $contact->$idName = $bean->id ; |
|
875 | + if ($idName != $select) { |
|
876 | + $rname = isset($fieldDef['rname']) ? $fieldDef['rname'] : ""; |
|
877 | + if (!empty($rname) && isset($bean->$rname)) |
|
878 | + $contact->$select = $bean->$rname; |
|
879 | + else |
|
880 | + $contact->$select = $bean->name; |
|
881 | + } |
|
882 | + } |
|
883 | + } else if ($module != "Contacts"){ |
|
884 | + $contactRel = $this->findRelationship($contact, $bean); |
|
885 | + if (!empty($contactRel)) |
|
886 | + { |
|
887 | + $bean->id = create_guid(); |
|
888 | + $bean->new_with_id = true; |
|
889 | + $contact->load_relationship ($contactRel) ; |
|
890 | + $relObject = $contact->$contactRel->getRelationshipObject(); |
|
891 | + if ($relObject->relationship_type == "one-to-many" && $contact->$contactRel->_get_bean_position()) |
|
892 | + { |
|
893 | + $id_field = $relObject->rhs_key; |
|
894 | + $bean->$id_field = $contact->id; |
|
895 | + } else { |
|
896 | + $contact->$contactRel->add($bean); |
|
897 | + } |
|
898 | + //Set the parent of activites to the new Contact |
|
899 | + if (isset($bean->field_defs['parent_id']) && isset($bean->field_defs['parent_type'])) |
|
900 | + { |
|
901 | + $bean->parent_id = $contact->id; |
|
902 | + $bean->parent_type = "Contacts"; |
|
903 | + } |
|
904 | + } |
|
905 | + } |
|
906 | + } |
|
907 | + |
|
908 | + protected function copyAddressFields($bean, $contact) |
|
909 | + { |
|
910 | + //Copy over address info from the contact to any beans with address not set |
|
911 | + foreach($bean->field_defs as $field => $def) |
|
912 | + { |
|
913 | + if(!isset($_REQUEST[$bean->module_dir . $field]) && strpos($field, "_address_") !== false) |
|
914 | + { |
|
915 | + $set = "primary"; |
|
916 | + if (strpos($field, "alt_") !== false || strpos($field, "shipping_") !== false) |
|
917 | + $set = "alt"; |
|
918 | + $type = ""; |
|
919 | + |
|
920 | + if(strpos($field, "_address_street_2") !== false) |
|
921 | + $type = "_address_street_2"; |
|
922 | + else if(strpos($field, "_address_street_3") !== false) |
|
923 | + $type = "_address_street_3"; |
|
924 | + else if(strpos($field, "_address_street_4") !== false) |
|
925 | + $type = ""; |
|
926 | + else if(strpos($field, "_address_street") !== false) |
|
927 | + $type = "_address_street"; |
|
928 | + else if(strpos($field, "_address_city") !== false) |
|
929 | + $type = "_address_city"; |
|
930 | + else if(strpos($field, "_address_state") !== false) |
|
931 | + $type = "_address_state"; |
|
932 | + else if(strpos($field, "_address_postalcode") !== false) |
|
933 | + $type = "_address_postalcode"; |
|
934 | + else if(strpos($field, "_address_country") !== false) |
|
935 | + $type = "_address_country"; |
|
936 | + |
|
937 | + $var = $set.$type; |
|
938 | + if (isset($contact->$var)) |
|
939 | + $bean->$field = $contact->$var; |
|
940 | + } |
|
941 | + } |
|
942 | + } |
|
943 | 943 | |
944 | 944 | |
945 | 945 | protected function findRelationship( |
@@ -947,12 +947,12 @@ discard block |
||
947 | 947 | $to |
948 | 948 | ) |
949 | 949 | { |
950 | - global $dictionary; |
|
951 | - require_once("modules/TableDictionary.php"); |
|
952 | - foreach ($from->field_defs as $field=>$def) |
|
950 | + global $dictionary; |
|
951 | + require_once("modules/TableDictionary.php"); |
|
952 | + foreach ($from->field_defs as $field=>$def) |
|
953 | 953 | { |
954 | 954 | if (isset($def['type']) && $def['type'] == "link" && isset($def['relationship'])) |
955 | - { |
|
955 | + { |
|
956 | 956 | $rel_name = $def['relationship']; |
957 | 957 | $rel_def = ""; |
958 | 958 | if (isset($dictionary[$from->object_name]['relationships']) && isset($dictionary[$from->object_name]['relationships'][$rel_name])) |
@@ -966,16 +966,16 @@ discard block |
||
966 | 966 | else if (isset($dictionary[$rel_name]) && isset($dictionary[$rel_name]['relationships']) |
967 | 967 | && isset($dictionary[$rel_name]['relationships'][$rel_name])) |
968 | 968 | { |
969 | - $rel_def = $dictionary[$rel_name]['relationships'][$rel_name]; |
|
969 | + $rel_def = $dictionary[$rel_name]['relationships'][$rel_name]; |
|
970 | 970 | } |
971 | 971 | if (!empty($rel_def)) { |
972 | 972 | if ($rel_def['lhs_module'] == $from->module_dir && $rel_def['rhs_module'] == $to->module_dir ) |
973 | 973 | { |
974 | - return $field; |
|
974 | + return $field; |
|
975 | 975 | } |
976 | 976 | else if ($rel_def['rhs_module'] == $from->module_dir && $rel_def['lhs_module'] == $to->module_dir ) |
977 | 977 | { |
978 | - return $field; |
|
978 | + return $field; |
|
979 | 979 | } |
980 | 980 | } |
981 | 981 | } |
@@ -996,16 +996,16 @@ discard block |
||
996 | 996 | } |
997 | 997 | return false; |
998 | 998 | } |
999 | - /** |
|
1000 | - * @see SugarView::_getModuleTitleParams() |
|
1001 | - */ |
|
1002 | - protected function _getModuleTitleParams($browserTitle = false) |
|
1003 | - { |
|
1004 | - global $mod_strings; |
|
1005 | - $params = parent::_getModuleTitleParams($browserTitle); |
|
1006 | - $params[] = "<a href='index.php?module=Leads&action=DetailView&record={$this->bean->id}'>{$this->bean->name}</a>"; |
|
1007 | - $params[] = $mod_strings['LBL_CONVERTLEAD']; |
|
1008 | - return $params; |
|
999 | + /** |
|
1000 | + * @see SugarView::_getModuleTitleParams() |
|
1001 | + */ |
|
1002 | + protected function _getModuleTitleParams($browserTitle = false) |
|
1003 | + { |
|
1004 | + global $mod_strings; |
|
1005 | + $params = parent::_getModuleTitleParams($browserTitle); |
|
1006 | + $params[] = "<a href='index.php?module=Leads&action=DetailView&record={$this->bean->id}'>{$this->bean->name}</a>"; |
|
1007 | + $params[] = $mod_strings['LBL_CONVERTLEAD']; |
|
1008 | + return $params; |
|
1009 | 1009 | } |
1010 | 1010 | |
1011 | 1011 | |
@@ -1013,27 +1013,27 @@ discard block |
||
1013 | 1013 | $lead |
1014 | 1014 | ) |
1015 | 1015 | { |
1016 | - if ($lead->status == "Converted") |
|
1017 | - { |
|
1018 | - echo ("<span class='error'>" . translate('LBL_CONVERTLEAD_WARNING')); |
|
1019 | - $dupes = array(); |
|
1020 | - $q = "SELECT id, first_name, last_name FROM contacts WHERE first_name LIKE '{$lead->first_name}' AND last_name LIKE '{$lead->last_name}' AND deleted = 0"; |
|
1021 | - $result = $lead->db->query($q); |
|
1022 | - while($row = $lead->db->fetchByAssoc($result)) { |
|
1023 | - $contact = new Contact(); |
|
1024 | - $contact->retrieve($row['id']); |
|
1025 | - $dupes[$row['id']] = $contact->name; |
|
1026 | - } |
|
1027 | - if (!empty($dupes)) |
|
1028 | - { |
|
1029 | - foreach($dupes as $id => $name) |
|
1030 | - { |
|
1031 | - echo (translate('LBL_CONVERTLEAD_WARNING_INTO_RECORD') . "<a href='index.php?module=Contacts&action=DetailView&record=$id'>$name</a>"); |
|
1032 | - break; |
|
1033 | - } |
|
1034 | - } |
|
1035 | - echo "</span>"; |
|
1036 | - } |
|
1037 | - return false; |
|
1016 | + if ($lead->status == "Converted") |
|
1017 | + { |
|
1018 | + echo ("<span class='error'>" . translate('LBL_CONVERTLEAD_WARNING')); |
|
1019 | + $dupes = array(); |
|
1020 | + $q = "SELECT id, first_name, last_name FROM contacts WHERE first_name LIKE '{$lead->first_name}' AND last_name LIKE '{$lead->last_name}' AND deleted = 0"; |
|
1021 | + $result = $lead->db->query($q); |
|
1022 | + while($row = $lead->db->fetchByAssoc($result)) { |
|
1023 | + $contact = new Contact(); |
|
1024 | + $contact->retrieve($row['id']); |
|
1025 | + $dupes[$row['id']] = $contact->name; |
|
1026 | + } |
|
1027 | + if (!empty($dupes)) |
|
1028 | + { |
|
1029 | + foreach($dupes as $id => $name) |
|
1030 | + { |
|
1031 | + echo (translate('LBL_CONVERTLEAD_WARNING_INTO_RECORD') . "<a href='index.php?module=Contacts&action=DetailView&record=$id'>$name</a>"); |
|
1032 | + break; |
|
1033 | + } |
|
1034 | + } |
|
1035 | + echo "</span>"; |
|
1036 | + } |
|
1037 | + return false; |
|
1038 | 1038 | } |
1039 | 1039 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -88,10 +88,10 @@ discard block |
||
88 | 88 | $this->medataDataFile = "custom/{$editviewFile}"; |
89 | 89 | } |
90 | 90 | include($this->medataDataFile); |
91 | - foreach($viewdefs['Leads']['EditView']['panels'] as $panel_index => $section){ |
|
92 | - foreach($section as $row_array){ |
|
93 | - foreach($row_array as $cell){ |
|
94 | - if(isset($cell['name']) && $cell['name'] == 'opportunity_name'){ |
|
91 | + foreach ($viewdefs['Leads']['EditView']['panels'] as $panel_index => $section) { |
|
92 | + foreach ($section as $row_array) { |
|
93 | + foreach ($row_array as $cell) { |
|
94 | + if (isset($cell['name']) && $cell['name'] == 'opportunity_name') { |
|
95 | 95 | $opportunityNameInLayout = true; |
96 | 96 | } |
97 | 97 | } |
@@ -125,15 +125,15 @@ discard block |
||
125 | 125 | // Check if Lead has an account set |
126 | 126 | if (!empty($this->focus->account_name)) |
127 | 127 | { |
128 | - $filter .= '&name_advanced=' . urlencode($this->focus->account_name); |
|
128 | + $filter .= '&name_advanced='.urlencode($this->focus->account_name); |
|
129 | 129 | } |
130 | 130 | // Check if Lead First name is available |
131 | 131 | if (!empty($this->focus->first_name)) |
132 | 132 | { |
133 | - $filter .= '&first_name_advanced=' . urlencode($this->focus->first_name); |
|
133 | + $filter .= '&first_name_advanced='.urlencode($this->focus->first_name); |
|
134 | 134 | } |
135 | 135 | // Lead Last Name is always available |
136 | - $filter .= '&last_name_advanced=' . urlencode($this->focus->last_name); |
|
136 | + $filter .= '&last_name_advanced='.urlencode($this->focus->last_name); |
|
137 | 137 | |
138 | 138 | $smarty->assign('initialFilter', $filter); |
139 | 139 | $smarty->assign('displayParams', array('initial_filter' => '{$initialFilter}')); |
@@ -176,20 +176,20 @@ discard block |
||
176 | 176 | $smarty->assign('lead_conv_activity_opt', $sugar_config['lead_conv_activity_opt']); |
177 | 177 | |
178 | 178 | //Switch up list depending on copy or move |
179 | - if($sugar_config['lead_conv_activity_opt'] == 'move') |
|
179 | + if ($sugar_config['lead_conv_activity_opt'] == 'move') |
|
180 | 180 | { |
181 | 181 | $smarty->assign('convertModuleListOptions', get_select_options_with_id(array('None'=>$app_strings['LBL_NONE'], 'Contacts' => $app_list_strings["moduleListSingular"]['Contacts']), '')); |
182 | 182 | } |
183 | - else if($sugar_config['lead_conv_activity_opt'] == 'copy') |
|
183 | + else if ($sugar_config['lead_conv_activity_opt'] == 'copy') |
|
184 | 184 | { |
185 | 185 | $smarty->assign('convertModuleListOptions', get_select_options_with_id(array('Contacts' => $app_list_strings["moduleListSingular"]['Contacts']), '')); |
186 | 186 | } |
187 | 187 | |
188 | 188 | |
189 | 189 | |
190 | - foreach($this->defs as $module => $vdef) |
|
190 | + foreach ($this->defs as $module => $vdef) |
|
191 | 191 | { |
192 | - if(!isset($beanList[$module])) |
|
192 | + if (!isset($beanList[$module])) |
|
193 | 193 | { |
194 | 194 | continue; |
195 | 195 | } |
@@ -205,9 +205,9 @@ discard block |
||
205 | 205 | } |
206 | 206 | |
207 | 207 | $focus->fill_in_additional_detail_fields(); |
208 | - foreach($focus->field_defs as $field => $def) |
|
208 | + foreach ($focus->field_defs as $field => $def) |
|
209 | 209 | { |
210 | - if(isset($vdef[$ev->view]['copyData']) && $vdef[$ev->view]['copyData']) |
|
210 | + if (isset($vdef[$ev->view]['copyData']) && $vdef[$ev->view]['copyData']) |
|
211 | 211 | { |
212 | 212 | if ($module == "Accounts" && $field == 'name') |
213 | 213 | { |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | $focus->amount = unformat_number($this->focus->opportunity_amount); |
219 | 219 | } |
220 | 220 | else if ($module == "Opportunities" && $field == 'name') { |
221 | - if ($opportunityNameInLayout && !empty($this->focus->opportunity_name)){ |
|
221 | + if ($opportunityNameInLayout && !empty($this->focus->opportunity_name)) { |
|
222 | 222 | $focus->name = $this->focus->opportunity_name; |
223 | 223 | } |
224 | 224 | } |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | ) |
302 | 302 | { |
303 | 303 | $validateSelect = isset($viewdef['required']) && $viewdef['required'] && !empty($viewdef['select']); |
304 | - $jsOut = " |
|
304 | + $jsOut = " |
|
305 | 305 | <script type='text/javascript'> |
306 | 306 | if (!SUGAR.convert) SUGAR.convert = {requiredFields: {}}; |
307 | 307 | SUGAR.convert.toggle$module = function(){ |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | } |
316 | 316 | "; |
317 | 317 | if ($validateSelect) { |
318 | - $jsOut .= " |
|
318 | + $jsOut .= " |
|
319 | 319 | removeFromValidate('ConvertLead', '{$viewdef['select']}');"; |
320 | 320 | } |
321 | 321 | |
@@ -327,9 +327,9 @@ discard block |
||
327 | 327 | removeFromValidate('ConvertLead', '$module' + i); |
328 | 328 | }"; |
329 | 329 | if ($validateSelect) { |
330 | - $jsOut .= " |
|
330 | + $jsOut .= " |
|
331 | 331 | addToValidate('ConvertLead', '{$viewdef['select']}', 'varchar', true, '" |
332 | - . translate($this->contact->field_defs[$viewdef['select']]['vname']) . "');"; |
|
332 | + . translate($this->contact->field_defs[$viewdef['select']]['vname'])."');"; |
|
333 | 333 | } |
334 | 334 | $jsOut .= " |
335 | 335 | SUGAR.convert.{$module}Enabled = false; |
@@ -346,19 +346,19 @@ discard block |
||
346 | 346 | } |
347 | 347 | $jsOut .= " |
348 | 348 | YAHOO.util.Event.onDOMReady(SUGAR.convert.toggle$module);"; |
349 | - } else if (isset($viewdef['default_action']) && $viewdef['default_action'] == "create") |
|
349 | + } else if (isset($viewdef['default_action']) && $viewdef['default_action'] == "create") |
|
350 | 350 | { |
351 | 351 | $jsOut .= "\n SUGAR.convert.{$module}Enabled = true;"; |
352 | 352 | } |
353 | 353 | $jsOut .= " |
354 | 354 | YAHOO.util.Event.addListener('new$module', 'click', SUGAR.convert.toggle$module); |
355 | 355 | SUGAR.convert.requiredFields.$module = {};"; |
356 | - foreach($focus->field_defs as $field => $def) |
|
356 | + foreach ($focus->field_defs as $field => $def) |
|
357 | 357 | { |
358 | 358 | if (isset($def['required']) && $def['required']) |
359 | 359 | { |
360 | 360 | $jsOut .= " |
361 | - SUGAR.convert.requiredFields.$module.$field = '". translate($def['vname'], $module) . "';\n"; |
|
361 | + SUGAR.convert.requiredFields.$module.$field = '".translate($def['vname'], $module)."';\n"; |
|
362 | 362 | } |
363 | 363 | } |
364 | 364 | |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | |
413 | 413 | if (isset($duplicateContacts)) |
414 | 414 | { |
415 | - echo $contactForm->buildTableForm($duplicateContacts, 'Contacts'); |
|
415 | + echo $contactForm->buildTableForm($duplicateContacts, 'Contacts'); |
|
416 | 416 | return; |
417 | 417 | } |
418 | 418 | $this->new_contact = true; |
@@ -604,26 +604,26 @@ discard block |
||
604 | 604 | { |
605 | 605 | global $beanList; |
606 | 606 | echo "<div><ul>"; |
607 | - foreach($beans as $bean) |
|
607 | + foreach ($beans as $bean) |
|
608 | 608 | { |
609 | 609 | $beanName = $bean->object_name; |
610 | - if ( $beanName == 'Contact' && !$this->new_contact ) { |
|
611 | - echo "<li>" . translate("LBL_EXISTING_CONTACT") . " - |
|
610 | + if ($beanName == 'Contact' && !$this->new_contact) { |
|
611 | + echo "<li>".translate("LBL_EXISTING_CONTACT")." - |
|
612 | 612 | <a href='index.php?module={$bean->module_dir}&action=DetailView&record={$bean->id}'> |
613 | 613 | {$bean->get_summary_text()} |
614 | 614 | </a></li>"; |
615 | 615 | } |
616 | 616 | else { |
617 | 617 | global $app_list_strings; |
618 | - if(!empty($app_list_strings['moduleListSingular'][$bean->module_dir])) { |
|
618 | + if (!empty($app_list_strings['moduleListSingular'][$bean->module_dir])) { |
|
619 | 619 | $module_name = $app_list_strings['moduleListSingular'][$bean->module_dir]; |
620 | 620 | } else { |
621 | 621 | $module_name = translate('LBL_MODULE_NAME', $bean->module_dir); |
622 | 622 | } |
623 | - if(empty($module_name)) { |
|
623 | + if (empty($module_name)) { |
|
624 | 624 | $module_name = translate($beanName); |
625 | 625 | } |
626 | - echo "<li>" . translate("LBL_CREATED_NEW") . ' ' . $module_name . " - |
|
626 | + echo "<li>".translate("LBL_CREATED_NEW").' '.$module_name." - |
|
627 | 627 | <a href='index.php?module={$bean->module_dir}&action=DetailView&record={$bean->id}'> |
628 | 628 | {$bean->get_summary_text()} |
629 | 629 | </a></li>"; |
@@ -649,17 +649,17 @@ discard block |
||
649 | 649 | $accountParentInfo = array(); |
650 | 650 | |
651 | 651 | //determine the account id info ahead of time if it is being created as part of this conversion |
652 | - if(!empty($beans['Accounts'])){ |
|
652 | + if (!empty($beans['Accounts'])) { |
|
653 | 653 | $account_id = create_guid(); |
654 | - if(!empty($beans['Accounts']->id)){ |
|
654 | + if (!empty($beans['Accounts']->id)) { |
|
655 | 655 | $account_id = $beans['Accounts']->id; |
656 | - }else{ |
|
656 | + } else { |
|
657 | 657 | $beans['Accounts']->id = $account_id; |
658 | 658 | } |
659 | - $accountParentInfo = array('id'=>$account_id,'type'=>'Accounts'); |
|
659 | + $accountParentInfo = array('id'=>$account_id, 'type'=>'Accounts'); |
|
660 | 660 | } |
661 | 661 | |
662 | - foreach($beans as $module => $bean) |
|
662 | + foreach ($beans as $module => $bean) |
|
663 | 663 | { |
664 | 664 | if (isset($parent_types[$module])) |
665 | 665 | { |
@@ -668,9 +668,9 @@ discard block |
||
668 | 668 | $bean->id = create_guid(); |
669 | 669 | $bean->new_with_id = true; |
670 | 670 | } |
671 | - if( isset($_POST['lead_conv_ac_op_sel']) && $_POST['lead_conv_ac_op_sel'] != 'None') |
|
671 | + if (isset($_POST['lead_conv_ac_op_sel']) && $_POST['lead_conv_ac_op_sel'] != 'None') |
|
672 | 672 | { |
673 | - foreach($activities as $activity) |
|
673 | + foreach ($activities as $activity) |
|
674 | 674 | { |
675 | 675 | if (!isset($sugar_config['lead_conv_activity_opt']) || $sugar_config['lead_conv_activity_opt'] == 'copy') { |
676 | 676 | if (isset($_POST['lead_conv_ac_op_sel'])) { |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | |
715 | 715 | // delete the old relationship to the old parent (lead) |
716 | 716 | if ($rel = $this->findRelationship($activity, $lead)) { |
717 | - $activity->load_relationship ($rel) ; |
|
717 | + $activity->load_relationship($rel); |
|
718 | 718 | |
719 | 719 | if ($activity->parent_id && $activity->id) { |
720 | 720 | $activity->$rel->delete($activity->id, $activity->parent_id); |
@@ -723,10 +723,10 @@ discard block |
||
723 | 723 | |
724 | 724 | // add the new relationship to the new parent (contact, account, etc) |
725 | 725 | if ($rel = $this->findRelationship($activity, $bean)) { |
726 | - $activity->load_relationship ($rel) ; |
|
726 | + $activity->load_relationship($rel); |
|
727 | 727 | |
728 | 728 | $relObj = $activity->$rel->getRelationshipObject(); |
729 | - if ( $relObj->relationship_type=='one-to-one' || $relObj->relationship_type == 'one-to-many' ) |
|
729 | + if ($relObj->relationship_type == 'one-to-one' || $relObj->relationship_type == 'one-to-many') |
|
730 | 730 | { |
731 | 731 | $key = $relObj->rhs_key; |
732 | 732 | $activity->$key = $bean->id; |
@@ -757,13 +757,13 @@ discard block |
||
757 | 757 | $activitesList = array("Calls", "Tasks", "Meetings", "Emails", "Notes"); |
758 | 758 | $activities = array(); |
759 | 759 | |
760 | - foreach($activitesList as $module) |
|
760 | + foreach ($activitesList as $module) |
|
761 | 761 | { |
762 | 762 | $beanName = $beanList[$module]; |
763 | 763 | $activity = new $beanName(); |
764 | 764 | $query = "SELECT id FROM {$activity->table_name} WHERE parent_id = '{$lead->id}' AND parent_type = 'Leads' AND deleted = 0"; |
765 | - $result = $db->query($query,true); |
|
766 | - while($row = $db->fetchByAssoc($result)) |
|
765 | + $result = $db->query($query, true); |
|
766 | + while ($row = $db->fetchByAssoc($result)) |
|
767 | 767 | { |
768 | 768 | $activity = new $beanName(); |
769 | 769 | $activity->retrieve($row['id']); |
@@ -790,12 +790,12 @@ discard block |
||
790 | 790 | //set the parent id and type if it was passed in, otherwise use blank to wipe it out |
791 | 791 | $parentID = ''; |
792 | 792 | $parentType = ''; |
793 | - if(!empty($parentArr)){ |
|
794 | - if(!empty($parentArr['id'])){ |
|
793 | + if (!empty($parentArr)) { |
|
794 | + if (!empty($parentArr['id'])) { |
|
795 | 795 | $parentID = $parentArr['id']; |
796 | 796 | } |
797 | 797 | |
798 | - if(!empty($parentArr['type'])){ |
|
798 | + if (!empty($parentArr['type'])) { |
|
799 | 799 | $parentType = $parentArr['type']; |
800 | 800 | } |
801 | 801 | |
@@ -815,9 +815,9 @@ discard block |
||
815 | 815 | $newActivity->$rel = ''; |
816 | 816 | } |
817 | 817 | |
818 | - $newActivity->load_relationship ($rel) ; |
|
818 | + $newActivity->load_relationship($rel); |
|
819 | 819 | $relObj = $newActivity->$rel->getRelationshipObject(); |
820 | - if ( $relObj->relationship_type=='one-to-one' || $relObj->relationship_type == 'one-to-many' ) |
|
820 | + if ($relObj->relationship_type == 'one-to-one' || $relObj->relationship_type == 'one-to-many') |
|
821 | 821 | { |
822 | 822 | $key = $relObj->rhs_key; |
823 | 823 | $newActivity->$key = $bean->id; |
@@ -825,14 +825,14 @@ discard block |
||
825 | 825 | |
826 | 826 | //parent (related to field) should be blank unless it is explicitly sent in |
827 | 827 | //it is not sent in unless the account is being created as well during lead conversion |
828 | - $newActivity->parent_id = $parentID; |
|
828 | + $newActivity->parent_id = $parentID; |
|
829 | 829 | $newActivity->parent_type = $parentType; |
830 | 830 | |
831 | 831 | $newActivity->update_date_modified = false; //bug 41747 |
832 | 832 | $newActivity->save(); |
833 | 833 | $newActivity->$rel->add($bean); |
834 | 834 | if ($newActivity->module_dir == "Notes" && $newActivity->filename) { |
835 | - UploadFile::duplicate_file($activity->id, $newActivity->id, $newActivity->filename); |
|
835 | + UploadFile::duplicate_file($activity->id, $newActivity->id, $newActivity->filename); |
|
836 | 836 | } |
837 | 837 | } |
838 | 838 | } |
@@ -851,12 +851,12 @@ discard block |
||
851 | 851 | ) |
852 | 852 | { |
853 | 853 | //Copy data from the contact to new bean |
854 | - foreach($bean->field_defs as $field => $def) |
|
854 | + foreach ($bean->field_defs as $field => $def) |
|
855 | 855 | { |
856 | - if(!isset($_REQUEST[$module . $field]) && isset($lead->$field) && $field != 'id') |
|
856 | + if (!isset($_REQUEST[$module.$field]) && isset($lead->$field) && $field != 'id') |
|
857 | 857 | { |
858 | 858 | $bean->$field = $lead->$field; |
859 | - if($field == 'date_entered') $bean->$field = gmdate($GLOBALS['timedate']->get_db_date_time_format()); //bug 41030 |
|
859 | + if ($field == 'date_entered') $bean->$field = gmdate($GLOBALS['timedate']->get_db_date_time_format()); //bug 41030 |
|
860 | 860 | } |
861 | 861 | } |
862 | 862 | populateFromPost($module, $bean, true); |
@@ -871,7 +871,7 @@ discard block |
||
871 | 871 | $bean->id = create_guid(); |
872 | 872 | $bean->new_with_id = true; |
873 | 873 | $idName = $fieldDef['id_name']; |
874 | - $contact->$idName = $bean->id ; |
|
874 | + $contact->$idName = $bean->id; |
|
875 | 875 | if ($idName != $select) { |
876 | 876 | $rname = isset($fieldDef['rname']) ? $fieldDef['rname'] : ""; |
877 | 877 | if (!empty($rname) && isset($bean->$rname)) |
@@ -880,13 +880,13 @@ discard block |
||
880 | 880 | $contact->$select = $bean->name; |
881 | 881 | } |
882 | 882 | } |
883 | - } else if ($module != "Contacts"){ |
|
883 | + } else if ($module != "Contacts") { |
|
884 | 884 | $contactRel = $this->findRelationship($contact, $bean); |
885 | 885 | if (!empty($contactRel)) |
886 | 886 | { |
887 | 887 | $bean->id = create_guid(); |
888 | 888 | $bean->new_with_id = true; |
889 | - $contact->load_relationship ($contactRel) ; |
|
889 | + $contact->load_relationship($contactRel); |
|
890 | 890 | $relObject = $contact->$contactRel->getRelationshipObject(); |
891 | 891 | if ($relObject->relationship_type == "one-to-many" && $contact->$contactRel->_get_bean_position()) |
892 | 892 | { |
@@ -908,30 +908,30 @@ discard block |
||
908 | 908 | protected function copyAddressFields($bean, $contact) |
909 | 909 | { |
910 | 910 | //Copy over address info from the contact to any beans with address not set |
911 | - foreach($bean->field_defs as $field => $def) |
|
911 | + foreach ($bean->field_defs as $field => $def) |
|
912 | 912 | { |
913 | - if(!isset($_REQUEST[$bean->module_dir . $field]) && strpos($field, "_address_") !== false) |
|
913 | + if (!isset($_REQUEST[$bean->module_dir.$field]) && strpos($field, "_address_") !== false) |
|
914 | 914 | { |
915 | 915 | $set = "primary"; |
916 | 916 | if (strpos($field, "alt_") !== false || strpos($field, "shipping_") !== false) |
917 | 917 | $set = "alt"; |
918 | 918 | $type = ""; |
919 | 919 | |
920 | - if(strpos($field, "_address_street_2") !== false) |
|
920 | + if (strpos($field, "_address_street_2") !== false) |
|
921 | 921 | $type = "_address_street_2"; |
922 | - else if(strpos($field, "_address_street_3") !== false) |
|
922 | + else if (strpos($field, "_address_street_3") !== false) |
|
923 | 923 | $type = "_address_street_3"; |
924 | - else if(strpos($field, "_address_street_4") !== false) |
|
924 | + else if (strpos($field, "_address_street_4") !== false) |
|
925 | 925 | $type = ""; |
926 | - else if(strpos($field, "_address_street") !== false) |
|
926 | + else if (strpos($field, "_address_street") !== false) |
|
927 | 927 | $type = "_address_street"; |
928 | - else if(strpos($field, "_address_city") !== false) |
|
928 | + else if (strpos($field, "_address_city") !== false) |
|
929 | 929 | $type = "_address_city"; |
930 | - else if(strpos($field, "_address_state") !== false) |
|
930 | + else if (strpos($field, "_address_state") !== false) |
|
931 | 931 | $type = "_address_state"; |
932 | - else if(strpos($field, "_address_postalcode") !== false) |
|
932 | + else if (strpos($field, "_address_postalcode") !== false) |
|
933 | 933 | $type = "_address_postalcode"; |
934 | - else if(strpos($field, "_address_country") !== false) |
|
934 | + else if (strpos($field, "_address_country") !== false) |
|
935 | 935 | $type = "_address_country"; |
936 | 936 | |
937 | 937 | $var = $set.$type; |
@@ -969,11 +969,11 @@ discard block |
||
969 | 969 | $rel_def = $dictionary[$rel_name]['relationships'][$rel_name]; |
970 | 970 | } |
971 | 971 | if (!empty($rel_def)) { |
972 | - if ($rel_def['lhs_module'] == $from->module_dir && $rel_def['rhs_module'] == $to->module_dir ) |
|
972 | + if ($rel_def['lhs_module'] == $from->module_dir && $rel_def['rhs_module'] == $to->module_dir) |
|
973 | 973 | { |
974 | 974 | return $field; |
975 | 975 | } |
976 | - else if ($rel_def['rhs_module'] == $from->module_dir && $rel_def['lhs_module'] == $to->module_dir ) |
|
976 | + else if ($rel_def['rhs_module'] == $from->module_dir && $rel_def['lhs_module'] == $to->module_dir) |
|
977 | 977 | { |
978 | 978 | return $field; |
979 | 979 | } |
@@ -1015,20 +1015,20 @@ discard block |
||
1015 | 1015 | { |
1016 | 1016 | if ($lead->status == "Converted") |
1017 | 1017 | { |
1018 | - echo ("<span class='error'>" . translate('LBL_CONVERTLEAD_WARNING')); |
|
1018 | + echo ("<span class='error'>".translate('LBL_CONVERTLEAD_WARNING')); |
|
1019 | 1019 | $dupes = array(); |
1020 | 1020 | $q = "SELECT id, first_name, last_name FROM contacts WHERE first_name LIKE '{$lead->first_name}' AND last_name LIKE '{$lead->last_name}' AND deleted = 0"; |
1021 | 1021 | $result = $lead->db->query($q); |
1022 | - while($row = $lead->db->fetchByAssoc($result)) { |
|
1022 | + while ($row = $lead->db->fetchByAssoc($result)) { |
|
1023 | 1023 | $contact = new Contact(); |
1024 | 1024 | $contact->retrieve($row['id']); |
1025 | 1025 | $dupes[$row['id']] = $contact->name; |
1026 | 1026 | } |
1027 | 1027 | if (!empty($dupes)) |
1028 | 1028 | { |
1029 | - foreach($dupes as $id => $name) |
|
1029 | + foreach ($dupes as $id => $name) |
|
1030 | 1030 | { |
1031 | - echo (translate('LBL_CONVERTLEAD_WARNING_INTO_RECORD') . "<a href='index.php?module=Contacts&action=DetailView&record=$id'>$name</a>"); |
|
1031 | + echo (translate('LBL_CONVERTLEAD_WARNING_INTO_RECORD')."<a href='index.php?module=Contacts&action=DetailView&record=$id'>$name</a>"); |
|
1032 | 1032 | break; |
1033 | 1033 | } |
1034 | 1034 | } |