init
This commit is contained in:
17
modules/ContactLeads/AS_Popup.php
Normal file
17
modules/ContactLeads/AS_Popup.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
if(!empty($_REQUEST['html'])) {
|
||||
require_once('modules/ContactLeads/Popup_picker.php');
|
||||
$popup = new Popup_Picker();
|
||||
if($_REQUEST['html'] == 'Dial' )
|
||||
$popup->process_page_dial();
|
||||
|
||||
|
||||
} else {
|
||||
require_once('include/Popups/Popup_picker.php');
|
||||
$popup = new Popup_Picker();
|
||||
echo $popup->process_page();
|
||||
}
|
||||
|
||||
?>
|
||||
114
modules/ContactLeads/AcceptDecline.php
Normal file
114
modules/ContactLeads/AcceptDecline.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
global $sugar_config, $dbconfig, $beanList, $beanFiles, $app_strings, $app_list_strings;
|
||||
|
||||
|
||||
if ( !empty($_REQUEST['user_id'])) {
|
||||
$current_user = new User();
|
||||
$result = $current_user->retrieve($_REQUEST['user_id']);
|
||||
if ($result == null) {
|
||||
session_destroy();
|
||||
sugar_cleanup();
|
||||
die("The user id doesn't exist");
|
||||
}
|
||||
$current_entity = $current_user;
|
||||
}
|
||||
else if ( ! empty($_REQUEST['contactlead_id'])) {
|
||||
$current_entity = new ContactLead();
|
||||
$current_entity->disable_row_level_security = true;
|
||||
$result = $current_entity->retrieve($_REQUEST['contactlead_id']);
|
||||
if($result == null) {
|
||||
session_destroy();
|
||||
sugar_cleanup();
|
||||
die("The contactlead id doesn't exist");
|
||||
}
|
||||
}
|
||||
else if ( ! empty($_REQUEST['lead_id'])) {
|
||||
$current_entity = new Lead();
|
||||
$current_entity->disable_row_level_security = true;
|
||||
$result = $current_entity->retrieve($_REQUEST['lead_id']);
|
||||
if($result == null) {
|
||||
session_destroy();
|
||||
sugar_cleanup();
|
||||
die("The lead id doesn't exist");
|
||||
}
|
||||
}
|
||||
|
||||
$bean = $beanList[clean_string($_REQUEST['module'])];
|
||||
require_once($beanFiles[$bean]);
|
||||
$focus = new $bean;
|
||||
$focus->disable_row_level_security = true;
|
||||
$result = $focus->retrieve($_REQUEST['record']);
|
||||
|
||||
if($result == null) {
|
||||
session_destroy();
|
||||
sugar_cleanup();
|
||||
die("The focus id doesn't exist");
|
||||
}
|
||||
|
||||
$focus->set_accept_status($current_entity,$_REQUEST['accept_status']);
|
||||
|
||||
print $app_strings['LBL_STATUS_UPDATED']."<BR><BR>";
|
||||
print $app_strings['LBL_STATUS']. " ". $app_list_strings['dom_meeting_accept_status'][$_REQUEST['accept_status']];
|
||||
print "<BR><BR>";
|
||||
$script = <<<EOQ
|
||||
<SCRIPT language="JavaScript">
|
||||
<!--
|
||||
var browserName=navigator.appName;
|
||||
if (browserName=="Netscape") {
|
||||
// C.L. fix for Mozilla/Netscape flavors... need a parent window
|
||||
function closeme()
|
||||
{
|
||||
window.open('','_parent','');
|
||||
window.close();
|
||||
}
|
||||
} else {
|
||||
function closeme()
|
||||
{
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
EOQ;
|
||||
|
||||
print $script;
|
||||
print "<a href='#' onclick='window.closeme(); return false;'>".$app_strings['LBL_CLOSE_WINDOW']."</a><br>";
|
||||
sugar_cleanup();
|
||||
exit;
|
||||
?>
|
||||
120
modules/ContactLeads/Address_picker.html
Normal file
120
modules/ContactLeads/Address_picker.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!--
|
||||
/*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function save_checks(offset) {
|
||||
checked_ids = Array();
|
||||
for (i = 0; i < document.MassUpdate.elements.length; i++){
|
||||
if(document.MassUpdate.elements[i].name == 'mass[]' && document.MassUpdate.elements[i].checked) {
|
||||
temp_string = '';
|
||||
temp_string += '"' + document.MassUpdate.elements[i].value + '": {';
|
||||
for(the_key in associated_javascript_data[document.MassUpdate.elements[i].value]) {
|
||||
temp_string += '"' + the_key + '":"' + associated_javascript_data[document.MassUpdate.elements[i].value][the_key] + '",';
|
||||
}
|
||||
temp_string = temp_string.substring(0,temp_string.length - 1);
|
||||
temp_string += '}';
|
||||
checked_ids.push(temp_string);
|
||||
}
|
||||
}
|
||||
document.MassUpdate.saved_associated_data.value = escape('{' + checked_ids.join(',') + '}');
|
||||
document.MassUpdate.action.value = 'ContactLeadAddressPopup';
|
||||
document.MassUpdate.ContactLeads_CONTACTLEAD_offset.value = offset;
|
||||
document.MassUpdate.submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
// reassigned the saved data from the saved checks
|
||||
if(typeof(document.MassUpdate) != 'undefined' && document.MassUpdate.saved_associated_data.value != '') {
|
||||
temp_array = '';
|
||||
for(the_key in temp_array) {
|
||||
associated_javascript_data[the_key] = temp_array[the_key];
|
||||
}
|
||||
}
|
||||
|
||||
// save checks across pages for multiselects
|
||||
if(typeof(document.MassUpdate) != "undefined") {
|
||||
checked_items = Array();
|
||||
inputs_array = document.MassUpdate.elements;
|
||||
|
||||
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
||||
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].style.display == "none") {
|
||||
checked_items.push(inputs_array[wp].value);
|
||||
}
|
||||
}
|
||||
for(i in checked_items) {
|
||||
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
||||
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].value == checked_items[i]) {
|
||||
inputs_array[wp].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
|
||||
<!-- BEGIN: list_nav_row -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="listView">
|
||||
{PAGINATION}
|
||||
<!-- END: list_nav_row -->
|
||||
<tr height="20">
|
||||
<td scope="col" class="listViewThS1" NOWRAP>{CHECKALL}</td>
|
||||
<td scope="col" width="20%" class="listViewThS1" nowrap="nowrap"><a href="{ORDER_BY}last_name" class="listViewThLinkS1">{MOD.LBL_LIST_CONTACTLEAD_NAME}{arrow_start}{last_name_arrow}{arrow_end}</a></td>
|
||||
<td scope="col" width="35%" class="listViewThS1" nowrap="nowrap"><a href="{ORDER_BY}primary_address_street" class="listViewThLinkS1">{MOD.LBL_PRIMARY_ADDRESS}{arrow_start}{email1_arrow}{arrow_end}</a></td>
|
||||
<td scope="col" width="40%" class="listViewThS1" nowrap="nowrap">{MOD.LBL_LIST_ACCOUNT_NAME}</td>
|
||||
</tr>
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20"
|
||||
onmouseover="setPointer(this, '{CONTACTLEAD.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
|
||||
onmouseout="setPointer(this, '{CONTACTLEAD.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
|
||||
onmousedown="setPointer(this, '{CONTACTLEAD.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
|
||||
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>{PREROW}</td>
|
||||
<td scope='row' valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><a href="#" class="listViewTdLinkS1" onclick="send_back('ContactLeads','{CONTACTLEAD.ID}');">{CONTACTLEAD.FIRST_NAME} {CONTACTLEAD.LAST_NAME}</a></td>
|
||||
<td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
<slot>{CONTACTLEAD.PRIMARY_ADDRESS_STREET}<br>
|
||||
{CONTACTLEAD.PRIMARY_ADDRESS_CITY} {CONTACTLEAD.PRIMARY_ADDRESS_STATE} {CONTACTLEAD.PRIMARY_ADDRESS_POSTALCODE}<br>
|
||||
{CONTACTLEAD.PRIMARY_ADDRESS_COUNTRY}</slot>
|
||||
<td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{CONTACTLEAD.ACCOUNT_NAME}</td>
|
||||
</tr>
|
||||
<tr><td colspan="20" class="listViewHRS1"></td></tr>
|
||||
<!-- END: row -->
|
||||
{ASSOCIATED_JAVASCRIPT_DATA}
|
||||
</table>
|
||||
|
||||
<!-- END: main -->
|
||||
147
modules/ContactLeads/BusinessCard.html
Normal file
147
modules/ContactLeads/BusinessCard.html
Normal file
@@ -0,0 +1,147 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* {APP.LBL_CURRENCY_SYM}Header: /cvsroot/sugarcrm/sugarcrm/modules/ContactLeads/EditView.html,v 1.22 2004/07/16 04:04:42 sugarclint Exp {APP.LBL_CURRENCY_SYM}
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
<!-- BEGIN: error -->
|
||||
<span color="red">{ERROR}</span>
|
||||
<!-- END: error -->
|
||||
|
||||
<!-- BEGIN: startform -->
|
||||
<form name="BusinessCard" action='index.php' method='post'>
|
||||
<input type="hidden" name="module" value="ContactLeads">
|
||||
<input type="hidden" name="action" value="BusinessCard">
|
||||
<input type="hidden" name="handle" value="Save">
|
||||
<input type="hidden" name="dup_checked" value="true">
|
||||
<!-- END: startform -->
|
||||
<script>
|
||||
function toggleDisplay(id){
|
||||
|
||||
if(this.document.getElementById( id).style.display=='none'){
|
||||
this.document.getElementById( id).style.display='inline'
|
||||
if(this.document.getElementById(id+"link") != undefined){
|
||||
this.document.getElementById(id+"link").style.display='none';
|
||||
}
|
||||
|
||||
}else{
|
||||
this.document.getElementById( id).style.display='none'
|
||||
if(this.document.getElementById(id+"link") != undefined){
|
||||
this.document.getElementById(id+"link").style.display='inline';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isChecked(field){
|
||||
|
||||
return eval("document.forms['BusinessCard']."+field+".checked");
|
||||
}
|
||||
function checkOpportunity(){
|
||||
if(!isChecked('newopportunity')){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
removeFromValidate('BusinessCard', 'Opportunitiesaccount_name');
|
||||
if(validate_form('BusinessCard', 'Opportunities')){
|
||||
|
||||
if(this.document.forms['BusinessCard'].selectedAccount.value != ''){
|
||||
return true;
|
||||
}
|
||||
if(!isChecked('newaccount')){
|
||||
alert('{OPPNEEDSACCOUNT}');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<p><table class='{TABLECLASS}' cellpadding="0" cellspacing="0" width="100%" border="0" >
|
||||
<tr><td>
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0" >
|
||||
|
||||
<!-- BEGIN: row -->
|
||||
<tr><td>{ROWVALUE} </td></tr>
|
||||
<!-- END: row -->
|
||||
|
||||
<!-- BEGIN: form -->
|
||||
<tr ><td valign='top' align='left' class="{CLASS}"><h4 class="{CLASS}">{FORMHEADER}</h4></td></tr>
|
||||
<tr ><td valign='top' align='left'>{FORMBODY}{FORMFOOTER}{POSTFORM}</td></tr>
|
||||
<!-- END: form -->
|
||||
<!-- BEGIN: formnoborder -->
|
||||
<tr > <td valign='top' align='left' colspan='3' border='0'>{FORMHEADER}</td></tr>
|
||||
<tr ><td class='{CLASS}' valign='top' align='left' colspan='1' >{FORMBODY}{FORMFOOTER}{POSTFORM}</td></tr>
|
||||
<tr ><td valign='top' align='left' colspan='3' border='0'><td> </td></tr>
|
||||
<!-- END: formnoborder -->
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table></p>
|
||||
|
||||
<p> <table class='{TABLECLASS}' cellpadding="0" cellspacing="0" width="100%" border="0" >
|
||||
<tr><td>
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0" >
|
||||
<!-- BEGIN: hrrow -->
|
||||
<td class="{CLASS}"><h4 class="{CLASS}">{HEADER}</h4></td>
|
||||
<!-- END: hrrow -->
|
||||
<!-- BEGIN: headlessform -->
|
||||
<tr><td valign='top' align='left' border='0'>{FORMBODY}{FORMFOOTER}{POSTFORM}</td></tr>
|
||||
<!-- END: headlessform -->
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table></p>
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN: save -->
|
||||
|
||||
<p> <table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td align="right"><input title='{APP.LBL_SAVE_BUTTON_TITLE}' onclick="return (validate_form('BusinessCard', 'ContactLead') && validate_form('BusinessCard', 'display_account') && (!isChecked('newaccount') || validate_form('BusinessCard', 'Accounts')) {CHECKOPPORTUNITY} && (!isChecked('newappointment') || validate_form('BusinessCard', 'Appointments')))" accessKey='{APP.LBL_SAVE_BUTTON_KEY}' class='button' type='submit' name='button' value=' {APP.LBL_SAVE_BUTTON_LABEL} ' ></td>
|
||||
</tr>
|
||||
</table></p>
|
||||
<!-- END: save -->
|
||||
<!-- BEGIN: endform -->
|
||||
</form>
|
||||
<!-- END: endform -->
|
||||
|
||||
<!-- END: main -->
|
||||
367
modules/ContactLeads/BusinessCard.php
Normal file
367
modules/ContactLeads/BusinessCard.php
Normal file
@@ -0,0 +1,367 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Business Card Wizard
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
require_once('XTemplate/xtpl.php');
|
||||
global $theme;
|
||||
$error_msg = '';
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'ContactLeads');
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$mod_strings['LBL_BUSINESSCARD'], true);
|
||||
echo "\n</p>\n";
|
||||
$xtpl=new XTemplate ('modules/ContactLeads/BusinessCard.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
|
||||
$xtpl->assign("HEADER", $mod_strings['LBL_ADD_BUSINESSCARD']);
|
||||
|
||||
$xtpl->assign("MODULE", $_REQUEST['module']);
|
||||
if ($error_msg != '')
|
||||
{
|
||||
$xtpl->assign("ERROR", $error_msg);
|
||||
$xtpl->parse("main.error");
|
||||
}
|
||||
|
||||
if(isset($_POST['handle']) && $_POST['handle'] == 'Save'){
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
require_once('modules/ContactLeads/ContactLeadFormBase.php');
|
||||
$contactleadForm = new ContactLeadFormBase();
|
||||
require_once('modules/Accounts/AccountFormBase.php');
|
||||
$accountForm = new AccountFormBase();
|
||||
require_once('modules/Opportunities/Opportunity.php');
|
||||
require_once('modules/Opportunities/OpportunityFormBase.php');
|
||||
$oppForm = new OpportunityFormBase();
|
||||
if(!isset($_POST['selectedContactLead']) && !isset($_POST['ContinueContactLead'])){
|
||||
$duplicateContactLeads = $contactleadForm->checkForDuplicates('ContactLeads');
|
||||
if(isset($duplicateContactLeads)){
|
||||
$formBody = $contactleadForm->buildTableForm($duplicateContactLeads);
|
||||
$xtpl->assign('FORMBODY', $formBody);
|
||||
$xtpl->parse('main.formnoborder');
|
||||
$xtpl->parse('main');
|
||||
$xtpl->out('main');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($_POST['selectedAccount']) && empty($_POST['ContinueAccount'])){
|
||||
$duplicateAccounts = $accountForm->checkForDuplicates('Accounts');
|
||||
|
||||
if(isset($duplicateAccounts)){
|
||||
$xtpl->assign('FORMBODY', $accountForm->buildTableForm($duplicateAccounts));
|
||||
$xtpl->parse('main.formnoborder');
|
||||
$xtpl->parse('main');
|
||||
$xtpl->out('main');
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['newopportunity']) && $_POST['newopportunity']=='on' &&!isset($_POST['selectedOpportunity']) && !isset($_POST['ContinueOpportunity'])){
|
||||
|
||||
$duplicateOpps = $oppForm->checkForDuplicates('Opportunities');
|
||||
if(isset($duplicateOpps)){
|
||||
$xtpl->assign('FORMBODY', $oppForm->buildTableForm($duplicateOpps));
|
||||
$xtpl->parse('main.formnoborder');
|
||||
$xtpl->parse('main');
|
||||
$xtpl->out('main');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!empty($_POST['selectedContactLead'])){
|
||||
$contactlead = new ContactLead();
|
||||
$contactlead->retrieve($_POST['selectedContactLead']);
|
||||
}else{
|
||||
$contactlead= $contactleadForm->handleSave('ContactLeads',false, false);
|
||||
}
|
||||
if(!empty($_POST['selectedAccount'])){
|
||||
$account = new Account();
|
||||
$account->retrieve($_POST['selectedAccount']);
|
||||
}else if(isset($_POST['newaccount']) && $_POST['newaccount']=='on' ){
|
||||
$account= $accountForm->handleSave('Accounts',false, false);
|
||||
}
|
||||
if(isset($_POST['newopportunity']) && $_POST['newopportunity']=='on' ){
|
||||
if(!empty($_POST['selectedOpportunity'])){
|
||||
$opportunity = new Opportunity();
|
||||
$opportunity->retrieve($_POST['selectedOpportunity']);
|
||||
}else{
|
||||
if(isset($account)){
|
||||
$_POST['Opportunitiesaccount_id'] = $account->id;
|
||||
$_POST['Opportunitiesaccount_name'] = $account->name;
|
||||
|
||||
}
|
||||
if(isset($_POST['ContactLeadslead_source']) && !empty($_POST['ContactLeadslead_source'])){
|
||||
$_POST['Opportunitieslead_source'] = $_POST['ContactLeadslead_source'];
|
||||
}
|
||||
$opportunity= $oppForm->handleSave('Opportunities',false, false);
|
||||
|
||||
}
|
||||
}
|
||||
require_once('modules/Notes/NoteFormBase.php');
|
||||
|
||||
$noteForm = new NoteFormBase();
|
||||
if(isset($account))
|
||||
$_POST['AccountNotesparent_id'] = $account->id;
|
||||
$accountnote= $noteForm->handleSave('AccountNotes',false, false);
|
||||
if(isset($contactlead))
|
||||
$_POST['ContactLeadNotesparent_type'] = "ContactLeads";
|
||||
$_POST['ContactLeadNotesparent_id'] = $contactlead->id;
|
||||
$contactleadnote= $noteForm->handleSave('ContactLeadNotes',false, false);
|
||||
if(isset($opportunity)){
|
||||
$_POST['OpportunityNotesparent_type'] = "Opportunities";
|
||||
$_POST['OpportunityNotesparent_id'] = $opportunity->id;
|
||||
$opportunitynote= $noteForm->handleSave('OpportunityNotes',false, false);
|
||||
}
|
||||
if(isset($_POST['newappointment']) && $_POST['newappointment']=='on' ){
|
||||
if(isset($_POST['appointment']) && $_POST['appointment'] == 'Meeting'){
|
||||
require_once('modules/Meetings/MeetingFormBase.php');
|
||||
$meetingForm = new MeetingFormBase();
|
||||
$meeting= $meetingForm->handleSave('Appointments',false, false);
|
||||
}else{
|
||||
require_once('modules/Calls/CallFormBase.php');
|
||||
$callForm = new CallFormBase();
|
||||
$call= $callForm->handleSave('Appointments',false, false);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($call)){
|
||||
if(isset($contactlead)) {
|
||||
$call->load_relationship('contactleads');
|
||||
$call->contactleads->add($contactlead->id);
|
||||
} else if(isset($account)){
|
||||
$call->load_relationship('account');
|
||||
$call->account->add($account->id);
|
||||
}else if(isset($opportunity)){
|
||||
$call->load_relationship('opportunity');
|
||||
$call->opportunity->add($opportunity->id);
|
||||
}
|
||||
}
|
||||
if(isset($meeting)){
|
||||
if(isset($contactlead)) {
|
||||
$meeting->load_relationship('contactleads');
|
||||
$meeting->contactleads->add($contactlead->id);
|
||||
} else if(isset($account)){
|
||||
$meeting->load_relationship('account');
|
||||
$meeting->account->add($account->id);
|
||||
}else if(isset($opportunity)){
|
||||
$meeting->load_relationship('opportunity');
|
||||
$meeting->opportunity->add($opportunity->id);
|
||||
}
|
||||
}
|
||||
if(isset($account)){
|
||||
if(isset($contactlead)) {
|
||||
$account->load_relationship('contactleads');
|
||||
$account->contactleads->add($contactlead->id);
|
||||
} else if(isset($accountnote)){
|
||||
$account->load_relationship('notes');
|
||||
$account->notes->add($accountnote->id);
|
||||
}else if(isset($opportunity)){
|
||||
$account->load_relationship('opportunities');
|
||||
$account->opportunities->add($opportunity->id);
|
||||
}
|
||||
}
|
||||
if(isset($opportunity)){
|
||||
if(isset($contactlead)) {
|
||||
$opportunity->load_relationship('contactleads');
|
||||
$opportunity->contactleads->add($contactlead->id);
|
||||
} else if(isset($accountnote)){
|
||||
$opportunity->load_relationship('notes');
|
||||
$opportunity->notes->add($accountnote->id);
|
||||
}
|
||||
}
|
||||
if(isset($contactlead)){
|
||||
if(isset($contactleadnote)){
|
||||
$contactlead->load_relationship('notes');
|
||||
$contactlead->notes->add($contactleadnote->id);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($contactlead)){
|
||||
$contactlead->track_view($current_user->id, 'ContactLeads');
|
||||
if(isset($_POST['selectedContactLead']) && $_POST['selectedContactLead'] == $contactlead->id){
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_EXISTING_CONTACTLEAD']." - <a href='index.php?action=DetailView&module=ContactLeads&record=".$contactlead->id."'>".$contactlead->first_name ." ".$contactlead->last_name."</a>" );
|
||||
$xtpl->parse('main.row');
|
||||
}else{
|
||||
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_CREATED_CONTACTLEAD']." - <a href='index.php?action=DetailView&module=ContactLeads&record=".$contactlead->id."'>".$contactlead->first_name ." ".$contactlead->last_name."</a>" );
|
||||
$xtpl->parse('main.row');
|
||||
}
|
||||
}
|
||||
if(isset($account)){
|
||||
$account->track_view($current_user->id, 'Accounts');
|
||||
if(isset($_POST['selectedAccount']) && $_POST['selectedAccount'] == $account->id){
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_EXISTING_ACCOUNT']. " - <a href='index.php?action=DetailView&module=Accounts&record=".$account->id."'>".$account->name."</a>");
|
||||
$xtpl->parse('main.row');
|
||||
}else{
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_CREATED_ACCOUNT']. " - <a href='index.php?action=DetailView&module=Accounts&record=".$account->id."'>".$account->name."</a>");
|
||||
$xtpl->parse('main.row');
|
||||
}
|
||||
|
||||
}
|
||||
if(isset($opportunity)){
|
||||
$opportunity->track_view($current_user->id, 'Opportunities');
|
||||
if(isset($_POST['selectedOpportunity']) && $_POST['selectedOpportunity'] == $opportunity->id){
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_EXISTING_OPPORTUNITY']. " - <a href='index.php?action=DetailView&module=Opportunities&record=".$opportunity->id."'>".$opportunity->name."</a>");
|
||||
$xtpl->parse('main.row');
|
||||
}else{
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_CREATED_OPPORTUNITY']. " - <a href='index.php?action=DetailView&module=Opportunities&record=".$opportunity->id."'>".$opportunity->name."</a>");
|
||||
$xtpl->parse('main.row');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(isset($call)){
|
||||
$call->track_view($current_user->id, 'Calls');
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_CREATED_CALL']. " - <a href='index.php?action=DetailView&module=Calls&record=".$call->id."'>".$call->name."</a>");
|
||||
$xtpl->parse('main.row');
|
||||
}
|
||||
if(isset($meeting)){
|
||||
$meeting->track_view($current_user->id, 'Meetings');
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_CREATED_MEETING']. " - <a href='index.php?action=DetailView&module=Calls&record=".$meeting->id."'>".$meeting->name."</a>");
|
||||
$xtpl->parse('main.row');
|
||||
}
|
||||
$xtpl->assign('ROWVALUE'," ");
|
||||
$xtpl->parse('main.row');
|
||||
$xtpl->assign('ROWVALUE',"<a href='index.php?module=ContactLeads&action=BusinessCard'>{$mod_strings['LBL_ADDMORE_BUSINESSCARD']}</a>");
|
||||
$xtpl->parse('main.row');
|
||||
$xtpl->parse('main');
|
||||
$xtpl->out('main');
|
||||
}
|
||||
|
||||
else{
|
||||
|
||||
|
||||
//CONTACTLEAD
|
||||
$xtpl->assign('FORMHEADER',$mod_strings['LNK_NEW_CONTACTLEAD']);
|
||||
$xtpl->parse("main.startform");
|
||||
require_once('modules/ContactLeads/ContactLeadFormBase.php');
|
||||
$xtpl->assign('OPPNEEDSACCOUNT',$mod_strings['NTC_OPPORTUNITY_REQUIRES_ACCOUNT']);
|
||||
if ($sugar_config['require_accounts']) {
|
||||
$xtpl->assign('CHECKOPPORTUNITY', "&& checkOpportunity()");
|
||||
}
|
||||
else {
|
||||
$xtpl->assign('CHECKOPPORTUNITY', "");
|
||||
}
|
||||
$contactleadForm = new ContactLeadFormBase();
|
||||
$xtpl->assign('FORMBODY',$contactleadForm->getWideFormBody('ContactLeads', 'ContactLeads', 'BusinessCard', '', false));
|
||||
$xtpl->assign('TABLECLASS', 'tabForm');
|
||||
$xtpl->assign('CLASS', 'dataLabel');
|
||||
require_once('modules/Notes/NoteFormBase.php');
|
||||
$noteForm = new NoteFormBase();
|
||||
$postform = "<div id='contactleadnotelink'><p><a href='javascript:toggleDisplay(\"contactleadnote\");addToValidate(\"BusinessCard\", \"ContactLeadNotesname\", \"varchar\", true,\"".$mod_strings['LBL_NOTE_SUBJECT']."\");' class='tabFormLink'>${mod_strings['LNK_NEW_NOTE']}</a></p></div>";
|
||||
$postform .= '<div id="contactleadnote" style="display:none">'.'<input type=hidden name=CreateContactLeadNote value=0>'.$noteForm->getFormBody('ContactLeadNotes','Notes','BusinessCard', 85, false).'</div>';
|
||||
$xtpl->assign('POSTFORM',$postform);
|
||||
$xtpl->parse("main.form");
|
||||
|
||||
|
||||
$xtpl->assign('HEADER', $app_strings['LBL_RELATED_RECORDS']);
|
||||
$xtpl->parse("main.hrrow");
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'BusinessCard',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'selectedAccount',
|
||||
'name' => 'display_account_name',
|
||||
),
|
||||
);
|
||||
|
||||
$json = getJSONobj();
|
||||
$encoded_contactlead_popup_request_data = $json->encode($popup_request_data);
|
||||
|
||||
//Account
|
||||
require_once('include/QuickSearchDefaults.php');
|
||||
$qsd = new QuickSearchDefaults();
|
||||
$sqs_objects = array('display_account_name' => $qsd->getQSParent());
|
||||
$sqs_objects['display_account_name']['populate_list'] = array('display_account_name', 'selectedAccount');
|
||||
$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . ';
|
||||
addToValidateBinaryDependency(\'BusinessCard\', \'display_account_name\', \'alpha\', false, \'' . $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ACCOUNT'] . '\', \'selectedAccount\' );
|
||||
</script>';
|
||||
|
||||
$selectAccountButton = $quicksearch_js;
|
||||
$selectAccountButton .= "<div id='newaccountdivlink' style='display:inline' class='dataLabel'>{$mod_strings['LNK_SELECT_ACCOUNT']}: <input class='sqsEnabled' name='display_account_name' id='display_account_name' type=\"text\" value=\"\"><input name='selectedAccount' id='selectedAccount' type=\"hidden\" value=''> <input type='button' title=\"{$app_strings['LBL_SELECT_BUTTON_TITLE']}\" accessKey=\"{$app_strings['LBL_SELECT_BUTTON_KEY']}\" type=\"button\" class=\"button\" value='{$app_strings['LBL_SELECT_BUTTON_LABEL']}' name=btn1 LANGUAGE=javascript onclick='open_popup(\"Accounts\", 600, 400, \"\", true, false, $encoded_contactlead_popup_request_data);'/> <input type='button' title=\"{$app_strings['LBL_CLEAR_BUTTON_TITLE']}\" accessKey=\"{$app_strings['LBL_CLEAR_BUTTON_KEY']}\" type=\"button\" class=\"button\" value='{$app_strings['LBL_CLEAR_BUTTON_LABEL']}' name=btn1 LANGUAGE=javascript onclick='document.forms[\"ConvertLead\"].selectedAccount.value=\"\";document.forms[\"ConvertLead\"].display_account_name.value=\"\"; '><br><b>{$app_strings['LBL_OR']}</b></div><br><br>";
|
||||
$xtpl->assign('FORMHEADER',get_form_header($mod_strings['LNK_NEW_ACCOUNT'], '', ''));
|
||||
require_once('modules/Accounts/AccountFormBase.php');
|
||||
$accountForm = new AccountFormBase();
|
||||
$xtpl->assign('CLASS', 'evenListRow');
|
||||
$xtpl->assign('FORMBODY',$selectAccountButton."<slot class='dataLabel'><input class='checkbox' type='checkbox' name='newaccount' onclick='document.forms[\"BusinessCard\"].selectedAccount.value=\"\";document.forms[\"BusinessCard\"].display_account_name.value=\"\";toggleDisplay(\"newaccountdiv\");'> ".$mod_strings['LNK_NEW_ACCOUNT']."</slot> <div id='newaccountdiv' style='display:none'>".$accountForm->getWideFormBody('Accounts', 'Accounts','BusinessCard', '' ));
|
||||
require_once('modules/Notes/NoteFormBase.php');
|
||||
$noteForm = new NoteFormBase();
|
||||
$postform = "<div id='accountnotelink'><p><a href='javascript:toggleDisplay(\"accountnote\");'>${mod_strings['LNK_NEW_NOTE']}</a></p></div>";
|
||||
$postform .= '<div id="accountnote" style="display:none">'.$noteForm->getFormBody('AccountNotes', 'Notes', 'BusinessCard', 85).'</div>';
|
||||
$xtpl->assign('POSTFORM',$postform);
|
||||
$xtpl->parse("main.headlessform");
|
||||
|
||||
//OPPORTUNITTY
|
||||
$xtpl->assign('FORMHEADER',get_form_header($mod_strings['LNK_NEW_OPPORTUNITY'], '', ''));
|
||||
require_once('modules/Opportunities/OpportunityFormBase.php');
|
||||
$oppForm = new OpportunityFormBase();
|
||||
$xtpl->assign('CLASS', 'evenListRow');
|
||||
$xtpl->assign('FORMBODY',"<slot class='dataLabel'><input class='checkbox' type='checkbox' name='newopportunity' onclick='toggleDisplay(\"newoppdiv\");'> ".$mod_strings['LNK_NEW_OPPORTUNITY']."</slot><div id='newoppdiv' style='display:none'>".$oppForm->getWideFormBody('Opportunities', 'Opportunities','BusinessCard', '' , false));
|
||||
require_once('modules/Notes/NoteFormBase.php');
|
||||
$noteForm = new NoteFormBase();
|
||||
$postform = "<div id='oppnotelink'><a href='javascript:toggleDisplay(\"oppnote\");'>${mod_strings['LNK_NEW_NOTE']}</a></div>";
|
||||
$postform .= '<div id="oppnote" style="display:none">'.$noteForm->getFormBody('OpportunityNotes', 'Notes','BusinessCard', 85).'</div><br>';
|
||||
$xtpl->assign('POSTFORM',$postform);
|
||||
$xtpl->parse("main.headlessform");
|
||||
|
||||
//Appointment
|
||||
$xtpl->assign('FORMHEADER',$mod_strings['LNK_NEW_APPOINTMENT']);
|
||||
require_once('modules/Calls/CallFormBase.php');
|
||||
$callForm = new CallFormBase();
|
||||
$xtpl->assign('FORMBODY', "<input class='checkbox' type='checkbox' name='newappointment' onclick='toggleDisplay(\"newappointmentdiv\");'> ".$mod_strings['LNK_NEW_APPOINTMENT']."<div id='newappointmentdiv' style='display:none'>".$callForm->getWideFormBody('Appointments', 'Calls',85));
|
||||
$xtpl->assign('POSTFORM','');
|
||||
$xtpl->parse("main.headlessform");
|
||||
$xtpl->parse("main.save");
|
||||
$xtpl->parse("main.endform");
|
||||
$xtpl->parse("main");
|
||||
|
||||
$xtpl->out("main");
|
||||
|
||||
}
|
||||
?>
|
||||
61
modules/ContactLeads/ContactLead.js
Normal file
61
modules/ContactLeads/ContactLead.js
Normal file
@@ -0,0 +1,61 @@
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
function set_campaignlog_and_save_background(popup_reply_data)
|
||||
{var form_name=popup_reply_data.form_name;var name_to_value_array=popup_reply_data.name_to_value_array;var passthru_data=popup_reply_data.passthru_data;var query_array=new Array();if(name_to_value_array!='undefined'){for(var the_key in name_to_value_array)
|
||||
{if(the_key=='toJSON')
|
||||
{}
|
||||
else
|
||||
{query_array.push(the_key+'='+name_to_value_array[the_key]);}}}
|
||||
var selection_list;if(popup_reply_data.selection_list)
|
||||
{selection_list=popup_reply_data.selection_list;}
|
||||
else
|
||||
{selection_list=popup_reply_data.name_to_value_array;}
|
||||
if(selection_list!='undefined'){for(var the_key in selection_list)
|
||||
{query_array.push('subpanel_id[]='+selection_list[the_key])}}
|
||||
var module=get_module_name();var id=get_record_id();query_array.push('value=DetailView');query_array.push('module='+module);query_array.push('http_method=get');query_array.push('return_module='+module);query_array.push('return_id='+id);query_array.push('record='+id);query_array.push('isDuplicate=false');query_array.push('return_type=addcampaignlog');query_array.push('action=Save2');query_array.push('inline=1');var refresh_page=escape(passthru_data['refresh_page']);for(prop in passthru_data){if(prop=='link_field_name'){query_array.push('subpanel_field_name='+escape(passthru_data[prop]));}else{if(prop=='module_name'){query_array.push('subpanel_module_name='+escape(passthru_data[prop]));}else{query_array.push(prop+'='+escape(passthru_data[prop]));}}}
|
||||
var query_string=query_array.join('&');request_map[request_id]=passthru_data['child_field'];var returnstuff=http_fetch_sync('index.php',query_string);request_id++;got_data(returnstuff,true);if(refresh_page==1){document.location.reload(true);}}
|
||||
function validatePortalName(e){var portalName=document.getElementById('portal_name');var portalNameExisting=document.getElementById("portal_name_existing");var portalNameVerified=document.getElementById('portal_name_verified');if(typeof(portalName.parentNode.lastChild)!='undefined'&&portalName.parentNode.lastChild.tagName=='SPAN'){portalName.parentNode.lastChild.innerHTML='';}
|
||||
if(portalName.value==portalNameExisting.value){return;}
|
||||
var callbackFunction=function success(data){count=data.responseText;if(count!=0){add_error_style('EditView','portal_name',SUGAR.language.get('app_strings','ERR_EXISTING_PORTAL_USERNAME'));for(wp=1;wp<=10;wp++){window.setTimeout('fade_error_style(style, '+wp*10+')',1000+(wp*50));}
|
||||
portalName.focus();}
|
||||
if(portalNameVerified.parentNode.childNodes.length>1){portalNameVerified.parentNode.removeChild(portalNameVerified.parentNode.lastChild);}
|
||||
verifiedTextNode=document.createElement('span');verifiedTextNode.innerHTML='';portalNameVerified.parentNode.appendChild(verifiedTextNode);portalNameVerified.value=count==0?"true":"false";verifyingPortalName=false;}
|
||||
if(portalNameVerified.parentNode.childNodes.length>1){portalNameVerified.parentNode.removeChild(portalNameVerified.parentNode.lastChild);}
|
||||
if(portalName.value!=''&&!verifyingPortalName){document.getElementById('portal_name_verified').value="false";verifiedTextNode=document.createElement('span');portalNameVerified.parentNode.appendChild(verifiedTextNode);verifiedTextNode.innerHTML=SUGAR.language.get('app_strings','LBL_VERIFY_PORTAL_NAME');verifyingPortalName=true;var cObj=YAHOO.util.Connect.asyncRequest('POST','index.php?module=ContactLeads&action=ValidPortalUsername&portal_name='+portalName.value,{success:callbackFunction,failure:callbackFunction});}}
|
||||
function handleKeyDown(e){if((kc=e["keyCode"])){enterKeyPressed=(kc==13)?true:false;if(enterKeyPressed){validatePortalName(e);freezeEvent(e);setTimeout(forceSubmit,2100);}}}
|
||||
function freezeEvent(e){if(e.preventDefault)e.preventDefault();e.returnValue=false;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();return false;}
|
||||
function forceSubmit(){theForm=YAHOO.util.Dom.get('EditView');if(theForm){theForm.action.value='Save';if(!check_form('EditView')){return false;}
|
||||
theForm.submit();}}
|
||||
verifyingPortalName=false;enterKeyPressed=false;
|
||||
869
modules/ContactLeads/ContactLead.php
Normal file
869
modules/ContactLeads/ContactLead.php
Normal file
@@ -0,0 +1,869 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/SugarObjects/templates/person/Person.php');
|
||||
require_once('include/utils.php');
|
||||
require_once('modules/Opportunities/Opportunity.php');
|
||||
|
||||
|
||||
|
||||
require_once('modules/Cases/Case.php');
|
||||
require_once('modules/Tasks/Task.php');
|
||||
require_once('modules/Notes/Note.php');
|
||||
require_once('modules/Leads/Lead.php');
|
||||
require_once('modules/Meetings/Meeting.php');
|
||||
require_once('modules/Calls/Call.php');
|
||||
require_once('modules/Emails/Email.php');
|
||||
require_once('modules/Bugs/Bug.php');
|
||||
require_once('modules/Users/User.php');
|
||||
require_once('modules/Campaigns/Campaign.php');
|
||||
require_once('include/SugarObjects/templates/person/Person.php');
|
||||
// ContactLead is used to store customer information.
|
||||
class ContactLead extends Person {
|
||||
var $field_name_map;
|
||||
// Stored fields
|
||||
var $id;
|
||||
var $name = '';
|
||||
var $lead_source;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $assigned_user_id;
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $modified_by_name;
|
||||
|
||||
|
||||
|
||||
|
||||
var $foreign_contactlead;
|
||||
var $description;
|
||||
var $salutation;
|
||||
var $first_name;
|
||||
var $last_name;
|
||||
var $title;
|
||||
var $department;
|
||||
var $birthdate;
|
||||
var $reports_to_id;
|
||||
var $do_not_call;
|
||||
var $phone_home;
|
||||
var $phone_mobile;
|
||||
var $phone_work;
|
||||
var $phone_other;
|
||||
var $phone_fax;
|
||||
var $email1;
|
||||
var $email_and_name1;
|
||||
var $email_and_name2;
|
||||
var $email2;
|
||||
var $assistant;
|
||||
var $assistant_phone;
|
||||
var $email_opt_out;
|
||||
var $primary_address_street;
|
||||
var $primary_address_city;
|
||||
var $primary_address_state;
|
||||
var $primary_address_postalcode;
|
||||
var $primary_address_country;
|
||||
var $alt_address_street;
|
||||
var $alt_address_city;
|
||||
var $alt_address_state;
|
||||
var $alt_address_postalcode;
|
||||
var $alt_address_country;
|
||||
var $portal_name;
|
||||
var $portal_app;
|
||||
var $portal_active;
|
||||
var $contactleads_users_id;
|
||||
// These are for related fields
|
||||
var $bug_id;
|
||||
var $lead_name;
|
||||
var $lead_id;
|
||||
var $report_to_name;
|
||||
var $opportunity_role;
|
||||
var $opportunity_rel_id;
|
||||
var $opportunity_id;
|
||||
var $case_role;
|
||||
var $case_rel_id;
|
||||
var $case_id;
|
||||
var $task_id;
|
||||
var $note_id;
|
||||
var $meeting_id;
|
||||
var $call_id;
|
||||
var $email_id;
|
||||
var $assigned_user_name;
|
||||
var $accept_status;
|
||||
var $accept_status_id;
|
||||
var $accept_status_name;
|
||||
var $alt_address_street_2;
|
||||
var $alt_address_street_3;
|
||||
var $opportunity_role_id;
|
||||
var $portal_password;
|
||||
var $primary_address_street_2;
|
||||
var $primary_address_street_3;
|
||||
var $campaign_id;
|
||||
var $sync_contactlead;
|
||||
|
||||
var $mailing_tag;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var $full_name; // l10n localized name
|
||||
var $invalid_email;
|
||||
var $table_name = "contactleads";
|
||||
var $rel_lead_table = "leads_contactleads";
|
||||
//This is needed for upgrade. This table definition moved to Opportunity module.
|
||||
var $rel_opportunity_table = "opportunities_contactleads";
|
||||
|
||||
|
||||
|
||||
|
||||
var $object_name = "ContactLead";
|
||||
var $module_dir = 'ContactLeads';
|
||||
var $emailAddress;
|
||||
var $new_schema = true;
|
||||
var $importable = true;
|
||||
|
||||
// This is used to retrieve related fields from form posts.
|
||||
var $additional_column_fields = Array('bug_id', 'assigned_user_name', 'lead_name', 'lead_id', 'opportunity_id', 'case_id', 'task_id', 'note_id', 'meeting_id', 'call_id', 'email_id'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
var $relationship_fields = Array('lead_id'=> 'leads','bug_id' => 'bugs', 'call_id'=>'calls','case_id'=>'cases','email_id'=>'emails',
|
||||
'meeting_id'=>'meetings','note_id'=>'notes','task_id'=>'tasks', 'opportunity_id'=>'opportunities', 'contactleads_users_id' => 'user_sync'
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function ContactLead() {
|
||||
parent::Person();
|
||||
global $current_user;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function fill_in_relationship_fields(){
|
||||
if(!empty($this->relDepth)) {
|
||||
if($this->relDepth > 1)return;
|
||||
}else $this->relDepth = 0;
|
||||
|
||||
foreach($this->field_defs as $field){
|
||||
if(0 == strcmp($field['type'],'relate') && !empty($field['module'])){
|
||||
$name = $field['name'];
|
||||
|
||||
if(empty($this->$name)){
|
||||
|
||||
// set the value of this relate field in this bean ($this->$field['name']) to the value of the 'name' field in the related module for the record identified by the value of $this->$field['id_name']
|
||||
$related_module = $field['module'];
|
||||
$id_name = $field['id_name'];
|
||||
|
||||
// first, load the link field. This is not done automatically by the bean; usually bean subclasses load any needed link fields in fill_in_additional_fields()
|
||||
// here though we need it to be loaded as it contains the id of the related record
|
||||
if (empty($this->$id_name))
|
||||
$this->fill_in_link_field($id_name);
|
||||
|
||||
if(!empty($this->$id_name) && $this->$id_name != $this->id){
|
||||
if(isset($GLOBALS['beanList'][ $related_module])){
|
||||
$class = $GLOBALS['beanList'][$related_module];
|
||||
|
||||
if(!empty($this->$id_name) && file_exists($GLOBALS['beanFiles'][$class]) && isset($this->$name)){
|
||||
require_once($GLOBALS['beanFiles'][$class]);
|
||||
$mod = new $class();
|
||||
$mod->relDepth = $this->relDepth + 1;
|
||||
$mod->retrieve($this->$id_name);
|
||||
if (!empty($field['rname'])) {
|
||||
$this->$name = $mod->$field['rname'];
|
||||
} else
|
||||
if (isset($mod->name)) {
|
||||
$this->$name = $mod->name;
|
||||
}
|
||||
if(isset($field['additionalFields'])){
|
||||
foreach($field['additionalFields'] as $field=>$to){
|
||||
if(isset($mod->$field)){
|
||||
$this->$to = $mod->$field;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function add_list_count_joins(&$query, $where)
|
||||
{
|
||||
// leads.name
|
||||
if(eregi("leads.name", $where))
|
||||
{
|
||||
// add a join to the leads table.
|
||||
$query .= "
|
||||
LEFT JOIN leads_contactleads
|
||||
ON contactleads.id=leads_contactleads.contactlead_id
|
||||
LEFT JOIN leads
|
||||
ON leads_contactleads.lead_id=leads.id
|
||||
";
|
||||
}
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function listviewACLHelper(){
|
||||
$array_assign = parent::listviewACLHelper();
|
||||
$is_owner = false;
|
||||
//MFH BUG 18281; JChi #15255
|
||||
$is_owner = !empty($this->assigned_user_id) && $this->assigned_user_id == $GLOBALS['current_user']->id;
|
||||
if(!ACLController::moduleSupportsACL('Accounts') || ACLController::checkAccess('Accounts', 'view', $is_owner)){
|
||||
$array_assign['ACCOUNT'] = 'a';
|
||||
}else{
|
||||
$array_assign['ACCOUNT'] = 'span';
|
||||
|
||||
}
|
||||
return $array_assign;
|
||||
}
|
||||
|
||||
function create_list_query($order_by, $where, $show_deleted = 0)
|
||||
{
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
// MFH - BUG #14208 creates alias name for select
|
||||
$query = "SELECT ";
|
||||
$query .= db_concat($this->table_name,array('first_name','last_name')) . " name, ";
|
||||
$query .= "
|
||||
$this->table_name.*,
|
||||
leads.name as lead_name,
|
||||
leads.id as lead_id,
|
||||
leads.assigned_user_id lead_id_owner,
|
||||
users.user_name as assigned_user_name ";
|
||||
|
||||
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= "
|
||||
FROM contactleads ";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$query .= "LEFT JOIN users
|
||||
ON contactleads.assigned_user_id=users.id
|
||||
LEFT JOIN leads_contactleads
|
||||
ON contactleads.id=leads_contactleads.contactlead_id and leads_contactleads.deleted = 0
|
||||
LEFT JOIN leads
|
||||
ON leads_contactleads.lead_id=leads.id AND leads.deleted=0 ";
|
||||
|
||||
|
||||
|
||||
$query .= "LEFT JOIN email_addr_bean_rel eabl ON eabl.bean_id = contactleads.id AND eabl.bean_module = 'ContactLeads' and eabl.primary_address = 1 and eabl.deleted=0 ";
|
||||
$query .= "LEFT JOIN email_addresses ea ON (ea.id = eabl.email_address_id) ";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$where_auto = '1=1';
|
||||
if($show_deleted == 0){
|
||||
$where_auto = " $this->table_name.deleted=0 ";
|
||||
//$where_auto .= " AND leads.deleted=0 ";
|
||||
}else if($show_deleted == 1){
|
||||
$where_auto = " $this->table_name.deleted=1 ";
|
||||
}
|
||||
|
||||
|
||||
if($where != "")
|
||||
$query .= "where ($where) AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
if(!empty($order_by))
|
||||
$query .= " ORDER BY ". $this->process_order_by($order_by, null);
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function create_export_query(&$order_by, &$where)
|
||||
{
|
||||
$custom_join = $this->custom_fields->getJOIN(true, true);
|
||||
$query = "SELECT
|
||||
contactleads.*,email_addresses.email_address email1,
|
||||
leads.name as lead_name,
|
||||
users.user_name as assigned_user_name ";
|
||||
|
||||
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM contactleads ";
|
||||
|
||||
|
||||
|
||||
|
||||
$query .= "LEFT JOIN users
|
||||
ON contactleads.assigned_user_id=users.id ";
|
||||
|
||||
|
||||
|
||||
$query .= "LEFT JOIN leads_contactleads
|
||||
ON ( contactleads.id=leads_contactleads.contactlead_id and (leads_contactleads.deleted is null or leads_contactleads.deleted = 0))
|
||||
LEFT JOIN leads
|
||||
ON leads_contactleads.lead_id=leads.id ";
|
||||
|
||||
//join email address table too.
|
||||
$query .= ' LEFT JOIN email_addr_bean_rel on contactleads.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module=\'ContactLeads\' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 ';
|
||||
$query .= ' LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id ' ;
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
|
||||
$where_auto = "( leads.deleted IS NULL OR leads.deleted=0 )
|
||||
AND contactleads.deleted=0 ";
|
||||
|
||||
if($where != "")
|
||||
$query .= "where ($where) AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
if(!empty($order_by))
|
||||
$query .= " ORDER BY ". $this->process_order_by($order_by, null);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
function fill_in_additional_list_fields() {
|
||||
parent::fill_in_additional_list_fields();
|
||||
// cn: bug 8586 - l10n names for ContactLeads in Email TO: field
|
||||
$this->_create_proper_name_field();
|
||||
$this->email_and_name1 = "{$this->full_name} <".$this->email1.">";
|
||||
$this->email_and_name2 = "{$this->full_name} <".$this->email2.">";
|
||||
|
||||
if($this->force_load_details == true) {
|
||||
$this->fill_in_additional_detail_fields();
|
||||
}
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields() {
|
||||
parent::fill_in_additional_detail_fields();
|
||||
global $locale, $app_list_strings, $current_user;
|
||||
|
||||
|
||||
// retrieve the lead information and the information about the person the contactlead reports to.
|
||||
$query = "SELECT acc.id, acc.name, con_reports_to.first_name, con_reports_to.last_name
|
||||
from contactleads
|
||||
left join leads_contactleads a_c on a_c.contactlead_id = '".$this->id."' and a_c.deleted=0
|
||||
left join leads acc on a_c.lead_id = acc.id and acc.deleted=0
|
||||
left join contactleads con_reports_to on con_reports_to.id = contactleads.reports_to_id
|
||||
where contactleads.id = '".$this->id."'";
|
||||
|
||||
$result = $this->db->query($query,true," Error filling in additional detail fields: ");
|
||||
|
||||
// Get the id and the name.
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
|
||||
if($row != null)
|
||||
{
|
||||
$this->lead_name = $row['name'];
|
||||
$this->lead_id = $row['id'];
|
||||
$this->report_to_name = $row['first_name'].' '.$row['last_name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lead_name = '';
|
||||
$this->lead_id = '';
|
||||
$this->report_to_name = '';
|
||||
}
|
||||
$this->load_contactleads_users_relationship();
|
||||
/** concating this here because newly created ContactLeads do not have a
|
||||
* 'name' attribute constructed to pass onto related items, such as Tasks
|
||||
* Notes, etc.
|
||||
*/
|
||||
$this->name = $locale->getLocaleFormattedName($this->first_name, $this->last_name);
|
||||
if(!empty($this->contactleads_users_id)) {
|
||||
$this->sync_contactlead = true;
|
||||
}
|
||||
|
||||
if(!empty($this->portal_active) && $this->portal_active == 1) {
|
||||
$this->portal_active = true;
|
||||
}
|
||||
|
||||
// Set campaign name if there is a campaign id
|
||||
if( !empty($this->campaign_id)){
|
||||
require_once('modules/Campaigns/Campaign.php');
|
||||
$camp = new Campaign();
|
||||
$where = "campaigns.id='{$this->campaign_id}'";
|
||||
$campaign_list = $camp->get_full_list("campaigns.name", $where, true);
|
||||
$this->campaign_name = $campaign_list[0]->name;
|
||||
}
|
||||
|
||||
//asterisk phone extension
|
||||
if ($_REQUEST['action']=='DetailView') {
|
||||
require_once("include/ECM/EcmFormatPhoneNumber/EcmFormatPhoneNumber.php");
|
||||
$this->phone_work = EcmFormatPhoneNumber($this->phone_work, "ContactLead", "ContactLeads", $this->id);
|
||||
$this->phone_mobile = EcmFormatPhoneNumber($this->phone_mobile, "ContactLead", "ContactLeads", $this->id);
|
||||
$this->phone_home = EcmFormatPhoneNumber($this->phone_home, "ContactLead", "ContactLeads", $this->id);
|
||||
$this->phone_other = EcmFormatPhoneNumber($this->phone_other, "ContactLead", "ContactLeads", $this->id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
loads the contactleads_users relationship to populate a checkbox
|
||||
where a user can select if they would like to sync a particular
|
||||
contactlead to Outlook
|
||||
*/
|
||||
function load_contactleads_users_relationship(){
|
||||
/*global $current_user;
|
||||
|
||||
$this->load_relationship("user_sync");
|
||||
$query_array=$this->user_sync->getQuery(true);
|
||||
|
||||
$query_array['where'] .= " AND users.id = '$current_user->id'";
|
||||
|
||||
$query='';
|
||||
foreach ($query_array as $qstring) {
|
||||
$query.=' '.$qstring;
|
||||
}
|
||||
|
||||
$list = $this->build_related_list($query, new User());
|
||||
if(!empty($list)){
|
||||
//this should only return one possible value so set it
|
||||
$this->contactleads_users_id = $list[0]->id;
|
||||
}*/
|
||||
}
|
||||
|
||||
function get_list_view_data() {
|
||||
global $system_config;
|
||||
global $current_user;
|
||||
|
||||
$this->_create_proper_name_field();
|
||||
$temp_array = $this->get_list_view_array();
|
||||
$temp_array['NAME'] = $this->name;
|
||||
$temp_array['ENCODED_NAME'] = $this->name;
|
||||
|
||||
/*
|
||||
if(isset($system_config->settings['system_skypeout_on'])
|
||||
&& $system_config->settings['system_skypeout_on'] == 1)
|
||||
{
|
||||
if(!empty($temp_array['PHONE_WORK'])
|
||||
&& skype_formatted($temp_array['PHONE_WORK']))
|
||||
{
|
||||
$temp_array['PHONE_WORK'] = '<a href="callto://'
|
||||
. $temp_array['PHONE_WORK']. '">'
|
||||
. $temp_array['PHONE_WORK']. '</a>' ;
|
||||
}
|
||||
}
|
||||
*/
|
||||
require_once("include/ECM/EcmFormatPhoneNumber/EcmFormatPhoneNumber.php");
|
||||
$temp_array['PHONE_WORK'] = EcmFormatPhoneNumber($temp_array['PHONE_WORK'], "ContactLead", "ContactLeads", $this->id);
|
||||
$temp_array['PHONE_MOBILE'] = EcmFormatPhoneNumber($temp_array['PHONE_MOBILE'], "ContactLead", "ContactLeads", $this->id);
|
||||
$temp_array['PHONE_HOME'] = EcmFormatPhoneNumber($temp_array['PHONE_HOME'], "ContactLead", "ContactLeads", $this->id);
|
||||
$temp_array['PHONE_OTHER'] = EcmFormatPhoneNumber($temp_array['PHONE_OTHER'], "ContactLead", "ContactLeads", $this->id);
|
||||
|
||||
$temp_array['EMAIL1'] = $this->emailAddress->getPrimaryAddress($this);
|
||||
$this->email1 = $temp_array['EMAIL1'];
|
||||
$temp_array['EMAIL1_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView');
|
||||
$temp_array['EMAIL_AND_NAME1'] = "{$this->full_name} <".$temp_array['EMAIL1'].">";
|
||||
|
||||
include_once("modules/Accounts/Account.php");
|
||||
$addrs=Account::get_email_addresses($this->id,'ContactLeads');
|
||||
|
||||
$temp_array["EMAIL"] = $r['addr'];
|
||||
$temp_array["ADDRS"] = @implode("||",$addrs);
|
||||
$temp_array["CNT_DATA"] = $cnt;
|
||||
$temp_array["ACC_DATA"] = $acc;
|
||||
if($_REQUEST['action']!="Popup"){
|
||||
$temp_array['FIRST_NAME']='<a target="_blank" href="index.php?module=ContactLeads&return_module=Contacts&action=DetailView&record='.$this->id.'">'.$this->first_name.'</a>';
|
||||
}
|
||||
return $temp_array;
|
||||
}
|
||||
|
||||
/**
|
||||
builds a generic search based on the query string using or
|
||||
do not include any $this-> because this is called on without having the class instantiated
|
||||
*/
|
||||
function build_generic_where_clause ($the_query_string)
|
||||
{
|
||||
$where_clauses = Array();
|
||||
$the_query_string = $this->db->quote($the_query_string);
|
||||
|
||||
array_push($where_clauses, "contactleads.last_name like '$the_query_string%'");
|
||||
array_push($where_clauses, "contactleads.first_name like '$the_query_string%'");
|
||||
array_push($where_clauses, "leads.name like '$the_query_string%'");
|
||||
array_push($where_clauses, "contactleads.assistant like '$the_query_string%'");
|
||||
array_push($where_clauses, "ea.email_address like '$the_query_string%'");
|
||||
|
||||
if (is_numeric($the_query_string))
|
||||
{
|
||||
array_push($where_clauses, "contactleads.phone_home like '%$the_query_string%'");
|
||||
array_push($where_clauses, "contactleads.phone_mobile like '%$the_query_string%'");
|
||||
array_push($where_clauses, "contactleads.phone_work like '%$the_query_string%'");
|
||||
array_push($where_clauses, "contactleads.phone_other like '%$the_query_string%'");
|
||||
array_push($where_clauses, "contactleads.phone_fax like '%$the_query_string%'");
|
||||
array_push($where_clauses, "contactleads.assistant_phone like '%$the_query_string%'");
|
||||
}
|
||||
|
||||
$the_where = "";
|
||||
foreach($where_clauses as $clause)
|
||||
{
|
||||
if($the_where != "") $the_where .= " or ";
|
||||
$the_where .= $clause;
|
||||
}
|
||||
|
||||
|
||||
return $the_where;
|
||||
}
|
||||
|
||||
function set_notification_body($xtpl, $contactlead)
|
||||
{
|
||||
$xtpl->assign("CONTACTLEAD_NAME", trim($contactlead->first_name . " " . $contactlead->last_name));
|
||||
$xtpl->assign("CONTACTLEAD_DESCRIPTION", $contactlead->description);
|
||||
|
||||
return $xtpl;
|
||||
}
|
||||
|
||||
function get_contactlead_id_by_email($email)
|
||||
{
|
||||
$email = trim($email);
|
||||
if(empty($email)){
|
||||
//email is empty, no need to query, return null
|
||||
return null;
|
||||
}
|
||||
|
||||
$where_clause = "(email1='$email' OR email2='$email') AND deleted=0";
|
||||
|
||||
$query = "SELECT * FROM $this->table_name WHERE $where_clause";
|
||||
$GLOBALS['log']->debug("Retrieve $this->object_name: ".$query);
|
||||
//requireSingleResult has beeen deprecated.
|
||||
//$result = $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:");
|
||||
$result = $this->db->limitQuery($query,0,1,true, "Retrieving record $where_clause:");
|
||||
|
||||
if( empty($result))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$row = $this->db->fetchByAssoc($result, -1, true);
|
||||
return $row['id'];
|
||||
|
||||
}
|
||||
|
||||
function save_relationship_changes($is_update) {
|
||||
|
||||
//if lead_id was replaced unlink the previous lead_id.
|
||||
//this rel_fields_before_value is populated by sugarbean during the retrieve call.
|
||||
if (!empty($this->lead_id) and !empty($this->rel_fields_before_value['lead_id']) and
|
||||
(trim($this->lead_id) != trim($this->rel_fields_before_value['lead_id']))) {
|
||||
//unlink the old record.
|
||||
$this->load_relationship('leads');
|
||||
$this->leads->delete($this->id,$this->rel_fields_before_value['lead_id']);
|
||||
}
|
||||
parent::save_relationship_changes($is_update);
|
||||
}
|
||||
|
||||
function bean_implements($interface){
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function get_unlinked_email_query($type=array()) {
|
||||
require_once('include/utils.php');
|
||||
return get_unlinked_email_query($type, $this);
|
||||
}
|
||||
|
||||
/**
|
||||
* used by import to add a list of users
|
||||
*
|
||||
* Parameter can be one of the following:
|
||||
* - string 'all': add this contactlead for all users
|
||||
* - comma deliminated lists of teams and/or users
|
||||
*
|
||||
* @param string $list_of_user
|
||||
*/
|
||||
|
||||
function process_sync_to_outlook(
|
||||
$list_of_users
|
||||
)
|
||||
{
|
||||
static $focus_user;
|
||||
|
||||
// cache this object since we'll be reusing it a bunch
|
||||
if ( !($focus_user instanceof User) ) {
|
||||
require_once('modules/Users/User.php');
|
||||
$focus_user = new User();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ( empty($list_of_users) ) {
|
||||
return;
|
||||
}
|
||||
if ( !isset($this->users) ) {
|
||||
$this->load_relationship('user_sync');
|
||||
}
|
||||
|
||||
if ( strtolower($list_of_users) == 'all' ) {
|
||||
// add all non-deleted users
|
||||
$sql = "SELECT id FROM users WHERE deleted=0 AND is_group=0 AND portal_only=0";
|
||||
$result=$this->db->query($sql);
|
||||
while ( $hash = $this->db->fetchByAssoc($result) ) {
|
||||
$this->user_sync->add($hash['id']);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$theList = explode(",",$list_of_users);
|
||||
foreach ($theList as $eachItem) {
|
||||
if ( $focus_user->retrieve_user_id($eachItem)
|
||||
|| $focus_user->retrieve($eachItem)) {
|
||||
// it is a user, add user
|
||||
$this->user_sync->add($this->id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showPositions55(){
|
||||
$arr=$this->getPositionList55(true);
|
||||
|
||||
global $mod_strings;
|
||||
if(count($arr)>0){
|
||||
$table='
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="list view" width="40%">
|
||||
<tr class="oddListRowS1">
|
||||
<th><b>Nazwa grupy</b></td>
|
||||
<th><b>Aktywna</b></td>
|
||||
</tr>
|
||||
';
|
||||
$i == 0;
|
||||
foreach($arr as $a){
|
||||
$i++;
|
||||
|
||||
|
||||
$table.='
|
||||
<tr class="oddListRowS1">
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;"><a href="index.php?module=EcmMailingCategories&action=DetailView&record='.$a['cat_id'].'">'.$a['product_group'].'</a></td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.($a['discount']==1 ? 'Tak' : "Nie").'</td>
|
||||
|
||||
';
|
||||
}
|
||||
$table.='</table>';
|
||||
}
|
||||
|
||||
return $table;
|
||||
}
|
||||
|
||||
function getPositionList55($array = false) {
|
||||
if(isset($this->id) && $this->id != '') {
|
||||
$query = "SELECT * FROM ecmmailingcategories_relation WHERE parent_id='".$this->id."' AND deleted='0' AND parent_type='ContactLead'";
|
||||
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
if($r) {
|
||||
|
||||
while($w = $this->db->fetchByAssoc($r)) {
|
||||
//get category name && assigned_file
|
||||
$n = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT name FROM ecmmailingcategories WHERE id='".$w['ecmmailingcategoriy_id']."'"));
|
||||
$w['product_group'] = $n['name'];
|
||||
$w['cat_id'] =$w['ecmmailingcategoriy_id'];
|
||||
$w['discount'] =$w['available'];
|
||||
$return_array [] = $w;
|
||||
|
||||
}
|
||||
$json = getJSONobj();
|
||||
|
||||
return $array ? $return_array : $json->encode($return_array);
|
||||
}
|
||||
}
|
||||
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
|
||||
//end managing addresses
|
||||
function savePositions55($pl) {
|
||||
|
||||
global $current_user;
|
||||
|
||||
$exists = array();
|
||||
foreach ($pl as $p) {
|
||||
|
||||
if (!isset($p['product_group']) || $p['product_group']=='') continue;
|
||||
|
||||
|
||||
if (isset($p['id']) && $p['id']!='') {
|
||||
|
||||
//update exists
|
||||
$q = "
|
||||
UPDATE ecmmailingcategories_relation set
|
||||
parent_id = '".addslashes($this->id)."',
|
||||
ecmmailingcategoriy_id= '".addslashes($p['cat_id'])."',
|
||||
available = '".addslashes($p['discount'])."',
|
||||
parent_type = 'ContactLead',
|
||||
parent_name = '".addslashes($p['product_group'])."'
|
||||
WHERE id = '".$p['id']."'
|
||||
";
|
||||
|
||||
//$GLOBALS['db']->query("INSERT INTO log VALUES ('".addslashes($q)."')");
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $p['id'];
|
||||
|
||||
} else {
|
||||
//insert new record
|
||||
$id = create_guid();
|
||||
$t = array(
|
||||
$id,
|
||||
addslashes($p['cat_id']),
|
||||
'0',
|
||||
addslashes($p['discount']),
|
||||
$this->id,
|
||||
addslashes($p['product_group']),
|
||||
'ContactLead'
|
||||
|
||||
);
|
||||
$q = "INSERT INTO ecmmailingcategories_relation VALUES ('".implode("','", $t)."')";
|
||||
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//delete old
|
||||
$GLOBALS['db']->query("UPDATE ecmmailingcategories_relation SET deleted='1' WHERE parent_id='".$this->id."' AND id NOT IN ('".implode("','",$exists)."')");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
747
modules/ContactLeads/ContactLeadFormBase.php
Normal file
747
modules/ContactLeads/ContactLeadFormBase.php
Normal file
@@ -0,0 +1,747 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Base form for contactlead
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
class ContactLeadFormBase {
|
||||
|
||||
function checkForDuplicates($prefix){
|
||||
global $local_log;
|
||||
require_once('include/formbase.php');
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
$focus = new ContactLead();
|
||||
$query = '';
|
||||
$baseQuery = 'SELECT id, first_name, last_name, title FROM contactleads where deleted = 0 AND ';
|
||||
if(!empty($_POST[$prefix.'first_name']) && !empty($_POST[$prefix.'last_name'])){
|
||||
$query = $baseQuery ." first_name LIKE '". $_POST[$prefix.'first_name'] . "%' AND last_name = '". $_POST[$prefix.'last_name'] ."'";
|
||||
}else{
|
||||
$query = $baseQuery ." last_name = '". $_POST[$prefix.'last_name'] ."'";
|
||||
}
|
||||
|
||||
$rows = array();
|
||||
global $db;
|
||||
$result = $db->query($query);
|
||||
while (($row = $db->fetchByAssoc($result)) != null) {
|
||||
if(!isset($rows[$row['id']])) {
|
||||
$rows[]=$row;
|
||||
}
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
$emails = array();
|
||||
$emailStr = '';
|
||||
while(isset($_POST['emailAddress' . $count])) {
|
||||
$emailStr .= ",'" . strtoupper(trim($_POST['emailAddress' . $count++])) . "'";
|
||||
} //while
|
||||
|
||||
if($count > 0) {
|
||||
$emailStr = substr($emailStr, 1);
|
||||
$query = 'SELECT DISTINCT er.bean_id AS id FROM email_addr_bean_rel er, ' .
|
||||
'email_addresses ea WHERE ea.id = er.email_address_id ' .
|
||||
'AND ea.deleted = 0 AND er.deleted = 0 AND er.bean_module = \'ContactLeads\' ' .
|
||||
'AND email_address_caps IN (' . $emailStr . ')';
|
||||
$result = $db->query($query);
|
||||
while (($row= $db->fetchByAssoc($result)) != null) {
|
||||
if(!isset($rows[$row['id']])) {
|
||||
$query2 = "SELECT id, first_name, last_name, title FROM contactleads WHERE deleted = 0 AND id = '" . $row['id'] . "'";
|
||||
$result2 = $db->query($query2);
|
||||
$r = $db->fetchByAssoc($result2);
|
||||
if(isset($r['id'])) {
|
||||
$rows[]=$r;
|
||||
}
|
||||
} //if
|
||||
}
|
||||
} //if
|
||||
|
||||
return !empty($rows) ? $rows : null;
|
||||
}
|
||||
|
||||
function buildTableForm($rows, $mod=''){
|
||||
global $odd_bg, $even_bg, $action;
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}else global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$cols = sizeof($rows[0]) * 2 + 1;
|
||||
if ($action != 'ShowDuplicates')
|
||||
{
|
||||
$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>';
|
||||
$form .= "<form action='index.php' method='post' name='dupContactLeads'>
|
||||
<input type='hidden' name='selectedContactLead' value=''>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_SHOW_DUPLICATES']. '</td></tr><tr><td height="20"></td></tr></table>';
|
||||
}
|
||||
$form .= get_form_header($mod_strings['LBL_DUPLICATE'],"", '');
|
||||
$form .= "<table width='100%' cellpadding='0' cellspacing='0'> <tr class='listViewThS1'> ";
|
||||
if ($action != 'ShowDuplicates')
|
||||
{
|
||||
$form .= "<td class='listViewThS1'> </td>";
|
||||
}
|
||||
|
||||
require_once('include/formbase.php');
|
||||
|
||||
if(isset($_POST['return_action']) && $_POST['return_action'] == 'SubPanelViewer') {
|
||||
$_POST['return_action'] = 'DetailView';
|
||||
}
|
||||
|
||||
if(isset($_POST['return_action']) && $_POST['return_action'] == 'DetailView' && empty($_REQUEST['return_id'])) {
|
||||
unset($_POST['return_action']);
|
||||
}
|
||||
|
||||
$form .= getPostToForm('/emailAddress(PrimaryFlag|OptOutFlag|InvalidFlag)?[0-9]*?$/', true);
|
||||
|
||||
if(isset($rows[0])){
|
||||
foreach ($rows[0] as $key=>$value){
|
||||
if($key != 'id'){
|
||||
$form .= "<td scope='col' class='listViewThS1'>". $mod_strings[$mod_strings['db_'.$key]]. "</td>";
|
||||
}
|
||||
}
|
||||
$form .= "</tr>";
|
||||
}
|
||||
$bgcolor = $odd_bg;
|
||||
$rowColor = 'oddListRowS1';
|
||||
foreach($rows as $row){
|
||||
|
||||
$form .= "<tr class='$rowColor' bgcolor='$bgcolor'>";
|
||||
if ($action != 'ShowDuplicates')
|
||||
{
|
||||
$form .= "<td width='1%' bgcolor='$bgcolor' nowrap ><a href='#' onClick=\"document.dupContactLeads.selectedContactLead.value='${row['id']}';document.dupContactLeads.submit() \">[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>\n";
|
||||
}
|
||||
$wasSet = false;
|
||||
|
||||
foreach ($row as $key=>$value){
|
||||
if($key != 'id'){
|
||||
if(isset($_POST['popup']) && $_POST['popup']==true){
|
||||
$form .= "<td scope='row' class='$rowColor' bgcolor='$bgcolor'><a href='#' onclick=\"window.opener.location='index.php?module=ContactLeads&action=DetailView&record=${row['id']}'\">$value</a></td>\n";
|
||||
}
|
||||
else if(!$wasSet){
|
||||
$form .= "<td scope='row' class='$rowColor' bgcolor='$bgcolor'><a target='_blank' href='index.php?module=ContactLeads&action=DetailView&record=${row['id']}'>$value</a></td>\n";
|
||||
$wasSet = true;
|
||||
}else{
|
||||
$form .= "<td class='$rowColor' bgcolor='$bgcolor'><a target='_blank' href='index.php?module=ContactLeads&action=DetailView&record=${row['id']}'>$value</a></td>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($rowColor == 'evenListRowS1'){
|
||||
$rowColor = 'oddListRowS1';
|
||||
$bgcolor = $odd_bg;
|
||||
}else{
|
||||
$rowColor = 'evenListRowS1';
|
||||
$bgcolor = $even_bg;
|
||||
}
|
||||
$form .= "</tr>";
|
||||
}
|
||||
$form .= "<tr class='listViewThS1'><td colspan='$cols' class='blackline'></td></tr>";
|
||||
if ($action == 'ShowDuplicates')
|
||||
{
|
||||
$form .= "</table><br> <input title='${app_strings['LBL_SAVE_BUTTON_TITLE']}' accessKey='${app_strings['LBL_SAVE_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value=' ${app_strings['LBL_SAVE_BUTTON_LABEL']} '> ";
|
||||
if (!empty($_POST['return_module']) && !empty($_POST['return_action']) && !empty($_POST['return_id']))
|
||||
$form .= "<input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='${app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"location.href='index.php?module=".$_POST['return_module']."&action=". $_POST['return_action']."&record=".$_REQUEST['return_id']."'\" type='button' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
|
||||
else if (!empty($_POST['return_module']) && !empty($_POST['return_action']))
|
||||
$form .= "<input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='${app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"location.href='index.php?module=".$_POST['return_module']."&action=". $_POST['return_action']."'\" type='button' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
|
||||
else
|
||||
$form .= "<input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='${app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"location.href='index.php?module=ContactLeads&action=ListView'\" type='button' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$form .= "</table><br><input type='submit' class='button' name='ContinueContactLead' value='${mod_strings['LNK_NEW_CONTACTLEAD']}'></form>";
|
||||
}
|
||||
return $form;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
function getWideFormBody($prefix, $mod='',$formname='', $contactlead = '', $portal = true){
|
||||
|
||||
if(!ACLController::checkAccess('ContactLeads', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
if(empty($contactlead)){
|
||||
$contactlead = new ContactLead();
|
||||
}
|
||||
|
||||
global $mod_strings;
|
||||
$temp_strings = $mod_strings;
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}
|
||||
global $app_strings;
|
||||
global $current_user;
|
||||
global $app_list_strings;
|
||||
$primary_address_country_options = get_select_options_with_id($app_list_strings['countries_dom'], $contactlead->primary_address_country);
|
||||
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
|
||||
$lbl_first_name = $mod_strings['LBL_FIRST_NAME'];
|
||||
$lbl_last_name = $mod_strings['LBL_LAST_NAME'];
|
||||
$lbl_phone = $mod_strings['LBL_OFFICE_PHONE'];
|
||||
$lbl_address = $mod_strings['LBL_PRIMARY_ADDRESS'];
|
||||
|
||||
if (isset($contactlead->assigned_user_id)) {
|
||||
$user_id=$contactlead->assigned_user_id;
|
||||
} else {
|
||||
$user_id = $current_user->id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Retrieve Email address and set email1, email2
|
||||
$sugarEmailAddress = new SugarEmailAddress();
|
||||
$sugarEmailAddress->handleLegacyRetrieve($contactlead);
|
||||
if(!isset($contactlead->email1)){
|
||||
$contactlead->email1 = '';
|
||||
}
|
||||
if(!isset($contactlead->email2)){
|
||||
$contactlead->email2 = '';
|
||||
}
|
||||
if(!isset($contactlead->email_opt_out)){
|
||||
$contactlead->email_opt_out = '';
|
||||
}
|
||||
$lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
|
||||
$salutation_options=get_select_options_with_id($app_list_strings['salutation_dom'], $contactlead->salutation);
|
||||
if (isset($contactlead->lead_source)) {
|
||||
$lead_source_options=get_select_options_with_id($app_list_strings['lead_source_dom'], $contactlead->lead_source);
|
||||
} else {
|
||||
$lead_source_options=get_select_options_with_id($app_list_strings['lead_source_dom'], '');
|
||||
}
|
||||
|
||||
$form="";
|
||||
|
||||
|
||||
|
||||
if ($formname == 'ConvertProspect') {
|
||||
$lead_source_label = "<td class='dataLabel'> </td>";
|
||||
$lead_source_field = "<td class='dataField'> </td>";
|
||||
} else {
|
||||
$lead_source_label = "<td class='dataLabel' nowrap>${mod_strings['LBL_LEAD_SOURCE']}</td>";
|
||||
$lead_source_field = "<td class='dataField'><select name='${prefix}lead_source'>$lead_source_options</select></td>";
|
||||
}
|
||||
|
||||
$form .= <<<EOQ
|
||||
<input type="hidden" name="${prefix}record" value="">
|
||||
<input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
|
||||
<table border='0' celpadding="0" cellspacing="0" width='100%'>
|
||||
<tr>
|
||||
<td nowrap class='dataLabel'>$lbl_first_name</td>
|
||||
<td class='dataLabel'>$lbl_last_name <span class="required">$lbl_required_symbol</span></td>
|
||||
<td class='dataLabel' nowrap>${mod_strings['LBL_TITLE']}</td>
|
||||
<td class='dataLabel' nowrap>${mod_strings['LBL_DEPARTMENT']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='dataField'><select name='${prefix}salutation'>$salutation_options</select> <input name="${prefix}first_name" type="text" value="{$contactlead->first_name}"></td>
|
||||
<td class='dataField'><input name='${prefix}last_name' type="text" value="{$contactlead->last_name}"></td>
|
||||
<td class='dataField' nowrap><input name='${prefix}title' type="text" value="{$contactlead->title}"></td>
|
||||
<td class='dataField' nowrap><input name='${prefix}department' type="text" value="{$contactlead->department}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap colspan='4' class='dataLabel'>$lbl_address</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td nowrap colspan='4' class='dataField'><textarea cols='80' rows='2' name='${prefix}primary_address_street'>{$contactlead->primary_address_street}</textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataLabel'>${mod_strings['LBL_CITY']}</td>
|
||||
<td class='dataLabel'>${mod_strings['LBL_STATE']}</td>
|
||||
<td class='dataLabel'>${mod_strings['LBL_POSTAL_CODE']}</td>
|
||||
<td class='dataLabel'>${mod_strings['LBL_COUNTRY']}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataField'><input name='${prefix}primary_address_city' maxlength='100' value='{$contactlead->primary_address_city}'></td>
|
||||
<td class='dataField'><input name='${prefix}primary_address_state' maxlength='100' value='{$contactlead->primary_address_state}'></td>
|
||||
<td class='dataField'><input name='${prefix}primary_address_postalcode' maxlength='100' value='{$contactlead->primary_address_postalcode}'></td>
|
||||
<td class='dataField'><select name='${prefix}primary_address_country' size='1' selected='{$contactlead->primary_address_country}'>{$primary_address_country_options}</select></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td nowrap class='dataLabel'>$lbl_phone</td>
|
||||
<td nowrap class='dataLabel'>${mod_strings['LBL_MOBILE_PHONE']}</td>
|
||||
<td nowrap class='dataLabel'>${mod_strings['LBL_FAX_PHONE']}</td>
|
||||
<td nowrap class='dataLabel'>${mod_strings['LBL_HOME_PHONE']}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td nowrap class='dataField'><input name='${prefix}phone_work' type="text" value="{$contactlead->phone_work}"></td>
|
||||
<td nowrap class='dataField'><input name='${prefix}phone_mobile' type="text" value="{$contactlead->phone_mobile}"></td>
|
||||
<td nowrap class='dataField'><input name='${prefix}phone_fax' type="text" value="{$contactlead->phone_fax}"></td>
|
||||
<td nowrap class='dataField'><input name='${prefix}phone_home' type="text" value="{$contactlead->phone_home}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataLabel' nowrap>${mod_strings['LBL_OTHER_PHONE']}</td>
|
||||
$lead_source_label
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataField' nowrap><input name='${prefix}phone_other' type="text" value="{$contactlead->phone_other}"></td>
|
||||
$lead_source_field
|
||||
</tr>
|
||||
EOQ;
|
||||
|
||||
$form .= $sugarEmailAddress->getEmailAddressWidgetEditView($contactlead->id, $_REQUEST['action']=='ConvertLead'?'Leads':'ContactLeads', false, 'include/SugarEmailAddress/templates/forWideFormBodyView.tpl');
|
||||
|
||||
|
||||
$form .= <<<EOQ
|
||||
<tr>
|
||||
<td nowrap colspan='4' class='dataLabel'>${mod_strings['LBL_DESCRIPTION']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap colspan='4' class='dataField'><textarea cols='80' rows='4' name='${prefix}description' >{$contactlead->description}</textarea></td>
|
||||
</tr>
|
||||
EOQ;
|
||||
|
||||
|
||||
|
||||
//carry forward custom lead fields common to contactleads during Lead Conversion
|
||||
$tempContactLead = new ContactLead();
|
||||
|
||||
if (method_exists($contactlead, 'convertCustomFieldsForm')) $contactlead->convertCustomFieldsForm($form, $tempContactLead, $prefix);
|
||||
unset($tempContactLead);
|
||||
|
||||
$form .= <<<EOQ
|
||||
</table>
|
||||
<input type='hidden' name='${prefix}alt_address_street' value='{$contactlead->alt_address_street}'>
|
||||
<input type='hidden' name='${prefix}alt_address_city' value='{$contactlead->alt_address_city}'><input type='hidden' name='${prefix}alt_address_state' value='{$contactlead->alt_address_state}'><input type='hidden' name='${prefix}alt_address_postalcode' value='{$contactlead->alt_address_postalcode}'><input type='hidden' name='${prefix}alt_address_country' value='{$contactlead->alt_address_country}'>
|
||||
<input type='hidden' name='${prefix}do_not_call' value='{$contactlead->do_not_call}'>
|
||||
<input type='hidden' name='${prefix}email_opt_out' value='{$contactlead->email_opt_out}'>
|
||||
EOQ;
|
||||
|
||||
if ($portal == true){
|
||||
if (isset($contactlead->portal_name)) {
|
||||
$form.="<input type='hidden' name='${prefix}portal_name' value='{$contactlead->portal_name}'>";
|
||||
} else {
|
||||
$form.="<input type='hidden' name='${prefix}portal_name' value=''>";
|
||||
}
|
||||
if (isset($contactlead->portal_app)) {
|
||||
$form.="<input type='hidden' name='${prefix}portal_app' value='{$contactlead->portal_app}'>";
|
||||
} else {
|
||||
$form.="<input type='hidden' name='${prefix}portal_app' value=''>";
|
||||
}
|
||||
|
||||
|
||||
if(!empty($contactlead->portal_name) && !empty($contactlead->portal_app)){
|
||||
$form .= "<input name='${prefix}portal_active' type='hidden' size='25' value='1' >";
|
||||
}
|
||||
|
||||
if(isset($contactlead->portal_password)){
|
||||
$form.="<input type='password' name='${prefix}portal_password1' value='{$contactlead->portal_password}'>";
|
||||
$form.="<input type='password' name='${prefix}portal_password' value='{$contactlead->portal_password}'>";
|
||||
$form .= "<input name='${prefix}old_portal_password' type='hidden' size='25' value='{$contactlead->portal_password}' >";
|
||||
}else{
|
||||
$form.="<input type='password' name='${prefix}portal_password1' value=''>";
|
||||
$form.="<input type='password' name='${prefix}portal_password' value=''>";
|
||||
$form .= "<input name='${prefix}old_portal_password' type='hidden' size='25' value='' >";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
require_once('include/javascript/javascript.php');
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new ContactLead());
|
||||
$javascript->addField('email1','false',$prefix);
|
||||
$javascript->addField('email2','false',$prefix);
|
||||
$javascript->addRequiredFields($prefix);
|
||||
|
||||
$form .=$javascript->getScript();
|
||||
$mod_strings = $temp_strings;
|
||||
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
function getFormBody($prefix, $mod='', $formname=''){
|
||||
if(!ACLController::checkAccess('ContactLeads', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
global $mod_strings;
|
||||
$temp_strings = $mod_strings;
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}
|
||||
global $app_strings;
|
||||
global $current_user;
|
||||
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
|
||||
$lbl_first_name = $mod_strings['LBL_FIRST_NAME'];
|
||||
$lbl_last_name = $mod_strings['LBL_LAST_NAME'];
|
||||
$lbl_phone = $mod_strings['LBL_PHONE'];
|
||||
$user_id = $current_user->id;
|
||||
$lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
|
||||
if ($formname == 'EmailEditView')
|
||||
{
|
||||
$form = <<<EOQ
|
||||
<input type="hidden" name="${prefix}record" value="">
|
||||
<input type="hidden" name="${prefix}email2" value="">
|
||||
<input type="hidden" name="${prefix}phone_work" value="">
|
||||
<input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
|
||||
$lbl_first_name<br>
|
||||
<input name="${prefix}first_name" type="text" value="" size=10><br>
|
||||
$lbl_last_name <span class="required">$lbl_required_symbol</span><br>
|
||||
<input name='${prefix}last_name' type="text" value="" size=10><br>
|
||||
$lbl_email_address <span class="required">$lbl_required_symbol</span><br>
|
||||
<input name='${prefix}email1' type="text" value=""><br><br>
|
||||
|
||||
EOQ;
|
||||
}
|
||||
else
|
||||
{
|
||||
$form = <<<EOQ
|
||||
<input type="hidden" name="${prefix}record" value="">
|
||||
<input type="hidden" name="${prefix}email2" value="">
|
||||
<input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
|
||||
$lbl_first_name<br>
|
||||
<input name="${prefix}first_name" type="text" value=""><br>
|
||||
$lbl_last_name <span class="required">$lbl_required_symbol</span><br>
|
||||
<input name='${prefix}last_name' type="text" value=""><br>
|
||||
$lbl_phone<br>
|
||||
<input name='${prefix}phone_work' type="text" value=""><br>
|
||||
$lbl_email_address<br>
|
||||
<input name='${prefix}email1' type="text" value=""><br><br>
|
||||
|
||||
EOQ;
|
||||
}
|
||||
require_once('include/javascript/javascript.php');
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new ContactLead());
|
||||
$javascript->addField('email1','false',$prefix);
|
||||
$javascript->addRequiredFields($prefix);
|
||||
|
||||
$form .=$javascript->getScript();
|
||||
$mod_strings = $temp_strings;
|
||||
return $form;
|
||||
|
||||
}
|
||||
function getForm($prefix, $mod=''){
|
||||
if(!ACLController::checkAccess('ContactLeads', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}else global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
|
||||
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
|
||||
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
|
||||
|
||||
|
||||
$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
|
||||
$the_form .= <<<EOQ
|
||||
|
||||
<form name="${prefix}ContactLeadSave" onSubmit="return check_form('${prefix}ContactLeadSave')" method="POST" action="index.php">
|
||||
<input type="hidden" name="${prefix}module" value="ContactLeads">
|
||||
<input type="hidden" name="${prefix}action" value="Save">
|
||||
EOQ;
|
||||
$the_form .= $this->getFormBody($prefix,'ContactLeads', "${prefix}ContactLeadSave");
|
||||
$the_form .= <<<EOQ
|
||||
<input title="$lbl_save_button_title" accessKey="$lbl_save_button_key" class="button" type="submit" name="${prefix}button" value=" $lbl_save_button_label " >
|
||||
</form>
|
||||
|
||||
EOQ;
|
||||
$the_form .= get_left_form_footer();
|
||||
$the_form .= get_validate_record_js();
|
||||
|
||||
return $the_form;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function handleSave($prefix, $redirect=true, $useRequired=false){
|
||||
global $theme, $current_user;
|
||||
$theme_path="themes/".$theme."/";
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
|
||||
require_once ('include/utils.php');
|
||||
require_once('include/formbase.php');
|
||||
require_once('XTemplate/xtpl.php');
|
||||
global $timedate;
|
||||
|
||||
$focus = new ContactLead();
|
||||
|
||||
if($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))){
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!empty($_POST[$prefix.'new_reports_to_id'])) {
|
||||
$focus->retrieve($_POST[$prefix.'new_reports_to_id']);
|
||||
$focus->reports_to_id = $_POST[$prefix.'record'];
|
||||
} else {
|
||||
$focus = populateFromPost($prefix, $focus);
|
||||
|
||||
if(isset($focus->portal_password) && $focus->portal_password != $_POST[$prefix.'old_portal_password']){
|
||||
$focus->portal_password = md5($focus->portal_password);
|
||||
}
|
||||
if (!isset($_POST[$prefix.'email_opt_out'])) $focus->email_opt_out = 0;
|
||||
if (!isset($_POST[$prefix.'do_not_call'])) $focus->do_not_call = 0;
|
||||
|
||||
}
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
if($_REQUEST['action'] != 'BusinessCard' && $_REQUEST['action'] != 'ConvertLead' && $_REQUEST['action'] != 'ConvertProspect')
|
||||
{
|
||||
if ($_POST[$prefix.'sync_contactlead']){
|
||||
$focus->contactleads_users_id = $current_user->id;
|
||||
}
|
||||
else{
|
||||
if (!isset($focus->users))
|
||||
{
|
||||
$focus->load_relationship('user_sync');
|
||||
}
|
||||
$focus->contactleads_users_id = null;
|
||||
//die($current_user->id.' '.$focus->id);
|
||||
$focus->user_sync->delete($focus->id, $current_user->id);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($GLOBALS['check_notify'])) {
|
||||
$check_notify = $GLOBALS['check_notify'];
|
||||
}
|
||||
else {
|
||||
$check_notify = FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (empty($_POST['record']) && empty($_POST['dup_checked'])) {
|
||||
|
||||
$duplicateContactLeads = $this->checkForDuplicates($prefix);
|
||||
if(isset($duplicateContactLeads)){
|
||||
$location='module=ContactLeads&action=ShowDuplicates';
|
||||
$get = '';
|
||||
if(isset($_POST['inbound_email_id']) && !empty($_POST['inbound_email_id'])) {
|
||||
$get .= '&inbound_email_id='.$_POST['inbound_email_id'];
|
||||
}
|
||||
|
||||
//add all of the post fields to redirect get string
|
||||
foreach ($focus->column_fields as $field)
|
||||
{
|
||||
if (!empty($focus->$field))
|
||||
{
|
||||
$get .= "&ContactLeads$field=".urlencode($focus->$field);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($focus->additional_column_fields as $field)
|
||||
{
|
||||
if (!empty($focus->$field))
|
||||
{
|
||||
$get .= "&ContactLeads$field=".urlencode($focus->$field);
|
||||
}
|
||||
}
|
||||
|
||||
if($focus->hasCustomFields()) {
|
||||
foreach($focus->field_defs as $name=>$field) {
|
||||
if (!empty($field['source']) && $field['source'] == 'custom_fields')
|
||||
{
|
||||
$get .= "&ContactLeads$name=".urlencode($focus->$name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require_once('include/SugarEmailAddress/SugarEmailAddress.php');
|
||||
$emailAddress = new SugarEmailAddress();
|
||||
$get .= $emailAddress->getFormBaseURL($focus);
|
||||
|
||||
//create list of suspected duplicate contactlead id's in redirect get string
|
||||
$i=0;
|
||||
foreach ($duplicateContactLeads as $contactlead)
|
||||
{
|
||||
$get .= "&duplicate[$i]=".$contactlead['id'];
|
||||
$i++;
|
||||
}
|
||||
|
||||
//add return_module, return_action, and return_id to redirect get string
|
||||
$get .= "&return_module=";
|
||||
if(!empty($_POST['return_module'])) $get .= $_POST['return_module'];
|
||||
else $get .= "ContactLeads";
|
||||
$get .= "&return_action=";
|
||||
if(!empty($_POST['return_action'])) $get .= $_POST['return_action'];
|
||||
//else $get .= "DetailView";
|
||||
if(!empty($_POST['return_id'])) $get .= "&return_id=".$_POST['return_id'];
|
||||
if(!empty($_POST['popup'])) $get .= '&popup='.$_POST['popup'];
|
||||
if(!empty($_POST['create'])) $get .= '&create='.$_POST['create'];
|
||||
|
||||
// for InboundEmail flow
|
||||
if(!empty($_POST['start'])) $get .= '&start='.$_POST['start'];
|
||||
|
||||
//now redirect the post to modules/ContactLeads/ShowDuplicates.php
|
||||
if (!empty($_POST['is_ajax_call']) && $_POST['is_ajax_call'] == '1')
|
||||
{
|
||||
ob_clean();
|
||||
$json = getJSONobj();
|
||||
$_SESSION['SHOW_DUPLICATES'] = $get;
|
||||
echo $json->encode(array('status' => 'dupe', 'get' => $location . $get));
|
||||
} else {
|
||||
if(!empty($_POST['to_pdf'])) $location .= '&to_pdf='.$_POST['to_pdf'];
|
||||
$_SESSION['SHOW_DUPLICATES'] = $get;
|
||||
header("Location: index.php?$location");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
global $current_user;
|
||||
if(is_admin($current_user)){
|
||||
if (!isset($_POST[$prefix.'portal_active'])) $focus->portal_active = '0';
|
||||
//if no password is set set account to inactive for portal
|
||||
if(empty($_POST[$prefix.'portal_name']))$focus->portal_active = '0';
|
||||
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// INBOUND EMAIL HANDLING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
if(isset($_REQUEST['inbound_email_id']) && !empty($_REQUEST['inbound_email_id'])) {
|
||||
// fake this case like it's already saved.
|
||||
$focus->save($check_notify);
|
||||
require_once('modules/Emails/Email.php');
|
||||
$email = new Email();
|
||||
$email->retrieve($_REQUEST['inbound_email_id']);
|
||||
$email->parent_type = 'ContactLeads';
|
||||
$email->parent_id = $focus->id;
|
||||
$email->assigned_user_id = $current_user->id;
|
||||
$email->status = 'read';
|
||||
$email->save();
|
||||
$email->load_relationship('contactleads');
|
||||
$email->contactleads->add($focus->id);
|
||||
|
||||
header("Location: index.php?&module=Emails&action=EditView&type=out&inbound_email_id=".$_REQUEST['inbound_email_id']."&parent_id=".$email->parent_id."&parent_type=".$email->parent_type.'&start='.$_REQUEST['start'].'&assigned_user_id='.$current_user->id);
|
||||
exit();
|
||||
}
|
||||
//// END INBOUND EMAIL HANDLING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$focus->save($check_notify);
|
||||
$focus->savePositions55($_POST['position_list55']);
|
||||
$return_id = $focus->id;
|
||||
|
||||
$GLOBALS['log']->debug("Saved record with id of ".$return_id);
|
||||
|
||||
if (!empty($_POST['is_ajax_call']) && $_POST['is_ajax_call'] == '1') {
|
||||
$json = getJSONobj();
|
||||
echo $json->encode(array('status' => 'success',
|
||||
'get' => ''));
|
||||
return null;
|
||||
}
|
||||
|
||||
if(isset($_POST['popup']) && $_POST['popup'] == 'true') {
|
||||
$get = '&module=';
|
||||
if(!empty($_POST['return_module'])) $get .= $_POST['return_module'];
|
||||
else $get .= 'ContactLeads';
|
||||
$get .= '&action=';
|
||||
if(!empty($_POST['return_action'])) $get .= $_POST['return_action'];
|
||||
else $get .= 'Popup';
|
||||
if(!empty($_POST['return_id'])) $get .= '&return_id='.$_POST['return_id'];
|
||||
if(!empty($_POST['popup'])) $get .= '&popup='.$_POST['popup'];
|
||||
if(!empty($_POST['create'])) $get .= '&create='.$_POST['create'];
|
||||
if(!empty($_POST['to_pdf'])) $get .= '&to_pdf='.$_POST['to_pdf'];
|
||||
$get .= '&first_name=' . $focus->first_name;
|
||||
$get .= '&last_name=' . $focus->last_name;
|
||||
$get .= '&query=true';
|
||||
header("Location: index.php?$get");
|
||||
return;
|
||||
}
|
||||
|
||||
if($redirect){
|
||||
$this->handleRedirect($return_id);
|
||||
}else{
|
||||
return $focus;
|
||||
}
|
||||
}
|
||||
|
||||
function handleRedirect($return_id){
|
||||
if(isset($_POST['return_module']) && $_POST['return_module'] != "") {
|
||||
$return_module = $_POST['return_module'];
|
||||
}
|
||||
else {
|
||||
$return_module = "ContactLeads";
|
||||
}
|
||||
|
||||
if(isset($_POST['return_action']) && $_POST['return_action'] != "") {
|
||||
if($_REQUEST['return_module'] == 'Emails') {
|
||||
$return_action = $_REQUEST['return_action'];
|
||||
}
|
||||
// if we create a new record "Save", we want to redirect to the DetailView
|
||||
elseif($_REQUEST['action'] == "Save" && $_REQUEST['return_module'] != "Home") {
|
||||
$return_action = 'DetailView';
|
||||
} else {
|
||||
// if we "Cancel", we go back to the list view.
|
||||
$return_action = $_REQUEST['return_action'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$return_action = "DetailView";
|
||||
}
|
||||
|
||||
if(isset($_POST['return_id']) && $_POST['return_id'] != "") {
|
||||
$return_id = $_POST['return_id'];
|
||||
}
|
||||
|
||||
header("Location: index.php?action=$return_action&module=$return_module&record=$return_id");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
137
modules/ContactLeads/ContactLeadOpportunityRelationship.php
Normal file
137
modules/ContactLeads/ContactLeadOpportunityRelationship.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
require_once('data/SugarBean.php');
|
||||
|
||||
// ContactLead is used to store customer information.
|
||||
class ContactLeadOpportunityRelationship extends SugarBean {
|
||||
// Stored fields
|
||||
var $id;
|
||||
var $contactlead_id;
|
||||
var $contactlead_role;
|
||||
var $opportunity_id;
|
||||
|
||||
// Related fields
|
||||
var $contactlead_name;
|
||||
var $opportunity_name;
|
||||
|
||||
var $table_name = "opportunities_contactleads";
|
||||
var $object_name = "ContactLeadOpportunityRelationship";
|
||||
var $column_fields = Array("id"
|
||||
,"contactlead_id"
|
||||
,"opportunity_id"
|
||||
,"contactlead_role"
|
||||
,'date_modified'
|
||||
);
|
||||
|
||||
var $new_schema = true;
|
||||
|
||||
var $additional_column_fields = Array();
|
||||
var $field_defs = array (
|
||||
'id'=>array('name' =>'id', 'type' =>'char', 'len'=>'36', 'default'=>'')
|
||||
, 'contactlead_id'=>array('name' =>'contactlead_id', 'type' =>'char', 'len'=>'36', )
|
||||
, 'opportunity_id'=>array('name' =>'opportunity_id', 'type' =>'char', 'len'=>'36',)
|
||||
, 'contactlead_role'=>array('name' =>'contactlead_role', 'type' =>'char', 'len'=>'50')
|
||||
, 'date_modified'=>array ('name' => 'date_modified','type' => 'datetime')
|
||||
, 'deleted'=>array('name' =>'deleted', 'type' =>'bool', 'len'=>'1', 'default'=>'0', 'required'=>true)
|
||||
);
|
||||
function ContactLeadOpportunityRelationship() {
|
||||
$this->db = DBManagerFactory::getInstance();
|
||||
$this->dbManager = DBManagerFactory::getInstance();
|
||||
|
||||
$this->disable_row_level_security =true;
|
||||
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields()
|
||||
{
|
||||
if(isset($this->contactlead_id) && $this->contactlead_id != "")
|
||||
{
|
||||
$query = "SELECT first_name, last_name from contactleads where id='$this->contactlead_id' AND deleted=0";
|
||||
$result =$this->db->query($query,true," Error filling in additional detail fields: ");
|
||||
// Get the id and the name.
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
|
||||
if($row != null)
|
||||
{
|
||||
$this->contactlead_name = return_name($row, 'first_name', 'last_name');
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($this->opportunity_id) && $this->opportunity_id != "")
|
||||
{
|
||||
$query = "SELECT name from opportunities where id='$this->opportunity_id' AND deleted=0";
|
||||
$result =$this->db->query($query,true," Error filling in additional detail fields: ");
|
||||
// Get the id and the name.
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
|
||||
if($row != null)
|
||||
{
|
||||
$this->opportunity_name = $row['name'];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function create_list_query(&$order_by, &$where)
|
||||
{
|
||||
$query = "SELECT id, first_name, last_name, phone_work, title, email1 FROM contactleads ";
|
||||
$where_auto = "deleted=0";
|
||||
|
||||
if($where != "")
|
||||
$query .= "where $where AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
$query .= " ORDER BY last_name, first_name";
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
103
modules/ContactLeads/ContactLeadOpportunityRelationshipEdit.html
Normal file
103
modules/ContactLeads/ContactLeadOpportunityRelationshipEdit.html
Normal file
@@ -0,0 +1,103 @@
|
||||
<!--
|
||||
/*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<form action="index.php" method="post" name="EditView" onsubmit="return check_form('EditView')">
|
||||
<input type="hidden" name="module" value="ContactLeads" />
|
||||
<input type="hidden" name="record" value="{ID}" />
|
||||
<input type="hidden" name="return_module" value="{RETURN_MODULE}" />
|
||||
<input type="hidden" name="return_action" value="{RETURN_ACTION}" />
|
||||
<input type="hidden" name="return_id" value="{RETURN_ID}" />
|
||||
<input type="hidden" name="action" value="" />
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding-bottom: 2px;">
|
||||
<input type="submit" name="button" class="button"
|
||||
title="{APP.LBL_SAVE_BUTTON_TITLE}"
|
||||
accesskey="{APP.LBL_SAVE_BUTTON_KEY}"
|
||||
onclick="this.form.action.value='SaveContactLeadOpportunityRelationship';"
|
||||
value=" {APP.LBL_SAVE_BUTTON_LABEL} "
|
||||
/>
|
||||
<input type="submit" name="button" class="button"
|
||||
title="{APP.LBL_CANCEL_BUTTON_TITLE}"
|
||||
accessKey="{APP.LBL_CANCEL_BUTTON_KEY}"
|
||||
onclick="this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'"
|
||||
value=" {APP.LBL_CANCEL_BUTTON_LABEL} "
|
||||
/>
|
||||
</td>
|
||||
<td align="right" nowrap="nowrap"><span class="required">{APP.LBL_REQUIRED_SYMBOL}</span> {APP.NTC_REQUIRED}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabForm">
|
||||
<tr><td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="15%" class="dataLabel"><slot>{MOD.LBL_CONTACTLEAD_NAME}</slot></td>
|
||||
<td width="35%" class="dataField"><slot>
|
||||
<input type="text" name='contactlead_name' rows="1" cols="30" value="{CONTACTLEAD.NAME}" readonly="readonly" />
|
||||
<input type="hidden" name='contactlead_id' value='{CONTACTLEAD.ID}'>
|
||||
<input type="button" name="btn1" class="button"
|
||||
title="{APP.LBL_SELECT_BUTTON_TITLE}"
|
||||
accesskey="{APP.LBL_SELECT_BUTTON_KEY}"
|
||||
value='{APP.LBL_SELECT_BUTTON_LABEL}'
|
||||
onclick='open_popup("ContactLeads",600,400,"",true,false,{"call_back_function":"set_return","form_name":"EditView","field_to_name_array":{"id":"contactlead_id","name":"contactlead_name"}});' />
|
||||
</slot></td>
|
||||
<td width="15%" class="dataLabel"><slot>{MOD.LBL_OPP_NAME}</slot></td>
|
||||
<td width="35%" class="dataField"><slot>
|
||||
<input type="text" class='sqsEnabled' id='opportunity_name' name='opportunity_name' rows="2" cols="30" value="{OPPORTUNITY.NAME}" />
|
||||
<input id='opportunity_id' name='opportunity_id' type="hidden" value='{OPPORTUNITY.ID}'>
|
||||
<input type="button" name="btn1" class="button"
|
||||
title="{APP.LBL_SELECT_BUTTON_TITLE}"
|
||||
accesskey="{APP.LBL_SELECT_BUTTON_KEY}"
|
||||
value='{APP.LBL_SELECT_BUTTON_LABEL}'
|
||||
onclick='open_popup("Opportunities",600,400,"",true,false,{"call_back_function":"set_return","form_name":"EditView","field_to_name_array":{"id":"opportunity_id","name":"opportunity_name"}});' />
|
||||
</slot></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="dataLabel"><slot>{MOD.LBL_CONTACTLEAD_ROLE}</slot></td>
|
||||
<td class="dataField"><slot><select name='contactlead_role'>{CONTACTLEAD_ROLE_OPTIONS}</select></slot></td>
|
||||
<td class="dataLabel"><slot> </slot></td>
|
||||
<td class="dataField"><slot> </slot></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr></table>
|
||||
|
||||
</form>
|
||||
{JAVASCRIPT}
|
||||
<!-- END: main -->
|
||||
122
modules/ContactLeads/ContactLeadOpportunityRelationshipEdit.php
Normal file
122
modules/ContactLeads/ContactLeadOpportunityRelationshipEdit.php
Normal file
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once('modules/ContactLeads/ContactLeadOpportunityRelationship.php');
|
||||
require_once('modules/ContactLeads/Forms.php');
|
||||
require_once('include/utils.php');
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $mod_strings;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$focus = new ContactLeadOpportunityRelationship();
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
|
||||
$focus->id = "";
|
||||
}
|
||||
|
||||
// Prepopulate either side of the relationship if passed in.
|
||||
safe_map('opportunity_name', $focus);
|
||||
safe_map('opportunity_id', $focus);
|
||||
safe_map('contactlead_name', $focus);
|
||||
safe_map('contactlead_id', $focus);
|
||||
safe_map('contactlead_role', $focus);
|
||||
|
||||
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
|
||||
$GLOBALS['log']->info("ContactLead opportunity relationship");
|
||||
|
||||
$json = getJSONobj();
|
||||
require_once('include/QuickSearchDefaults.php');
|
||||
$qsd = new QuickSearchDefaults();
|
||||
$sqs_objects = array('opportunity_name' => $qsd->getQSParent());
|
||||
$sqs_objects['opportunity_name']['populate_list'] = array('opportunity_name', 'opportunity_id');
|
||||
$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
|
||||
echo $quicksearch_js;
|
||||
|
||||
$xtpl=new XTemplate ('modules/ContactLeads/ContactLeadOpportunityRelationshipEdit.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
|
||||
$xtpl->assign("RETURN_URL", "&return_module=$currentModule&return_action=DetailView&return_id=$focus->id");
|
||||
$xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
|
||||
$xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
|
||||
$xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
|
||||
$xtpl->assign("THEME", $theme);
|
||||
$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("ID", $focus->id);
|
||||
$xtpl->assign("CONTACTLEAD",$contactleadName = Array("NAME" => $focus->contactlead_name, "ID" => $focus->contactlead_id));
|
||||
$xtpl->assign("OPPORTUNITY",$oppName = Array("NAME" => $focus->opportunity_name, "ID" => $focus->opportunity_id));
|
||||
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CONTACTLEAD_OPP_FORM_TITLE']." ".$contactleadName['NAME'] . " - ". $oppName['NAME'], true);
|
||||
echo "\n</p>\n";
|
||||
|
||||
$xtpl->assign("CONTACTLEAD_ROLE_OPTIONS", get_select_options_with_id($app_list_strings['opportunity_relationship_type_dom'], $focus->contactlead_role));
|
||||
|
||||
|
||||
|
||||
|
||||
$xtpl->parse("main");
|
||||
|
||||
$xtpl->out("main");
|
||||
|
||||
require_once('include/javascript/javascript.php');
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName('EditView');
|
||||
$javascript->setSugarBean($focus);
|
||||
$javascript->addToValidateBinaryDependency('opportunity_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $mod_strings['LBL_OPP_NAME'], 'false', '', 'opportunity_id');
|
||||
echo $javascript->getScript();
|
||||
|
||||
|
||||
?>
|
||||
71
modules/ContactLeads/ContactLeadsQuickCreate.php
Normal file
71
modules/ContactLeads/ContactLeadsQuickCreate.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/EditView/QuickCreate.php');
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
require_once('include/javascript/javascript.php');
|
||||
|
||||
class ContactLeadsQuickCreate extends QuickCreate {
|
||||
|
||||
var $javascript;
|
||||
|
||||
function process() {
|
||||
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
|
||||
$mod_strings = return_module_language($current_language, 'ContactLeads');
|
||||
|
||||
parent::process();
|
||||
|
||||
$this->ss->assign("SALUTATION_OPTIONS", get_select_options_with_id($app_list_strings['salutation_dom'], ''));
|
||||
|
||||
if($this->viaAJAX) { // override for ajax call
|
||||
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"contactleadsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"contactleads\"); else return false;'");
|
||||
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_contactleads\")';");
|
||||
}
|
||||
|
||||
$this->ss->assign('viaAJAX', $this->viaAJAX);
|
||||
|
||||
$this->javascript = new javascript();
|
||||
$this->javascript->setFormName('contactleadsQuickCreate');
|
||||
|
||||
$focus = new ContactLead();
|
||||
$this->javascript->setSugarBean($focus);
|
||||
$this->javascript->addAllFields('');
|
||||
|
||||
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
|
||||
}
|
||||
}
|
||||
?>
|
||||
161
modules/ContactLeads/CreateMailingTags.php
Normal file
161
modules/ContactLeads/CreateMailingTags.php
Normal file
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
/*
|
||||
define('RELATIVE_PATH','include/html2fpdf/');
|
||||
define('FPDF_FONTPATH','include/html2fpdf/font/');
|
||||
require_once("include/html2fpdf/html2fpdf.php");
|
||||
|
||||
$pdf = new HTML2FPDF("P");
|
||||
$pdf->SetMargins(12,12,12);
|
||||
$pdf->SetAutoPageBreak(true,0);
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('arialpl', '', 10);
|
||||
|
||||
$cids=explode(",",$_REQUEST['uid']);
|
||||
$count=count($cids);
|
||||
$y=0;
|
||||
for($i=0;$i<$count;$i++){
|
||||
if($i%3==0)$x=5;
|
||||
if($i%3==1)$x=75;
|
||||
if($i%3==2)$x=145;
|
||||
|
||||
$nm=array();
|
||||
$r=mysql_fetch_array(mysql_query("select * from contactleads where id='".$cids[$i]."'"));
|
||||
if($r['salutation'])$nm[]=$r['saultation'];
|
||||
if($r['first_name'])$nm[]=$r['first_name'];
|
||||
if($r['last_name'])$nm[]=$r['last_name'];
|
||||
|
||||
$rr=mysql_fetch_array(mysql_query("select account_id from accounts_contactleads where contactlead_id='".$r['id']."' and deleted='0'"));
|
||||
$rr=mysql_fetch_array(mysql_query("select * from accounts where id='".$rr['account_id']."'"));
|
||||
$r['primary_address_street']=$rr['billing_address_street'];
|
||||
$r['primary_address_postalcode']=$rr['billing_address_postalcode'];
|
||||
$r['primary_address_city']=$rr['billing_address_city'];
|
||||
$r['primary_address_country']=$rr['billing_address_country'];
|
||||
|
||||
$name=iconv("UTF-8","ISO-8859-2",implode(" ",$nm));
|
||||
$pdf->SetXY($x,$y);
|
||||
$pdf->SetFont('arialpl', 'B', 10);
|
||||
$yy=$y;
|
||||
$pdf->Cell(60,6,$name,0,0,"C");
|
||||
$yy+=5;
|
||||
$pdf->SetXY($x,$yy);
|
||||
$pdf->SetFont('arialpl', '', 8);
|
||||
if($r['primary_address_street']){
|
||||
$pdf->Cell(60,6,iconv("UTF-8","ISO-8859-2",$rr['name']),0,0,"C");
|
||||
$yy+=5;
|
||||
}
|
||||
$pdf->SetXY($x,$yy);
|
||||
$pdf->SetFont('arialpl', '', 10);
|
||||
if($r['primary_address_street']){
|
||||
$pdf->Cell(60,6,iconv("UTF-8","ISO-8859-2",$r['primary_address_street']),0,0,"C");
|
||||
$yy+=5;
|
||||
}
|
||||
$pdf->SetXY($x,$yy);
|
||||
if($r['primary_address_postalcode'] || $r['primary_address_city']){
|
||||
$pdf->Cell(60,6,iconv("UTF-8","ISO-8859-2",$r['primary_address_postalcode'].' '.$r['primary_address_city']),0,0,"C");
|
||||
$yy+=5;
|
||||
}
|
||||
$pdf->SetXY($x,$yy);
|
||||
if($r['primary_address_country']){
|
||||
$pdf->Cell(60,6,iconv("UTF-8","ISO-8859-2",$r['primary_address_country']),0,0,"C");
|
||||
$yy+=5;
|
||||
}
|
||||
$ph=array();
|
||||
if($r['phone_work'])$ph[]="Tel.: ".$r['phone_work'];
|
||||
if($r['phone_mobile'])$ph[]="Kom.: ".$r['phone_mobile'];
|
||||
$phone=implode(" ",$ph);
|
||||
$pdf->SetXY($x,$yy);
|
||||
$pdf->SetFont('arialpl', '', 8);
|
||||
if($phone){
|
||||
$pdf->Cell(60,6,iconv("UTF-8","ISO-8859-2",$phone),0,0,"C");
|
||||
$yy+=5;
|
||||
}
|
||||
if($i%3==2)$y+=38;
|
||||
if($i==23){
|
||||
$pdf->AddPage();
|
||||
$y=0;
|
||||
$x=5;
|
||||
}
|
||||
}
|
||||
|
||||
$pdf->Output("MailingTags.pdf", "D");*/
|
||||
|
||||
define('RELATIVE_PATH','include/html2fpdf/');
|
||||
define('FPDF_FONTPATH','include/html2fpdf/font/');
|
||||
require_once("include/html2fpdf/html2fpdf.php");
|
||||
|
||||
$pdf = new HTML2FPDF("L");
|
||||
$pdf->SetMargins(12,12,12);
|
||||
$pdf->SetAutoPageBreak(true,0);
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('arialpl', '', 20);
|
||||
|
||||
$cids=explode(",",$_REQUEST['uid']);
|
||||
$count=count($cids);
|
||||
$y=37;
|
||||
for($i=0;$i<$count;$i++){
|
||||
if($i%2==0)$x=0;
|
||||
if($i%2==1)$x=135;
|
||||
|
||||
$nm=array();
|
||||
$r=mysql_fetch_array(mysql_query("select * from contactleads where id='".$cids[$i]."'"));
|
||||
if($r['salutation'])$nm[]=$r['saultation'];
|
||||
if($r['first_name'])$nm[]=$r['first_name'];
|
||||
if($r['last_name'])$nm[]=$r['last_name'];
|
||||
|
||||
$rr=mysql_fetch_array(mysql_query("select account_id from accounts_contactleads where contactlead_id='".$r['id']."' and deleted='0'"));
|
||||
$rr=mysql_fetch_array(mysql_query("select * from accounts where id='".$rr['account_id']."'"));
|
||||
$r['primary_address_street']=$rr['billing_address_street'];
|
||||
$r['primary_address_postalcode']=$rr['billing_address_postalcode'];
|
||||
$r['primary_address_city']=$rr['billing_address_city'];
|
||||
$r['primary_address_country']=$rr['billing_address_country'];
|
||||
|
||||
$name=iconv("UTF-8","ISO-8859-2",implode(" ",$nm));
|
||||
$pdf->SetXY($x,$y);
|
||||
$pdf->SetFont('arialpl', 'B', 20);
|
||||
$yy=$y;
|
||||
$pdf->Cell(160,6,$name,0,0,"C");
|
||||
$yy+=9;
|
||||
$pdf->SetXY($x,$yy);
|
||||
$pdf->SetFont('arialpl', '', 16);
|
||||
if($r['primary_address_street']){
|
||||
$pdf->Cell(160,6,iconv("UTF-8","ISO-8859-2",$rr['name']),0,0,"C");
|
||||
$yy+=9;
|
||||
}
|
||||
$pdf->SetXY($x,$yy);
|
||||
$pdf->SetFont('arialpl', '', 20);
|
||||
if($r['primary_address_street']){
|
||||
$pdf->Cell(160,6,iconv("UTF-8","ISO-8859-2",$r['primary_address_street']),0,0,"C");
|
||||
$yy+=9;
|
||||
}
|
||||
$pdf->SetXY($x,$yy);
|
||||
if($r['primary_address_postalcode'] || $r['primary_address_city']){
|
||||
$pdf->Cell(160,6,iconv("UTF-8","ISO-8859-2",$r['primary_address_postalcode'].' '.$r['primary_address_city']),0,0,"C");
|
||||
$yy+=9;
|
||||
}
|
||||
$pdf->SetXY($x,$yy);
|
||||
if($r['primary_address_country']){
|
||||
$pdf->Cell(160,6,iconv("UTF-8","ISO-8859-2",$r['primary_address_country']),0,0,"C");
|
||||
$yy+=9;
|
||||
}
|
||||
$ph=array();
|
||||
if($r['phone_work'])$ph[]="Tel.: ".$r['phone_work'];
|
||||
if($r['phone_mobile'])$ph[]="Kom.: ".$r['phone_mobile'];
|
||||
$phone=implode(" ",$ph);
|
||||
$pdf->SetXY($x,$yy);
|
||||
$pdf->SetFont('arialpl', '', 16);
|
||||
if($phone){
|
||||
$pdf->Cell(160,6,iconv("UTF-8","ISO-8859-2",""),0,0,"C");
|
||||
$yy+=9;
|
||||
}
|
||||
if($i%2==1)$y+=85;
|
||||
if($i%4==3 && $i!=$count-1){
|
||||
$pdf->AddPage();
|
||||
$y=37;
|
||||
$x=5;
|
||||
}
|
||||
}
|
||||
|
||||
$pdf->Output("MailingTags.pdf", "D");
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $current_user;
|
||||
$dashletData['MyContactLeadsDashlet']['searchFields'] = array('date_entered' => array('default' => ''),
|
||||
|
||||
|
||||
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name));
|
||||
$dashletData['MyContactLeadsDashlet']['columns'] = array('name' => array('width' => '30',
|
||||
'label' => 'LBL_NAME',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'related_fields' => array('first_name', 'last_name')),
|
||||
'account_name' => array('width' => '20',
|
||||
'label' => 'LBL_ACCOUNT_NAME',
|
||||
'sortable' => false,
|
||||
'link' => true,
|
||||
'id' => 'account_id',
|
||||
'ACLTag' => 'ACCOUNT'),
|
||||
'title' => array('width' => '10',
|
||||
'label' => 'LBL_TITLE'),
|
||||
'email1' => array('width' => '10',
|
||||
'label' => 'LBL_EMAIL_ADDRESS',
|
||||
'sortable' => false,
|
||||
'customCode' => '{$EMAIL1_LINK}{$EMAIL1}</a>',),
|
||||
'phone_work' => array('width' => '10',
|
||||
'label' => 'LBL_OFFICE_PHONE',
|
||||
'default' => true),
|
||||
'phone_home' => array('width' => '10',
|
||||
'label' => 'LBL_HOME_PHONE'),
|
||||
'phone_mobile' => array('width' => '10',
|
||||
'label' => 'LBL_MOBILE_PHONE'),
|
||||
'phone_other' => array('width' => '10',
|
||||
'label' => 'LBL_OTHER_PHONE'),
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
'default' => true),
|
||||
'date_modified' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_MODIFIED'),
|
||||
'created_by' => array('width' => '8',
|
||||
'label' => 'LBL_CREATED'),
|
||||
'assigned_user_name' => array('width' => '8',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true),
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['MyContactLeadsDashlet'] = array('module' => 'ContactLeads',
|
||||
'title' => 'Potencjale kontakty',
|
||||
'description' => 'A customizable view into ContactLeads',
|
||||
'category' => 'Module Views',
|
||||
'hidden' => true);
|
||||
?>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/Dashlets/DashletGeneric.php');
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
|
||||
class MyContactLeadsDashlet extends DashletGeneric {
|
||||
function MyContactLeadsDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings;
|
||||
require('modules/ContactLeads/Dashlets/MyContactLeadsDashlet/MyContactLeadsDashlet.data.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'ContactLeads');
|
||||
|
||||
$this->searchFields = $dashletData['MyContactLeadsDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['MyContactLeadsDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new ContactLead();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
177
modules/ContactLeads/Email_picker.html
Normal file
177
modules/ContactLeads/Email_picker.html
Normal file
@@ -0,0 +1,177 @@
|
||||
<!--
|
||||
/*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<!-- BEGIN: SearchHeader -->
|
||||
<script type="text/javascript" src="include/JSON.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script> <script type="text/javascript" src="modules/Emails/javascript/email_popup_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
<form action="index.php" method="post" name="popup_query_form" id="popup_query_form">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="tabForm">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="dataLabel" nowrap="nowrap">
|
||||
{MOD.LBL_FIRST_NAME}
|
||||
</td>
|
||||
<td class="dataField" nowrap="nowrap">
|
||||
<input type="text" size="20" name="first_name" class="dataField" value="{LAST_SEARCH.FIRST_NAME}" />
|
||||
</td>
|
||||
<td class="dataLabel" nowrap="nowrap">
|
||||
{MOD.LBL_LAST_NAME}
|
||||
</td>
|
||||
<td class="dataField" nowrap="nowrap">
|
||||
<input type="text" size="20" name="last_name" class="dataField" value="{LAST_SEARCH.LAST_NAME}" />
|
||||
</td>
|
||||
<td valign="top" align="right">
|
||||
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
||||
<input type="hidden" name="action" value="Popup" />
|
||||
<input type="hidden" name="query" value="true" />
|
||||
<input type="hidden" name="func_name" value="" />
|
||||
<input type="hidden" name="request_data" value="{request_data}" />
|
||||
<input type="hidden" name="populate_parent" value="false" />
|
||||
<input type="hidden" name="record_id" value="" />
|
||||
<input type="hidden" name="html" value="Email_picker" />
|
||||
<input type="submit" name="button" class="button" title="{APP.LBL_SEARCH_BUTTON_TITLE}" accesskey="{APP.LBL_SEARCH_BUTTON_KEY}" value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="dataLabel" nowrap="nowrap">
|
||||
{MOD.LBL_ACCOUNT_NAME}
|
||||
</td>
|
||||
<td class="dataField">
|
||||
<input type="text" size="20" name="account_name" class="dataField" value="{LAST_SEARCH.ACCOUNT_NAME}{ACCOUNT_NAME}" />
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
/* initialize the popup request from the parent */
|
||||
window.document.forms['popup_query_form'].request_data.value = JSON.stringify(window.opener.get_popup_request_data());
|
||||
-->
|
||||
</script>
|
||||
<p>
|
||||
<div id='addformlink'>
|
||||
{CREATECONTACTLEAD}
|
||||
</div>
|
||||
<div id='addform' style='display:none;position:relative;z-index:2;left:0px;top:0px;'>
|
||||
<form name="ContactLeadSave" onsubmit="return check_form('ContactLeadSave');" method="post" action="index.php">
|
||||
{ADDFORMHEADER}
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="tabForm">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
||||
<input type="hidden" name="action" value="Popup" />
|
||||
<input type="hidden" name="doAction" value="save" />
|
||||
<input type="hidden" name="query" value="true" />
|
||||
<input type="hidden" name="html" value="Email_picker" />
|
||||
{ADDFORM}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</p>
|
||||
<!-- END: SearchHeader -->
|
||||
<!-- BEGIN: list_nav_row -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="listView">
|
||||
{PAGINATION}
|
||||
<!-- END: list_nav_row -->
|
||||
<tr height="20">
|
||||
<td scope="col" class="listViewThS1" nowrap>
|
||||
{CHECKALL}
|
||||
</td>
|
||||
<td scope="col" width="40%" class="listViewThS1" nowrap="nowrap">
|
||||
<a href="{ORDER_BY}last_name" class="listViewThLinkS1">
|
||||
{MOD.LBL_LIST_CONTACTLEAD_NAME}{arrow_start}{last_name_arrow}{arrow_end}
|
||||
</a>
|
||||
</td>
|
||||
<td scope="col" width="20%" class="listViewThS1" nowrap="nowrap">
|
||||
<a href="{ORDER_BY}email1" class="listViewThLinkS1">
|
||||
{MOD.LBL_LIST_EMAIL_ADDRESS}{arrow_start}{email1_arrow}{arrow_end}
|
||||
</a>
|
||||
</td>
|
||||
<td scope="col" width="40%" class="listViewThS1" nowrap="nowrap">
|
||||
{MOD.LBL_LIST_ACCOUNT_NAME}
|
||||
</td>
|
||||
</tr>
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" onmouseover="setPointer(this, '{CONTACTLEAD.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');" onmouseout="setPointer(this, '{CONTACTLEAD.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');" onmousedown="setPointer(this, '{CONTACTLEAD.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
|
||||
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>
|
||||
{PREROW}
|
||||
</td>
|
||||
<td scope='row' valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
<a href="#" class="listViewTdLinkS1" onclick="send_back('ContactLeads','{CONTACTLEAD.ID}');">
|
||||
{CONTACTLEAD.FULL_NAME}
|
||||
</a>
|
||||
</td>
|
||||
<td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
<a href="#" class="listViewTdLinkS1" onclick="send_back('ContactLeads','{CONTACTLEAD.ID}');">
|
||||
{CONTACTLEAD.EMAIL1}
|
||||
</a>
|
||||
<br />
|
||||
<a href="#" class="listViewTdLinkS1" onclick="send_back('ContactLeads','{CONTACTLEAD.ID}');">
|
||||
{CONTACTLEAD.EMAIL2}
|
||||
</a>
|
||||
</td>
|
||||
<td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
{CONTACTLEAD.ACCOUNT_NAME}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="20" class="listViewHRS1">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END: row -->
|
||||
{ASSOCIATED_JAVASCRIPT_DATA}
|
||||
</table>
|
||||
<!-- END: main -->
|
||||
37
modules/ContactLeads/Forms.php
Normal file
37
modules/ContactLeads/Forms.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*********************************************************************************/
|
||||
require_once('include/EditView/SideQuickCreate.php');
|
||||
70
modules/ContactLeads/ImportVCard.html
Normal file
70
modules/ContactLeads/ImportVCard.html
Normal file
@@ -0,0 +1,70 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* {APP.LBL_CURRENCY_SYM}Header: /cvsroot/sugarcrm/sugarcrm/modules/ContactLeads/EditView.html,v 1.22 2004/07/16 04:04:42 sugarclint Exp {APP.LBL_CURRENCY_SYM}
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
<!-- BEGIN: error -->
|
||||
<span class="error">{ERROR}</span>
|
||||
<!-- END: error -->
|
||||
<b>{MOD.LBL_IMPORT_VCARDTEXT}</b>
|
||||
<script type="text/javascript">
|
||||
|
||||
function validate_vcard()
|
||||
{
|
||||
if (document.getElementById("vcard_file").value=="")
|
||||
{
|
||||
alert('{ERROR_TEXT}');
|
||||
}
|
||||
else
|
||||
{
|
||||
document.EditView.submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<form name="EditView" method="POST" ENCTYPE="multipart/form-data" action="index.php">
|
||||
<input type="hidden" name="max_file_size" value="{MAX_FILE_SIZE}">
|
||||
<input type='hidden' name='action' value='ImportVCard'>
|
||||
<input type='hidden' name='module' value='{MODULE}'>
|
||||
<input type='hidden' name='from' value='ImportVCard'>
|
||||
|
||||
<input size=60 name="vcard" id="vcard_file" type="file" /> <input class='button' type="button" onclick='validate_vcard()' value="{MOD.LBL_IMPORT_VCARD}" />
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<!-- END: main -->
|
||||
83
modules/ContactLeads/ImportVCard.php
Normal file
83
modules/ContactLeads/ImportVCard.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
********************************************************************************/
|
||||
|
||||
if(isset($_FILES['vcard']['tmp_name']) && isset($_FILES['vcard']['size']) > 0){
|
||||
require_once('include/vCard.php');
|
||||
$vcard = new vCard();
|
||||
$record = $vcard->importVCard($_FILES['vcard']['tmp_name']);
|
||||
header("Location: index.php?action=DetailView&module=ContactLeads&record=$record");
|
||||
exit();
|
||||
}else{
|
||||
require_once('XTemplate/xtpl.php');
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME']." ".$mod_strings['LBL_IMPORT_VCARD'], true);
|
||||
echo "\n</p>\n";
|
||||
global $theme;
|
||||
$error_msg = '';
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'ContactLeads');
|
||||
|
||||
$xtpl=new XTemplate ('modules/ContactLeads/ImportVCard.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("ERROR_TEXT", $mod_strings['LBL_EMPTY_VCARD']);
|
||||
$xtpl->assign("HEADER", $mod_strings['LBL_IMPORT_VCARD']);
|
||||
|
||||
$xtpl->assign("MODULE", $_REQUEST['module']);
|
||||
if ($error_msg != '')
|
||||
{
|
||||
$xtpl->assign("ERROR", $error_msg);
|
||||
$xtpl->parse("main.error");
|
||||
}
|
||||
|
||||
|
||||
$xtpl->parse("main");
|
||||
|
||||
$xtpl->out("main");
|
||||
}?>
|
||||
184
modules/ContactLeads/MailMergePicker.html
Normal file
184
modules/ContactLeads/MailMergePicker.html
Normal file
@@ -0,0 +1,184 @@
|
||||
<!--
|
||||
/*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<!-- BEGIN: SearchHeader -->
|
||||
<script type="text/javascript" src="include/JSON.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/javascript/popup_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/javascript/sugar_3.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="tabForm">
|
||||
<tr>
|
||||
<td>
|
||||
<form action="index.php" method="post" name="popup_query_form" id="popup_query_form">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="dataLabel" nowrap="nowrap">
|
||||
{MOD.LBL_FIRST_NAME}
|
||||
</td>
|
||||
<td class="dataField" nowrap="nowrap">
|
||||
<input type="text" size="20" name="first_name" class="dataField" value="{FIRST_NAME}" />
|
||||
</td>
|
||||
<td class="dataLabel" nowrap="nowrap">
|
||||
{MOD.LBL_LAST_NAME}
|
||||
</td>
|
||||
<td class="dataField" nowrap="nowrap">
|
||||
<input type="text" size="20" name="last_name" class="dataField" value="{LAST_NAME}" />
|
||||
</td>
|
||||
<td valign="top" align="right">
|
||||
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
||||
<input type="hidden" name="action" value="Popup" />
|
||||
|
||||
<input type="hidden" name="query" value="true" />
|
||||
<input type="hidden" name="func_name" value="" />
|
||||
<input type="hidden" name="request_data" value="{request_data}" />
|
||||
<input type="hidden" name="populate_parent" value="false" />
|
||||
<input type="hidden" name="record_id" value="" />
|
||||
<input type="hidden" name="hide_clear_button" value="true" />
|
||||
<input type="submit" name="button" class="button" title="{APP.LBL_SEARCH_BUTTON_TITLE}" accesskey="{APP.LBL_SEARCH_BUTTON_KEY}" value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
|
||||
<input type="hidden" name="mode" value="{MULTI_SELECT}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="dataLabel" nowrap="nowrap">
|
||||
{MOD.LBL_ACCOUNT_NAME}
|
||||
</td>
|
||||
<td class="dataField">
|
||||
<input type="text" id="account_name" name="account_name" class="dataField" size="20" value="{ACCOUNT_NAME}" />
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
/* initialize the popup request from the parent */
|
||||
if(window.document.forms['popup_query_form'].request_data.value == "") {
|
||||
window.document.forms['popup_query_form'].request_data.value
|
||||
= JSON.stringify(window.opener.get_popup_request_data());
|
||||
}
|
||||
|
||||
// cn: bug 8104 - escaped unicode sequence printing out escaped values
|
||||
var account_name = document.getElementById('account_name').value;
|
||||
document.getElementById('account_name').value = unescape(account_name);
|
||||
-->
|
||||
</script>
|
||||
<p>
|
||||
<div id='addformlink'>
|
||||
{CREATEBUTTON}
|
||||
</div>
|
||||
<div id='addform' style='display:none;position:relative;z-index:2;left:0px;top:0px;'>
|
||||
<form name="ContactLeadSave" onsubmit="return check_form('ContactLeadSave');" method="post" action="index.php">
|
||||
{ADDFORMHEADER}
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="tabForm">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
||||
<input type="hidden" name="action" value="Popup" />
|
||||
<input type="hidden" name="doAction" value="save" />
|
||||
<input type="hidden" name="query" value="true" />
|
||||
{ADDFORM}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</p>
|
||||
<!-- END: SearchHeader -->
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="listView">
|
||||
<!-- BEGIN: list_nav_row -->
|
||||
{PAGINATION}
|
||||
<!-- END: list_nav_row -->
|
||||
<tr height="20">
|
||||
<td scope="col" class="listViewThS1" nowrap>
|
||||
{CHECKALL}
|
||||
</td>
|
||||
<td scope="col" width="40%" class="listViewThS1" nowrap="nowrap">
|
||||
<a href="{ORDER_BY}last_name" class="listViewThLinkS1">
|
||||
{MOD.LBL_LIST_CONTACTLEAD_NAME}{arrow_start}{last_name_arrow}{arrow_end}</a>
|
||||
</td>
|
||||
<td scope="col" width="20%" class="listViewThS1" nowrap="nowrap">
|
||||
<a href="{ORDER_BY}title" class="listViewThLinkS1">
|
||||
{MOD.LBL_LIST_TITLE}{arrow_start}{title_arrow}{arrow_end}</a>
|
||||
</td>
|
||||
<td scope="col" width="40%" class="listViewThS1" nowrap="nowrap">
|
||||
{MOD.LBL_LIST_ACCOUNT_NAME}
|
||||
</td>
|
||||
</tr>
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" onmouseover="setPointer(this, '{CONTACTLEAD.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');" onmouseout="setPointer(this, '{CONTACTLEAD.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');" onmousedown="setPointer(this, '{CONTACTLEAD.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
|
||||
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>
|
||||
{PREROW}
|
||||
</td>
|
||||
<td scope='row' valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
<{TAG_TYPE} href="#" onclick="send_back('ContactLeads','{CONTACTLEAD.ID}');" class="listViewTdLinkS1">{CONTACTLEAD.FULL_NAME}
|
||||
</{tag_type}>
|
||||
</td>
|
||||
<td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
{CONTACTLEAD.TITLE}
|
||||
</td>
|
||||
<td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
{CONTACTLEAD.ACCOUNT_NAME}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="20" class="listViewHRS1">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END: row -->
|
||||
</table>
|
||||
{ASSOCIATED_JAVASCRIPT_DATA}
|
||||
<!-- END: main -->
|
||||
58
modules/ContactLeads/Menu.php
Normal file
58
modules/ContactLeads/Menu.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings, $app_strings, $sugar_config;
|
||||
if(ACLController::checkAccess('ContactLeads', 'edit', true))$module_menu[] = Array("index.php?module=ContactLeads&action=EditView&return_module=ContactLeads&return_action=DetailView", $mod_strings['LNK_NEW_CONTACTLEAD'],"CreateContactLeads", 'ContactLeads');
|
||||
if(ACLController::checkAccess('ContactLeads', 'edit', true))$module_menu[] =Array("index.php?module=ContactLeads&action=BusinessCard", $mod_strings['LBL_ADD_BUSINESSCARD'],"CreateContactLeads", 'ContactLeads');
|
||||
if(ACLController::checkAccess('ContactLeads', 'import', true))$module_menu[] =Array("index.php?module=ContactLeads&action=ImportVCard", $mod_strings['LNK_IMPORT_VCARD'],"CreateContactLeads", 'ContactLeads');
|
||||
if(ACLController::checkAccess('ContactLeads', 'list', true))$module_menu[] =Array("index.php?module=ContactLeads&action=index&return_module=ContactLeads&return_action=DetailView", $mod_strings['LNK_CONTACTLEAD_LIST'],"ContactLeads", 'ContactLeads');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(ACLController::checkAccess('ContactLeads', 'import', true))$module_menu[] =Array("index.php?module=ContactLeads&action=Import&step=1&return_module=ContactLeads&return_action=index", $app_strings['LBL_IMPORT'],"Import", 'ContactLeads');
|
||||
if(ACLController::checkAccess('ContactLeads','list', true)) $module_menu[] = Array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
|
||||
|
||||
?>
|
||||
57
modules/ContactLeads/Popup.php
Normal file
57
modules/ContactLeads/Popup.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
require_once('modules/ContactLeads/Popup_picker.php');
|
||||
|
||||
$popup = new Popup_Picker();
|
||||
|
||||
echo $popup->process_page();
|
||||
|
||||
?>
|
||||
57
modules/ContactLeads/Popup1.php
Normal file
57
modules/ContactLeads/Popup1.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Popup
|
||||
*
|
||||
* The contents of this file are subject to the SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(!empty($_REQUEST['html'])) {
|
||||
require_once('modules/ContactLeads/Popup_picker.php');
|
||||
$popup = new Popup_Picker();
|
||||
|
||||
if($_REQUEST['html'] == 'Email_picker')
|
||||
{
|
||||
echo $popup->process_page_for_email();
|
||||
}
|
||||
elseif($_REQUEST['html'] == 'change_address')
|
||||
{
|
||||
echo $popup->process_page_for_address();
|
||||
}
|
||||
elseif($_REQUEST['html'] == 'mail_merge')
|
||||
{
|
||||
echo $popup->process_page_for_merge();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once('include/Popups/Popup_picker.php');
|
||||
$popup = new Popup_Picker();
|
||||
|
||||
echo $popup->process_page();
|
||||
}
|
||||
|
||||
?>
|
||||
57
modules/ContactLeads/PopupEmails.php
Normal file
57
modules/ContactLeads/PopupEmails.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
require_once('modules/ContactLeads/Popup_pickerEmails.php');
|
||||
|
||||
$popup = new Popup_Picker();
|
||||
|
||||
echo $popup->process_page();
|
||||
|
||||
?>
|
||||
290
modules/ContactLeads/Popup_picker.html
Normal file
290
modules/ContactLeads/Popup_picker.html
Normal file
@@ -0,0 +1,290 @@
|
||||
<!--
|
||||
/*
|
||||
* The contents of this file are subject to the SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<!-- BEGIN: SearchHeader -->
|
||||
|
||||
|
||||
<script type="text/javascript" src="include/JSON.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/javascript/popup_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
<script>
|
||||
function selectTabCSS(id){
|
||||
document.getElementById("basic_form").style.display='none';
|
||||
document.getElementById("advanced_form").style.display='none';
|
||||
document.getElementById("link_basic").className='';
|
||||
document.getElementById("link_advanced").className='';
|
||||
document.getElementById("tab_basic").className='';
|
||||
document.getElementById("tab_advanced").className='';
|
||||
|
||||
document.getElementById(id+"_form").style.display='';
|
||||
document.getElementById("link_"+id).className='current';
|
||||
document.getElementById("tab_"+id).className='active';
|
||||
document.getElementById("tab").value=id;
|
||||
if(id=="advanced"){
|
||||
var bi=document.getElementById("basic_form").getElementsByTagName("input");
|
||||
for(var i=0;i<bi.length;i++){
|
||||
if(bi[i].type=="text")bi[i].value="";
|
||||
if(bi[i].type=="checkbox")bi[i].checked=false;
|
||||
}
|
||||
var bs=document.getElementById("basic_form").getElementsByTagName("select");
|
||||
for(var i=0;i<bs.length;i++){
|
||||
bs[i].value="";
|
||||
}
|
||||
}
|
||||
if(id=="basic"){
|
||||
var ai=document.getElementById("advanced_form").getElementsByTagName("input");
|
||||
for(var i=0;i<ai.length;i++){
|
||||
if(ai[i].type=="text")ai[i].value="";
|
||||
if(ai[i].type=="checkbox")ai[i].checked=false;
|
||||
}
|
||||
var as=document.getElementById("basic_form").getElementsByTagName("select");
|
||||
for(var i=0;i<as.length;i++){
|
||||
as[i].value="";
|
||||
}
|
||||
}
|
||||
}
|
||||
//selectTabCSS(document.getElementById("tab").value);
|
||||
</script>
|
||||
<ul class="tablist">
|
||||
<li class="active" id="tab_basic"><a class="current" id="link_basic" href="javascript:selectTabCSS('basic');">Basic Search</a></li>
|
||||
<li class="" id="tab_advanced"><a class="" id="link_advanced" href="javascript:selectTabCSS('advanced');">Advanced Search</a></li>
|
||||
</ul>
|
||||
<form action="index.php" method="post" name="popup_query_form" id="search_form">
|
||||
<input type="hidden" name="tab" id="tab" value="{TABB}" />
|
||||
<input type="hidden" name="div" id="div" value="{DIV}" />
|
||||
<input type="hidden" name="pre" id="pre" value="{PRE}" />
|
||||
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
||||
<input type="hidden" name="action" value="Popup" />
|
||||
<input type="hidden" name="query" value="true" />
|
||||
<input type="hidden" name="request_data" value="{request_data}" />
|
||||
<input type="hidden" name="record_id" value="" />
|
||||
<input type="hidden" name="mode" value="{MULTI_SELECT}" />
|
||||
<table cellpaddin="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<table cellpaddin="0" cellspacing="0" border="0" width="100%" id="advanced_form" style="display:none;border-top: 0px none; margin-bottom: 4px;" class="tabForm">
|
||||
<tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">First Name</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="first_name_advanced" id="first_name_advanced" size="30" maxlength="100" value="{FIRST_NAME}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Any Address</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="address_street_advanced" id="address_street_advanced" size="30" value="{ADDRESS}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Any Phone</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="phone_advanced" id="phone_advanced" size="30" value="{PHONE}" title="" tabindex="" type="text"></td>
|
||||
</tr><tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Last Name</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="last_name_advanced" id="last_name_advanced" size="30" maxlength="100" value="{LAST_NAME}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">City</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="address_city_advanced" id="address_city_advanced" size="30" value="{CITY}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Any Email</td><td class="dataField" width="30%" nowrap="nowrap"><input name="email_advanced" id="email_advanced" size="30" value="{EMAIL}" title="" tabindex="" type="text"></td>
|
||||
</tr><tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Account Name</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="account_name_advanced" tabindex="" id="account_name_advanced" size="" value="{ACCOUNT_NAME}" title="" type="text">
|
||||
<input name="account_id_advanced" id="account_id_advanced" value="{ACCOUNT_ID}" type="hidden"><input name="btn_account_name_advanced" tabindex="" title="Select [Alt+T]" accesskey="T" class="button" value="Select" onclick='open_popup("Accounts", 600, 400, "", true, false, {"call_back_function":"set_return","form_name":"search_form","field_to_name_array":{"id":"account_id_advanced","name":"account_name_advanced"}}, "single", true,"new");' type="button"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">State</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="address_state_advanced" id="address_state_advanced" size="30" value="{STATE}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Do Not Call</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap">
|
||||
<select id="do_not_call_advanced" name="do_not_call_advanced" tabindex="">
|
||||
{DO_NOT_CALL_LIST}
|
||||
</select>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Assistant</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="assistant_advanced" id="assistant_advanced" size="30" maxlength="75" value="{ASSISTANT}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Postal Code</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="address_postalcode_advanced" id="address_postalcode_advanced" size="30" value="{POSTAL_CODE}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Country</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="primary_address_country_advanced" id="primary_address_country_advanced" size="30" value="{COUNTRY}" title="" tabindex="" type="text"></td>
|
||||
</tr><tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Assigned to</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap">
|
||||
<select name="assigned_user_id_advanced[]" style="width: 150px;" multiple="true" size="6">
|
||||
{ASSIGNED_TO_LIST}
|
||||
</select>
|
||||
</td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Foreign contactlead</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap">
|
||||
<select name="foreign_contactlead_advanced" style="width: 150px;">
|
||||
{FOREIGN_CONTACTLEAD}
|
||||
</select>
|
||||
</td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Mailing tag</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap">
|
||||
<select name="mailing_tag_advanced" style="width: 150px;">
|
||||
{MAILING_TAG}
|
||||
</select>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td colspan="20">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="basic_form" style="border-top: 0px none; margin-bottom: 4px;" class="tabForm">
|
||||
<tr>
|
||||
<td class="dataLabel" nowrap="nowrap">{MOD.LBL_FIRST_NAME} <input type="text" name="first_name" size="20" class="dataField" value="{FIRST_NAME}" /></td>
|
||||
<td class="dataLabel" nowrap="nowrap">{MOD.LBL_LAST_NAME} <input type="text" name="last_name" size="20" class="dataField" value="{LAST_NAME}" /></td>
|
||||
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Account Name</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="account_name" tabindex="" id="account_name" size="" value="{ACCOUNT_NAME}" title="" type="text">
|
||||
<input name="account_id" id="account_id" value="{ACCOUNT_ID}" type="hidden"><input name="btn_account_name" tabindex="" title="Select [Alt+T]" accesskey="T" class="button" value="Select" onclick='open_popup("Accounts", 600, 400, "", true, false, {"call_back_function":"set_return","form_name":"search_form","field_to_name_array":{"id":"account_id","name":"account_name"}}, "single", true,"new");' type="button"></td>
|
||||
<td width="20%" align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="dataLabel" nowrap="nowrap">Only my items: <input type="checkbox" name="only_my_items" value="1" {OMI_CHECKED} /></td>
|
||||
<td class="dataLabel" nowrap="nowrap"> </td>
|
||||
<td class="dataLabel" nowrap="nowrap"> </td>
|
||||
<td class="dataField" nowrap="nowrap"> </td>
|
||||
<td align="right"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" name="button" class="button"
|
||||
title="{APP.LBL_SEARCH_BUTTON_TITLE}"
|
||||
accessKey="{APP.LBL_SEARCH_BUTTON_KEY}"
|
||||
value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
|
||||
<input type="button" name="button" class="button"
|
||||
title="Clear"
|
||||
value="Clear" onclick="selectTabCSS(document.getElementById('tab').value);location.reload();" />
|
||||
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
/* initialize the popup request from the parent */
|
||||
|
||||
if(window.document.forms['popup_query_form'].request_data.value == "")
|
||||
{
|
||||
window.document.forms['popup_query_form'].request_data.value
|
||||
= JSON.stringify(window.opener.get_popup_request_data());
|
||||
}
|
||||
// cn: bug 8104 - escaped unicode sequence printing out escaped values
|
||||
var account_name = document.getElementById('account_name').value;
|
||||
document.getElementById('account_name').value = unescape(account_name);
|
||||
-->
|
||||
|
||||
</script>
|
||||
|
||||
<p>
|
||||
<div id='addformlink'>{CREATEBUTTON}
|
||||
<div id='addform' style='display:none;position:relative;z-index:2;left:0px;top:0px;'>
|
||||
<form name="ContactLeadSave" onsubmit="return check_form('ContactLeadSave');" method="post" action="index.php">
|
||||
{ADDFORMHEADER}
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="tabForm">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr><td>
|
||||
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
||||
<input type="hidden" name="action" value="Popup" />
|
||||
<input type="hidden" name="doAction" value="save" />
|
||||
<input type="hidden" name="query" value="true" />
|
||||
{ADDFORM}
|
||||
</td></tr>
|
||||
</table></td></tr></table>
|
||||
</form>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<!-- END: SearchHeader -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="listView">
|
||||
<!-- BEGIN: list_nav_row -->
|
||||
{PAGINATION}
|
||||
{PAG}
|
||||
<!-- END: list_nav_row -->
|
||||
<tr height="20">
|
||||
<td scope="col" class="listViewThS1" NOWRAP>{CHECKALL}</td>
|
||||
<td scope="col" width="40%" class="listViewThS1" nowrap="nowrap"><a href="{ORDER_BY}last_name" class="listViewThLinkS1">{MOD.LBL_LIST_CONTACTLEAD_NAME}{arrow_start}{last_name_arrow}{arrow_end}</a></td>
|
||||
<td scope="col" width="20%" class="listViewThS1" nowrap="nowrap"><a href="{ORDER_BY}title" class="listViewThLinkS1">{MOD.LBL_LIST_TITLE}{arrow_start}{title_arrow}{arrow_end}</a></td>
|
||||
<td scope="col" width="40%" class="listViewThS1" nowrap="nowrap">{MOD.LBL_LIST_ACCOUNT_NAME}</td>
|
||||
</tr>
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20"
|
||||
onmouseover="setPointer(this, '{CONTACTLEAD.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
|
||||
onmouseout="setPointer(this, '{CONTACTLEAD.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
|
||||
onmousedown="setPointer(this, '{CONTACTLEAD.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
|
||||
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>{PREROW}</td>
|
||||
<td scope='row' valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><a href="#" onclick="send_back('ContactLeads','{CONTACTLEAD.ID}');" class="listViewTdLinkS1">{CONTACTLEAD.FULL_NAME}</a></td>
|
||||
<td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{CONTACTLEAD.TITLE}</td>
|
||||
<td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{CONTACTLEAD.ACCOUNT_NAME}</td>
|
||||
</tr>
|
||||
<tr><td colspan="20" class="listViewHRS1"></td></tr>
|
||||
<!-- END: row -->
|
||||
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
function save_checks(offset,n) {
|
||||
checked_ids = Array();
|
||||
for (i = 0; i < document.MassUpdate.elements.length; i++){
|
||||
if(document.MassUpdate.elements[i].name == 'mass[]' && document.MassUpdate.elements[i].checked) {
|
||||
temp_string = '';
|
||||
temp_string += '"' + document.MassUpdate.elements[i].value + '": {';
|
||||
for(the_key in associated_javascript_data[document.MassUpdate.elements[i].value]) {
|
||||
temp_string += '"' + the_key + '":"' + associated_javascript_data[document.MassUpdate.elements[i].value][the_key] + '",';
|
||||
}
|
||||
temp_string = temp_string.substring(0,temp_string.length - 1);
|
||||
temp_string += '}';
|
||||
checked_ids.push(temp_string);
|
||||
}
|
||||
}
|
||||
document.MassUpdate.saved_associated_data.value = escape('{' + checked_ids.join(',') + '}');
|
||||
|
||||
document.MassUpdate.action.value = "Popup";
|
||||
document.MassUpdate.ContactLeads_CONTACTLEAD_offset.value = offset;
|
||||
document.MassUpdate.submit();
|
||||
}
|
||||
// reassigned the saved data from the saved checks
|
||||
if(typeof(document.MassUpdate) != 'undefined' && document.MassUpdate.saved_associated_data.value != '') {
|
||||
temp_array = [];
|
||||
for(the_key in temp_array) {
|
||||
associated_javascript_data[the_key] = temp_array[the_key];
|
||||
}
|
||||
}
|
||||
|
||||
// save checks across pages for multiselects
|
||||
if(typeof(document.MassUpdate) != "undefined") {
|
||||
checked_items = Array();
|
||||
inputs_array = document.MassUpdate.elements;
|
||||
|
||||
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
||||
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].style.display == "none") {
|
||||
checked_items.push(inputs_array[wp].value);
|
||||
}
|
||||
}
|
||||
for(i in checked_items) {
|
||||
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
||||
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].value == checked_items[i]) {
|
||||
inputs_array[wp].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
{ASSOCIATED_JAVASCRIPT_DATA}
|
||||
|
||||
<!-- END: main -->
|
||||
840
modules/ContactLeads/Popup_picker.php
Normal file
840
modules/ContactLeads/Popup_picker.php
Normal file
@@ -0,0 +1,840 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Popup Picker
|
||||
*
|
||||
* The contents of this file are subject to the SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $theme;
|
||||
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
require_once('modules/ContactLeads/ContactLeadFormBase.php');
|
||||
require_once('themes/'.$theme.'/layout_utils.php');
|
||||
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
class Popup_Picker
|
||||
{
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function Popup_Picker()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function _get_where_clause(){
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query'])){
|
||||
$where_clauses = array();
|
||||
append_where_clause($where_clauses, "first_name", "contactleads.first_name");
|
||||
append_where_clause($where_clauses, "last_name", "contactleads.last_name");
|
||||
append_where_clause($where_clauses, "first_name_advanced", "contactleads.first_name");
|
||||
append_where_clause($where_clauses, "last_name_advanced", "contactleads.last_name");
|
||||
append_where_clause($where_clauses, "address_postalcode", "contactleads.primary_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_postalcode_advanced", "contactleads.primary_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_street", "contactleads.primary_address_street");
|
||||
append_where_clause($where_clauses, "address_street_advanced", "contactleads.primary_address_street");
|
||||
append_where_clause($where_clauses, "address_city", "contactleads.primary_address_city");
|
||||
append_where_clause($where_clauses, "address_city_advanced", "contactleads.primary_address_city");
|
||||
append_where_clause($where_clauses, "address_country", "contactleads.primary_address_country");
|
||||
append_where_clause($where_clauses, "address_country_advanced", "contactleads.primary_address_country");
|
||||
append_where_clause($where_clauses, "address_state", "contactleads.primary_address_state");
|
||||
append_where_clause($where_clauses, "address_state_advanced", "contactleads.primary_address_state");
|
||||
append_where_clause($where_clauses, "phone", "contactleads.phone_work");
|
||||
append_where_clause($where_clauses, "phone_advanced", "contactleads.phone_work");
|
||||
append_where_clause($where_clauses, "account_id", "accounts.id");
|
||||
append_where_clause($where_clauses, "account_id_advanced", "accounts.id");
|
||||
append_where_clause($where_clauses, "account_name", "accounts.name");
|
||||
append_where_clause($where_clauses, "account_name_advanced", "accounts.name");
|
||||
append_where_clause($where_clauses, "assistant", "contactleads.assistant");
|
||||
append_where_clause($where_clauses, "assistant_advanced", "contactleads.assistant");
|
||||
append_where_clause($where_clauses, "do_not_call_advanced", "contactleads.do_not_call");
|
||||
//append_where_clause($where_clauses, "assigned_user_id", "contactleads.assigned_user_id");
|
||||
if(($_REQUEST['foreign_contactlead_advanced']==1 || $_REQUEST['foreign_contactlead_advanced']==0) && !isset($_REQUEST['foreign_contactlead_advanced']))append_where_clause($where_clauses, "foreign_contactlead_advanced", "contactleads.foreign_contactlead");
|
||||
if(($_REQUEST['mailing_tag_advanced']==1 || $_REQUEST['mailing_tag_advanced']==0) && !isset($_REQUEST['mailing_tag_advanced']))append_where_clause($where_clauses, "mailing_tag_advanced", "contactleads.mailing_tag");
|
||||
if(count($_REQUEST['assigned_user_id'])>0){
|
||||
foreach($_REQUEST['assigned_user_id'] as $au){
|
||||
$where_clauses[]="contactleads.assigned_user_id='".$au."'";
|
||||
}
|
||||
}
|
||||
if(count($_REQUEST['assigned_user_id_advanced'])>0){
|
||||
foreach($_REQUEST['assigned_user_id_advanced'] as $au){
|
||||
$where_clauses[]="contactleads.assigned_user_id='".$au."'";
|
||||
}
|
||||
}
|
||||
if($_REQUEST['only_my_items'])$where_clauses[]="contactleads.assigned_user_id='".$_SESSION['authenticated_user_id']."'";
|
||||
/*append_where_clause($where_clauses, "address_postalcode", "contactleads.alt_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_street", "contactleads.alt_address_street");
|
||||
append_where_clause($where_clauses, "address_city", "contactleads.alt_address_city");
|
||||
append_where_clause($where_clauses, "address_country", "contactleads.alt_address_country");
|
||||
append_where_clause($where_clauses, "address_state", "contactleads.alt_address_state");*/
|
||||
|
||||
//append_where_clause($where_clauses, "assigned_user_advanced", "contactleads.assigned_user_id");
|
||||
$where = generate_where_statement($where_clauses);
|
||||
echo $where;
|
||||
}
|
||||
return $where;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page_dial()
|
||||
{
|
||||
global $system_config;
|
||||
/*
|
||||
* CHECK IF USER WOULD LIKE TO USE PRO VERSION
|
||||
*/
|
||||
if( isset($system_config->settings['system_asterisk_pro']) && $system_config->settings['system_asterisk_pro'] == 1)
|
||||
{
|
||||
$asterisk_popup='include/asterisk/Asterisk_popup.tpl';
|
||||
$pro='include/asterisk/pro.php';
|
||||
/*
|
||||
* CHECK THAT ALL NECESSARY FILES FOR PRO VERSION ARE AVAILABLE
|
||||
*/
|
||||
if( file_exists($asterisk_popup) && file_exists($pro) ){
|
||||
require_once('include/asterisk/pro.php');
|
||||
proLogic();
|
||||
}
|
||||
/*
|
||||
* IF ALL FILES ARE NOT THERE THEN DISPLAY WHERE THEY ARE AVAILABLE AT
|
||||
*/
|
||||
else
|
||||
{
|
||||
/*
|
||||
* TRYING TO USE PRO WITHOUT NECESSARY FILES
|
||||
*/
|
||||
echo "<html><body onLoad=\"javascript:self.resizeTo(400,130)\"><center><font color='red'><br>Either the PRO version is not enabled or you are not using the PRO version. For more information you may visit <a href='http://www.voicerd.com/products.php'>http://www.voicerd.com/products.php</a><br> or email VoiceRD ( <a href='mailto:voicerd@novacoast.com?subject=Acquiring SugarCRM Pro'>voicerd@novacoast.com</a> )</font></center></body></html>";
|
||||
}
|
||||
}
|
||||
/*
|
||||
* USE THE OPEN SOURCE VERSION
|
||||
*/
|
||||
else{
|
||||
$this->openSourceLogic();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function openSourceLogic()
|
||||
{
|
||||
global $system_config;
|
||||
global $current_user;
|
||||
|
||||
$display_number = $_REQUEST['number'];
|
||||
//remove anything that is not a number or an asterisk(*)
|
||||
$number = preg_replace ( "/[^\d\*]/", "", $_REQUEST['number'] );
|
||||
|
||||
/*
|
||||
* If there is a prefix to be dialed then pre-pend that to the number that will be dialed
|
||||
*/
|
||||
if(!isset($system_config->settings['system_asterisk_prefix']) || $system_config->settings['system_asterisk_prefix'] != "" )
|
||||
{
|
||||
/*
|
||||
* Grab the prefix number and remove anything that is not a number or an asterisk(*)
|
||||
*/
|
||||
$prefix = $system_config->settings['system_asterisk_prefix'];
|
||||
$prefix = preg_replace ( "/[^\d\*]/", "", $prefix );
|
||||
/*
|
||||
* Pre-prend the prefix to the dial number and to the display number
|
||||
*/
|
||||
$display_number = $prefix."+".$display_number;
|
||||
$number = $prefix.$number;
|
||||
}
|
||||
|
||||
/*
|
||||
* If asterisk port was left empty in admin setting then default to 5038
|
||||
*/
|
||||
if(!isset($system_config->settings['system_asterisk_port']) || $system_config->settings['system_asterisk_port'] == "" )
|
||||
$system_config->settings['system_asterisk_port'] = "5038";
|
||||
|
||||
/*
|
||||
* If asterisk internal context was left empty in admin settings then default to "from-internal"
|
||||
*/
|
||||
if(!isset($system_config->settings['system_asterisk_internal_context']) || $system_config->settings['system_asterisk_internal_context'] == "" )
|
||||
$system_config->settings['system_asterisk_internal_context'] = "from-internal";
|
||||
|
||||
/*
|
||||
* If asterisk external context was left empty in admin settings then default to "from-internal"
|
||||
*/
|
||||
if(!isset($system_config->settings['system_asterisk_external_context']) || $system_config->settings['system_asterisk_external_context'] == "" )
|
||||
$system_config->settings['system_asterisk_external_context'] = "from-internal";
|
||||
|
||||
/*
|
||||
* If asterisk auto pickup is blank default to *3
|
||||
*/
|
||||
if(!isset($system_config->settings['system_asterisk_auto_pickup']) || $system_config->settings['system_asterisk_auto_pickup'] == "" )
|
||||
$system_config->settings['system_asterisk_auto_pickup'] = "*3";
|
||||
|
||||
/*
|
||||
* if any of the required fields were left empty in admin settings then signal error.
|
||||
*/
|
||||
if( !isset($system_config->settings['system_asterisk_server']) || $system_config->settings['system_asterisk_server'] == "" || !isset($system_config->settings['system_asterisk_username']) || $system_config->settings['system_asterisk_username'] == "" || !isset($system_config->settings['system_asterisk_secret']) || $system_config->settings['system_asterisk_secret'] == "" )
|
||||
{
|
||||
return "Asterisk Configuration Error.";
|
||||
}
|
||||
/*
|
||||
* If all required fields are filled in then dial
|
||||
*/
|
||||
else
|
||||
{
|
||||
//HTML code
|
||||
$output_html="<html>";
|
||||
if( isset($system_config->settings['system_asterisk_popup_timer']) && $system_config->settings['system_asterisk_popup_timer'] !="" )
|
||||
{
|
||||
$output_html.= "<body onLoad=\"javascript:self.resizeTo(350,130);setTimeout(window.close,".($system_config->settings['system_asterisk_popup_timer']*1000).")\">";
|
||||
}
|
||||
else
|
||||
{
|
||||
$output_html="<body onLoad=\"javascript:self.resizeTo(350,130)\">";
|
||||
}
|
||||
$output_html.=<<<EOQ
|
||||
<table width='100%' colspacing='0' colpadding'0'>
|
||||
<tr>
|
||||
<th align='center'><font size='5'>Dialing...$display_number</font></th>
|
||||
</tr><!--<tr>
|
||||
<th valign='bottom' align='center'><font color='red'><br>Go to <a href='http://www.voicerd.com/products.php'>http://www.voicerd.com/products.php</a><br>for more information or email <a href='mailto:ehoward@novacoast.com?subject=Acquiring SugarCRM Pro'>ehoward@novacoast.com</a></font></th>
|
||||
</tr>-->
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
EOQ;
|
||||
|
||||
///If user has auto pickup selected then pre-pend
|
||||
if(isset($current_user->asterisk_auto_pickup) && $current_user->asterisk_auto_pickup == '1'){
|
||||
$number = $system_config->settings['system_asterisk_auto_pickup'].$number;
|
||||
}
|
||||
|
||||
//Asterisk DialCode
|
||||
$timeout = 30;
|
||||
$socket = fsockopen( $system_config->settings['system_asterisk_server'],$system_config->settings['system_asterisk_port'], $errno, $errstr, $timeout);
|
||||
if(!$socket){ die("Error Connecting to Asterisk Server"); }
|
||||
fputs($socket, "Action: Login\r\n");
|
||||
fputs($socket, "UserName: ".$system_config->settings['system_asterisk_username']."\r\n");
|
||||
fputs($socket, "Secret: ".$system_config->settings['system_asterisk_secret']."\r\n\r\n");
|
||||
fputs($socket, "Action: Originate\r\n");
|
||||
//Partially contributed by SugarForge User mikeyb
|
||||
$callerid = $current_user->asterisk_extension;
|
||||
if (strpos($current_user->asterisk_extension, '/') === false) {
|
||||
fputs($socket, "Channel: Local/".$current_user->asterisk_extension."@".$system_config->settings['system_asterisk_internal_context']."\r\n");
|
||||
} else {
|
||||
fputs($socket, "Channel: ".$current_user->asterisk_extension."\r\n");
|
||||
}
|
||||
fputs($socket, "Context: ".$system_config->settings['system_asterisk_external_context']."\r\n");
|
||||
fputs($socket, "Exten: ".$number."\r\n");
|
||||
fputs($socket, "Priority: 1\r\n");
|
||||
fputs($socket, "Callerid: ".$current_user->asterisk_extension."\r\n\r\n");
|
||||
$wrets=fgets($socket,128);
|
||||
echo $output_html;
|
||||
}
|
||||
}
|
||||
////////END ASTERISK PATCH////////
|
||||
function process_page()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$formBase = new ContactLeadFormBase();
|
||||
if(isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'save')
|
||||
{
|
||||
$formBase->handleSave('', false, true);
|
||||
}
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
|
||||
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
|
||||
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
|
||||
|
||||
// TODO: cleanup the construction of $addform
|
||||
$formbody = $formBase->getFormBody('','','EmailEditView');
|
||||
$addform = '<table><tr><td nowrap="nowrap" valign="top">'
|
||||
.str_replace('<br>', '</td><td nowrap="nowrap" valign="top"> ', $formbody)
|
||||
. '</td></tr></table>'
|
||||
. '<input type="hidden" name="action" value="Popup" />';
|
||||
$formSave = <<<EOQ
|
||||
<input type="submit" name="button" class="button" title="$lbl_save_button_title" accesskey="$lbl_save_button_key" value=" $lbl_save_button_label " />
|
||||
<input type="button" name="button" class="button" title="{$app_strings['LBL_CANCEL_BUTTON_TITLE']}" accesskey="{$app_strings['LBL_CANCEL_BUTTON_KEY']}" value="{$app_strings['LBL_CANCEL_BUTTON_LABEL']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$createContactLead = <<<EOQ
|
||||
<input type="button" name="showAdd" class="button" value="{$mod_strings['LNK_NEW_CONTACTLEAD']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$addformheader = get_form_header($mod_strings['LNK_NEW_CONTACTLEAD'], $formSave, false);
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
//if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
|
||||
$multi_select=true;
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('ContactLeads',document.MassUpdate,'mass[]','" .$app_strings['ERR_NOTHING_SELECTED']."');\" title='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']." ' />\n";
|
||||
//}
|
||||
//END:FOR MULTI-SELECT
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
//$button.="<input type='hidden' name='saved_associated_data' value=''><input type='hidden' name='ContactLeads_CONTACTLEAD_offset' id='ContactLeads_CONTACTLEAD_offset' value='".$_REQUEST['ContactLeads_CONTACTLEAD_offset']."'>";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$form = new XTemplate('modules/ContactLeads/Popup_picker.html');
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
|
||||
$fields=array("first_name","last_name","address_postalcode","address_street","address_state","address_city","address_country","phone","account_id","account_name","assistant","assigned_user_id");
|
||||
|
||||
foreach($fields as $f){
|
||||
if($_REQUEST[$f])$form->assign(strtoupper($f),$_REQUEST[$f]);
|
||||
else $form->assign(strtoupper($f),$_REQUEST[$f."_advanced"]);
|
||||
}
|
||||
|
||||
$w=mysql_query("select id,first_name,last_name from users where status='Active' and deleted='0' order by first_name asc, last_name asc");
|
||||
while($r=mysql_fetch_array($w)){
|
||||
$atr.='<option value="'.$r['id'].'"';
|
||||
if(@in_array($r['id'],$_REQUEST['assigned_user_id_advanced']))$atr.=' selected';
|
||||
$atr.='>'.$r['first_name'].' '.$r['last_name'].'</option>';
|
||||
}
|
||||
if($_REQUEST['tab'])$form->assign("TABB",$_REQUEST['tab']);
|
||||
else $form->assign("TABB","basic");
|
||||
|
||||
|
||||
$form->assign('ASSIGNED_TO_LIST',$atr);
|
||||
$atr="";
|
||||
$arr=array(""=>"","1"=>"Yes","0"=>"No");
|
||||
foreach($arr as $k=>$v){
|
||||
$atr.='<option value="'.$k.'"';
|
||||
if($k==$_REQUEST['foreign_contactlead_advanced'])$atr.=' selected';
|
||||
$atr.='>'.$v.'</option>';
|
||||
}
|
||||
$form->assign('FOREIGN_CONTACTLEAD',$atr);
|
||||
$atr="";
|
||||
$arr=array(""=>"","1"=>"Yes","0"=>"No");
|
||||
foreach($arr as $k=>$v){
|
||||
$atr.='<option value="'.$k.'"';
|
||||
if($k==$_REQUEST['mailing_tag_advanced'])$atr.=' selected';
|
||||
$atr.='>'.$v.'</option>';
|
||||
}
|
||||
$form->assign('MAILING_TAG',$atr);
|
||||
|
||||
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('CREATECONTACTLEAD', $createContactLead);
|
||||
$form->assign('ADDFORMHEADER', $addformheader);
|
||||
$form->assign('ADDFORM', $addform);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
$form->assign('request_data', $request_data);
|
||||
//if(!$_REQUEST['ContactLeads_CONTACTLEAD_offset'])$offset=0;
|
||||
//else $offset=$_REQUEST['ContactLeads_CONTACTLEAD_offset']+20;
|
||||
//print_r($_REQUEST);
|
||||
if(!isset($_REQUEST['ContactLeads_CONTACTLEAD_offset'])){
|
||||
$form->assign("PAG","<input type='hidden' name='saved_associated_data' value=''>
|
||||
<input type='hidden' name='ContactLeads_CONTACTLEAD_offset' id='ContactLeads_CONTACTLEAD_offset' value='0'>".$button);
|
||||
|
||||
}
|
||||
else{
|
||||
$form->assign("PAG",$button);
|
||||
}
|
||||
|
||||
$form->assign('offset',$offset);
|
||||
$form->assign('DIV',$_REQUEST['div']);
|
||||
$form->assign('PRE',$_REQUEST['pre']);
|
||||
if($_REQUEST['only_my_items'])$form->assign("OMI_CHECKED","checked");
|
||||
|
||||
$dnc.='<option value="" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="")$dnc.='selected="selected"';
|
||||
$dnc.='></option>';
|
||||
$dnc.='<option value="0" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="0")$dnc.='selected="selected"';
|
||||
$dnc.='> No</option>';
|
||||
$dnc.='<option value="1" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="1")$dnc.='selected="selected"';
|
||||
$dnc.='> Yes</option';
|
||||
$form->assign('DO_NOT_CALL_LIST',$dnc);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new ContactLead();
|
||||
$ListView = new ListView();
|
||||
$ListView->display_header_and_footer=false;
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->setQuery($where, '', '', 'CONTACTLEAD');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
$ListView->multi_select_popup=true;
|
||||
|
||||
ob_start();
|
||||
$ListView->processListView($seed_bean, 'main', 'CONTACTLEAD');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
|
||||
function process_page_for_merge()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
//START:FOR MULTI-SELECT
|
||||
$multi_select=false;
|
||||
if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
|
||||
$multi_select=true;
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('ContactLeads',document.MassUpdate,'mass[]','" .$app_strings['ERR_NOTHING_SELECTED']."');\" title='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
//END:FOR MULTI-SELECT
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/ContactLeads/Popup_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$form->assign('request_data', $request_data);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new ContactLead();
|
||||
$ListView = new ListView();
|
||||
$ListView->display_header_and_footer=false;
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->multi_select_popup=$multi_select;
|
||||
if ($multi_select) $ListView->xTemplate->assign("TAG_TYPE","SPAN"); else $ListView->xTemplate->assign("TAG_TYPE","A");
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setQuery($where, '', 'contactleads.last_name, contactleads.first_name', 'CONTACTLEAD');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false);
|
||||
//BEGIN ATHENA CUSTOMIZATION - rsmith
|
||||
$query = $_REQUEST['select'].' WHERE '.$_REQUEST['where']."'".$_REQUEST['id']."'";
|
||||
|
||||
//$response = $seed_bean->process_list_query($_REQUEST['select'], 0, -1, -1, $_REQUEST['where']."'".$_REQUEST['id']."'");
|
||||
|
||||
$result = $seed_bean->db->query($query,true,"Error retrieving $seed_bean->object_name list: ");
|
||||
|
||||
$list = Array();
|
||||
if(empty($rows_found))
|
||||
{
|
||||
$rows_found = $seed_bean->db->getRowCount($result);
|
||||
}
|
||||
|
||||
$row_offset = 0;
|
||||
global $sugar_config;
|
||||
$max_per_page = $sugar_config['list_max_entries_per_page'];
|
||||
|
||||
while(($row = $seed_bean->db->fetchByAssoc($result)) != null)
|
||||
{
|
||||
$seed_bean = new ContactLead();
|
||||
foreach($seed_bean->field_defs as $field=>$value)
|
||||
{
|
||||
if (isset($row[$field]))
|
||||
{
|
||||
$seed_bean->$field = $row[$field];
|
||||
}
|
||||
else if (isset($row[$seed_bean->table_name .'.'.$field]))
|
||||
{
|
||||
$seed_bean->$field = $row[$seed_bean->table_name .'.'.$field];
|
||||
}
|
||||
else
|
||||
{
|
||||
$seed_bean->$field = "";
|
||||
}
|
||||
}
|
||||
$seed_bean->fill_in_additional_list_fields();
|
||||
|
||||
$list[] = $seed_bean;
|
||||
}
|
||||
|
||||
$ListView->processListViewTwo($list, 'main', 'CONTACTLEAD');
|
||||
|
||||
//END ATHENA CUSTOMIZATION - rsmith
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page_for_email()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
//START:FOR MULTI-SELECT
|
||||
$multi_select=false;
|
||||
if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
|
||||
$multi_select=true;
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('ContactLeads',document.MassUpdate,'mass[]','" .$app_strings['ERR_NOTHING_SELECTED']."');\" title='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
//END:FOR MULTI-SELECT
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/ContactLeads/Popup_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new ContactLead();
|
||||
$ListView = new ListView();
|
||||
$ListView->display_header_and_footer=false;
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->multi_select_popup=$multi_select;
|
||||
if ($multi_select) $ListView->xTemplate->assign("TAG_TYPE","SPAN"); else $ListView->xTemplate->assign("TAG_TYPE","A");
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setQuery($where, '', 'contactleads.last_name, contactleads.first_name', 'CONTACTLEAD');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false);
|
||||
$ListView->processListView($seed_bean, 'main', 'CONTACTLEAD');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page_for_address()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$formBase = new ContactLeadFormBase();
|
||||
if(isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'save')
|
||||
{
|
||||
|
||||
$formBase->handleSave('', false, true);
|
||||
}
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
|
||||
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
|
||||
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
|
||||
|
||||
// TODO: cleanup the construction of $addform
|
||||
$formbody = $formBase->getFormBody('','','EmailEditView');
|
||||
$addform = '<table><tr><td nowrap="nowrap" valign="top">'
|
||||
.str_replace('<br>', '</td><td nowrap="nowrap" valign="top"> ', $formbody)
|
||||
. '</td></tr></table>'
|
||||
. '<input type="hidden" name="action" value="Popup" />';
|
||||
$formSave = <<<EOQ
|
||||
<input type="submit" name="button" class="button" title="$lbl_save_button_title" accesskey="$lbl_save_button_key" value=" $lbl_save_button_label " />
|
||||
<input type="button" name="button" class="button" title="{$app_strings['LBL_CANCEL_BUTTON_TITLE']}" accesskey="{$app_strings['LBL_CANCEL_BUTTON_KEY']}" value="{$app_strings['LBL_CANCEL_BUTTON_LABEL']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$createContactLead = <<<EOQ
|
||||
<input type="button" name="showAdd" class="button" value="{$mod_strings['LNK_NEW_CONTACTLEAD']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$addformheader = get_form_header($mod_strings['LNK_NEW_CONTACTLEAD'], $formSave, false);
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/ContactLeads/Address_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
//$form->assign('CREATECONTACTLEAD', $createContactLead);
|
||||
$form->assign('ADDFORMHEADER', $addformheader);
|
||||
$form->assign('ADDFORM', $addform);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
$form->assign('request_data', $request_data);
|
||||
|
||||
// fill in for mass update
|
||||
$button = "<input type='hidden' name='module' value='ContactLeads'><input type='hidden' id='form_action' name='action' value='index'><input type='hidden' name='massupdate' value='true'><input type='hidden' name='delete' value='false'><input type='hidden' name='mass' value='Array'><input type='hidden' name='Update' value='Update'>";
|
||||
if(isset($_REQUEST['mass']) && is_array($_REQUEST['mass'])) {
|
||||
foreach(array_unique($_REQUEST['mass']) as $record) {
|
||||
$button .= "<input style='display: none' checked type='checkbox' name='mass[]' value='$record'>\n";
|
||||
}
|
||||
}
|
||||
$button .= "<input type='hidden' name='saved_associated_data' value=''>";
|
||||
$button .= "<input type='hidden' name='query' value='true'>";
|
||||
$button .= "<input type='hidden' name='close_window' value='true'>";
|
||||
$button .= "<input type='hidden' name='html' value='change_address'>";
|
||||
$button .= "<input type='hidden' name='account_name' value='$account_name'>";
|
||||
$button .= "<span style='display: none'><textarea name='primary_address_street'>" . str_replace("<br>", "\n", $_REQUEST["primary_address_street"]) . "</textarea></span>";
|
||||
$button .= "<input type='hidden' name='primary_address_city' value='". $_REQUEST["primary_address_city"] ."'>";
|
||||
$button .= "<input type='hidden' name='primary_address_state' value='". $_REQUEST["primary_address_state"] ."'>";
|
||||
$button .= "<input type='hidden' name='primary_address_postalcode' value='". $_REQUEST["primary_address_postalcode"] ."'>";
|
||||
$button .= "<input type='hidden' name='primary_address_country' value='". $_REQUEST["primary_address_country"] ."'>";
|
||||
//$button .= "<input type='hidden' name='ContactLeads_CONTACTLEAD_offset' value=''>";
|
||||
$button .= "<input title='".$mod_strings['LBL_COPY_ADDRESS_CHECKED']."' class='button' LANGUAGE=javascript type='submit' name='button' value=' ".$mod_strings['LBL_COPY_ADDRESS_CHECKED']." '>\n";
|
||||
$button .= "<input title='".$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accessKey='".$app_strings['LBL_CANCEL_BUTTON_KEY']."' class='button' LANGUAGE=javascript onclick=\"window.close()\" type='submit' name='button' value=' ".$app_strings['LBL_CANCEL_BUTTON_LABEL']." '>\n";
|
||||
|
||||
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
//$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
//$form->parse('main.SearchHeader');
|
||||
//$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new ContactLead();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->multi_select_popup=true;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->setQuery($where, '', '', 'CONTACTLEAD');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
|
||||
ob_start();
|
||||
$ListView->processListViewMulti($seed_bean, 'main', 'CONTACTLEAD');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// Regular Expression to override sListView
|
||||
$exp = '/sListView.save_checks/si';
|
||||
$change = 'save_checks';
|
||||
$output_html = preg_replace(array($exp), array($change), $output_html);
|
||||
$output_html .= '<script>
|
||||
|
||||
checked_items = Array();
|
||||
inputs_array = document.MassUpdate.elements;
|
||||
|
||||
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
||||
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].style.display == "none") {
|
||||
checked_items.push(inputs_array[wp].value);
|
||||
}
|
||||
}
|
||||
for(i in checked_items) {
|
||||
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
||||
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].value == checked_items[i]) {
|
||||
inputs_array[wp].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>';
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
}
|
||||
?>
|
||||
645
modules/ContactLeads/Popup_picker1.php
Normal file
645
modules/ContactLeads/Popup_picker1.php
Normal file
@@ -0,0 +1,645 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Popup Picker
|
||||
*
|
||||
* The contents of this file are subject to the SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $theme;
|
||||
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
require_once('modules/ContactLeads/ContactLeadFormBase.php');
|
||||
require_once('themes/'.$theme.'/layout_utils.php');
|
||||
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
class Popup_Picker
|
||||
{
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function Popup_Picker()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function _get_where_clause(){
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query'])){
|
||||
$where_clauses = array();
|
||||
append_where_clause($where_clauses, "first_name", "contactleads.first_name");
|
||||
append_where_clause($where_clauses, "last_name", "contactleads.last_name");
|
||||
append_where_clause($where_clauses, "first_name_advanced", "contactleads.first_name");
|
||||
append_where_clause($where_clauses, "last_name_advanced", "contactleads.last_name");
|
||||
append_where_clause($where_clauses, "address_postalcode", "contactleads.primary_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_postalcode_advanced", "contactleads.primary_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_street", "contactleads.primary_address_street");
|
||||
append_where_clause($where_clauses, "address_street_advanced", "contactleads.primary_address_street");
|
||||
append_where_clause($where_clauses, "address_city", "contactleads.primary_address_city");
|
||||
append_where_clause($where_clauses, "address_city_advanced", "contactleads.primary_address_city");
|
||||
append_where_clause($where_clauses, "address_country", "contactleads.primary_address_country");
|
||||
append_where_clause($where_clauses, "address_country_advanced", "contactleads.primary_address_country");
|
||||
append_where_clause($where_clauses, "address_state", "contactleads.primary_address_state");
|
||||
append_where_clause($where_clauses, "address_state_advanced", "contactleads.primary_address_state");
|
||||
append_where_clause($where_clauses, "phone", "contactleads.phone_work");
|
||||
append_where_clause($where_clauses, "phone_advanced", "contactleads.phone_work");
|
||||
append_where_clause($where_clauses, "account_id", "accounts.id");
|
||||
append_where_clause($where_clauses, "account_id_advanced", "accounts.id");
|
||||
append_where_clause($where_clauses, "account_name", "accounts.name");
|
||||
append_where_clause($where_clauses, "account_name_advanced", "accounts.name");
|
||||
append_where_clause($where_clauses, "assistant", "contactleads.assistant");
|
||||
append_where_clause($where_clauses, "assistant_advanced", "contactleads.assistant");
|
||||
append_where_clause($where_clauses, "do_not_call_advanced", "contactleads.do_not_call");
|
||||
//append_where_clause($where_clauses, "assigned_user_id", "contactleads.assigned_user_id");
|
||||
//append_where_clause($where_clauses, "assigned_user_id_advanced", "contactleads.assigned_user_id");
|
||||
if(count($_REQUEST['assigned_user_id'])>0){
|
||||
foreach($_REQUEST['assigned_user_id'] as $au){
|
||||
$where_clauses[]="contactleads.assigned_user_id='".$au."'";
|
||||
}
|
||||
}
|
||||
if(count($_REQUEST['assigned_user_id_advanced'])>0){
|
||||
foreach($_REQUEST['assigned_user_id_advanced'] as $au){
|
||||
$where_clauses[]="contactleads.assigned_user_id='".$au."'";
|
||||
}
|
||||
}
|
||||
if($_REQUEST['only_my_items'])$where_clauses[]="contactleads.assigned_user_id='".$_SESSION['authenticated_user_id']."'";
|
||||
/*append_where_clause($where_clauses, "address_postalcode", "contactleads.alt_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_street", "contactleads.alt_address_street");
|
||||
append_where_clause($where_clauses, "address_city", "contactleads.alt_address_city");
|
||||
append_where_clause($where_clauses, "address_country", "contactleads.alt_address_country");
|
||||
append_where_clause($where_clauses, "address_state", "contactleads.alt_address_state");*/
|
||||
|
||||
//append_where_clause($where_clauses, "assigned_user_advanced", "contactleads.assigned_user_id");
|
||||
$where = generate_where_statement($where_clauses);
|
||||
}
|
||||
return $where;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page_for_email()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$formBase = new ContactLeadFormBase();
|
||||
if(isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'save')
|
||||
{
|
||||
$formBase->handleSave('', false, true);
|
||||
}
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
|
||||
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
|
||||
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
|
||||
|
||||
// TODO: cleanup the construction of $addform
|
||||
$formbody = $formBase->getFormBody('','','EmailEditView');
|
||||
$addform = '<table><tr><td nowrap="nowrap" valign="top">'
|
||||
.str_replace('<br>', '</td><td nowrap="nowrap" valign="top"> ', $formbody)
|
||||
. '</td></tr></table>'
|
||||
. '<input type="hidden" name="action" value="Popup" />';
|
||||
$formSave = <<<EOQ
|
||||
<input type="submit" name="button" class="button" title="$lbl_save_button_title" accesskey="$lbl_save_button_key" value=" $lbl_save_button_label " />
|
||||
<input type="button" name="button" class="button" title="{$app_strings['LBL_CANCEL_BUTTON_TITLE']}" accesskey="{$app_strings['LBL_CANCEL_BUTTON_KEY']}" value="{$app_strings['LBL_CANCEL_BUTTON_LABEL']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$createContactLead = <<<EOQ
|
||||
<input type="button" name="showAdd" class="button" value="{$mod_strings['LNK_NEW_CONTACTLEAD']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$addformheader = get_form_header($mod_strings['LNK_NEW_CONTACTLEAD'], $formSave, false);
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
|
||||
$fields=array("first_name","last_name","address_postalcode","address_street","address_state","address_city","address_country","phone","account_id","account_name","assistant","assigned_user_id");
|
||||
|
||||
foreach($fields as $f){
|
||||
if($_REQUEST[$f])$form->assign(strtoupper($f),$_REQUEST[$f]);
|
||||
else $form->assign(strtoupper($f),$_REQUEST[$f."_advanced"]);
|
||||
}
|
||||
|
||||
$w=mysql_query("select id,first_name,last_name from users where status='Active' and deleted='0' order by first_name asc, last_name asc");
|
||||
while($r=mysql_fetch_array($w)){
|
||||
$atr.='<option value="'.$r['id'].'"';
|
||||
if(@in_array($r['id'],$_REQUEST['assigned_user_id_advanced']))$atr.=' selected';
|
||||
$atr.='>'.$r['first_name'].' '.$r['last_name'].'</option>';
|
||||
}
|
||||
if($_REQUEST['tab'])$form->assign("TABB",$_REQUEST['tab']);
|
||||
else $form->assign("TABB","basic");
|
||||
|
||||
$form = new XTemplate('modules/ContactLeads/Email_picker.html');
|
||||
$form->assign('ASSIGNED_TO_LIST',$atr);
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('CREATECONTACTLEAD', $createContactLead);
|
||||
$form->assign('ADDFORMHEADER', $addformheader);
|
||||
$form->assign('ADDFORM', $addform);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
$form->assign('request_data', $request_data);
|
||||
$form->assign('DIV',$_REQUEST['div']);
|
||||
$form->assign('PRE',$_REQUEST['pre']);
|
||||
if($_REQUEST['only_my_items'])$form->assign("OMI_CHECKED","checked");
|
||||
|
||||
$dnc.='<option value="" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="")$dnc.='selected="selected"';
|
||||
$dnc.='></option>';
|
||||
$dnc.='<option value="0" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="0")$dnc.='selected="selected"';
|
||||
$dnc.='> No</option>';
|
||||
$dnc.='<option value="1" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="1")$dnc.='selected="selected"';
|
||||
$dnc.='> Yes</option';
|
||||
$form->assign('DO_NOT_CALL_LIST',$dnc);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new ContactLead();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->setQuery($where, '', '', 'CONTACTLEAD');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$ListView->processListView($seed_bean, 'main', 'CONTACTLEAD');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
|
||||
function process_page_for_merge()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
//START:FOR MULTI-SELECT
|
||||
$multi_select=false;
|
||||
if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
|
||||
$multi_select=true;
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('ContactLeads',document.MassUpdate,'mass[]','" .$app_strings['ERR_NOTHING_SELECTED']."');\" title='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
//END:FOR MULTI-SELECT
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/ContactLeads/Popup_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$form->assign('request_data', $request_data);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new ContactLead();
|
||||
$ListView = new ListView();
|
||||
$ListView->display_header_and_footer=false;
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->multi_select_popup=$multi_select;
|
||||
if ($multi_select) $ListView->xTemplate->assign("TAG_TYPE","SPAN"); else $ListView->xTemplate->assign("TAG_TYPE","A");
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setQuery($where, '', 'contactleads.last_name, contactleads.first_name', 'CONTACTLEAD');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false);
|
||||
//BEGIN ATHENA CUSTOMIZATION - rsmith
|
||||
$query = $_REQUEST['select'].' WHERE '.$_REQUEST['where']."'".$_REQUEST['id']."'";
|
||||
|
||||
//$response = $seed_bean->process_list_query($_REQUEST['select'], 0, -1, -1, $_REQUEST['where']."'".$_REQUEST['id']."'");
|
||||
|
||||
$result = $seed_bean->db->query($query,true,"Error retrieving $seed_bean->object_name list: ");
|
||||
|
||||
$list = Array();
|
||||
if(empty($rows_found))
|
||||
{
|
||||
$rows_found = $seed_bean->db->getRowCount($result);
|
||||
}
|
||||
|
||||
$row_offset = 0;
|
||||
global $sugar_config;
|
||||
$max_per_page = $sugar_config['list_max_entries_per_page'];
|
||||
|
||||
while(($row = $seed_bean->db->fetchByAssoc($result)) != null)
|
||||
{
|
||||
$seed_bean = new ContactLead();
|
||||
foreach($seed_bean->field_defs as $field=>$value)
|
||||
{
|
||||
if (isset($row[$field]))
|
||||
{
|
||||
$seed_bean->$field = $row[$field];
|
||||
}
|
||||
else if (isset($row[$seed_bean->table_name .'.'.$field]))
|
||||
{
|
||||
$seed_bean->$field = $row[$seed_bean->table_name .'.'.$field];
|
||||
}
|
||||
else
|
||||
{
|
||||
$seed_bean->$field = "";
|
||||
}
|
||||
}
|
||||
$seed_bean->fill_in_additional_list_fields();
|
||||
|
||||
$list[] = $seed_bean;
|
||||
}
|
||||
|
||||
$ListView->processListViewTwo($list, 'main', 'CONTACTLEAD');
|
||||
|
||||
//END ATHENA CUSTOMIZATION - rsmith
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
//START:FOR MULTI-SELECT
|
||||
$multi_select=false;
|
||||
if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
|
||||
$multi_select=true;
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('ContactLeads',document.MassUpdate,'mass[]','" .$app_strings['ERR_NOTHING_SELECTED']."');\" title='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
//END:FOR MULTI-SELECT
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/ContactLeads/Popup_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new ContactLead();
|
||||
$ListView = new ListView();
|
||||
$ListView->display_header_and_footer=false;
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->multi_select_popup=$multi_select;
|
||||
if ($multi_select) $ListView->xTemplate->assign("TAG_TYPE","SPAN"); else $ListView->xTemplate->assign("TAG_TYPE","A");
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setQuery($where, '', 'contactleads.last_name, contactleads.first_name', 'CONTACTLEAD');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false);
|
||||
$ListView->processListView($seed_bean, 'main', 'CONTACTLEAD');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page_for_address()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$formBase = new ContactLeadFormBase();
|
||||
if(isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'save')
|
||||
{
|
||||
|
||||
$formBase->handleSave('', false, true);
|
||||
}
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
|
||||
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
|
||||
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
|
||||
|
||||
// TODO: cleanup the construction of $addform
|
||||
$formbody = $formBase->getFormBody('','','EmailEditView');
|
||||
$addform = '<table><tr><td nowrap="nowrap" valign="top">'
|
||||
.str_replace('<br>', '</td><td nowrap="nowrap" valign="top"> ', $formbody)
|
||||
. '</td></tr></table>'
|
||||
. '<input type="hidden" name="action" value="Popup" />';
|
||||
$formSave = <<<EOQ
|
||||
<input type="submit" name="button" class="button" title="$lbl_save_button_title" accesskey="$lbl_save_button_key" value=" $lbl_save_button_label " />
|
||||
<input type="button" name="button" class="button" title="{$app_strings['LBL_CANCEL_BUTTON_TITLE']}" accesskey="{$app_strings['LBL_CANCEL_BUTTON_KEY']}" value="{$app_strings['LBL_CANCEL_BUTTON_LABEL']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$createContactLead = <<<EOQ
|
||||
<input type="button" name="showAdd" class="button" value="{$mod_strings['LNK_NEW_CONTACTLEAD']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$addformheader = get_form_header($mod_strings['LNK_NEW_CONTACTLEAD'], $formSave, false);
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/ContactLeads/Address_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
//$form->assign('CREATECONTACTLEAD', $createContactLead);
|
||||
$form->assign('ADDFORMHEADER', $addformheader);
|
||||
$form->assign('ADDFORM', $addform);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
$form->assign('request_data', $request_data);
|
||||
|
||||
// fill in for mass update
|
||||
$button = "<input type='hidden' name='module' value='ContactLeads'><input type='hidden' id='form_action' name='action' value='index'><input type='hidden' name='massupdate' value='true'><input type='hidden' name='delete' value='false'><input type='hidden' name='mass' value='Array'><input type='hidden' name='Update' value='Update'>";
|
||||
if(isset($_REQUEST['mass']) && is_array($_REQUEST['mass'])) {
|
||||
foreach(array_unique($_REQUEST['mass']) as $record) {
|
||||
$button .= "<input style='display: none' checked type='checkbox' name='mass[]' value='$record'>\n";
|
||||
}
|
||||
}
|
||||
$button .= "<input type='hidden' name='saved_associated_data' value=''>";
|
||||
$button .= "<input type='hidden' name='query' value='true'>";
|
||||
$button .= "<input type='hidden' name='close_window' value='true'>";
|
||||
$button .= "<input type='hidden' name='html' value='change_address'>";
|
||||
$button .= "<input type='hidden' name='account_name' value='$account_name'>";
|
||||
$button .= "<span style='display: none'><textarea name='primary_address_street'>" . str_replace("<br>", "\n", $_REQUEST["primary_address_street"]) . "</textarea></span>";
|
||||
$button .= "<input type='hidden' name='primary_address_city' value='". $_REQUEST["primary_address_city"] ."'>";
|
||||
$button .= "<input type='hidden' name='primary_address_state' value='". $_REQUEST["primary_address_state"] ."'>";
|
||||
$button .= "<input type='hidden' name='primary_address_postalcode' value='". $_REQUEST["primary_address_postalcode"] ."'>";
|
||||
$button .= "<input type='hidden' name='primary_address_country' value='". $_REQUEST["primary_address_country"] ."'>";
|
||||
//$button .= "<input type='hidden' name='ContactLeads_CONTACTLEAD_offset' value=''>";
|
||||
$button .= "<input title='".$mod_strings['LBL_COPY_ADDRESS_CHECKED']."' class='button' LANGUAGE=javascript type='submit' name='button' value=' ".$mod_strings['LBL_COPY_ADDRESS_CHECKED']." '>\n";
|
||||
$button .= "<input title='".$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accessKey='".$app_strings['LBL_CANCEL_BUTTON_KEY']."' class='button' LANGUAGE=javascript onclick=\"window.close()\" type='submit' name='button' value=' ".$app_strings['LBL_CANCEL_BUTTON_LABEL']." '>\n";
|
||||
|
||||
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
//$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
//$form->parse('main.SearchHeader');
|
||||
//$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new ContactLead();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->setQuery($where, '', '', 'CONTACTLEAD');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
// Added
|
||||
$ListView->process_for_popups = true;
|
||||
|
||||
ob_start();
|
||||
$ListView->processListViewMulti($seed_bean, 'main', 'CONTACTLEAD');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// Regular Expression to override sListView
|
||||
$exp = '/sListView.save_checks/si';
|
||||
$change = 'save_checks';
|
||||
$output_html = preg_replace(array($exp), array($change), $output_html);
|
||||
$output_html .= '<script>
|
||||
|
||||
checked_items = Array();
|
||||
inputs_array = document.MassUpdate.elements;
|
||||
|
||||
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
||||
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].style.display == "none") {
|
||||
checked_items.push(inputs_array[wp].value);
|
||||
}
|
||||
}
|
||||
for(i in checked_items) {
|
||||
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
||||
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].value == checked_items[i]) {
|
||||
inputs_array[wp].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>';
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
}
|
||||
?>
|
||||
347
modules/ContactLeads/Popup_pickerEmails.html
Normal file
347
modules/ContactLeads/Popup_pickerEmails.html
Normal file
@@ -0,0 +1,347 @@
|
||||
<!--
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<!-- BEGIN: SearchHeader -->
|
||||
<script>
|
||||
function selectTabCSS(id){
|
||||
document.getElementById("basic_form").style.display='none';
|
||||
document.getElementById("advanced_form").style.display='none';
|
||||
document.getElementById("link_basic").className='';
|
||||
document.getElementById("link_advanced").className='';
|
||||
document.getElementById("tab_basic").className='';
|
||||
document.getElementById("tab_advanced").className='';
|
||||
|
||||
document.getElementById(id+"_form").style.display='';
|
||||
document.getElementById("link_"+id).className='current';
|
||||
document.getElementById("tab_"+id).className='active';
|
||||
document.getElementById("tab").value=id;
|
||||
if(id=="advanced"){
|
||||
var bi=document.getElementById("basic_form").getElementsByTagName("input");
|
||||
for(var i=0;i<bi.length;i++){
|
||||
if(bi[i].type=="text")bi[i].value="";
|
||||
if(bi[i].type=="checkbox")bi[i].checked=false;
|
||||
}
|
||||
var bs=document.getElementById("basic_form").getElementsByTagName("select");
|
||||
for(var i=0;i<bs.length;i++){
|
||||
bs[i].value="";
|
||||
}
|
||||
}
|
||||
if(id=="basic"){
|
||||
var ai=document.getElementById("advanced_form").getElementsByTagName("input");
|
||||
for(var i=0;i<ai.length;i++){
|
||||
if(ai[i].type=="text")ai[i].value="";
|
||||
if(ai[i].type=="checkbox")ai[i].checked=false;
|
||||
}
|
||||
var as=document.getElementById("basic_form").getElementsByTagName("select");
|
||||
for(var i=0;i<as.length;i++){
|
||||
as[i].value="";
|
||||
}
|
||||
}
|
||||
}
|
||||
selectTabCSS(document.getElementById("tab").value);
|
||||
</script>
|
||||
<ul class="tablist">
|
||||
<li class="active" id="tab_basic"><a class="current" id="link_basic" href="javascript:selectTabCSS('basic');">Basic Search</a></li>
|
||||
<li class="" id="tab_advanced"><a class="" id="link_advanced" href="javascript:selectTabCSS('advanced');">Advanced Search</a></li>
|
||||
</ul>
|
||||
<form action="index.php" method="post" name="popup_query_form" id="search_form">
|
||||
<input type="hidden" name="tab" id="tab" value="{TABB}" />
|
||||
<input type="hidden" name="div" id="div" value="{DIV}" />
|
||||
<input type="hidden" name="pre" id="pre" value="{PRE}" />
|
||||
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
||||
<input type="hidden" name="ContactLeads_CONTACTLEAD_offset" id="ContactLeads_CONTACTLEAD_offset" value="0" />
|
||||
<input type="hidden" name="action" value="PopupEmails" />
|
||||
<input type="hidden" name="query" value="true" />
|
||||
<input type="hidden" name="request_data" value="{request_data}" />
|
||||
<input type="hidden" name="record_id" value="" />
|
||||
<input type="hidden" name="mode" value="{MULTI_SELECT}" />
|
||||
<table cellpaddin="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<table cellpaddin="0" cellspacing="0" border="0" width="100%" id="advanced_form" style="display:none;border-top: 0px none; margin-bottom: 4px;" class="tabForm">
|
||||
<tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">First Name</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="first_name_advanced" id="first_name_advanced" size="30" maxlength="100" value="{FIRST_NAME}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Any Address</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="address_street_advanced" id="address_street_advanced" size="30" value="{ADDRESS}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Any Phone</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="phone_advanced" id="phone_advanced" size="30" value="{PHONE}" title="" tabindex="" type="text"></td>
|
||||
</tr><tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Last Name</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="last_name_advanced" id="last_name_advanced" size="30" maxlength="100" value="{LAST_NAME}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">City</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="address_city_advanced" id="address_city_advanced" size="30" value="{CITY}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Any Email</td><td class="dataField" width="30%" nowrap="nowrap"><input name="email_advanced" id="email_advanced" size="30" value="{EMAIL}" title="" tabindex="" type="text"></td>
|
||||
</tr><tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Account Name</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="account_name_advanced" tabindex="" id="account_name_advanced" size="" value="{ACCOUNT_NAME}" title="" type="text">
|
||||
<input name="account_id_advanced" id="account_id_advanced" value="{ACCOUNT_ID}" type="hidden"><input name="btn_account_name_advanced" tabindex="" title="Select [Alt+T]" accesskey="T" class="button" value="Select" onclick='open_popup("Accounts", 600, 400, "", true, false, {"call_back_function":"set_return","form_name":"search_form","field_to_name_array":{"id":"account_id_advanced","name":"account_name_advanced"}}, "single", true,"new");' type="button"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">State</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="address_state_advanced" id="address_state_advanced" size="30" value="{STATE}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Do Not Call</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap">
|
||||
<select id="do_not_call_advanced" name="do_not_call_advanced" tabindex="">
|
||||
{DO_NOT_CALL_LIST}
|
||||
</select>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Assistant</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="assistant_advanced" id="assistant_advanced" size="30" maxlength="75" value="{ASSISTANT}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Postal Code</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="address_postalcode_advanced" id="address_postalcode_advanced" size="30" value="{POSTAL_CODE}" title="" tabindex="" type="text"></td>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Country</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="primary_address_country_advanced" id="primary_address_country_advanced" size="30" value="{COUNTRY}" title="" tabindex="" type="text"></td>
|
||||
</tr><tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Assigned to</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap">
|
||||
<select name="assigned_user_id_advanced[]" style="width: 150px;" multiple="true" size="6">
|
||||
{ASSIGNED_TO_LIST}
|
||||
</select>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td colspan="20">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="basic_form" style="border-top: 0px none; margin-bottom: 4px;" class="tabForm">
|
||||
<tr>
|
||||
<td class="dataLabel" nowrap="nowrap">{MOD.LBL_FIRST_NAME} <input type="text" name="first_name" size="20" class="dataField" value="{FIRST_NAME}" /></td>
|
||||
<td class="dataLabel" nowrap="nowrap">{MOD.LBL_LAST_NAME} <input type="text" name="last_name" size="20" class="dataField" value="{LAST_NAME}" /></td>
|
||||
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Account Name</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap"><input name="account_name" tabindex="" id="account_name" size="" value="{ACCOUNT_NAME}" title="" type="text">
|
||||
<input name="account_id" id="account_id" value="{ACCOUNT_ID}" type="hidden"><input name="btn_account_name" tabindex="" title="Select [Alt+T]" accesskey="T" class="button" value="Select" onclick='open_popup("Accounts", 600, 400, "", true, false, {"call_back_function":"set_return","form_name":"search_form","field_to_name_array":{"id":"account_id","name":"account_name"}}, "single", true,"new");' type="button"></td>
|
||||
<td width="20%" align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="dataLabel" nowrap="nowrap">Only my items: <input type="checkbox" name="only_my_items" value="1" {OMI_CHECKED} /></td>
|
||||
<td class="dataLabel" nowrap="nowrap"> </td>
|
||||
<td class="dataLabel" nowrap="nowrap"> </td>
|
||||
<td class="dataField" nowrap="nowrap"> </td>
|
||||
<td align="right"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" name="button" class="button"
|
||||
title="{APP.LBL_SEARCH_BUTTON_TITLE}"
|
||||
accessKey="{APP.LBL_SEARCH_BUTTON_KEY}"
|
||||
value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
|
||||
<input type="button" name="button" class="button"
|
||||
title="Clear"
|
||||
value="Clear" onclick="selectTabCSS(document.getElementById('tab').value);location.reload();" />
|
||||
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
/* initialize the popup request from the parent */
|
||||
|
||||
if(window.document.forms['popup_query_form'].request_data.value == "")
|
||||
{
|
||||
window.document.forms['popup_query_form'].request_data.value
|
||||
= JSON.stringify(window.opener.get_popup_request_data());
|
||||
}
|
||||
-->
|
||||
function add_to_div(module,id,name,email){
|
||||
var pre=document.getElementById("pre").value;
|
||||
if(pre=="contactleads_to")var addr="addressTo"+parent.opener.document.getElementById("idx").value;
|
||||
if(pre=="contactleads_cc")var addr="addressCC"+parent.opener.document.getElementById("idx").value;
|
||||
if(pre=="contactleads_bcc")var addr="addressBCC"+parent.opener.document.getElementById("idx").value;
|
||||
var L=parent.opener.document.getElementById(pre+"_count").value;
|
||||
L++;
|
||||
|
||||
var div=parent.opener.document.getElementById(pre+"_div");
|
||||
div.setAttribute("style","width: 500px;padding-left:6px; max-height:50px; overflow:auto;display:none;");
|
||||
|
||||
var div_acc=document.createElement("div");
|
||||
div_acc.setAttribute("id",pre+"_div_"+L);
|
||||
div_acc.setAttribute("style","");
|
||||
div.appendChild(div_acc);
|
||||
|
||||
var input=document.createElement("input");
|
||||
input.setAttribute("name",pre+"_name_"+L);
|
||||
input.setAttribute("type","text");
|
||||
input.setAttribute("value",name);
|
||||
div_acc.appendChild(input);
|
||||
|
||||
var input=document.createElement("input");
|
||||
input.setAttribute("name",pre+"_id_"+L);
|
||||
input.setAttribute("type","text");
|
||||
input.setAttribute("style","display:none;");
|
||||
input.setAttribute("value",id);
|
||||
div_acc.appendChild(input);
|
||||
|
||||
var span=document.createElement("span");
|
||||
span.innerHTML=' ';
|
||||
div_acc.appendChild(span);
|
||||
|
||||
var img=document.createElement("img");
|
||||
img.setAttribute("src","themes/Sugar/images/delete_inline.gif");
|
||||
img.style.cursor="pointer";
|
||||
img.onclick=function(){div.removeChild(div_acc);div.removeChild(br1);};
|
||||
div_acc.appendChild(img);
|
||||
|
||||
var em=email.split("||");
|
||||
for(var j=0;j<em.length;j++){
|
||||
if(em[j]!="" && em[j]!=" "){
|
||||
var input=document.createElement("input");
|
||||
input.setAttribute("name",pre+"_email_check_"+L+"_"+j);
|
||||
input.setAttribute("type","checkbox");
|
||||
input.setAttribute("checked","checked");
|
||||
input.setAttribute("value",em[j]);
|
||||
div_acc.appendChild(input);
|
||||
|
||||
var span=document.createElement("span");
|
||||
span.setAttribute("id",pre+"_email_"+L+"_"+j);
|
||||
span.innerHTML=" "+em[j];
|
||||
div_acc.appendChild(span);
|
||||
|
||||
parent.opener.document.getElementById(addr).value=parent.opener.document.getElementById(addr).value+"; "+name+" <"+em[j]+">";
|
||||
}
|
||||
}
|
||||
parent.opener.document.getElementById(pre+"_count").value=L;
|
||||
window.close();
|
||||
}
|
||||
i=0;
|
||||
</script>
|
||||
|
||||
<!-- END: SearchHeader -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="listView" id="table_acc">
|
||||
<!-- BEGIN: list_nav_row -->
|
||||
{PAGINATION}
|
||||
<!-- END: list_nav_row -->
|
||||
<tr height="20" class="listViewThS1">
|
||||
<td scope="col" width="5%" class="listViewThS1" NOWRAP>{CHECKALL}</td>
|
||||
<td scope="col" scope="col" width="35%" class="listViewThS1" NOWRAP>
|
||||
<slot>
|
||||
<a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_NAME}{arrow_start}{name_arrow}{arrow_end}</a>
|
||||
</slot>
|
||||
</td>
|
||||
<td scope="col" scope="col" width="35%" class="listViewThS1" NOWRAP>
|
||||
<slot>
|
||||
<a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_TITLE}{arrow_start}{title_arrow}{arrow_end}</a>
|
||||
</slot>
|
||||
</td>
|
||||
<td scope="col" scope="col" width="35%" class="listViewThS1" NOWRAP>
|
||||
<slot>
|
||||
<a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_ACCOUNT_NAME}{arrow_start}{account_name_arrow}{arrow_end}</a>
|
||||
</slot>
|
||||
</td>
|
||||
<td scope="col" scope="col" width="35%" class="listViewThS1" NOWRAP>
|
||||
<slot>
|
||||
<a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_LIST_EMAIL_ADDRESS}{arrow_start}{email1_arrow}{arrow_end}</a>
|
||||
</slot>
|
||||
</td>
|
||||
<td scope="col" scope="col" width="35%" class="listViewThS1" NOWRAP>
|
||||
<slot>
|
||||
<a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_OFFICE_PHONE}{arrow_start}{phone_work_arrow}{arrow_end}</a>
|
||||
</slot>
|
||||
</td>
|
||||
<td scope="col" scope="col" width="35%" class="listViewThS1" NOWRAP>
|
||||
<slot>
|
||||
<a href="{ORDER_BY}name" class="listViewThLinkS1">User{arrow_start}{assigned_user_name_arrow}{arrow_end}</a>
|
||||
</slot>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20"
|
||||
onmouseover="setPointer(this, '{CONTACTLEAD.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
|
||||
onmouseout="setPointer(this, '{CONTACTLEAD.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
|
||||
onmousedown="setPointer(this, '{CONTACTLEAD.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
|
||||
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>{PREROW}</td>
|
||||
<td scope="row" valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
<slot>
|
||||
<{TAG.MAIN} href="#"
|
||||
onclick="add_to_div('ContactLead','{CONTACTLEAD.ID}','{CONTACTLEAD.NAME}','{CONTACTLEAD.ADDRS}')"
|
||||
class="listViewTdLinkS1">{CONTACTLEAD.NAME}</{TAG.MAIN}>
|
||||
</slot>
|
||||
</td>
|
||||
<td scope="row" valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
<slot>{CONTACTLEAD.TITLE}</slot>
|
||||
</td>
|
||||
<td scope="row" valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
<slot><a href="index.php?module=Accounts&action=DetailView&record={CONTACTLEAD.ACCOUNT_ID}">{CONTACTLEAD.ACCOUNT_NAME}</a></slot>
|
||||
</td>
|
||||
<td scope="row" valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
<slot>{CONTACTLEAD.EMAIL1}</slot>
|
||||
</td>
|
||||
<td scope="row" valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
<slot>{CONTACTLEAD.PHONE_WORK}</slot>
|
||||
</td>
|
||||
<td scope="row" valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
|
||||
<slot>{CONTACTLEAD.ASSIGNED_USER_NAME}</slot>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="20" class="listViewHRS1"></td>
|
||||
</tr>
|
||||
<!-- END: row -->
|
||||
</table>
|
||||
{ASSOCIATED_JAVASCRIPT_DATA}
|
||||
<script>
|
||||
function addAll(m){
|
||||
var checks=document.getElementById("table_acc").getElementsByTagName("input");
|
||||
for(i=0;i<31;i++){
|
||||
if(checks[i] && checks[i].name!="massall" && checks[i].checked==true){
|
||||
|
||||
if(associated_javascript_data[checks[i].value].ADDRS==null)var addrs="";
|
||||
else var addrs=associated_javascript_data[checks[i].value].ADDRS
|
||||
if(addrs!="")add_to_div('ContactLead',associated_javascript_data[checks[i].value].ID,associated_javascript_data[checks[i].value].NAME,addrs);
|
||||
}
|
||||
}
|
||||
}
|
||||
selectTabCSS(document.getElementById("tab").value);
|
||||
</script>
|
||||
<!-- END: main -->
|
||||
236
modules/ContactLeads/Popup_pickerEmails.php
Normal file
236
modules/ContactLeads/Popup_pickerEmails.php
Normal file
@@ -0,0 +1,236 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
global $theme;
|
||||
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
require_once('themes/'.$theme.'/layout_utils.php');
|
||||
require_once('log4php/LoggerManager.php');
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
class Popup_Picker{
|
||||
|
||||
function Popup_Picker(){
|
||||
;
|
||||
}
|
||||
|
||||
function _get_where_clause(){
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query'])){
|
||||
$where_clauses = array();
|
||||
append_where_clause($where_clauses, "first_name", "contactleads.first_name");
|
||||
append_where_clause($where_clauses, "last_name", "contactleads.last_name");
|
||||
append_where_clause($where_clauses, "first_name_advanced", "contactleads.first_name");
|
||||
append_where_clause($where_clauses, "last_name_advanced", "contactleads.last_name");
|
||||
append_where_clause($where_clauses, "address_postalcode", "contactleads.primary_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_postalcode_advanced", "contactleads.primary_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_street", "contactleads.primary_address_street");
|
||||
append_where_clause($where_clauses, "address_street_advanced", "contactleads.primary_address_street");
|
||||
append_where_clause($where_clauses, "address_city", "contactleads.primary_address_city");
|
||||
append_where_clause($where_clauses, "address_city_advanced", "contactleads.primary_address_city");
|
||||
append_where_clause($where_clauses, "address_country", "contactleads.primary_address_country");
|
||||
append_where_clause($where_clauses, "address_country_advanced", "contactleads.primary_address_country");
|
||||
append_where_clause($where_clauses, "address_state", "contactleads.primary_address_state");
|
||||
append_where_clause($where_clauses, "address_state_advanced", "contactleads.primary_address_state");
|
||||
append_where_clause($where_clauses, "phone", "contactleads.phone_work");
|
||||
append_where_clause($where_clauses, "phone_advanced", "contactleads.phone_work");
|
||||
append_where_clause($where_clauses, "account_id", "accounts.id");
|
||||
append_where_clause($where_clauses, "account_id_advanced", "accounts.id");
|
||||
append_where_clause($where_clauses, "account_name", "accounts.name");
|
||||
append_where_clause($where_clauses, "account_name_advanced", "accounts.name");
|
||||
append_where_clause($where_clauses, "assistant", "contactleads.assistant");
|
||||
append_where_clause($where_clauses, "assistant_advanced", "contactleads.assistant");
|
||||
append_where_clause($where_clauses, "do_not_call_advanced", "contactleads.do_not_call");
|
||||
//append_where_clause($where_clauses, "assigned_user_id", "contactleads.assigned_user_id");
|
||||
//append_where_clause($where_clauses, "assigned_user_id_advanced", "contactleads.assigned_user_id");
|
||||
if(count($_REQUEST['assigned_user_id'])>0){
|
||||
foreach($_REQUEST['assigned_user_id'] as $au){
|
||||
$where_clauses[]="contactleads.assigned_user_id='".$au."'";
|
||||
}
|
||||
}
|
||||
if(count($_REQUEST['assigned_user_id_advanced'])>0){
|
||||
foreach($_REQUEST['assigned_user_id_advanced'] as $au){
|
||||
$where_clauses[]="contactleads.assigned_user_id='".$au."'";
|
||||
}
|
||||
}
|
||||
if($_REQUEST['only_my_items'])$where_clauses[]="contactleads.assigned_user_id='".$_SESSION['authenticated_user_id']."'";
|
||||
/*append_where_clause($where_clauses, "address_postalcode", "contactleads.alt_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_street", "contactleads.alt_address_street");
|
||||
append_where_clause($where_clauses, "address_city", "contactleads.alt_address_city");
|
||||
append_where_clause($where_clauses, "address_country", "contactleads.alt_address_country");
|
||||
append_where_clause($where_clauses, "address_state", "contactleads.alt_address_state");*/
|
||||
|
||||
//append_where_clause($where_clauses, "assigned_user_advanced", "contactleads.assigned_user_id");
|
||||
$where = generate_where_statement($where_clauses);
|
||||
}
|
||||
return $where;
|
||||
}
|
||||
|
||||
function process_page(){
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
if(!$hide_clear_button){
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY'] ."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY'] ."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= '<input type="button" onclick="addAll(i);" value="Select" class="button" />';
|
||||
$button .= "</form>\n";
|
||||
$form = new XTemplate('modules/ContactLeads/Popup_pickerEmails.html');
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
|
||||
$fields=array("first_name","last_name","address_postalcode","address_street","address_state","address_city","address_country","phone","account_id","account_name","assistant","assigned_user_id");
|
||||
|
||||
foreach($fields as $f){
|
||||
if($_REQUEST[$f])$form->assign(strtoupper($f),$_REQUEST[$f]);
|
||||
else $form->assign(strtoupper($f),$_REQUEST[$f."_advanced"]);
|
||||
}
|
||||
|
||||
$w=mysql_query("select id,first_name,last_name from users where status='Active' and deleted='0' order by first_name asc, last_name asc");
|
||||
while($r=mysql_fetch_array($w)){
|
||||
$atr.='<option value="'.$r['id'].'"';
|
||||
if(@in_array($r['id'],$_REQUEST['assigned_user_id_advanced']))$atr.=' selected';
|
||||
$atr.='>'.$r['first_name'].' '.$r['last_name'].'</option>';
|
||||
}
|
||||
if($_REQUEST['tab'])$form->assign("TABB",$_REQUEST['tab']);
|
||||
else $form->assign("TABB","basic");
|
||||
$form->assign('ASSIGNED_TO_LIST',$atr);
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('request_data', $request_data);
|
||||
$form->assign('DIV',$_REQUEST['div']);
|
||||
$form->assign('PRE',$_REQUEST['pre']);
|
||||
if($_REQUEST['only_my_items'])$form->assign("OMI_CHECKED","checked");
|
||||
|
||||
$dnc.='<option value="" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="")$dnc.='selected="selected"';
|
||||
$dnc.='></option>';
|
||||
$dnc.='<option value="0" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="0")$dnc.='selected="selected"';
|
||||
$dnc.='> No</option>';
|
||||
$dnc.='<option value="1" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="1")$dnc.='selected="selected"';
|
||||
$dnc.='> Yes</option';
|
||||
$form->assign('DO_NOT_CALL_LIST',$dnc);
|
||||
|
||||
|
||||
$output_html .= "
|
||||
<script type=\"text/javascript\">
|
||||
function save_checks(offset) {
|
||||
//location.href=\"index.php?module=ContactLeads&action=PopupEmails&ContactLeads_CONTACTLEAD_offset=\"+offset;
|
||||
document.getElementById('ContactLeads_CONTACTLEAD_offset').value=offset;
|
||||
document.popup_query_form.submit();
|
||||
}
|
||||
</script>";
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// RESET THE SECTIONS THAT ARE ALREADY IN THE PAGE SO THAT THEY DO NOT PRINT AGAIN LATER.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// CREATE THE LISTVIEW
|
||||
$seed_bean = new ContactLead();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->multi_select_popup=true;
|
||||
|
||||
$ListView->setQuery($where, '', 'name', 'CONTACTLEAD');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$ListView->processListView($seed_bean, 'main', 'CONTACTLEAD');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
} // end of class Popup_Picker
|
||||
?>
|
||||
61
modules/ContactLeads/Save.php
Normal file
61
modules/ContactLeads/Save.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
require_once('modules/ContactLeads/ContactLeadFormBase.php');
|
||||
|
||||
$json = getJSONobj();
|
||||
//categories
|
||||
$pll = array();
|
||||
$exp=explode("||||",$_POST['position_list55']);
|
||||
foreach($exp as $ep){
|
||||
if($ep){
|
||||
$pll[] = $json->decode(htmlspecialchars_decode($ep));
|
||||
}
|
||||
}
|
||||
$_POST['position_list55'] = $pll;
|
||||
|
||||
$contactleadForm = new ContactLeadFormBase();
|
||||
$prefix = empty($_REQUEST['dup_checked']) ? '' : 'ContactLeads';
|
||||
$contactleadForm->handleSave($prefix, true, false);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('modules/ContactLeads/ContactLeadOpportunityRelationship.php');
|
||||
|
||||
require_once('include/utils.php');
|
||||
|
||||
|
||||
$focus = new ContactLeadOpportunityRelationship();
|
||||
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
foreach($focus->column_fields as $field)
|
||||
{
|
||||
safe_map($field, $focus, true);
|
||||
}
|
||||
|
||||
foreach($focus->additional_column_fields as $field)
|
||||
{
|
||||
safe_map($field, $focus, true);
|
||||
}
|
||||
|
||||
// send them to the edit screen.
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record'] != "")
|
||||
{
|
||||
$recordID = $_REQUEST['record'];
|
||||
}
|
||||
|
||||
$focus->save();
|
||||
$recordID = $focus->id;
|
||||
|
||||
$GLOBALS['log']->debug("Saved record with id of ".$recordID);
|
||||
|
||||
$header_URL = "Location: index.php?action={$_REQUEST['return_action']}&module={$_REQUEST['return_module']}&record={$_REQUEST['return_id']}";
|
||||
$GLOBALS['log']->debug("about to post header URL of: $header_URL");
|
||||
|
||||
header($header_URL);
|
||||
?>
|
||||
|
||||
67
modules/ContactLeads/ShowDuplicates.html
Normal file
67
modules/ContactLeads/ShowDuplicates.html
Normal file
@@ -0,0 +1,67 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* {APP.LBL_CURRENCY_SYM}Header: /cvsroot/sugarcrm/sugarcrm/modules/ContactLeads/EditView.html,v 1.22 2004/07/16 04:04:42 sugarclint Exp {APP.LBL_CURRENCY_SYM}
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
<!-- BEGIN: error -->
|
||||
<span class="color">{ERROR}</span>
|
||||
<!-- END: error -->
|
||||
|
||||
<form action='index.php' method='post' name='Save'>
|
||||
<input type="hidden" name="module" value="ContactLeads">
|
||||
<input type="hidden" name="return_module" value="{RETURN_MODULE}">
|
||||
<input type="hidden" name="return_action" value="{RETURN_ACTION}">
|
||||
<input type="hidden" name="return_id" value="{RETURN_ID}">
|
||||
<input type="hidden" name="inbound_email_id" value="{INBOUND_EMAIL_ID}">
|
||||
<input type="hidden" name="start" value="{START}">
|
||||
<input type="hidden" name="dup_checked" value="true">
|
||||
<input type="hidden" name="action" value="">
|
||||
{INPUT_FIELDS}
|
||||
<p> <table class='{TABLECLASS}' cellpadding="0" cellspacing="0" width="100%" border="0" >
|
||||
<tr><td>
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0" >
|
||||
|
||||
<tr ><td valign='top' align='left' border='0' class="{CLASS}"><h4 class="{CLASS}">{FORMHEADER}</h4></td></tr>
|
||||
<tr><td valign='top' align='left'>{FORMBODY}{FORMFOOTER}{POSTFORM}</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
<!-- END: main -->
|
||||
168
modules/ContactLeads/ShowDuplicates.php
Normal file
168
modules/ContactLeads/ShowDuplicates.php
Normal file
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
// retrieve $_POST values out of the $_SESSION variable - placed in there by ContactLeadFormBase to avoid the length limitations on URLs implicit with GETS
|
||||
//$GLOBALS['log']->debug('ShowDuplicates.php: _POST = '.print_r($_SESSION['SHOW_DUPLICATES'],true));
|
||||
parse_str($_SESSION['SHOW_DUPLICATES'],$_POST);
|
||||
unset($_SESSION['SHOW_DUPLICATES']);
|
||||
//$GLOBALS['log']->debug('ShowDuplicates.php: _POST = '.print_r($_POST,true));
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $theme;
|
||||
require_once('XTemplate/xtpl.php');
|
||||
$error_msg = '';
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'ContactLeads');
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$mod_strings['LBL_SAVE_CONTACTLEAD'], true);
|
||||
echo "\n</p>\n";
|
||||
$xtpl=new XTemplate ('modules/ContactLeads/ShowDuplicates.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("MODULE", $_REQUEST['module']);
|
||||
if ($error_msg != '')
|
||||
{
|
||||
$xtpl->assign("ERROR", $error_msg);
|
||||
$xtpl->parse("main.error");
|
||||
}
|
||||
|
||||
if((isset($_REQUEST['popup']) && $_REQUEST['popup'] == 'true') ||(isset($_POST['popup']) && $_POST['popup']==true)) insert_popup_header($theme);
|
||||
|
||||
require_once('modules/ContactLeads/ContactLead.php');
|
||||
$contactlead = new ContactLead();
|
||||
require_once('modules/ContactLeads/ContactLeadFormBase.php');
|
||||
$contactleadForm = new ContactLeadFormBase();
|
||||
$GLOBALS['check_notify'] = FALSE;
|
||||
|
||||
|
||||
$query = 'select id, first_name, last_name, title from contactleads where deleted=0 ';
|
||||
$duplicates = $_POST['duplicate'];
|
||||
$count = count($duplicates);
|
||||
if ($count > 0)
|
||||
{
|
||||
$query .= "and (";
|
||||
$first = true;
|
||||
foreach ($duplicates as $duplicate_id)
|
||||
{
|
||||
if (!$first) $query .= ' OR ';
|
||||
$first = false;
|
||||
$query .= "id='$duplicate_id' ";
|
||||
}
|
||||
$query .= ')';
|
||||
}
|
||||
|
||||
$duplicateContactLeads = array();
|
||||
|
||||
$db = DBManagerFactory::getInstance();
|
||||
$result = $db->query($query);
|
||||
$i=0;
|
||||
while (($row=$db->fetchByAssoc($result)) != null) {
|
||||
$duplicateContactLeads[$i] = $row;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$xtpl->assign('FORMBODY', $contactleadForm->buildTableForm($duplicateContactLeads, 'ContactLeads'));
|
||||
|
||||
$input = '';
|
||||
foreach ($contactlead->column_fields as $field)
|
||||
{
|
||||
if (!empty($_POST['ContactLeads'.$field])) {
|
||||
$input .= "<input type='hidden' name='$field' value='${_POST['ContactLeads'.$field]}'>\n";
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($contactlead->additional_column_fields as $field)
|
||||
{
|
||||
if (!empty($_POST['ContactLeads'.$field])) {
|
||||
$input .= "<input type='hidden' name='$field' value='${_POST['ContactLeads'.$field]}'>\n";
|
||||
}
|
||||
}
|
||||
|
||||
require_once('include/SugarEmailAddress/SugarEmailAddress.php');
|
||||
$emailAddress = new SugarEmailAddress();
|
||||
$input .= $emailAddress->getEmailAddressWidgetDuplicatesView($contactlead);
|
||||
|
||||
$get = '';
|
||||
if(!empty($_POST['return_module'])) $xtpl->assign('RETURN_MODULE', $_POST['return_module']);
|
||||
else $get .= "ContactLeads";
|
||||
$get .= "&return_action=";
|
||||
if(!empty($_POST['return_action'])) $xtpl->assign('RETURN_ACTION', $_POST['return_action']);
|
||||
else $get .= "DetailView";
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// INBOUND EMAIL WORKFLOW
|
||||
if(isset($_REQUEST['inbound_email_id'])) {
|
||||
$xtpl->assign('INBOUND_EMAIL_ID', $_REQUEST['inbound_email_id']);
|
||||
$xtpl->assign('RETURN_MODULE', 'Emails');
|
||||
$xtpl->assign('RETURN_ACTION', 'EditView');
|
||||
if(isset($_REQUEST['start'])) {
|
||||
$xtpl->assign('START', $_REQUEST['start']);
|
||||
}
|
||||
|
||||
}
|
||||
//// END INBOUND EMAIL WORKFLOW
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
if(!empty($_POST['popup']))
|
||||
$input .= '<input type="hidden" name="popup" value="'.$_POST['popup'].'">';
|
||||
else
|
||||
$input .= '<input type="hidden" name="popup" value="false">';
|
||||
|
||||
if(!empty($_POST['to_pdf']))
|
||||
$input .= '<input type="hidden" name="to_pdf" value="'.$_POST['to_pdf'].'">';
|
||||
else
|
||||
$input .= '<input type="hidden" name="to_pdf" value="false">';
|
||||
|
||||
if(!empty($_POST['create']))
|
||||
$input .= '<input type="hidden" name="create" value="'.$_POST['create'].'">';
|
||||
else
|
||||
$input .= '<input type="hidden" name="create" value="false">';
|
||||
|
||||
if(!empty($_POST['return_id'])) $xtpl->assign('RETURN_ID', $_POST['return_id']);
|
||||
|
||||
$xtpl->assign('INPUT_FIELDS',$input);
|
||||
$xtpl->parse('main');
|
||||
$xtpl->out('main');
|
||||
|
||||
?>
|
||||
59
modules/ContactLeads/SugarFeeds/ContactLeadFeed.php
Normal file
59
modules/ContactLeads/SugarFeeds/ContactLeadFeed.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('modules/SugarFeed/feedLogicBase.php');
|
||||
require_once('modules/SugarFeed/SugarFeed.php');
|
||||
|
||||
class ContactLeadFeed extends FeedLogicBase{
|
||||
var $module = 'ContactLeads';
|
||||
function pushFeed($bean, $event, $arguments){
|
||||
$text = '';
|
||||
if(empty($bean->fetched_row)){
|
||||
$text = '{SugarFeed.CREATED_CONTACTLEAD} [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->first_name . ' ' . $bean->last_name . ']';
|
||||
}
|
||||
|
||||
if(!empty($text)){
|
||||
SugarFeed::pushFeed($text, $bean->module_dir, $bean->id
|
||||
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
21305
modules/ContactLeads/contactleadSeedData.php
Normal file
21305
modules/ContactLeads/contactleadSeedData.php
Normal file
File diff suppressed because it is too large
Load Diff
177
modules/ContactLeads/contactleadSeedData_jp.php
Normal file
177
modules/ContactLeads/contactleadSeedData_jp.php
Normal file
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
// FILE SUGAR INT ONLY
|
||||
$last_name_array = array(
|
||||
"Cumberbund",
|
||||
"Reînhold",
|
||||
"für Büurigérre",
|
||||
"Înténåénd",
|
||||
"Väestörekisterikeskus",
|
||||
"Elenå",
|
||||
"あおき",
|
||||
"オーラム",
|
||||
"タイロー",
|
||||
"ノルドウエル",
|
||||
"ロベルトス",
|
||||
"上原",
|
||||
"伊藤",
|
||||
"吉田",
|
||||
"土見",
|
||||
"大空寺",
|
||||
"天川",
|
||||
"小林",
|
||||
"平",
|
||||
"玉野",
|
||||
"石橋",
|
||||
"窪田",
|
||||
"真田",
|
||||
"徳川",
|
||||
"菊地",
|
||||
"谷山",
|
||||
"速瀬",
|
||||
"野島",
|
||||
"青木",
|
||||
"香月",
|
||||
"鳴海",
|
||||
);
|
||||
|
||||
$first_name_array = array(
|
||||
"Johånnes",
|
||||
"Hénri",
|
||||
"Marîe",
|
||||
"Lars",
|
||||
"Österreich",
|
||||
"Klaüse",
|
||||
"Александра",
|
||||
"Валерия",
|
||||
"Виктория",
|
||||
"あゆ",
|
||||
"クリス",
|
||||
"クリント",
|
||||
"さやか",
|
||||
"ジェイコブ",
|
||||
"ジョン",
|
||||
"はるか",
|
||||
"ひと美",
|
||||
"まゆ",
|
||||
"まりこ",
|
||||
"モトコ",
|
||||
"ラーズ",
|
||||
"孝之",
|
||||
"五郎",
|
||||
"徹",
|
||||
"紀章",
|
||||
"勝昭",
|
||||
"正二",
|
||||
"健太",
|
||||
"敏文",
|
||||
);
|
||||
|
||||
|
||||
$company_name_array = array(
|
||||
"Butée Torique",
|
||||
"Targéte",
|
||||
"Wally Marté",
|
||||
"Bünde-Mitte",
|
||||
"Fabriqué Interationål",
|
||||
"Életriqué Géneråle",
|
||||
"Bénellî GMBh",
|
||||
"реклама",
|
||||
"Berufskolleg für Elektrotechnik",
|
||||
"プロダクションG.I.",
|
||||
"パンダビジュアル",
|
||||
"A.B.ケアブレインズ",
|
||||
"株式会社未来商事",
|
||||
);
|
||||
|
||||
|
||||
$street_address_array = array(
|
||||
"123 Any Street",
|
||||
"562 38th Avenue",
|
||||
"2 Penultimate Loop",
|
||||
"3 Ôester Ĭsland",
|
||||
"777 ΩΔΠβκτηηκμ",
|
||||
"10 Besançon Ave",
|
||||
"4542 Rue Chambéry",
|
||||
"678 Rue St. Angoulême",
|
||||
"三番町1-2-5",
|
||||
"富士見が丘545",
|
||||
"北見通り659",
|
||||
"海岸通り975",
|
||||
"3丁目2-5",
|
||||
"金岡町54654",
|
||||
"多古4678",
|
||||
"大洲5454",
|
||||
"海浜幕張4789",
|
||||
"御茶ノ水647",
|
||||
);
|
||||
|
||||
|
||||
$city_array = array (
|
||||
"Nice",
|
||||
"Orléans",
|
||||
"San Francisco",
|
||||
"Cupertino",
|
||||
"New York",
|
||||
"London",
|
||||
"Moscow",
|
||||
"Lisbon",
|
||||
"Böblingen",
|
||||
"Thüringen",
|
||||
"中央区",
|
||||
"京都市",
|
||||
"ニューヨーク",
|
||||
"サンフランシスコ",
|
||||
"ロサンゼルス",
|
||||
"ロンドン",
|
||||
"シカゴ",
|
||||
);
|
||||
|
||||
$last_name_count = count($last_name_array);
|
||||
$first_name_count = count($first_name_array);
|
||||
$company_name_count = count($company_name_array);
|
||||
$street_address_count = count($street_address_array);
|
||||
$city_array_count = count($city_array);
|
||||
|
||||
?>
|
||||
67
modules/ContactLeads/controller.php
Normal file
67
modules/ContactLeads/controller.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
class ContactLeadsController extends SugarController
|
||||
{
|
||||
function action_Popup(){
|
||||
if(!empty($_REQUEST['html']) && $_REQUEST['html'] == 'mail_merge'){
|
||||
$this->view = 'mailmergepopup';
|
||||
}else{
|
||||
$this->view = 'popup';
|
||||
}
|
||||
}
|
||||
|
||||
function action_ValidPortalUsername()
|
||||
{
|
||||
$this->view = 'validportalusername';
|
||||
}
|
||||
|
||||
function action_RetrieveEmail()
|
||||
{
|
||||
$this->view = 'retrieveemail';
|
||||
}
|
||||
|
||||
function action_ContactLeadAddressPopup()
|
||||
{
|
||||
$this->view = 'contactleadaddresspopup';
|
||||
}
|
||||
|
||||
function action_CloseContactLeadAddressPopup()
|
||||
{
|
||||
$this->view = 'closecontactleadaddresspopup';
|
||||
}
|
||||
}
|
||||
?>
|
||||
105
modules/ContactLeads/field_arrays.php
Normal file
105
modules/ContactLeads/field_arrays.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Contains field arrays that are used for caching
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$fields_array['ContactLead'] = array ('column_fields' => Array("id"
|
||||
,"date_entered"
|
||||
,"date_modified"
|
||||
,"modified_user_id"
|
||||
,"assigned_user_id"
|
||||
, "created_by"
|
||||
|
||||
|
||||
|
||||
,"salutation"
|
||||
,"first_name"
|
||||
,"last_name"
|
||||
,"lead_source"
|
||||
,"title"
|
||||
,"department"
|
||||
,"birthdate"
|
||||
,"reports_to_id"
|
||||
,"do_not_call"
|
||||
,"phone_home"
|
||||
,"phone_mobile"
|
||||
, "portal_name"
|
||||
, "portal_app"
|
||||
,"portal_active"
|
||||
,"portal_password"
|
||||
,"phone_work"
|
||||
,"phone_other"
|
||||
,"phone_fax"
|
||||
,"assistant"
|
||||
,"assistant_phone"
|
||||
,"email_opt_out"
|
||||
,"primary_address_street"
|
||||
,"primary_address_city"
|
||||
,"primary_address_state"
|
||||
,"primary_address_postalcode"
|
||||
,"primary_address_country"
|
||||
,"alt_address_street"
|
||||
,"alt_address_city"
|
||||
,"alt_address_state"
|
||||
,"alt_address_postalcode"
|
||||
,"alt_address_country"
|
||||
,"description"
|
||||
,'invalid_email'
|
||||
,"campaign_id"
|
||||
,"mailing_tag"
|
||||
,"foreign_contactlead"
|
||||
),
|
||||
'list_fields' => Array('id', 'first_name', 'last_name', 'account_name', 'account_id', 'title', 'phone_work', 'assigned_user_name', 'assigned_user_id', "case_role", 'case_rel_id', 'opportunity_role', 'opportunity_rel_id','foreign_contactlead'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
,'invalid_email'
|
||||
|
||||
|
||||
|
||||
|
||||
),
|
||||
'required_fields' => array("last_name"=>1),
|
||||
);
|
||||
?>
|
||||
51
modules/ContactLeads/language/en_us.help.BusinessCard.html
Normal file
51
modules/ContactLeads/language/en_us.help.BusinessCard.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>ContactLeads Business Card</h1>
|
||||
|
||||
<p>Use this page to enter a contactlead's business card information such as address, phone numbers, fax number, and email address. Optionally, from the Lead Source drop-down list, specify how the contactlead source, such as a trade show or a cold call. You can add additional comments in the Description field.
|
||||
|
||||
60
modules/ContactLeads/language/en_us.help.DetailView.html
Normal file
60
modules/ContactLeads/language/en_us.help.DetailView.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>ContactLead Detail Page</h1>
|
||||
|
||||
<p>View the contactlead details such as address, activities, history, and opportunities. You can create and manage any of this information from the appropriate sub-panel.</p>
|
||||
<ul>
|
||||
<li>To edit the contactlead information, click <span class="helpButton">Edit</span>, make the necessary revisions, and click <span class="helpButton">Save</span>. </li>
|
||||
<li>To duplicate the information, click <span class="helpButton">Duplicate</span>. You can then make modifications to the record and save it as a different contactlead. The system displays the new record in the list on the ContactLeads Home page.</li>
|
||||
<li>To find duplicate records, click <span class="helpButton">Find Duplicates</span>.
|
||||
<li>To view or merge data from external data sources, click <span class="helpButton">Get Data</span>. This button displays only if the system administrator has enabled this functionality.
|
||||
<li>To manage newsletter subscriptions, click <span class="helpButton">Manage Subscriptions</span>. To add the individual to a newsletter subscription mailing list, select the newsletter from the Available Newsletters list and drag it to the NewsLetters Subscribed To list.
|
||||
Similarly, to remove the individual from the mailing list of a newsletter, drag the newsletter from the Newsletters Subscribed to list to the Available Newsletters list. Click <span class="helpButton">Save</span> to update the information.
|
||||
<li>To delete a contactlead, click <span class="helpButton">Delete</span>.</li>
|
||||
<li>To track changes made to contactlead information over time, click the <span class="helpButton">View Change Log</span> link.</li>
|
||||
</ul>
|
||||
92
modules/ContactLeads/language/en_us.help.EditView.html
Normal file
92
modules/ContactLeads/language/en_us.help.EditView.html
Normal file
@@ -0,0 +1,92 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>ContactLeads</h1>
|
||||
|
||||
<p>To create a contactlead, enter the following information:</p>
|
||||
<span class="helpButton">ContactLead Information:</span>
|
||||
|
||||
<li><span class="helpButton">First Name</span>. Enter the contactlead's first name.</li>
|
||||
<li><span class="helpButton">Last Name</span>. Enter the contactlead's last name.</li>
|
||||
<li><span class="helpButton">Account Name</span>. From the drop-down list, select the name of the related account.</li>
|
||||
<li><span class="helpButton">Lead Source</span>. From the drop-down list, select how the lead was generated.</li>
|
||||
<li><span class="helpButton">Campaign</span>. Enter the name of the associated campaign, if applicable. To select a campaign from the Campaigns list, click <span class="helpButton">Select</span> and then click the campaign name in the list.</li>
|
||||
<li><span class="helpButton">Office Phone</span>. Enter the contactlead's work number.</li>
|
||||
<li><span class="helpButton">Mobile</span>. Enter the contactlead's mobile phone number.</li>
|
||||
<li><span class="helpButton">Home</span>. Enter the contactlead's home phone number.</li>
|
||||
<li><span class="helpButton">Other Phone</span>. Enter the alternative phone number, if any.</li>
|
||||
<li><span class="helpButton">Fax</span>. Enter the contactlead's fax number.</li>
|
||||
<li><span class="helpButton">Assistant</span>. Enter the assistant's name.</li>
|
||||
<li><span class="helpButton">Assistant Phone</span>. Enter the assistant's phone number.</li>
|
||||
<li><span class="helpButton">Account Name</span>. Enter the account name associated with the contactlead; alternatively, click <span class="helpButton">Select</span> to choose from the existing list of accounts.</li>
|
||||
<li><span class="helpButton">Lead Source</span>. From the drop-down list, select the source that generated the lead, such as direct mail or trade show.</li>
|
||||
<li><span class="helpButton">Title</span>. Enter the contactlead's business title.</li>
|
||||
<li><span class="helpButton">Department</span>. Enter the department to which the contactlead belongs.</li>
|
||||
<li><span class="helpButton">Birthdate</span>. Click the Calendar icon and select the contactlead's birthdate.</li>
|
||||
<li><span class="helpButton">Reports To</span>. Click <span class="helpButton">Select</span> and select the contactlead's supervisor from the ContactLeads list.</li>
|
||||
<li><span class="helpButton">Sync to Outlook</span>. If you have installed Sugar Plug-in for Microsoft Outlook, select this box to synchronize this contactlead information with Outlook.</li>
|
||||
<li><span class="helpButton">Do Not Call</span>. Select this box to add the contactlead to the Do Not Call list. This is to ensure that the contactlead is not targeted during campaigns.</li>
|
||||
|
||||
|
||||
|
||||
<li><span class="helpButton">Assigned to</span>. Select the individual who is responsible for communicating with this contactlead. By default, you are assigned to the contactlead.
|
||||
</ul>
|
||||
<p>
|
||||
<span class="helpButton">Email Address(es):</span>
|
||||
Enter one or more emails addresses for the contactlead and mark it as Primary. If an email address is incorrect, select Invalid to mark it as incorrect. If you sent out campaign emails this contactlead and the individual chose to opt-out of receiving them, select Opted Out.
|
||||
<p>
|
||||
<span class="helpButton">Address Information:</span> Enter the primary address and other address information. To copy information from one section to the other, you can enter the address information on either one of the sections and click the arrow buttons. If you select a contactlead from the ContactLead's list, the system automatically enters the address for you. However, you can edit this information if needed.</p>
|
||||
<p><span class="helpButton">Description:</span> Enter a brief description for the contactlead.</p>
|
||||
<p><span class="helpButton">Portal Information:</span></p>
|
||||
<ul>
|
||||
<li><span class="helpButton">Portal Name</span>. Assign a user name to allow the contactlead to access your Case portal.</li>
|
||||
<li><span class="helpButton">Portal Password</span>. Enter a user password for the contactlead to access the portal.
|
||||
<li><span class="helpButton">Confirm Portal Password</span>. Enter the password again to confirm it.
|
||||
<li><span class="helpButton">Portal Active</span>. Select this box if the portal is active.</li>
|
||||
</ul>
|
||||
Click <span class="helpButton">Save</span> to create the contactlead; click <span class="helpButton">Cancel</span> to return to the ContactLeads Home page without creating the new contactlead.</li>
|
||||
|
||||
53
modules/ContactLeads/language/en_us.help.ImportVCard.html
Normal file
53
modules/ContactLeads/language/en_us.help.ImportVCard.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>ContactLeads Import Vcard</h1>
|
||||
Use this page to import a contactlead's electronic business card in vCard format from your local machine.
|
||||
|
||||
<p>To import a vCard file from your local file system into Sugar, click <span class="helpButton">Browse</span>, navigate to the vCard location on your local machine, and click <span class="helpButton">Open</span>. When the file path displays in the field, click <span class="helpButton">Import Vcard</span>.
|
||||
<p>The system creates a new contactlead and displays the information from the vCard on the new contactlead's detail page.
|
||||
|
||||
79
modules/ContactLeads/language/en_us.help.index.html
Normal file
79
modules/ContactLeads/language/en_us.help.index.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>ContactLeads</h1>
|
||||
|
||||
<p>Use the ContactLeads module to create and manage contactleads for your organization. ContactLeads are individuals who are not employees of your organization such as customers and vendors.</p>
|
||||
<p>The ContactLeads Home page displays the following information:</p>
|
||||
<ul>
|
||||
<li>A Search sub-panel where you can enter the subject or contactlead to search for related activities. To perform an advanced search using additional fields, click the <span class="helpButton">Advanced Search</span> tab.
|
||||
<br>To customize and save the search layout and results, click the <span class="helpButton">Saved Search & Layout</span> link on the Advanced tab. To view a column in the search result, move it to the Display Column list using the left arrow. You can also change the order in which the results display from Ascending to Descending. Enter a name for the search results in the Save this View as ? field and click <span class="helpButton">Save</span>.
|
||||
<p>
|
||||
|
||||
<li>To search for contactleads in records assigned to you, select <span class="helpButton">Only my items</span>.
|
||||
<li>To perform an advanced search using additional fields, click the <span class="helpButton">Advanced Search</span> tab.
|
||||
<li>To customize and save the search layout and results, click the <span class="helpButton">Saved Search & Layout</span> tab.
|
||||
</ul>
|
||||
<li>A list of existing contactlead names along with related information such as the account name and email address.</li><ul>
|
||||
<li>To edit the contactlead details, click the Edit icon adjacent to the user name; alternatively, click <span class="helpButton">Edit</span> on the detail page.
|
||||
<li>To email a contactlead, click the email address.</ul>
|
||||
<li>To view the details of a contactlead, click the name in the ContactLeads list.</li>
|
||||
<li>To update, delete, and synchronize multiple contactleads, select the contactleads from the list and use the Mass Update section.</li>
|
||||
<li>To display the details of a contactlead, click the contactlead name in the list.
|
||||
<li>To export one or more contactleads, click <span class="helpButton">Export</span> located above the contactlead names.
|
||||
<li>To merge duplicate contactleads into one record, select the contactleads, and click <span class="helpButton">Merge Duplicates</span>.
|
||||
</ul>
|
||||
<ul>
|
||||
<li>A Shortcuts section that displays the following options:</li><ul>
|
||||
<li><span class="helpShortcut">Create ContactLead</span>. Click this option to create a record for a new contactlead.</li>
|
||||
<li><span class="helpShortcut">Enter Business Card</span>. Click this option to add information from the business card of a new contactlead.</li>
|
||||
<li><span class="helpShortcut">Create From vCard</span>. Click this option to import a vCard file from your local system.</li>
|
||||
<li><span class="helpShortcut">ContactLeads</span>. Click this option to navigate back to the ContactLeads Home page from a contactlead's detail page.</li>
|
||||
<li><span class="helpShortcut">ContactLead Reports</span>. Click this option to view an existing report on your contactleads, or to create a new report.</li>
|
||||
<li><span class="helpShortcut">Import</span>. Click this option to import contactlead information from an external application or file.</li>
|
||||
</ul>
|
||||
|
||||
238
modules/ContactLeads/language/en_us.lang.php
Normal file
238
modules/ContactLeads/language/en_us.lang.php
Normal file
@@ -0,0 +1,238 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_FOREIGN_CONTACTLEAD'=>'Foreign contactlead',
|
||||
'LBL_MAILING_TAG'=>'Mailing Tag',
|
||||
//DON'T CONVERT THESE THEY ARE MAPPINGS
|
||||
'db_last_name' => 'LBL_LIST_LAST_NAME',
|
||||
'db_first_name' => 'LBL_LIST_FIRST_NAME',
|
||||
'db_title' => 'LBL_LIST_TITLE',
|
||||
'db_email1' => 'LBL_LIST_EMAIL_ADDRESS',
|
||||
'db_email2' => 'LBL_LIST_OTHER_EMAIL_ADDRESS',
|
||||
//END DON'T CONVERT
|
||||
|
||||
|
||||
|
||||
'ERR_DELETE_RECORD' => 'Specify the record number to delete the contactlead.',
|
||||
'LBL_ACCOUNT_ID' => 'Account ID:',
|
||||
'LBL_ACCOUNT_NAME' => 'Account Name:',
|
||||
'LBL_CAMPAIGN' => 'Campaign:',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Activities',
|
||||
'LBL_ADD_BUSINESSCARD' => 'Enter Business Card',
|
||||
'LBL_ADDMORE_BUSINESSCARD' => 'Add another business card',
|
||||
'LBL_ADDRESS_INFORMATION' => 'Address Information',
|
||||
'LBL_ALT_ADDRESS_CITY' => 'Alternate Address City:',
|
||||
'LBL_ALT_ADDRESS_COUNTRY' => 'Alternate Address Country:',
|
||||
'LBL_ALT_ADDRESS_POSTALCODE' => 'Alternate Address Postal Code:',
|
||||
'LBL_ALT_ADDRESS_STATE' => 'Alternate Address State:',
|
||||
'LBL_ALT_ADDRESS_STREET_2' => 'Alternate Address Street 2:',
|
||||
'LBL_ALT_ADDRESS_STREET_3' => 'Alternate Address Street 3:',
|
||||
'LBL_ALT_ADDRESS_STREET' => 'Alternate Address Street:',
|
||||
'LBL_ALTERNATE_ADDRESS' => 'Other Address:',
|
||||
'LBL_ANY_ADDRESS' => 'Any Address:',
|
||||
'LBL_ANY_EMAIL' => 'Any Email:',
|
||||
'LBL_ANY_PHONE' => 'Any Phone:',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Assigned to:',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned User',
|
||||
'LBL_ASSISTANT_PHONE' => 'Assistant Phone:',
|
||||
'LBL_ASSISTANT' => 'Assistant:',
|
||||
'LBL_BIRTHDATE' => 'Birthdate:',
|
||||
'LBL_BUSINESSCARD' => 'Business Card',
|
||||
'LBL_CITY' => 'City:',
|
||||
'LBL_CAMPAIGN_ID' => 'Campaign ID',
|
||||
'LBL_CONTACTLEAD_INFORMATION' => 'ContactLead Information',
|
||||
'LBL_CONTACTLEAD_NAME' => 'ContactLead Name:',
|
||||
'LBL_CONTACTLEAD_OPP_FORM_TITLE' => 'ContactLead-Opportunity:',
|
||||
'LBL_CONTACTLEAD_ROLE' => 'Role:',
|
||||
'LBL_CONTACTLEAD' => 'ContactLead:',
|
||||
'LBL_COUNTRY' => 'Country:',
|
||||
'LBL_CREATED_ACCOUNT' => 'Created a new account',
|
||||
'LBL_CREATED_CALL' => 'Created a new call',
|
||||
'LBL_CREATED_CONTACTLEAD' => 'Created a new contactlead',
|
||||
'LBL_CREATED_MEETING' => 'Created a new meeting',
|
||||
'LBL_CREATED_OPPORTUNITY' =>'Created a new opportunity',
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified:',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'ContactLeads',
|
||||
'LBL_DEPARTMENT' => 'Department:',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Description Information',
|
||||
'LBL_DESCRIPTION' => 'Description:',
|
||||
'LBL_DIRECT_REPORTS_SUBPANEL_TITLE'=>'Direct Reports',
|
||||
'LBL_DO_NOT_CALL' => 'Do Not Call:',
|
||||
'LBL_DUPLICATE' => 'Possible Duplicate ContactLeads',
|
||||
'LBL_EMAIL_ADDRESS' => 'Email:',
|
||||
'LBL_EMAIL_OPT_OUT' => 'Email Opt Out:',
|
||||
'LBL_EMPTY_VCARD' => 'Please select a vCard file',
|
||||
'LBL_EXISTING_ACCOUNT' => 'Used an existing account',
|
||||
'LBL_EXISTING_CONTACTLEAD' => 'Used an existing contactlead',
|
||||
'LBL_EXISTING_OPPORTUNITY'=> 'Used an existing opportunity',
|
||||
'LBL_FAX_PHONE' => 'Fax:',
|
||||
'LBL_FIRST_NAME' => 'First Name:',
|
||||
'LBL_FULL_NAME' => 'Full Name:',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE'=>'History',
|
||||
'LBL_HOME_PHONE' => 'Home:',
|
||||
'LBL_ID' => 'ID:',
|
||||
'LBL_IMPORT_VCARD' => 'Import vCard',
|
||||
'LBL_VCARD' => 'vCard',
|
||||
'LBL_IMPORT_VCARDTEXT' => 'Automatically create a new contactlead by importing a vCard from your file system.',
|
||||
'LBL_INVALID_EMAIL'=>'Invalid Email:',
|
||||
'LBL_INVITEE' => 'Direct Reports',
|
||||
'LBL_LAST_NAME' => 'Last Name:',
|
||||
'LBL_LEAD_SOURCE' => 'Lead Source:',
|
||||
'LBL_LIST_ACCEPT_STATUS' => 'Accept Status',
|
||||
'LBL_LIST_ACCOUNT_NAME' => 'Account Name',
|
||||
'LBL_LIST_CONTACTLEAD_NAME' => 'ContactLead Name',
|
||||
'LBL_LIST_CONTACTLEAD_ROLE' => 'Role',
|
||||
'LBL_LIST_EMAIL_ADDRESS' => 'Email',
|
||||
'LBL_LIST_FIRST_NAME' => 'First Name',
|
||||
'LBL_LIST_FORM_TITLE' => 'ContactLead List',
|
||||
'LBL_VIEW_FORM_TITLE' => 'ContactLead View',
|
||||
'LBL_LIST_LAST_NAME' => 'Last Name',
|
||||
'LBL_LIST_DATE_MODIFIED' => 'Data Modyfikacji',
|
||||
'LBL_LIST_NAME' => 'Name',
|
||||
'LBL_LIST_OTHER_EMAIL_ADDRESS' => 'Other Email',
|
||||
'LBL_LIST_PHONE' => 'Office Phone',
|
||||
'LBL_LIST_TITLE' => 'Title',
|
||||
'LBL_MOBILE_PHONE' => 'Mobile:',
|
||||
'LBL_MODIFIED' => 'Modified By:',
|
||||
'LBL_MODULE_NAME' => 'ContactLeads',
|
||||
'LBL_MODULE_TITLE' => 'ContactLeads: Home',
|
||||
'LBL_NAME' => 'Name:',
|
||||
'LBL_NEW_FORM_TITLE' => 'New ContactLead',
|
||||
'LBL_NEW_PORTAL_PASSWORD' => 'New Portal Password:',
|
||||
'LBL_NOTE_SUBJECT' =>'Note Subject',
|
||||
'LBL_OFFICE_PHONE' => 'Office Phone:',
|
||||
'LBL_OPP_NAME' => 'Opportunity Name:',
|
||||
'LBL_OPPORTUNITY_ROLE_ID'=>'Opportunity Role ID:',
|
||||
'LBL_OPPORTUNITY_ROLE'=>'Opportunity Role',
|
||||
'LBL_OTHER_EMAIL_ADDRESS' => 'Other Email:',
|
||||
'LBL_OTHER_PHONE' => 'Other Phone:',
|
||||
'LBL_PHONE' => 'Phone:',
|
||||
'LBL_PORTAL_ACTIVE' => 'Portal Active:',
|
||||
'LBL_PORTAL_APP'=>'Portal Application:',
|
||||
'LBL_PORTAL_INFORMATION' => 'Portal Information',
|
||||
'LBL_PORTAL_NAME' => 'Portal Name:',
|
||||
'LBL_PORTAL_PASSWORD_ISSET' => 'Portal Password is Set:',
|
||||
'LBL_POSTAL_CODE' => 'Postal Code:',
|
||||
'LBL_PRIMARY_ADDRESS_CITY' => 'Primary Address City:',
|
||||
'LBL_PRIMARY_ADDRESS_COUNTRY' => 'Primary Address Country:',
|
||||
'LBL_PRIMARY_ADDRESS_POSTALCODE' => 'Primary Address Postal Code:',
|
||||
'LBL_PRIMARY_ADDRESS_STATE' => 'Primary Address State:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET_2' => 'Primary Address Street 2:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET_3' => 'Primary Address Street 3:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET' => 'Primary Address Street:',
|
||||
'LBL_PRIMARY_ADDRESS' => 'Primary Address:',
|
||||
'LBL_PRODUCTS_TITLE'=>'Products',
|
||||
'LBL_RELATED_CONTACTLEADS_TITLE'=>'Related ContactLeads',
|
||||
'LBL_REPORTS_TO_ID'=>'Reports to ID:',
|
||||
'LBL_REPORTS_TO' => 'Reports To:',
|
||||
'LBL_RESOURCE_NAME' => 'Resource Name',
|
||||
'LBL_SALUTATION' => 'Salutation:',
|
||||
'LBL_SAVE_CONTACTLEAD' => 'Save ContactLead',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'ContactLead Search',
|
||||
'LBL_SELECT_CHECKED_BUTTON_LABEL' => 'Select Checked ContactLeads',
|
||||
'LBL_SELECT_CHECKED_BUTTON_TITLE' => 'Select Checked ContactLeads',
|
||||
'LBL_STATE' => 'State:',
|
||||
'LBL_SYNC_CONTACTLEAD' => 'Sync to Outlook®:',
|
||||
'LBL_PROSPECT_LIST' => 'Prospect List',
|
||||
|
||||
|
||||
|
||||
'LBL_TITLE' => 'Title:',
|
||||
'LNK_CONTACTLEAD_LIST' => 'ContactLeads',
|
||||
'LNK_IMPORT_VCARD' => 'Create From vCard',
|
||||
'LNK_NEW_ACCOUNT' => 'Create Account',
|
||||
'LNK_NEW_APPOINTMENT' => 'Create Appointment',
|
||||
'LNK_NEW_CALL' => 'Schedule Call',
|
||||
'LNK_NEW_CASE' => 'Create Case',
|
||||
'LNK_NEW_CONTACTLEAD' => 'Create ContactLead',
|
||||
'LNK_NEW_EMAIL' => 'Archive Email',
|
||||
'LNK_NEW_MEETING' => 'Schedule Meeting',
|
||||
'LNK_NEW_NOTE' => 'Create Note',
|
||||
'LNK_NEW_OPPORTUNITY' => 'Create Opportunity',
|
||||
'LNK_NEW_TASK' => 'Create Task',
|
||||
'LNK_SELECT_ACCOUNT' => "Select Account",
|
||||
'MSG_DUPLICATE' => 'The contactlead record you are about to create might be a duplicate of a contactlead record that already exists. ContactLead records containing similar names and/or email addresses are listed below.<br>Click Save to continue creating this new contactlead, or click Cancel to return to the module without creating the contactlead.',
|
||||
'MSG_SHOW_DUPLICATES' => 'The contactlead record you are about to create might be a duplicate of a contactlead record that already exists. ContactLead records containing similar names and/or email addresses are listed below.<br>Click Save to continue creating this new contactlead, or click Cancel to return to the module without creating the contactlead.',
|
||||
'NTC_COPY_ALTERNATE_ADDRESS' => 'Copy alternate address to primary address',
|
||||
'NTC_COPY_PRIMARY_ADDRESS' => 'Copy primary address to alternate address',
|
||||
'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to delete this record?',
|
||||
'NTC_OPPORTUNITY_REQUIRES_ACCOUNT' => 'Creating an opportunity requires an account.\n Please either create a new account or select an existing one.',
|
||||
'NTC_REMOVE_CONFIRMATION' => 'Are you sure you want to remove this contactlead from the case?',
|
||||
'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Are you sure you want to remove this record as a direct report?',
|
||||
|
||||
'LBL_USER_PASSWORD' => 'Password:',
|
||||
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Leads',
|
||||
'LBL_OPPORTUNITIES_SUBPANEL_TITLE' => 'Opportunities',
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_CASES_SUBPANEL_TITLE' => 'Cases',
|
||||
'LBL_BUGS_SUBPANEL_TITLE' => 'Bugs',
|
||||
'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projects',
|
||||
'LBL_COPY_ADDRESS_CHECKED' => 'Copy Address to Checked ContactLeads',
|
||||
'LBL_TARGET_OF_CAMPAIGNS' => 'Campaigns (Target of) :',
|
||||
'LBL_CAMPAIGNS' => 'Campaigns',
|
||||
'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE'=>'Campaigns',
|
||||
'LBL_LIST_CITY' => 'City',
|
||||
'LBL_LIST_STATE' => 'State',
|
||||
'LBL_HOMEPAGE_TITLE' => 'My ContactLeads',
|
||||
'LBL_OPPORTUNITIES' => 'Opportunities',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_CHECKOUT_DATE'=>'Checkout Date',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)
|
||||
?>
|
||||
235
modules/ContactLeads/language/ge_ge.lang.php
Normal file
235
modules/ContactLeads/language/ge_ge.lang.php
Normal file
@@ -0,0 +1,235 @@
|
||||
i<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
//DON'T CONVERT THESE THEY ARE MAPPINGS
|
||||
'db_last_name' => 'LBL_LIST_LAST_NAME',
|
||||
'db_first_name' => 'LBL_LIST_FIRST_NAME',
|
||||
'db_title' => 'LBL_LIST_TITLE',
|
||||
'db_email1' => 'LBL_LIST_EMAIL_ADDRESS',
|
||||
'db_email2' => 'LBL_LIST_OTHER_EMAIL_ADDRESS',
|
||||
//END DON'T CONVERT
|
||||
|
||||
|
||||
|
||||
'ERR_DELETE_RECORD' => 'Die Nummer eines Eintrages muss angegeben werden um einen Kontakt zu löschen!',
|
||||
'LBL_ACCOUNT_ID' => 'Firma ID',
|
||||
'LBL_ACCOUNT_NAME' => 'Firmenname:',
|
||||
'LBL_CAMPAIGN' => 'Kampagne:',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Aktivitäten',
|
||||
'LBL_ADD_BUSINESSCARD' => 'Eingabe Visitenkarte',
|
||||
'LBL_ADDMORE_BUSINESSCARD' => 'Weitere Visitenkarte anlegen',
|
||||
'LBL_ADDRESS_INFORMATION' => 'Adressinformation',
|
||||
'LBL_ALT_ADDRESS_CITY' => '2. Adresse Stadt:',
|
||||
'LBL_ALT_ADDRESS_COUNTRY' => '2. Adresse Land:',
|
||||
'LBL_ALT_ADDRESS_POSTALCODE' => '2. Adresse PLZ:',
|
||||
'LBL_ALT_ADDRESS_STATE' => '2. Adresse Bundesland:',
|
||||
'LBL_ALT_ADDRESS_STREET_2' => '2. Adresse Straße 2:',
|
||||
'LBL_ALT_ADDRESS_STREET_3' => '2. Adresse Straße 3:',
|
||||
'LBL_ALT_ADDRESS_STREET' => '2. Adresse Straße:',
|
||||
'LBL_ALTERNATE_ADDRESS' => 'Weitere Adresse:',
|
||||
'LBL_ANY_ADDRESS' => 'Irgendeine Adresse:',
|
||||
'LBL_ANY_EMAIL' => 'Irgendeine E-Mail:',
|
||||
'LBL_ANY_PHONE' => 'Irgendeine Telefonnummer:',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Zugewiesen an:',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Zugew. Benutzer',
|
||||
'LBL_ASSISTANT_PHONE' => 'Telefonnr. Assistent:',
|
||||
'LBL_ASSISTANT' => 'Assistent:',
|
||||
'LBL_BIRTHDATE' => 'Geburtstag:',
|
||||
'LBL_BUSINESSCARD' => 'Visitenkarte',
|
||||
'LBL_CITY' => 'Stadt:',
|
||||
'LBL_CAMPAIGN_ID' => 'Kampagnen ID',
|
||||
'LBL_CONTACTLEAD_INFORMATION' => 'Kontakt Information',
|
||||
'LBL_CONTACTLEAD_NAME' => 'Name:',
|
||||
'LBL_CONTACTLEAD_OPP_FORM_TITLE' => 'Kontakt-Verkaufschance:',
|
||||
'LBL_CONTACTLEAD_ROLE' => 'Beruf:',
|
||||
'LBL_CONTACTLEAD' => 'Kontakt:',
|
||||
'LBL_COUNTRY' => 'Land:',
|
||||
'LBL_CREATED_ACCOUNT' => 'Neue Firma angelegt',
|
||||
'LBL_CREATED_CALL' => 'Neuer Anruf angelegt',
|
||||
'LBL_CREATED_CONTACTLEAD' => 'Neuer Kontakt angelegt',
|
||||
'LBL_CREATED_MEETING' => 'Neues Meeting angelegt',
|
||||
'LBL_CREATED_OPPORTUNITY' =>'Neue Verkaufschance erstellt',
|
||||
'LBL_DATE_MODIFIED' => 'Geändert am:',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Kontakte',
|
||||
'LBL_DEPARTMENT' => 'Abteilung:',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Beschreibungsinformation',
|
||||
'LBL_DESCRIPTION' => 'Beschreibung:',
|
||||
'LBL_DIRECT_REPORTS_SUBPANEL_TITLE'=>'Direkt-Unterstellte',
|
||||
'LBL_DO_NOT_CALL' => 'Nicht anrufen:',
|
||||
'LBL_DUPLICATE' => 'Mögliche doppelte Kontakte',
|
||||
'LBL_EMAIL_ADDRESS' => 'E-Mail:',
|
||||
'LBL_EMAIL_OPT_OUT' => 'Keine E-Mails senden:',
|
||||
'LBL_EMPTY_VCARD' => 'Bitte wählen Sie eine vCard Datei aus',
|
||||
'LBL_EXISTING_ACCOUNT' => 'Vorhandene Firma ausgewählt',
|
||||
'LBL_EXISTING_CONTACTLEAD' => 'Vorhandener Kontakt ausgewählt',
|
||||
'LBL_EXISTING_OPPORTUNITY'=> 'Vorhandene Verkaufschance benutzt',
|
||||
'LBL_FAX_PHONE' => 'Fax:',
|
||||
'LBL_FIRST_NAME' => 'Vorname:',
|
||||
'LBL_FULL_NAME' => 'Ganzer Name:',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE'=>'Verlauf',
|
||||
'LBL_HOME_PHONE' => 'Privat:',
|
||||
'LBL_ID' => 'ID:',
|
||||
'LBL_IMPORT_VCARD' => 'vCard importieren',
|
||||
'LBL_VCARD' => 'vCard',
|
||||
'LBL_IMPORT_VCARDTEXT' => 'Durch Import einer vCard neuen Kontakt automatisch anlegen.',
|
||||
'LBL_INVALID_EMAIL'=>'Ungültige E-Mail:',
|
||||
'LBL_INVITEE' => 'Direkt-Unterstellte',
|
||||
'LBL_LAST_NAME' => 'Nachname:',
|
||||
'LBL_LEAD_SOURCE' => 'Quelle:',
|
||||
'LBL_LIST_ACCEPT_STATUS' => 'Status',
|
||||
'LBL_LIST_ACCOUNT_NAME' => 'Firmenname',
|
||||
'LBL_LIST_CONTACTLEAD_NAME' => 'Kontakt:',
|
||||
'LBL_LIST_CONTACTLEAD_ROLE' => 'Rolle',
|
||||
'LBL_LIST_EMAIL_ADDRESS' => 'E-Mail',
|
||||
'LBL_LIST_FIRST_NAME' => 'Vorname',
|
||||
'LBL_LIST_FORM_TITLE' => 'Kontakt Liste',
|
||||
'LBL_VIEW_FORM_TITLE' => 'Kontakt Ansicht',
|
||||
'LBL_LIST_LAST_NAME' => 'Nachname',
|
||||
'LBL_LIST_NAME' => 'Name',
|
||||
'LBL_LIST_OTHER_EMAIL_ADDRESS' => 'Weitere E-Mail',
|
||||
'LBL_LIST_PHONE' => 'Telefon Büro',
|
||||
'LBL_LIST_TITLE' => 'Funktion',
|
||||
'LBL_MOBILE_PHONE' => 'Mobiltelefon:',
|
||||
'LBL_MODIFIED' => 'Geändert von:',
|
||||
'LBL_MODULE_NAME' => 'Kontakte',
|
||||
'LBL_MODULE_TITLE' => 'Kontakte: Home',
|
||||
'LBL_NAME' => 'Name:',
|
||||
'LBL_NEW_FORM_TITLE' => 'Neuer Kontakt',
|
||||
'LBL_NEW_PORTAL_PASSWORD' => 'Neues Portal Passwort:',
|
||||
'LBL_NOTE_SUBJECT' =>'Betreff Notiz',
|
||||
'LBL_OFFICE_PHONE' => 'Bürotelefon:',
|
||||
'LBL_OPP_NAME' => 'Verkaufschance Name:',
|
||||
'LBL_OPPORTUNITY_ROLE_ID'=>'Verkaufschance Rollen ID:',
|
||||
'LBL_OPPORTUNITY_ROLE'=>'Verkaufschance Rolle',
|
||||
'LBL_OTHER_EMAIL_ADDRESS' => 'Weitere E-Mail:',
|
||||
'LBL_OTHER_PHONE' => 'Weiteres Telefon:',
|
||||
'LBL_PHONE' => 'Telefon:',
|
||||
'LBL_PORTAL_ACTIVE' => 'Portal Aktiv:',
|
||||
'LBL_PORTAL_APP'=>'Portal Anwendung',
|
||||
'LBL_PORTAL_INFORMATION' => 'Portal Information',
|
||||
'LBL_PORTAL_NAME' => 'Portal Name:',
|
||||
'LBL_PORTAL_PASSWORD_ISSET' => 'Portal Password ist gesetzt:',
|
||||
'LBL_POSTAL_CODE' => 'PLZ:',
|
||||
'LBL_PRIMARY_ADDRESS_CITY' => 'Hauptadresse Stadt:',
|
||||
'LBL_PRIMARY_ADDRESS_COUNTRY' => 'Hauptadresse Land:',
|
||||
'LBL_PRIMARY_ADDRESS_POSTALCODE' => 'Hauptadresse PLZ:',
|
||||
'LBL_PRIMARY_ADDRESS_STATE' => 'Hauptadresse Bundesland:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET_2' => 'Hauptadresse Straße 2:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET_3' => 'Hauptadresse Straße 3:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET' => 'Hauptadresse Straße:',
|
||||
'LBL_PRIMARY_ADDRESS' => 'Hauptadresse:',
|
||||
'LBL_PRODUCTS_TITLE'=>'Produkte',
|
||||
'LBL_RELATED_CONTACTLEADS_TITLE'=>'Verknüpfte Kontakte',
|
||||
'LBL_REPORTS_TO_ID'=>'Berichtet an ID',
|
||||
'LBL_REPORTS_TO' => 'Berichtet an:',
|
||||
'LBL_RESOURCE_NAME' => 'Ressourcenname',
|
||||
'LBL_SALUTATION' => 'Anrede:',
|
||||
'LBL_SAVE_CONTACTLEAD' => 'Kontakt speichern',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Kontakte Suche',
|
||||
'LBL_SELECT_CHECKED_BUTTON_LABEL' => 'Markierte Kontakte auswählen',
|
||||
'LBL_SELECT_CHECKED_BUTTON_TITLE' => 'Markierte Kontakte auswählen',
|
||||
'LBL_STATE' => 'Bundesland:',
|
||||
'LBL_SYNC_CONTACTLEAD' => 'Sync mit Outlook®:',
|
||||
'LBL_PROSPECT_LIST' => 'Kontaktliste',
|
||||
|
||||
|
||||
|
||||
'LBL_TITLE' => 'Funktion:',
|
||||
'LNK_CONTACTLEAD_LIST' => 'Kontakte',
|
||||
'LNK_IMPORT_VCARD' => 'vCard importieren',
|
||||
'LNK_NEW_ACCOUNT' => 'Neue Firma',
|
||||
'LNK_NEW_APPOINTMENT' => 'Neuer Termin',
|
||||
'LNK_NEW_CALL' => 'Neuer Anruf',
|
||||
'LNK_NEW_CASE' => 'Neuer Fall',
|
||||
'LNK_NEW_CONTACTLEAD' => 'Neuer Kontakt',
|
||||
'LNK_NEW_EMAIL' => 'E-Mail archivieren',
|
||||
'LNK_NEW_MEETING' => 'Neues Meeting',
|
||||
'LNK_NEW_NOTE' => 'Neue Notiz',
|
||||
'LNK_NEW_OPPORTUNITY' => 'Neue Verkaufschance',
|
||||
'LNK_NEW_TASK' => 'Neue Aufgabe',
|
||||
'LNK_SELECT_ACCOUNT' => "Firma auswählen",
|
||||
'MSG_DUPLICATE' => 'Der Kontakt den Sie gerade erstellen, könnte eine Dublette eines bereits bestehenden Kontakts sein. Kontakte mit ähnlichen Namen / E-Mail Adressen sind unten aufgeführt.<br>Drücken Sie auf Speichern um fortzusetzen oder auf Abbrechen um zum Modul zurückzukehren ohne den Kontakt zu speichern.',
|
||||
'MSG_SHOW_DUPLICATES' => 'Der Kontakt den Sie gerade erstellen, könnte eine Dublette eines bereits bestehenden Kontakts sein. Kontakte mit ähnlichen Namen / E-Mail Adressen sind unten aufgeführt.<br>Drücken Sie auf Speichern um fortzusetzen oder auf Abbrechen um zum Modul zurückzukehren ohne den Kontakt zu speichern.',
|
||||
'NTC_COPY_ALTERNATE_ADDRESS' => 'Weitere Adresse in Hauptadresse kopieren',
|
||||
'NTC_COPY_PRIMARY_ADDRESS' => 'Hauptadresse in weitere Adresse kopieren',
|
||||
'NTC_DELETE_CONFIRMATION' => 'Sind Sie sicher, dass Sie diesen Eintrag löschen wollen?',
|
||||
'NTC_OPPORTUNITY_REQUIRES_ACCOUNT' => 'Zum erstellen einer Verkaufschance benötigen Sie eine Firma. Bitte erstellen Sie eine Firma oder wählen Sie eine existierende aus.',
|
||||
'NTC_REMOVE_CONFIRMATION' => 'Möchten Sie diesen Kontakt wirklich von diesem Fall entfernen?',
|
||||
'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Möchten Sie diesen Eintrag wirklich als direkten Bericht entfernen?',
|
||||
|
||||
'LBL_USER_PASSWORD' => 'Passwort:',
|
||||
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Interessenten',
|
||||
'LBL_OPPORTUNITIES_SUBPANEL_TITLE' => 'Verkaufschancen',
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_CASES_SUBPANEL_TITLE' => 'Fälle',
|
||||
'LBL_BUGS_SUBPANEL_TITLE' => 'Fehler',
|
||||
'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projekte',
|
||||
'LBL_COPY_ADDRESS_CHECKED' => 'Adresse zu gewählten Kontakten kopieren',
|
||||
'LBL_TARGET_OF_CAMPAIGNS' => 'Kampagnen (Ziele von):',
|
||||
'LBL_CAMPAIGNS' => 'Kampagnen',
|
||||
'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE'=>'Kampagnen',
|
||||
'LBL_LIST_CITY' => 'Stadt',
|
||||
'LBL_LIST_STATE' => 'Bundesland',
|
||||
'LBL_HOMEPAGE_TITLE' => 'Meine Kontakte',
|
||||
'LBL_OPPORTUNITIES' => 'Verkaufschancen',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_CHECKOUT_DATE'=>'Datum ausgecheckt',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)
|
||||
?>
|
||||
52
modules/ContactLeads/language/pl_pl.help.DetailView.html
Normal file
52
modules/ContactLeads/language/pl_pl.help.DetailView.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>ContactLead Detail Page</h1>
|
||||
|
||||
<p>View the contactlead details such as address, activities, history, and opportunities. You can create and manage any of this information from the appropriate sub-panel.</p>
|
||||
<ul>
|
||||
<li>To edit the contactlead information, click <span class="helpButton">Edit</span>, make the necessary revisions, and click <span class="helpButton">Save</span>. </li>
|
||||
<li>To duplicate the information, click <span class="helpButton">Duplicate</span>. You can then make modifications to the record and save it as a different contactlead. The system displays the new record in the list on the ContactLeads Home page.</li>
|
||||
<li>To find duplicate records, click <span class="helpButton">Find Duplicates</span>.
|
||||
<li>To view or merge data from external data sources, click <span class="helpButton">Get Data</span>. This button displays only if the system administrator has enabled this functionality.
|
||||
<li>To manage newsletter subscriptions, click <span class="helpButton">Manage Subscriptions</span>. To add the individual to a newsletter subscription mailing list, select the newsletter from the Available Newsletters list and drag it to the NewsLetters Subscribed To list.
|
||||
Similarly, to remove the individual from the mailing list of a newsletter, drag the newsletter from the Newsletters Subscribed to list to the Available Newsletters list. Click <span class="helpButton">Save</span> to update the information.
|
||||
<li>To delete a contactlead, click <span class="helpButton">Delete</span>.</li>
|
||||
<li>To track changes made to contactlead information over time, click the <span class="helpButton">View Change Log</span> link.</li>
|
||||
</ul>
|
||||
221
modules/ContactLeads/language/pl_pl.lang.php
Normal file
221
modules/ContactLeads/language/pl_pl.lang.php
Normal file
@@ -0,0 +1,221 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2005 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1 -->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
//DON'T CONVERT THESE THEY ARE MAPPINGS
|
||||
'db_last_name' => 'LBL_LIST_LAST_NAME',
|
||||
'db_first_name' => 'LBL_LIST_FIRST_NAME',
|
||||
'db_title' => 'LBL_LIST_TITLE',
|
||||
'db_email1' => 'LBL_LIST_EMAIL_ADDRESS',
|
||||
'db_email2' => 'LBL_LIST_OTHER_EMAIL_ADDRESS',
|
||||
//END DON'T CONVERT
|
||||
|
||||
'LNK_CONTACTLEAD_REPORTS' => 'Raporty Kontaktów',
|
||||
'LBL_PANEL_MAILINGGROUPS'=>'Grupy mailingowe',
|
||||
'LBL_MAILINGGROUP_NAME'=>"Nazwa grupy",
|
||||
'LBL_MAILINGGROUP_AVAILABLE'=>"Aktywna",
|
||||
'ERR_DELETE_RECORD' => 'Numer rekordu musi być określony, aby usunąć kontakt.',
|
||||
'LBL_ACCOUNT_ID' => 'ID Klienta:',
|
||||
'LBL_ACCOUNT_NAME' => 'Nazwa Klienta:',
|
||||
'LBL_CAMPAIGN' => 'Kampania:',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Działania',
|
||||
'LBL_ADD_BUSINESSCARD' => 'Wprowadź wizytówkę',
|
||||
'LBL_ADDMORE_BUSINESSCARD' => 'Dodaj inną wizytówkę',
|
||||
'LBL_ADDRESS_INFORMATION' => 'Dane adresowe',
|
||||
'LBL_ALT_ADDRESS_CITY' => 'Inne miasto Adresata:',
|
||||
'LBL_ALT_ADDRESS_COUNTRY' => 'Inny kraj Adresata:',
|
||||
'LBL_ALT_ADDRESS_POSTALCODE' => 'Inny Kod pocztowy Adresata:',
|
||||
'LBL_ALT_ADDRESS_STATE' => 'Nazwa innego województwa Adresata:',
|
||||
'LBL_ALT_ADDRESS_STREET_2' => 'Inna nazwa ulicy Adresata 2:',
|
||||
'LBL_ALT_ADDRESS_STREET_3' => 'Inna nazwa ulicy Adresata 3:',
|
||||
'LBL_ALT_ADDRESS_STREET' => 'Inna nazwy ulicy Adresata:',
|
||||
'LBL_ALTERNATE_ADDRESS' => 'Inne adresy:',
|
||||
'LBL_ANY_ADDRESS' => 'Dodaktowy adres:',
|
||||
'LBL_ANY_EMAIL' => 'Dodaktowy Email:',
|
||||
'LBL_ANY_PHONE' => 'Dodaktowy numer telefonu:',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Przydzielone do:',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Przydzielone do Użytkownika',
|
||||
'LBL_ASSISTANT_PHONE' => 'Telefon asystenta:',
|
||||
'LBL_FOREIGN_CONTACTLEAD' => 'Kontakt zagraniczny',
|
||||
'LBL_ASSISTANT' => 'Asystent:',
|
||||
'LBL_BIRTHDATE' => 'Data urodzin:',
|
||||
'LBL_MAILING_TAG' => 'Etykieta pocztowa',
|
||||
'LBL_BUSINESSCARD' => 'Wizytówka',
|
||||
'LBL_CITY' => 'Miasto:',
|
||||
'LBL_CAMPAIGN_ID' => 'ID Kampanii:',
|
||||
'LBL_CONTACTLEAD_INFORMATION' => 'Dane kontaktowe',
|
||||
'LBL_CONTACTLEAD_NAME' => 'Nazwa kontaktowa:',
|
||||
'LBL_CONTACTLEAD_OPP_FORM_TITLE' => 'Kontakt-Temat:',
|
||||
'LBL_CONTACTLEAD_ROLE' => 'Zależność:',
|
||||
'LBL_CONTACTLEAD' => 'Kontakt:',
|
||||
'LBL_COUNTRY' => 'Kraj:',
|
||||
'LBL_CREATED_ACCOUNT' => 'Utwórz nowego Klienta',
|
||||
'LBL_CREATED_CALL' => 'Utwórz rozmowę telefoniczną',
|
||||
'LBL_CREATED_CONTACTLEAD' => 'Utwórz nowy Kontakt',
|
||||
'LBL_CREATED_MEETING' => 'Utwórz nowe Spotkanie',
|
||||
'LBL_CREATED_OPPORTUNITY' =>'Utwóż nowy Temat',
|
||||
'LBL_DATE_MODIFIED' => 'Zmodyfikowano:',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Kontakty',
|
||||
'LBL_DEPARTMENT' => 'Departament:',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Informacje opisujące',
|
||||
'LBL_DESCRIPTION' => 'Opis:',
|
||||
'LBL_DIRECT_REPORTS_SUBPANEL_TITLE'=>'Raportowanie bezpośrednie',
|
||||
'LBL_DO_NOT_CALL' => 'Nie dzwonić',
|
||||
'LBL_DUPLICATE' => 'Moliwość zduplikowania Kontaktu',
|
||||
'LBL_EMAIL_ADDRESS' => 'Email:',
|
||||
'LBL_EMAIL_OPT_OUT' => 'Opcjonalny Email:',
|
||||
'LBL_EXISTING_ACCOUNT' => 'Użyto istniejcego Klienta',
|
||||
'LBL_EXISTING_CONTACTLEAD' => 'Użyto istniejcego Kontaktu',
|
||||
'LBL_EXISTING_OPPORTUNITY'=> 'Użyto istniejącego Tematu',
|
||||
'LBL_FAX_PHONE' => 'Fax:',
|
||||
'LBL_FIRST_NAME' => 'Imię',
|
||||
'LBL_FULL_NAME' => 'Pełna nazwa:',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE'=>'Historia',
|
||||
'LBL_LIST_DATE_MODIFIED' => 'Data Modyfikacji',
|
||||
'LBL_ECMQUOTES_SUBPANEL_TITLE' => 'Oferty',
|
||||
'LBL_HOME_PHONE' => 'Dom:',
|
||||
'LBL_ID' => 'ID:',
|
||||
'LBL_IMPORT_VCARD' => 'Importuj vCard',
|
||||
'LBL_VCARD' => 'vCard',
|
||||
'LBL_IMPORT_VCARDTEXT' => 'Automatycznie twórz nowy kontakt z pliku vCard pobranego z Twojego sytemu.',
|
||||
'LBL_INVALID_EMAIL'=>'Niewłaściwy format Email:',
|
||||
'LBL_INVITEE' => 'Raportowanie bezpośrednie',
|
||||
'LBL_LAST_NAME' => 'Nazwisko:',
|
||||
'LBL_LEAD_SOURCE' => 'Źródło pozyskania:',
|
||||
'LBL_LIST_ACCEPT_STATUS' => 'Status Akceptacji',
|
||||
'LBL_LIST_ACCOUNT_NAME' => 'Nazwisko Klienta',
|
||||
'LBL_LIST_CONTACTLEAD_NAME' => 'Nazwa Kontaktu',
|
||||
'LBL_LIST_CONTACTLEAD_ROLE' => 'Zależność',
|
||||
'LBL_LIST_EMAIL_ADDRESS' => 'Email',
|
||||
'LBL_LIST_FIRST_NAME' => 'Imię',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista Kontaktów',
|
||||
'LBL_VIEW_FORM_TITLE' => 'Widok Kontaktów',
|
||||
'LBL_LIST_LAST_NAME' => 'Nazwisko',
|
||||
'LBL_LIST_NAME' => 'Imię',
|
||||
'LBL_LIST_OTHER_EMAIL_ADDRESS' => 'Inny adres Email',
|
||||
'LBL_LIST_PHONE' => 'Telefon do biura',
|
||||
'LBL_LIST_TITLE' => 'Tytuł',
|
||||
'LBL_MOBILE_PHONE' => 'Telefon komórkowy:',
|
||||
'LBL_MODIFIED' => 'Zmodyfikowano przez Użytkownika ID:',
|
||||
'LBL_MODULE_NAME' => 'Kontakty',
|
||||
'LBL_MODULE_TITLE' => 'Kontakty: Strona Główna',
|
||||
'LBL_NAME' => 'Nazwisko:',
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowy kontakt',
|
||||
'LBL_NEW_PORTAL_PASSWORD' => 'Nowe hasło Portalu:',
|
||||
'LBL_NOTE_SUBJECT' =>'Tytuł Notatki',
|
||||
'LBL_OFFICE_PHONE' => 'Telefon do biura:',
|
||||
'LBL_OPP_NAME' => 'Nazwa Tematu:',
|
||||
'LBL_OPPORTUNITY_ROLE_ID'=>'ID Zależności w Temacie:',
|
||||
'LBL_OPPORTUNITY_ROLE'=>'Zalezność w Temacie',
|
||||
'LBL_OTHER_EMAIL_ADDRESS' => 'Inny Adres Email:',
|
||||
'LBL_OTHER_PHONE' => 'Inny Numer Telefonu:',
|
||||
'LBL_PHONE' => 'Telefon:',
|
||||
'LBL_PORTAL_ACTIVE' => 'Aktywny Użytkownik portalu:',
|
||||
'LBL_PORTAL_APP'=>'Aplikacje Portalu:',
|
||||
'LBL_PORTAL_INFORMATION' => 'Informacje o Portalu',
|
||||
'LBL_PORTAL_NAME' => 'Nazwa portalu:',
|
||||
'LBL_PORTAL_PASSWORD_ISSET' => 'Hasło dla Portalu ustalone?:',
|
||||
'LBL_POSTAL_CODE' => 'Kod Pocztowy:',
|
||||
'LBL_PRIMARY_ADDRESS_CITY' => 'Główny Adres - Miasto:',
|
||||
'LBL_PRIMARY_ADDRESS_COUNTRY' => 'Główny Adres - Kraj:',
|
||||
'LBL_PRIMARY_ADDRESS_POSTALCODE' => 'Główny Adres - Kod Pocztowy:',
|
||||
'LBL_PRIMARY_ADDRESS_STATE' => 'Główny Adres - Wojewódzwto:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET_2' => 'Główny Adres - Ulica 2:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET_3' => 'Główny Adres - Ulica 3:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET' => 'Główny Adres - Ulica:',
|
||||
'LBL_PRIMARY_ADDRESS' => 'Główny Adres:',
|
||||
'LBL_PRODUCTS_TITLE'=>'Produkty',
|
||||
'LBL_RELATED_CONTACTLEADS_TITLE'=>'Kontakty połączone',
|
||||
'LBL_REPORTS_TO_ID'=>'Raportuje do ID:',
|
||||
'LBL_REPORTS_TO' => 'Raportuje do:',
|
||||
'LBL_RESOURCE_NAME' => 'Nazwa Źródła',
|
||||
'LBL_SALUTATION' => 'Pozdrowienie:',
|
||||
'LBL_SAVE_CONTACTLEAD' => 'Zapisz kontakt',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukiwanie kontaktu',
|
||||
'LBL_SELECT_CHECKED_BUTTON_LABEL' => 'Wybierz zaznaczone kontakty',
|
||||
'LBL_SELECT_CHECKED_BUTTON_TITLE' => 'Wybierz zaznaczone kontakty',
|
||||
'LBL_STATE' => 'Województwo:',
|
||||
'LBL_SYNC_CONTACTLEAD' => 'Synchronizuj kontakt:',
|
||||
|
||||
'LBL_TEAM_ID' => 'ID Zespołu:',
|
||||
|
||||
'LBL_TITLE' => 'Tytuł:',
|
||||
'LNK_CONTACTLEAD_LIST' => 'Kontakty',
|
||||
'LNK_IMPORT_VCARD' => 'Utwórz vCard',
|
||||
'LNK_NEW_ACCOUNT' => 'Utwórz Klienta',
|
||||
'LNK_NEW_APPOINTMENT' => 'Utwórz Spotkanie',
|
||||
'LNK_NEW_CALL' => 'Zaplanowane rozmowy tel.',
|
||||
'LNK_NEW_CASE' => 'Utwórz Sprawę',
|
||||
'LNK_NEW_CONTACTLEAD' => 'Utwórz Kontakt',
|
||||
'LNK_NEW_EMAIL' => 'Archiwum Email',
|
||||
'LNK_NEW_MEETING' => 'Zaplanowane Spotkania',
|
||||
'LNK_NEW_NOTE' => 'Utwórz Notatkę',
|
||||
'LNK_NEW_OPPORTUNITY' => 'Utwórz Temat',
|
||||
'LNK_NEW_TASK' => 'Utwórz Zadanie',
|
||||
'LNK_SELECT_ACCOUNT' => 'Wybierz Klienta',
|
||||
'MSG_DUPLICATE' => 'Stworzenie tego kontaktu może spowodować utworzenie zduplikowanego kontaktu. Możesz wybrać kontakt z listy poniejż lub utworzyć kontakt klikając [Zapisz],z wykorzystaniem wprowadzonych danych, lub możesz kliknąć [Skasuj].',
|
||||
'MSG_SHOW_DUPLICATES' => 'Stworzenie tego kontaktu może spowodować utworzenie zduplikowanego kontaktu. \n Możesz wybrać kontakt z listy poniżej, utworzyć kontakt z wykorzystaniem wprowadzonych danych klikając [Zapisz], lub możesz kliknąć [Skasuj].',
|
||||
'NTC_COPY_ALTERNATE_ADDRESS' => 'Kopiuj alternatywny adres do adresu podstawowego',
|
||||
'NTC_COPY_PRIMARY_ADDRESS' => 'Kopiuj adres podstawowy do adresu alternatywnego',
|
||||
'NTC_DELETE_CONFIRMATION' => 'Czy na pewno chcesz usunąć wskazane informacje?',
|
||||
'NTC_OPPORTUNITY_REQUIRES_ACCOUNT' => 'Utworzenie Tematu wymaga wybrania Klienta. Wybierz już istniejącego, lub utwórz nowego.',
|
||||
'NTC_REMOVE_CONFIRMATION' => 'Czy na pewno chcesz usunąć ten kontakt z tej Sprawy?',
|
||||
'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Are you sure you want to remove this record as a direct report?',
|
||||
|
||||
'LBL_USER_PASSWORD' => 'Hasło:',
|
||||
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Wizytówki',
|
||||
'LBL_OPPORTUNITIES_SUBPANEL_TITLE' => 'Tematy',
|
||||
|
||||
'LBL_QUOTES_SUBPANEL_TITLE' => 'Zapytania',
|
||||
'LBL_PRODUCTS_SUBPANEL_TITLE' => 'Produkty',
|
||||
|
||||
'LBL_CASES_SUBPANEL_TITLE' => 'Sprawy',
|
||||
'LBL_BUGS_SUBPANEL_TITLE' => 'Błędy',
|
||||
'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projekty',
|
||||
'LBL_COPY_ADDRESS_CHECKED' => 'Kopiuj adresy do zaznaczonych kontaktów',
|
||||
'LBL_TARGET_OF_CAMPAIGNS' => 'Kampanie (Cel kampanii) :',
|
||||
'LBL_CAMPAIGNS' => 'Kampanie',
|
||||
'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE'=>'Zapis Kampanii',
|
||||
'LBL_LIST_CITY' => 'Miasto',
|
||||
'LBL_LIST_STATE' => 'Województwo',
|
||||
'LBL_HOMEPAGE_TITLE' => 'Moje Kontakty',
|
||||
|
||||
|
||||
'LBL_PORTAL_PASSWORD' => 'Hasło Portalu',
|
||||
'LBL_CONFIRM_PORTAL_PASSWORD' => 'Potwierdź Hasło Portalu',
|
||||
'LBL_PORTAL_DUPLICATE_USER_NAME' => 'Użyta nazwa Portalu już istnieje. Wybierz inną nazwę Nazwę portalu dla tego Kontaktu.',
|
||||
'LBL_CHECKOUT_DATE'=>'Data Zatwierdzenia',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
68
modules/ContactLeads/metadata/SearchFields.php
Normal file
68
modules/ContactLeads/metadata/SearchFields.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$searchFields['ContactLeads'] =
|
||||
array (
|
||||
'first_name' => array( 'query_type'=>'default'),
|
||||
'last_name'=> array('query_type'=>'default'),
|
||||
'account_name'=> array('query_type'=>'default','db_field'=>array('accounts.name')),
|
||||
'lead_source'=> array('query_type'=>'default','operator'=>'=', 'options' => 'lead_source_dom', 'template_var' => 'LEAD_SOURCE_OPTIONS'),
|
||||
'do_not_call'=> array('query_type'=>'default', 'input_type' => 'checkbox', 'operator'=>'='),
|
||||
'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','assistant_phone')),
|
||||
'email'=> array(
|
||||
'query_type' => 'default',
|
||||
'operator' => 'subquery',
|
||||
'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',
|
||||
'db_field' => array(
|
||||
'id',
|
||||
)
|
||||
),
|
||||
'assistant'=> array('query_type'=>'default'),
|
||||
'address_street'=> array('query_type'=>'default','db_field'=>array('primary_address_street','alt_address_street')),
|
||||
'address_city'=> array('query_type'=>'default','db_field'=>array('primary_address_city','alt_address_city')),
|
||||
'address_state'=> array('query_type'=>'default','db_field'=>array('primary_address_state','alt_address_state')),
|
||||
'address_postalcode'=> array('query_type'=>'default','db_field'=>array('primary_address_postalcode','alt_address_postalcode')),
|
||||
'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')),
|
||||
'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true),
|
||||
'assigned_user_id'=> array('query_type'=>'default'),
|
||||
'account_id'=> array('query_type'=>'default','db_field'=>array('accounts.id')),
|
||||
'campaign_name'=> array(
|
||||
'query_type'=>'default',
|
||||
'operator' => 'subquery',
|
||||
'subquery' => 'SELECT campaigns.id FROM campaigns WHERE campaigns.deleted=0 and campaigns.name LIKE',
|
||||
'db_field'=>array('campaign_id')),
|
||||
);
|
||||
?>
|
||||
81
modules/ContactLeads/metadata/additionalDetails.php
Normal file
81
modules/ContactLeads/metadata/additionalDetails.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*********************************************************************************/
|
||||
|
||||
function additionalDetailsContactLead($fields) {
|
||||
static $mod_strings;
|
||||
if(empty($mod_strings)) {
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'ContactLeads');
|
||||
}
|
||||
|
||||
$overlib_string = '<div style="overflow:auto; height:100px; max-height:100px;">';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) ||
|
||||
!empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) ||
|
||||
!empty($fields['PRIMARY_ADDRESS_COUNTRY']))
|
||||
$overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', ';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' ';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' ';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>';
|
||||
if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4))
|
||||
$overlib_string .= '<br>';
|
||||
if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> ' . $fields['PHONE_MOBILE'] . '<br>';
|
||||
if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> ' . $fields['PHONE_HOME'] . '<br>';
|
||||
if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> ' . $fields['PHONE_OTHER'] . '<br>';
|
||||
|
||||
if(!empty($fields['DATE_MODIFIED'])) $overlib_string .= '<b>'. $mod_strings['LBL_DATE_MODIFIED'] . '</b> ' . $fields['DATE_MODIFIED'] . '<br>';
|
||||
|
||||
/*
|
||||
if(!empty($fields['DESCRIPTION'])) {
|
||||
$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
|
||||
if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
|
||||
}
|
||||
*/
|
||||
|
||||
$overlib_string .= "</div>";
|
||||
return array('fieldToAddTo' => 'NAME',
|
||||
'string' => $overlib_string,
|
||||
'editLink' => "index.php?action=EditView&module=ContactLeads&return_module=ContactLeads&record={$fields['ID']}",
|
||||
'viewLink' => "index.php?action=DetailView&module=ContactLeads&return_module=ContactLeads&record={$fields['ID']}");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
212
modules/ContactLeads/metadata/detailviewdefs.php
Normal file
212
modules/ContactLeads/metadata/detailviewdefs.php
Normal file
@@ -0,0 +1,212 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs['ContactLeads']['DetailView'] = array(
|
||||
'templateMeta' => array('preForm' => '<form name="vcard" action="index.php">' .
|
||||
'<input type="hidden" name="entryPoint" value="vCard">' .
|
||||
'<input type="hidden" name="contactlead_id" value="{$fields.id.value}">' .
|
||||
'<input type="hidden" name="module" value="ContactLeads">' .
|
||||
'</form>',
|
||||
'form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE', 'FIND_DUPLICATES',
|
||||
|
||||
array('customCode'=>'<input title="{$APP.LBL_MANAGE_SUBSCRIPTIONS}" class="button" onclick="this.form.return_module.value=\'ContactLeads\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Subscriptions\'; this.form.module.value=\'Campaigns\';" type="submit" name="Manage Subscriptions" value="{$APP.LBL_MANAGE_SUBSCRIPTIONS}">'),
|
||||
|
||||
),
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
'includes'=> array(
|
||||
array('file'=>'modules/Leads/Lead.js'),
|
||||
),
|
||||
),
|
||||
'panels' =>array (
|
||||
'default'=>array(
|
||||
array (
|
||||
array (
|
||||
'name' => 'full_name',
|
||||
'customCode' => '{$fields.full_name.value} <input type="button" class="button" name="vCardButton" value="{$MOD.LBL_VCARD}" onClick="document.vcard.submit();">',
|
||||
'label' => 'LBL_NAME',
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'phone_work',
|
||||
'label' => 'LBL_OFFICE_PHONE',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'lead_name',
|
||||
|
||||
array (
|
||||
'name' => 'phone_mobile',
|
||||
'label' => 'LBL_MOBILE_PHONE',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'lead_source',
|
||||
|
||||
array (
|
||||
'name' => 'phone_home',
|
||||
'label' => 'LBL_HOME_PHONE',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'campaign_name',
|
||||
'label' => 'LBL_CAMPAIGN',
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'phone_other',
|
||||
'label' => 'LBL_OTHER_PHONE',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'title',
|
||||
array (
|
||||
'name' => 'phone_fax',
|
||||
'label' => 'LBL_FAX_PHONE',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'department',
|
||||
'birthdate',
|
||||
),
|
||||
|
||||
array (
|
||||
'report_to_name',
|
||||
'assistant',
|
||||
),
|
||||
|
||||
array (
|
||||
'sync_contactlead',
|
||||
'assistant_phone',
|
||||
),
|
||||
|
||||
array (
|
||||
'do_not_call',
|
||||
'mailing_tag',
|
||||
),
|
||||
array(
|
||||
'foreign_contactlead',
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
|
||||
|
||||
|
||||
array (
|
||||
'name' => 'date_modified',
|
||||
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
|
||||
'label' => 'LBL_DATE_MODIFIED',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'assigned_user_name',
|
||||
|
||||
array (
|
||||
'name' => 'date_entered',
|
||||
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'primary_address_street',
|
||||
'label'=> 'LBL_PRIMARY_ADDRESS',
|
||||
'type' => 'address',
|
||||
'displayParams'=>array('key'=>'primary'),
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'alt_address_street',
|
||||
'label'=> 'LBL_ALTERNATE_ADDRESS',
|
||||
'type' => 'address',
|
||||
'displayParams'=>array('key'=>'alt'),
|
||||
),
|
||||
),
|
||||
array (
|
||||
array('name'=>'portal_name',
|
||||
'customCode'=>'{if $PORTAL_ENABLED}{$fields.portal_name.value}{/if}',
|
||||
'customLabel'=>'{if $PORTAL_ENABLED}{sugar_translate label="LBL_PORTAL_NAME" module="ContactLeads"}{/if}'),
|
||||
array('name'=>'portal_active',
|
||||
'customCode'=>'{if $PORTAL_ENABLED}
|
||||
{if strval($fields.portal_active.value) == "1" || strval($fields.portal_active.value) == "yes" || strval($fields.portal_active.value) == "on"}
|
||||
{assign var="checked" value="CHECKED"}
|
||||
{else}
|
||||
{assign var="checked" value=""}
|
||||
{/if}
|
||||
<input type="checkbox" class="checkbox" name="{$fields.portal_active.name}" size="{$displayParams.size}" disabled="true" {$checked}>
|
||||
{/if}',
|
||||
'customLabel'=>'{if $PORTAL_ENABLED}{sugar_translate label="LBL_PORTAL_ACTIVE" module="ContactLeads"}{/if}'),
|
||||
),
|
||||
array (
|
||||
'description',
|
||||
),
|
||||
|
||||
array (
|
||||
'email1',
|
||||
),
|
||||
),
|
||||
'LBL_PANEL_MAILINGGROUPS' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '{$POSITIONS55}',
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
248
modules/ContactLeads/metadata/editviewdefs.php
Normal file
248
modules/ContactLeads/metadata/editviewdefs.php
Normal file
@@ -0,0 +1,248 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs ['ContactLeads'] ['EditView'] = array (
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'buttons' => array (
|
||||
0 => array (
|
||||
'customCode' => '<input type="submit" name="save" class="button" value="Zapisz" onclick="saveItems55(true);this.form.action.value=\'Save\';return check_form(\'EditView\');" />'
|
||||
),
|
||||
1 => 'CANCEL'
|
||||
),
|
||||
'hidden' => array (
|
||||
'<input type="hidden" name="opportunity_id" value="{$smarty.request.opportunity_id}">',
|
||||
|
||||
'<input type="hidden" name="case_id" value="{$smarty.request.case_id}">',
|
||||
'<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">',
|
||||
'<input type="hidden" name="email_id" value="{$smarty.request.email_id}">',
|
||||
'<input type="hidden" name="inbound_email_id" value="{$smarty.request.inbound_email_id}">'
|
||||
)
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
) ,
|
||||
'includes' => array (
|
||||
|
||||
array (
|
||||
'file' => 'modules/Accounts/MailingGroups.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/Accounts/MyTable.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/Accounts/paramsMT.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'include/JSON.js'
|
||||
),
|
||||
|
||||
)
|
||||
),
|
||||
'panels' => array (
|
||||
'lbl_contactlead_information' => array (
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'first_name',
|
||||
'customCode' => '{html_options name="salutation" options=$fields.salutation.options selected=$fields.salutation.value} <input name="first_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">'
|
||||
),
|
||||
'phone_work'
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'last_name',
|
||||
'displayParams' => array (
|
||||
'required' => true
|
||||
)
|
||||
),
|
||||
'phone_mobile'
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'lead_name',
|
||||
'displayParams' => array (
|
||||
'key' => 'billing',
|
||||
'copy' => 'primary',
|
||||
'billingKey' => 'primary',
|
||||
'additionalFields' => array (
|
||||
'phone_office' => 'phone_work'
|
||||
)
|
||||
)
|
||||
),
|
||||
'phone_home'
|
||||
),
|
||||
|
||||
array (
|
||||
'lead_source',
|
||||
'phone_other'
|
||||
),
|
||||
|
||||
array (
|
||||
'campaign_name',
|
||||
'phone_fax'
|
||||
),
|
||||
|
||||
array (
|
||||
'title',
|
||||
'birthdate'
|
||||
),
|
||||
|
||||
array (
|
||||
'department'
|
||||
),
|
||||
|
||||
array (
|
||||
'report_to_name',
|
||||
'assistant'
|
||||
),
|
||||
|
||||
array (
|
||||
'sync_contactlead',
|
||||
'assistant_phone'
|
||||
),
|
||||
|
||||
array (
|
||||
'do_not_call',
|
||||
'mailing_tag'
|
||||
),
|
||||
array (
|
||||
'foreign_contactlead'
|
||||
),
|
||||
|
||||
array (
|
||||
'assigned_user_name'
|
||||
)
|
||||
),
|
||||
'lbl_email_addresses' => array (
|
||||
array (
|
||||
'email1'
|
||||
)
|
||||
),
|
||||
'lbl_address_information' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'primary_address_street',
|
||||
'hideLabel' => true,
|
||||
'type' => 'address',
|
||||
'displayParams' => array (
|
||||
'key' => 'primary',
|
||||
'rows' => 2,
|
||||
'cols' => 30,
|
||||
'maxlength' => 150
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'alt_address_street',
|
||||
'hideLabel' => true,
|
||||
'type' => 'address',
|
||||
'displayParams' => array (
|
||||
'key' => 'alt',
|
||||
'copy' => 'primary',
|
||||
'rows' => 2,
|
||||
'cols' => 30,
|
||||
'maxlength' => 150
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'lbl_description_information' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'description',
|
||||
'displayParams' => array (
|
||||
'rows' => 6,
|
||||
'cols' => 80
|
||||
),
|
||||
'label' => 'LBL_DESCRIPTION'
|
||||
)
|
||||
)
|
||||
),
|
||||
'LBL_PANEL_MAILINGGROUPS' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '
|
||||
<input type="hidden" name="position_list55" id="position_list55" value=\'{$POSITION_LIST55}\'>
|
||||
<link rel="stylesheet" type="text/css" href="modules/Accounts/MyTable.css" />
|
||||
<div style="width:30%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV2">
|
||||
<table class="positions" style="width:100%;" id="itemsTable55">
|
||||
<thead id="head">
|
||||
<tr id="tr">
|
||||
<td width="70%">{$MOD.LBL_MAILINGGROUP_NAME}</td>
|
||||
<td width="20%">{$MOD.LBL_MAILINGGROUP_AVAILABLE}</td>
|
||||
<td width="10%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div><br>'
|
||||
)
|
||||
)
|
||||
),
|
||||
'lbl_portal_information' => array (
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'portal_name',
|
||||
'customCode' => '<table border="0" cellspacing="0" cellpadding="0"><tr><td>
|
||||
<input id="portal_name" name="portal_name" type="text" size="30" maxlength="30" value="{$fields.portal_name.value}" autocomplete="off">
|
||||
<input type="hidden" id="portal_name_existing" value="{$fields.portal_name.value}" autocomplete="off">
|
||||
</td><tr><tr><td><input type="hidden" id="portal_name_verified" value="true"></td></tr></table>'
|
||||
),
|
||||
'portal_active'
|
||||
)
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
;
|
||||
?>
|
||||
183
modules/ContactLeads/metadata/listviewdefs.php
Normal file
183
modules/ContactLeads/metadata/listviewdefs.php
Normal file
@@ -0,0 +1,183 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$listViewDefs['ContactLeads'] = array(/*
|
||||
'NAME' => array(
|
||||
'width' => '20%',
|
||||
'label' => 'LBL_LIST_NAME',
|
||||
'link' => true,
|
||||
'contextMenu' => array('objectType' => 'sugarPerson',
|
||||
'metaData' => array('contactlead_id' => '{$ID}',
|
||||
'module' => 'ContactLeads',
|
||||
'return_action' => 'ListView',
|
||||
'contactlead_name' => '{$FULL_NAME}',
|
||||
'parent_id' => '{$ACCOUNT_ID}',
|
||||
'parent_name' => '{$ACCOUNT_NAME}',
|
||||
'return_module' => 'ContactLeads',
|
||||
'return_action' => 'ListView',
|
||||
'parent_type' => 'Account',
|
||||
'notes_parent_type' => 'Account')
|
||||
),
|
||||
'orderBy' => 'name',
|
||||
'default' => true,
|
||||
'related_fields' => array('first_name', 'last_name', 'salutation', 'account_name', 'account_id'),
|
||||
), */
|
||||
'FIRST_NAME' => array(
|
||||
'width' => '15%',
|
||||
'label' => 'Imie',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'LAST_NAME' => array(
|
||||
'width' => '15%',
|
||||
'label' => 'Nazwisko',
|
||||
'default' => true),
|
||||
'TITLE' => array(
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_LIST_TITLE',
|
||||
'default' => true),
|
||||
'LEAD_NAME' => array(
|
||||
'width' => '34%',
|
||||
'label' => 'Kontrahent',
|
||||
'module' => 'Leads',
|
||||
'id' => 'LEAD_ID',
|
||||
'link' => true,
|
||||
'contextMenu' => array('objectType' => 'sugarAccount',
|
||||
'metaData' => array('return_module' => 'ContactLeads',
|
||||
'return_action' => 'ListView',
|
||||
'module' => 'Leads',
|
||||
'return_action' => 'ListView',
|
||||
'parent_id' => '{$LEAD_ID}',
|
||||
'parent_name' => '{$LEAD_NAME}',
|
||||
'account_id' => '{$LEAD_ID}',
|
||||
'account_name' => '{$LEAD_NAME}'),
|
||||
),
|
||||
'default' => true,
|
||||
'sortable'=> true,
|
||||
'ACLTag' => 'LEAD',
|
||||
'related_fields' => array('lead_id')),
|
||||
'EMAIL1' => array(
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_LIST_EMAIL_ADDRESS',
|
||||
'sortable' => false,
|
||||
'link' => true,
|
||||
'customCode' => '{$EMAIL1_LINK}{$EMAIL1}</a>',
|
||||
'default' => true
|
||||
),
|
||||
'PHONE_WORK' => array(
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_OFFICE_PHONE',
|
||||
'default' => true),
|
||||
'DEPARTMENT' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_DEPARTMENT'),
|
||||
'DO_NOT_CALL' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_DO_NOT_CALL'),
|
||||
'PHONE_HOME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_HOME_PHONE'),
|
||||
'PHONE_MOBILE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_MOBILE_PHONE'),
|
||||
'PHONE_OTHER' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_OTHER_PHONE'),
|
||||
'PHONE_FAX' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_FAX_PHONE'),
|
||||
'EMAIL2' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_LIST_EMAIL_ADDRESS',
|
||||
'sortable' => false,
|
||||
'customCode' => '{$EMAIL2_LINK}{$EMAIL2}</a>'),
|
||||
'EMAIL_OPT_OUT' => array(
|
||||
'width' => '10',
|
||||
|
||||
'label' => 'LBL_EMAIL_OPT_OUT'),
|
||||
'PRIMARY_ADDRESS_STREET' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_STREET'),
|
||||
'PRIMARY_ADDRESS_CITY' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_CITY'),
|
||||
'PRIMARY_ADDRESS_STATE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_STATE'),
|
||||
'PRIMARY_ADDRESS_POSTALCODE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_POSTALCODE'),
|
||||
'ALT_ADDRESS_COUNTRY' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_ALT_ADDRESS_COUNTRY'),
|
||||
'ALT_ADDRESS_STREET' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_ALT_ADDRESS_STREET'),
|
||||
'ALT_ADDRESS_CITY' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_ALT_ADDRESS_CITY'),
|
||||
'ALT_ADDRESS_STATE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_ALT_ADDRESS_STATE'),
|
||||
'ALT_ADDRESS_POSTALCODE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_ALT_ADDRESS_POSTALCODE'),
|
||||
'ALT_ADDRESS_COUNTRY' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_ALT_ADDRESS_COUNTRY'),
|
||||
'DATE_ENTERED' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
'CREATED_BY_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_CREATED'),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true),
|
||||
'MODIFIED_BY_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_MODIFIED')
|
||||
);
|
||||
?>
|
||||
50
modules/ContactLeads/metadata/metafiles.php
Normal file
50
modules/ContactLeads/metadata/metafiles.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on Jun 1, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$metafiles['ContactLeads'] = array(
|
||||
'detailviewdefs' => 'modules/ContactLeads/metadata/detailviewdefs.php',
|
||||
'editviewdefs' => 'modules/ContactLeads/metadata/editviewdefs.php',
|
||||
'listviewdefs' => 'modules/ContactLeads/metadata/listviewdefs.php',
|
||||
'searchdefs' => 'modules/ContactLeads/metadata/searchdefs.php',
|
||||
'popupdefs' => 'modules/ContactLeads/metadata/popupdefs.php',
|
||||
'searchfields' => 'modules/ContactLeads/metadata/SearchFields.php',
|
||||
);
|
||||
?>
|
||||
91
modules/ContactLeads/metadata/popupdefs.php
Normal file
91
modules/ContactLeads/metadata/popupdefs.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
$popupMeta = array('moduleMain' => 'ContactLead',
|
||||
'varName' => 'CONTACTLEAD',
|
||||
'orderBy' => 'contactleads.first_name, contactleads.last_name',
|
||||
'whereClauses' =>
|
||||
array('first_name' => 'contactleads.first_name',
|
||||
'last_name' => 'contactleads.last_name',
|
||||
'account_name' => 'accounts.name',
|
||||
'account_id' => 'accounts.id'),
|
||||
'searchInputs' =>
|
||||
array('first_name', 'last_name', 'account_name'),
|
||||
'create' =>
|
||||
array('formBase' => 'ContactLeadFormBase.php',
|
||||
'formBaseClass' => 'ContactLeadFormBase',
|
||||
'getFormBodyParams' => array('','','ContactLeadSave'),
|
||||
'createButton' => $mod_strings['LNK_NEW_CONTACTLEAD']
|
||||
),
|
||||
'listviewdefs' => array(
|
||||
'NAME' => array(
|
||||
'width' => '20%',
|
||||
'label' => 'LBL_LIST_NAME',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'related_fields' => array('first_name', 'last_name', 'salutation', 'account_name', 'account_id')),
|
||||
'ACCOUNT_NAME' => array(
|
||||
'width' => '25',
|
||||
'label' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'module' => 'Accounts',
|
||||
'id' => 'ACCOUNT_ID',
|
||||
'default' => true,
|
||||
'sortable'=> true,
|
||||
'ACLTag' => 'ACCOUNT',
|
||||
'related_fields' => array('account_id')),
|
||||
'TITLE' => array(
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_LIST_TITLE',
|
||||
'default' => true),
|
||||
'LEAD_SOURCE' => array(
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_LEAD_SOURCE',
|
||||
'default' => true),
|
||||
),
|
||||
'searchdefs' => array(
|
||||
'first_name',
|
||||
'last_name',
|
||||
array('name' => 'account_name', 'displayParams' => array('hideButtons'=>'true', 'size'=>30, 'class'=>'sqsEnabled sqsNoAutofill')),
|
||||
'title',
|
||||
'lead_source',
|
||||
array('name' => 'campaign_name', 'displayParams' => array('hideButtons'=>'true', 'size'=>30, 'class'=>'sqsEnabled sqsNoAutofill')),
|
||||
array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
|
||||
)
|
||||
);
|
||||
?>
|
||||
58
modules/ContactLeads/metadata/popupdefsEmail.php
Normal file
58
modules/ContactLeads/metadata/popupdefsEmail.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
$popupMeta = array('moduleMain' => 'ContactLead',
|
||||
'varName' => 'CONTACTLEAD',
|
||||
'orderBy' => 'contactleads.first_name, contactleads.last_name',
|
||||
'whereClauses' =>
|
||||
array('first_name' => 'contactleads.first_name',
|
||||
'last_name' => 'contactleads.last_name',
|
||||
'account_name' => 'accounts.name',
|
||||
'account_id' => 'accounts.id'),
|
||||
'searchInputs' =>
|
||||
array('first_name', 'last_name', 'account_name'),
|
||||
'create' =>
|
||||
array('formBase' => 'ContactLeadFormBase.php',
|
||||
'formBaseClass' => 'ContactLeadFormBase',
|
||||
'getFormBodyParams' => array('','','ContactLeadSave'),
|
||||
'createButton' => $mod_strings['LNK_NEW_CONTACTLEAD']
|
||||
),
|
||||
'templateForm' => 'modules/ContactLeads/Email_picker.html',
|
||||
);
|
||||
?>
|
||||
167
modules/ContactLeads/metadata/quickcreatedefs.php
Normal file
167
modules/ContactLeads/metadata/quickcreatedefs.php
Normal file
@@ -0,0 +1,167 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Id$
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$viewdefs = array (
|
||||
'ContactLeads' =>
|
||||
array (
|
||||
'QuickCreate' =>
|
||||
array (
|
||||
'templateMeta' =>
|
||||
array (
|
||||
'form' =>
|
||||
array (
|
||||
'hidden' =>
|
||||
array (
|
||||
0 => '<input type="hidden" name="opportunity_id" value="{$smarty.request.opportunity_id}">',
|
||||
1 => '<input type="hidden" name="case_id" value="{$smarty.request.case_id}">',
|
||||
2 => '<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">',
|
||||
3 => '<input type="hidden" name="email_id" value="{$smarty.request.email_id}">',
|
||||
4 => '<input type="hidden" name="inbound_email_id" value="{$smarty.request.inbound_email_id}">',
|
||||
5 => '<input type="hidden" name="reports_to_id" value="{$smarty.request.contactlead_id}">',
|
||||
6 => '<input type="hidden" name="report_to_name" value="{$smarty.request.contactlead_name}">',
|
||||
|
||||
|
||||
|
||||
),
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
),
|
||||
),
|
||||
'panels' =>
|
||||
array (
|
||||
'lbl_contactlead_information' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'first_name',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'name' => 'phone_work',
|
||||
),
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'last_name',
|
||||
'displayParams'=>array('required'=>true),
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'name' => 'phone_mobile',
|
||||
),
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'account_name',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'name' => 'phone_fax',
|
||||
),
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'title',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'name' => 'department',
|
||||
),
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'lead_source',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'name' => 'do_not_call',
|
||||
),
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'team_name',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
),
|
||||
),
|
||||
),
|
||||
'lbl_email_addresses' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'email1',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
67
modules/ContactLeads/metadata/searchdefs.php
Normal file
67
modules/ContactLeads/metadata/searchdefs.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$searchdefs['ContactLeads'] = array(
|
||||
'templateMeta' => array('maxColumns' => '3',
|
||||
'widths' => array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
'first_name',
|
||||
'last_name',
|
||||
'account_name',
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
),
|
||||
'advanced_search' => array(
|
||||
'first_name',
|
||||
array('name' => 'address_street', 'label' =>'LBL_ANY_ADDRESS', 'type' => 'name'),
|
||||
array('name' => 'phone', 'label' =>'LBL_ANY_PHONE', 'type' => 'name'),
|
||||
'last_name',
|
||||
array('name' => 'address_city', 'label' =>'LBL_CITY', 'type' => 'name'),
|
||||
array('name' => 'email', 'label' =>'LBL_ANY_EMAIL', 'type' => 'name'),
|
||||
'lead_name',
|
||||
array('name' => 'address_state', 'label' =>'LBL_STATE', 'type' => 'name'),
|
||||
'do_not_call',
|
||||
'assistant',
|
||||
array('name' => 'address_postalcode', 'label' =>'LBL_POSTAL_CODE', 'type' => 'name'),
|
||||
array('name' => 'primary_address_country', 'label' =>'LBL_COUNTRY', 'type' => 'name', 'options' => 'countries_dom', ),
|
||||
'lead_source',
|
||||
'foreign_contactlead',
|
||||
'mailing_tag',
|
||||
array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
87
modules/ContactLeads/metadata/sidecreateviewdefs.php
Normal file
87
modules/ContactLeads/metadata/sidecreateviewdefs.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*********************************************************************************/
|
||||
$viewdefs['ContactLeads']['SideQuickCreate'] = array(
|
||||
'templateMeta' => array('form'=>array('hidden'=>array('<input type="hidden" name="opportunity_id" value="{$smarty.request.opportunity_id}">',
|
||||
|
||||
|
||||
|
||||
'<input type="hidden" name="case_id" value="{$smarty.request.case_id}">',
|
||||
'<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">',
|
||||
'<input type="hidden" name="email_id" value="{$smarty.request.email_id}">',
|
||||
'<input type="hidden" name="inbound_email_id" value="{$smarty.request.inbound_email_id}">')
|
||||
,'buttons'=>array('SAVE'),
|
||||
'headerTpl'=>'include/EditView/header.tpl',
|
||||
'footerTpl'=>'include/EditView/footer.tpl',
|
||||
'button_location'=>'bottom',
|
||||
),
|
||||
'maxColumns' => '1',
|
||||
|
||||
'panelClass'=>'none',
|
||||
'labelsOnTop'=>true,
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
|
||||
),
|
||||
),
|
||||
'panels' =>array (
|
||||
'DEFAULT' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
array('name'=>'first_name', 'displayParams'=>array('size'=>20)),
|
||||
),
|
||||
array (
|
||||
array('name'=>'last_name',
|
||||
'displayParams'=>array('required'=>true, 'size'=>20),
|
||||
),
|
||||
),
|
||||
array (
|
||||
array('name'=>'phone_work', 'displayParams'=>array('size'=>20)),
|
||||
),
|
||||
array (
|
||||
array('name'=>'email1', 'customCode'=>'<input type="text" name="emailAddress0" size=20><input type="hidden" name="emailAddressPrimaryFlag" value="emailAddress0"><input type="hidden" name="useEmailWidget" value="true"><script language="Javascript">addToValidate("form_SideQuickCreate_ContactLeads", "emailAddress0", "email", false, SUGAR.language.get("app_strings", "LBL_EMAIL_ADDRESS_BOOK_EMAIL_ADDR"));</script>'),
|
||||
),
|
||||
array (
|
||||
array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)),
|
||||
),
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
65
modules/ContactLeads/metadata/studio.php
Normal file
65
modules/ContactLeads/metadata/studio.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$GLOBALS['studioDefs']['ContactLeads'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/ContactLeads/DetailView.html',
|
||||
'php_file'=>'modules/ContactLeads/DetailView.php',
|
||||
'type'=>'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/ContactLeads/EditView.html',
|
||||
'php_file'=>'modules/ContactLeads/EditView.php',
|
||||
'type'=>'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template'=>'listview',
|
||||
'meta_file'=>'modules/ContactLeads/listviewdefs.php',
|
||||
'type'=>'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/ContactLeads/SearchForm.html',
|
||||
'php_file'=>'modules/ContactLeads/ListView.php',
|
||||
'type'=>'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
268
modules/ContactLeads/metadata/subpaneldefs.php
Normal file
268
modules/ContactLeads/metadata/subpaneldefs.php
Normal file
@@ -0,0 +1,268 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Layout definition for ContactLeads
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$layout_defs['ContactLeads'] = array(
|
||||
// list of what Subpanels to show in the DetailView
|
||||
'subpanel_setup' => array(
|
||||
|
||||
'activities' => array(
|
||||
'order' => 10,
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'date_start',
|
||||
'title_key' => 'LBL_ACTIVITIES_SUBPANEL_TITLE',
|
||||
'type' => 'collection',
|
||||
'subpanel_name' => 'activities', //this values is not associated with a physical file.
|
||||
'module'=>'Activities',
|
||||
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateTaskButton'),
|
||||
|
||||
array('widget_class' => 'SubPanelTopScheduleMeetingButton'),
|
||||
array('widget_class' => 'SubPanelTopScheduleCallButton'),
|
||||
|
||||
array('widget_class' => 'SubPanelTopComposeEmailButton'),
|
||||
),
|
||||
'collection_list' => array(
|
||||
'tasks' => array(
|
||||
'module' => 'Tasks',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'tasks',
|
||||
),
|
||||
|
||||
'meetings' => array(
|
||||
'module' => 'Meetings',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'meetings',
|
||||
),
|
||||
'calls' => array(
|
||||
'module' => 'Calls',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'calls',
|
||||
),
|
||||
|
||||
)
|
||||
),
|
||||
|
||||
'history' => array(
|
||||
'order' => 20,
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'date_modified',
|
||||
'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE',
|
||||
'type' => 'collection',
|
||||
'subpanel_name' => 'history', //this values is not associated with a physical file.
|
||||
'module'=>'History',
|
||||
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateNoteButton'),
|
||||
array('widget_class' => 'SubPanelTopArchiveEmailButton'),
|
||||
array('widget_class' => 'SubPanelTopSummaryButton'),
|
||||
),
|
||||
|
||||
'collection_list' => array(
|
||||
'tasks' => array(
|
||||
'module' => 'Tasks',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'tasks',
|
||||
),
|
||||
|
||||
'meetings' => array(
|
||||
'module' => 'Meetings',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'meetings',
|
||||
),
|
||||
'calls' => array(
|
||||
'module' => 'Calls',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'calls',
|
||||
),
|
||||
|
||||
'notes' => array(
|
||||
'module' => 'Notes',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'notes',
|
||||
),
|
||||
'emails' => array(
|
||||
'module' => 'Emails',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'emails',
|
||||
),
|
||||
'linkedemails' => array(
|
||||
'module' => 'Emails',
|
||||
'subpanel_name' => 'ForUnlinkedEmailHistory',
|
||||
'get_subpanel_data' => 'function:get_unlinked_email_query',
|
||||
'generate_select'=>true,
|
||||
'function_parameters' => array('return_as_array'=>'true'),
|
||||
),
|
||||
)
|
||||
),
|
||||
|
||||
'leads' => array(
|
||||
'order' => 30,
|
||||
'module' => 'Leads',
|
||||
'sort_order' => 'asc',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'leads',
|
||||
'add_subpanel_data' => 'lead_id',
|
||||
'title_key' => 'LBL_LEADS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateLeadNameButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton',
|
||||
'popup_module' => 'Opportunities',
|
||||
'mode' => 'MultiSelect',
|
||||
),
|
||||
),
|
||||
),/*
|
||||
'opportunities' => array(
|
||||
'order' => 40,
|
||||
'module' => 'Opportunities',
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'date_closed',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'opportunities',
|
||||
'add_subpanel_data' => 'opportunity_id',
|
||||
'title_key' => 'LBL_OPPORTUNITIES_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
'cases' => array(
|
||||
'order' => 70,
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'case_number',
|
||||
'module' => 'Cases',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'cases',
|
||||
'add_subpanel_data' => 'case_id',
|
||||
'title_key' => 'LBL_CASES_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
|
||||
'bugs' => array(
|
||||
'order' => 80,
|
||||
'module' => 'Bugs',
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'bug_number',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'bugs',
|
||||
'add_subpanel_data' => 'bug_id',
|
||||
'title_key' => 'LBL_BUGS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
/*
|
||||
'contactleads' => array(
|
||||
'order' => 90,
|
||||
'module' => 'ContactLeads',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'last_name, first_name',
|
||||
'subpanel_name' => 'ForContactLeads',
|
||||
'get_subpanel_data' => 'direct_reports',
|
||||
'add_subpanel_data' => 'contactlead_id',
|
||||
'title_key' => 'LBL_DIRECT_REPORTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
*/
|
||||
'project' => array(
|
||||
'order' => 100,
|
||||
'module' => 'Project',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'project',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_PROJECTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
),
|
||||
),
|
||||
'campaigns' => array(
|
||||
'order' => 110,
|
||||
'module' => 'CampaignLog',
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'activity_date',
|
||||
'get_subpanel_data'=>'campaigns',
|
||||
'subpanel_name' => 'ForTargets',
|
||||
'title_key' => 'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE',
|
||||
),
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
110
modules/ContactLeads/metadata/subpanels/ForAccounts.php
Normal file
110
modules/ContactLeads/metadata/subpanels/ForAccounts.php
Normal file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for ContactLeads
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'ContactLeads'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '43%',
|
||||
),
|
||||
'title'=>array(
|
||||
'name'=>'title',
|
||||
'vname' => 'LBL_LIST_TITLE',
|
||||
//'widget_class' => 'SubPanelDetailViewLink',
|
||||
//'module' => 'ContactLeads',
|
||||
'width' => '10%',
|
||||
),
|
||||
'primary_address_city'=>array(
|
||||
'name'=>'primary_address_city',
|
||||
'vname' => 'LBL_LIST_CITY',
|
||||
'width' => '20%',
|
||||
),
|
||||
'primary_address_state'=>array(
|
||||
'name'=>'primary_address_state',
|
||||
'vname' => 'LBL_LIST_STATE',
|
||||
'width' => '10%',
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
118
modules/ContactLeads/metadata/subpanels/ForCalls.php
Normal file
118
modules/ContactLeads/metadata/subpanels/ForCalls.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for ContactLeads
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'ContactLeads'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'accept_status_name'=>array (
|
||||
'vname' => 'LBL_LIST_ACCEPT_STATUS',
|
||||
'width' => '11%',
|
||||
'sortable'=>false
|
||||
),
|
||||
'c_accept_status_fields'=>array(
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'accept_status_id'=>array(
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'account_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
107
modules/ContactLeads/metadata/subpanels/ForCases.php
Normal file
107
modules/ContactLeads/metadata/subpanels/ForCases.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for ContactLeads
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'ContactLeads'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'account_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
106
modules/ContactLeads/metadata/subpanels/ForContactLeads.php
Normal file
106
modules/ContactLeads/metadata/subpanels/ForContactLeads.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Layout definition for ContactLeads
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateDirectReport'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'ContactLeads'),
|
||||
),
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'contactlead_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
101
modules/ContactLeads/metadata/subpanels/ForEmails.php
Normal file
101
modules/ContactLeads/metadata/subpanels/ForEmails.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for ContactLeads
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'ContactLeads'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'account_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
118
modules/ContactLeads/metadata/subpanels/ForMeetings.php
Normal file
118
modules/ContactLeads/metadata/subpanels/ForMeetings.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for ContactLeads
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'ContactLeads'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'accept_status_name'=>array (
|
||||
'vname' => 'LBL_LIST_ACCEPT_STATUS',
|
||||
'width' => '11%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'm_accept_status_fields'=>array(
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'accept_status_id'=>array(
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'account_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
128
modules/ContactLeads/metadata/subpanels/ForOpportunities.php
Normal file
128
modules/ContactLeads/metadata/subpanels/ForOpportunities.php
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for ContactLeads
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'ContactLeads'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'account_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'opportunity_role_fields'=>array(
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'opportunity_role_id'=>array(
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'opportunity_role'=>array(
|
||||
'name'=>'opportunity_role',
|
||||
'vname' => 'LBL_LIST_CONTACTLEAD_ROLE',
|
||||
'width' => '10%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
//kbrill Bug#17483
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
//'widget_class' => 'SubPanelEditButton',
|
||||
//C.L. Bug#18035, changed to use SubPanelEditRoleButton
|
||||
'widget_class' => 'SubPanelEditRoleButton',
|
||||
'role_id'=>'opportunity_role_id',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
71
modules/ContactLeads/metadata/subpanels/ForProject.php
Normal file
71
modules/ContactLeads/metadata/subpanels/ForProject.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Quotes
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'title' => 'LBL_SELECT_USER_RESOURCE', 'popup_module' => 'Users', ),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
'list_fields' => array(
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name'=>array(
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_RESOURCE_NAME',
|
||||
'width' => '93%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButtonProjects',
|
||||
'width' => '5%',
|
||||
),
|
||||
'first_name' => array(
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
'last_name' => array(
|
||||
'usage'=>'query_only',
|
||||
)
|
||||
),
|
||||
);
|
||||
?>
|
||||
109
modules/ContactLeads/metadata/subpanels/default.php
Normal file
109
modules/ContactLeads/metadata/subpanels/default.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for ContactLeads
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'ContactLeads'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'sort_by' => 'last_name',
|
||||
'sort_order' => 'asc',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'account_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'ContactLeads',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
16
modules/ContactLeads/multidelete.php
Normal file
16
modules/ContactLeads/multidelete.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
if($_REQUEST['mass']!=""){
|
||||
$ids=$_REQUEST['mass'];
|
||||
|
||||
$contactLeads = new ContactLead();
|
||||
$contactLeads=$contactLeads->get_full_list("", "contactleads.id in ('".implode("','",$ids)."')");
|
||||
|
||||
foreach ($contactLeads as $contactLead){
|
||||
$contactLead->mark_deleted($contactLead->id);
|
||||
|
||||
}
|
||||
|
||||
header("Location: index.php?module=ContactLeads&action=index");
|
||||
}
|
||||
?>
|
||||
5
modules/ContactLeads/pl_pl.lang.php
Normal file
5
modules/ContactLeads/pl_pl.lang.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
$mod_strings['LBL_RESOURCE_NAME'] = 'Typ Źródła';
|
||||
|
||||
?>
|
||||
91
modules/ContactLeads/tpls/QuickCreate.tpl
Normal file
91
modules/ContactLeads/tpls/QuickCreate.tpl
Normal file
@@ -0,0 +1,91 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
<form action="index.php" method="POST" name="{$form_name}" id="{$form_id}" {$enctype}>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td style="padding-bottom: 2px;">
|
||||
<input type="hidden" name="module" value="{$module}">
|
||||
{if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}
|
||||
<input type="hidden" name="record" value="">
|
||||
{else}
|
||||
<input type="hidden" name="record" value="{$fields.id.value}">
|
||||
{/if}
|
||||
<input type="hidden" name="isDuplicate" value="false">
|
||||
<input type="hidden" name="action">
|
||||
<input type="hidden" name="return_module" value="{$smarty.request.return_module}">
|
||||
<input type="hidden" name="return_action" value="{$smarty.request.return_action}">
|
||||
<input type="hidden" name="return_id" value="{$smarty.request.return_id}">
|
||||
<input type="hidden" name="contactlead_role">
|
||||
{if !empty($smarty.request.return_module)}
|
||||
<input type="hidden" name="relate_to" value="{$smarty.request.return_module}">
|
||||
<input type="hidden" name="relate_id" value="{$smarty.request.return_id}">
|
||||
{/if}
|
||||
<input type="hidden" name="offset" value="{$offset}">
|
||||
{{if isset($form.hidden)}}
|
||||
{{foreach from=$form.hidden item=field}}
|
||||
{{$field}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
{* -- Begin QuickCreate Specific -- *}
|
||||
<input type="hidden" name="primary_address_street" value="{$smarty.request.primary_address_street}">
|
||||
<input type="hidden" name="primary_address_city" value="{$smarty.request.primary_address_city}">
|
||||
<input type="hidden" name="primary_address_state" value="{$smarty.request.primary_address_state}">
|
||||
<input type="hidden" name="primary_address_country" value="{$smarty.request.primary_address_country}">
|
||||
<input type="hidden" name="primary_address_postalcode" value="{$smarty.request.primary_address_postalcode}">
|
||||
<input type="hidden" name="phone_work" value="{$smarty.request.phone_work}">
|
||||
<input type="hidden" name="is_ajax_call" value="1">
|
||||
<input type="hidden" name="to_pdf" value="1">
|
||||
{* -- End QuickCreate Specific -- *}
|
||||
|
||||
{{if empty($form.button_location) || $form.button_location == 'top'}}
|
||||
{{if !empty($form) && !empty($form.buttons)}}
|
||||
{{foreach from=$form.buttons key=val item=button}}
|
||||
{{sugar_button module="$module" id="$button" view="$view"}}
|
||||
{{/foreach}}
|
||||
{{else}}
|
||||
{{sugar_button module="$module" id="SAVE" view="$view"}}
|
||||
{{sugar_button module="$module" id="CANCEL" view="$view"}}
|
||||
{{/if}}
|
||||
{{if empty($form.hideAudit) || !$form.hideAudit}}
|
||||
{{sugar_button module="$module" id="Audit" view="$view"}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td align='right'>{{$ADMIN_EDIT}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
689
modules/ContactLeads/vardefs.php
Normal file
689
modules/ContactLeads/vardefs.php
Normal file
@@ -0,0 +1,689 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$dictionary['ContactLead'] = array('table' => 'contactleads', 'audited'=>true, 'unified_search' => true, 'duplicate_merge'=>true, 'fields' =>
|
||||
array (
|
||||
|
||||
'email_and_name1' =>
|
||||
array (
|
||||
'name' => 'email_and_name1',
|
||||
'rname' => 'email_and_name1',
|
||||
'vname' => 'LBL_NAME',
|
||||
'type' => 'varchar',
|
||||
'source' => 'non-db',
|
||||
'len' => '510',
|
||||
'importable' => 'false',
|
||||
),
|
||||
'lead_source' =>
|
||||
array (
|
||||
'name' => 'lead_source',
|
||||
'vname' => 'LBL_LEAD_SOURCE',
|
||||
'type' => 'enum',
|
||||
'options' => 'lead_source_dom',
|
||||
'len' => '100',
|
||||
'comment' => 'How did the contactlead come about',
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
'account_name' =>
|
||||
array (
|
||||
'name' => 'account_name',
|
||||
'rname' => 'name',
|
||||
'id_name' => 'account_id',
|
||||
'vname' => 'LBL_ACCOUNT_NAME',
|
||||
'join_name'=>'accounts',
|
||||
'type' => 'relate',
|
||||
'link' => 'accounts',
|
||||
'table' => 'accounts',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Accounts',
|
||||
'dbType' => 'varchar',
|
||||
'len' => '255',
|
||||
'source' => 'non-db',
|
||||
'unified_search' => true,
|
||||
),
|
||||
'account_id' =>
|
||||
array (
|
||||
'name' => 'account_id',
|
||||
'rname' => 'id',
|
||||
'id_name' => 'account_id',
|
||||
'vname' => 'LBL_ACCOUNT_ID',
|
||||
'type' => 'relate',
|
||||
'table' => 'accounts',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Accounts',
|
||||
'dbType' => 'id',
|
||||
'reportable'=>false,
|
||||
'source' => 'non-db',
|
||||
'massupdate' => false,
|
||||
'duplicate_merge'=> 'disabled',
|
||||
'hideacl'=>true,
|
||||
|
||||
),
|
||||
'lead_name' =>
|
||||
array (
|
||||
'name' => 'lead_name',
|
||||
'rname' => 'name',
|
||||
'id_name' => 'lead_id',
|
||||
'vname' => 'Nazwa Potencjalnego Klienta',
|
||||
'join_name'=>'leads',
|
||||
'type' => 'relate',
|
||||
'link' => 'leads',
|
||||
'table' => 'leads',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Leads',
|
||||
'dbType' => 'varchar',
|
||||
'len' => '255',
|
||||
'source' => 'non-db',
|
||||
'unified_search' => true,
|
||||
),
|
||||
'lead_id' =>
|
||||
array (
|
||||
'name' => 'lead_id',
|
||||
'rname' => 'id',
|
||||
'id_name' => 'lead_id',
|
||||
'vname' => 'LBL_ACCOUNT_ID',
|
||||
'type' => 'relate',
|
||||
'table' => 'leads',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Leads',
|
||||
'dbType' => 'id',
|
||||
'reportable'=>false,
|
||||
'source' => 'non-db',
|
||||
'massupdate' => false,
|
||||
'duplicate_merge'=> 'disabled',
|
||||
'hideacl'=>true,
|
||||
|
||||
),
|
||||
'opportunity_role_fields' =>
|
||||
array (
|
||||
'name' => 'opportunity_role_fields',
|
||||
'rname' => 'id',
|
||||
'relationship_fields'=>array('id' => 'opportunity_role_id', 'contactlead_role' => 'opportunity_role'),
|
||||
'vname' => 'LBL_ACCOUNT_NAME',
|
||||
'type' => 'relate',
|
||||
'link' => 'opportunities',
|
||||
'link_type' => 'relationship_info',
|
||||
'join_link_name' => 'opportunities_contactleads',
|
||||
'source' => 'non-db',
|
||||
'importable' => 'false',
|
||||
'duplicate_merge'=> 'disabled',
|
||||
|
||||
),
|
||||
'opportunity_role_id' =>
|
||||
array(
|
||||
'name' => 'opportunity_role_id',
|
||||
'type' => 'varchar',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_OPPORTUNITY_ROLE_ID',
|
||||
),
|
||||
'opportunity_role' =>
|
||||
array(
|
||||
'name' => 'opportunity_role',
|
||||
'type' => 'enum',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_OPPORTUNITY_ROLE',
|
||||
'options' => 'opportunity_relationship_type_dom',
|
||||
),
|
||||
'reports_to_id'=>
|
||||
array(
|
||||
'name' => 'reports_to_id',
|
||||
'vname' => 'LBL_REPORTS_TO_ID',
|
||||
'type' => 'id',
|
||||
'required'=>false,
|
||||
'reportable'=>false,
|
||||
'comment' => 'The contactlead this contactlead reports to'
|
||||
),
|
||||
'report_to_name' =>
|
||||
array (
|
||||
'name' => 'report_to_name',
|
||||
'rname' => 'last_name',
|
||||
'id_name' => 'reports_to_id',
|
||||
'vname' => 'LBL_REPORTS_TO',
|
||||
'type' => 'relate',
|
||||
'link' => 'reports_to_link',
|
||||
'table' => 'contactleads',
|
||||
'isnull' => 'true',
|
||||
'module' => 'ContactLeads',
|
||||
'dbType' => 'varchar',
|
||||
'len' => 'id',
|
||||
'reportable'=>false,
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'birthdate' =>
|
||||
array (
|
||||
'name' => 'birthdate',
|
||||
'vname' => 'LBL_BIRTHDATE',
|
||||
'massupdate' => false,
|
||||
'type' => 'date',
|
||||
'comment' => 'The birthdate of the contactlead'
|
||||
),
|
||||
|
||||
|
||||
'portal_name' =>
|
||||
array (
|
||||
'name' => 'portal_name',
|
||||
'vname' => 'LBL_PORTAL_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'group'=>'portal',
|
||||
'comment' => 'Name as it appears in the portal'
|
||||
),
|
||||
'portal_active' =>
|
||||
array (
|
||||
'name' => 'portal_active',
|
||||
'vname' => 'LBL_PORTAL_ACTIVE',
|
||||
'type' => 'bool',
|
||||
'required' => true,
|
||||
'default' => '0',
|
||||
'group'=>'portal',
|
||||
'comment' => 'Indicator whether this contactlead is a portal user'
|
||||
),
|
||||
'mailing_tag' =>
|
||||
array (
|
||||
'name' => 'mailing_tag',
|
||||
'vname' => 'LBL_MAILING_TAG',
|
||||
'type' => 'bool',
|
||||
'default' => '0',
|
||||
),
|
||||
'foreign_contactlead' =>
|
||||
array (
|
||||
'name' => 'foreign_contactlead',
|
||||
'vname' => 'LBL_FOREIGN_CONTACTLEAD',
|
||||
'type' => 'bool',
|
||||
'default' => '0',
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'portal_app' =>
|
||||
array (
|
||||
'name' => 'portal_app',
|
||||
'vname' => 'LBL_PORTAL_APP',
|
||||
'type' => 'varchar',
|
||||
'group'=>'portal',
|
||||
'len' => '255',
|
||||
'comment' => 'Reference to the portal'
|
||||
),
|
||||
'accounts' =>
|
||||
array (
|
||||
'name' => 'accounts',
|
||||
'type' => 'link',
|
||||
'relationship' => 'accounts_contactleads',
|
||||
'link_type' => 'one',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_ACCOUNT',
|
||||
'duplicate_merge'=> 'disabled',
|
||||
),
|
||||
'reports_to_link' =>
|
||||
array (
|
||||
'name' => 'reports_to_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactlead_direct_reports',
|
||||
'link_type' => 'one',
|
||||
'side' => 'right',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_REPORTS_TO',
|
||||
),
|
||||
'opportunities' =>
|
||||
array (
|
||||
'name' => 'opportunities',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunities_contactleads',
|
||||
'source' => 'non-db',
|
||||
'module' => 'Opportunities',
|
||||
'bean_name' => 'Opportunity',
|
||||
'vname' => 'LBL_OPPORTUNITIES',
|
||||
),
|
||||
'email_addresses' =>
|
||||
array (
|
||||
'name' => 'email_addresses',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactleads_email_addresses',
|
||||
'module' => 'EmailAddress',
|
||||
'bean_name'=>'EmailAddress',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_EMAIL_ADDRESSES',
|
||||
'reportable'=>false,
|
||||
),
|
||||
'email_addresses_primary' =>
|
||||
array (
|
||||
'name' => 'email_addresses_primary',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactleads_email_addresses_primary',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
|
||||
'duplicate_merge'=> 'disabled',
|
||||
),
|
||||
'bugs' =>
|
||||
array (
|
||||
'name' => 'bugs',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactleads_bugs',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_BUGS',
|
||||
),
|
||||
'calls' =>
|
||||
array (
|
||||
'name' => 'calls',
|
||||
'type' => 'link',
|
||||
'relationship' => 'calls_contactleads',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_CALLS',
|
||||
),
|
||||
'cases' =>
|
||||
array (
|
||||
'name' => 'cases',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactleads_cases',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_CASES',
|
||||
),
|
||||
'direct_reports'=>
|
||||
array (
|
||||
'name' => 'direct_reports',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactlead_direct_reports',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_DIRECT_REPORTS',
|
||||
),
|
||||
'emails'=>
|
||||
array (
|
||||
'name' => 'emails',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_contactleads_rel',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_EMAILS',
|
||||
),
|
||||
'leads' =>
|
||||
array (
|
||||
'name' => 'leads',
|
||||
'type' => 'link',
|
||||
'relationship' => 'leads_contactleads',
|
||||
'link_type' => 'one',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_ACCOUNT',
|
||||
'duplicate_merge'=> 'disabled',
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'meetings'=>
|
||||
array (
|
||||
'name' => 'meetings',
|
||||
'type' => 'link',
|
||||
'relationship' => 'meetings_contactleads',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_MEETINGS',
|
||||
),
|
||||
'notes'=>
|
||||
array (
|
||||
'name' => 'notes',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactlead_notes',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_NOTES',
|
||||
),
|
||||
'project'=>
|
||||
array (
|
||||
'name' => 'project',
|
||||
'type' => 'link',
|
||||
'relationship' => 'projects_contactleads',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_PROJECTS',
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'tasks'=>
|
||||
array (
|
||||
'name' => 'tasks',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactlead_tasks',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_TASKS',
|
||||
),
|
||||
'user_sync'=>
|
||||
array (
|
||||
'name' => 'users',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactleads_users',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_USER_SYNC',
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'created_by_link' =>
|
||||
array (
|
||||
'name' => 'created_by_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactleads_created_by',
|
||||
'vname' => 'LBL_CREATED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'modified_user_link' =>
|
||||
array (
|
||||
'name' => 'modified_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactleads_modified_user',
|
||||
'vname' => 'LBL_MODIFIED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'assigned_user_link' =>
|
||||
array (
|
||||
'name' => 'assigned_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactleads_assigned_user',
|
||||
'vname' => 'LBL_ASSIGNED_TO_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'table' => 'users',
|
||||
'duplicate_merge'=>'enabled'
|
||||
),
|
||||
|
||||
'campaign_id' =>
|
||||
array (
|
||||
'name' => 'campaign_id',
|
||||
'comment' => 'Campaign that generated lead',
|
||||
'vname'=>'LBL_CAMPAIGN_ID',
|
||||
'rname' => 'id',
|
||||
'id_name' => 'campaign_id',
|
||||
'type' => 'id',
|
||||
//'dbType' => 'char',
|
||||
'table' => 'campaigns',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Campaigns',
|
||||
'reportable'=>false,
|
||||
'massupdate' => false,
|
||||
'duplicate_merge'=> 'disabled',
|
||||
),
|
||||
|
||||
'campaign_name' =>
|
||||
array (
|
||||
'name' => 'campaign_name',
|
||||
'vname' => 'LBL_CAMPAIGN',
|
||||
'type' => 'relate',
|
||||
'reportable'=>false,
|
||||
'source'=>'non-db',
|
||||
'table' => 'campaigns',
|
||||
'id_name' => 'campaign_id',
|
||||
'module'=>'Campaigns',
|
||||
'duplicate_merge'=>'disabled',
|
||||
'comment' => 'The first campaign name for ContactLead (Meta-data only)',
|
||||
),
|
||||
|
||||
'campaigns' =>
|
||||
array (
|
||||
'name' => 'campaigns',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contactlead_campaign_log',
|
||||
'module'=>'CampaignLog',
|
||||
'bean_name'=>'CampaignLog',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_CAMPAIGNS',
|
||||
),
|
||||
|
||||
'c_accept_status_fields' =>
|
||||
array (
|
||||
'name' => 'c_accept_status_fields',
|
||||
'rname' => 'id',
|
||||
'relationship_fields'=>array('id' => 'accept_status_id', 'accept_status' => 'accept_status_name'),
|
||||
'vname' => 'LBL_LIST_ACCEPT_STATUS',
|
||||
'type' => 'relate',
|
||||
'link' => 'calls',
|
||||
'link_type' => 'relationship_info',
|
||||
'source' => 'non-db',
|
||||
'importable' => 'false',
|
||||
'duplicate_merge'=> 'disabled',
|
||||
),
|
||||
'm_accept_status_fields' =>
|
||||
array (
|
||||
'name' => 'm_accept_status_fields',
|
||||
'rname' => 'id',
|
||||
'relationship_fields'=>array('id' => 'accept_status_id', 'accept_status' => 'accept_status_name'),
|
||||
'vname' => 'LBL_LIST_ACCEPT_STATUS',
|
||||
'type' => 'relate',
|
||||
'link' => 'meetings',
|
||||
'link_type' => 'relationship_info',
|
||||
'source' => 'non-db',
|
||||
'importable' => 'false',
|
||||
'hideacl'=>true,
|
||||
'duplicate_merge'=> 'disabled',
|
||||
),
|
||||
'accept_status_id' =>
|
||||
array(
|
||||
'name' => 'accept_status_id',
|
||||
'type' => 'varchar',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_LIST_ACCEPT_STATUS',
|
||||
),
|
||||
'accept_status_name' =>
|
||||
array(
|
||||
'massupdate' => false,
|
||||
'name' => 'accept_status_name',
|
||||
'type' => 'enum',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_LIST_ACCEPT_STATUS',
|
||||
'options' => 'dom_meeting_accept_status',
|
||||
'importable' => 'false',
|
||||
),
|
||||
'prospect_lists' =>
|
||||
array (
|
||||
'name' => 'prospect_lists',
|
||||
'type' => 'link',
|
||||
'relationship' => 'prospect_list_contactleads',
|
||||
'module'=>'ProspectLists',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_PROSPECT_LIST',
|
||||
),
|
||||
'sync_contactlead' =>
|
||||
array (
|
||||
'massupdate' => false,
|
||||
'name' => 'sync_contactlead',
|
||||
'vname' => 'LBL_SYNC_CONTACTLEAD',
|
||||
'type' => 'bool',
|
||||
'source' => 'non-db',
|
||||
'comment' => 'Synch to outlook? (Meta-Data only)',
|
||||
),
|
||||
),
|
||||
'indices' => array (
|
||||
array(
|
||||
'name' => 'idx_cont_last_first',
|
||||
'type' => 'index',
|
||||
'fields' => array('last_name', 'first_name', 'deleted')
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_contactleads_del_last',
|
||||
'type' => 'index',
|
||||
'fields' => array('deleted', 'last_name'),
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_cont_del_reports',
|
||||
'type' => 'index',
|
||||
'fields'=>array('deleted', 'reports_to_id', 'last_name')
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_reports_to_id',
|
||||
'type' => 'index',
|
||||
'fields'=> array('reports_to_id'),
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
array(
|
||||
'name' => 'idx_del_id_user',
|
||||
'type' => 'index',
|
||||
'fields'=> array('deleted', 'id', 'assigned_user_id'),
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_cont_assigned',
|
||||
'type' => 'index',
|
||||
'fields' => array('assigned_user_id')
|
||||
),
|
||||
// array(
|
||||
// 'name' => 'idx_cont_email1',
|
||||
// 'type' => 'index',
|
||||
// 'fields' => array('email1')
|
||||
// ),
|
||||
// array(
|
||||
// 'name' => 'idx_cont_email2',
|
||||
// 'type' => 'index',
|
||||
// 'fields' => array('email2')
|
||||
// ),
|
||||
)
|
||||
, 'relationships' => array (
|
||||
'contactlead_direct_reports' => array('lhs_module' => 'ContactLeads', 'lhs_table' => 'contactleads', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'ContactLeads', 'rhs_table' => 'contactleads', 'rhs_key' => 'reports_to_id',
|
||||
'relationship_type' => 'one-to-many'),
|
||||
'contactlead_leads' => array('lhs_module' => 'ContactLeads', 'lhs_table' => 'contactleads', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'Leads', 'rhs_table' => 'leads', 'rhs_key' => 'contactlead_id',
|
||||
'relationship_type' => 'one-to-many')
|
||||
,'contactlead_notes' => array('lhs_module' => 'ContactLeads', 'lhs_table' => 'contactleads', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'Notes', 'rhs_table' => 'notes', 'rhs_key' => 'contact_id',
|
||||
'relationship_type' => 'one-to-many')
|
||||
,'contactlead_tasks' => array('lhs_module' => 'ContactLeads', 'lhs_table' => 'contactleads', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'Tasks', 'rhs_table' => 'tasks', 'rhs_key' => 'contact_id',
|
||||
'relationship_type' => 'one-to-many')
|
||||
,'contactleads_assigned_user' =>
|
||||
array('lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'ContactLeads', 'rhs_table' => 'contactleads', 'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type' => 'one-to-many')
|
||||
,'contactleads_modified_user' =>
|
||||
array('lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'ContactLeads', 'rhs_table' => 'contactleads', 'rhs_key' => 'modified_user_id',
|
||||
'relationship_type' => 'one-to-many')
|
||||
,'contactleads_created_by' =>
|
||||
array('lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'ContactLeads', 'rhs_table' => 'contactleads', 'rhs_key' => 'created_by',
|
||||
'relationship_type' => 'one-to-many'),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'contactlead_campaign_log' => array(
|
||||
'lhs_module' => 'ContactLeads',
|
||||
'lhs_table' => 'contactleads',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'CampaignLog',
|
||||
'rhs_table' => 'campaign_log',
|
||||
'rhs_key' => 'target_id',
|
||||
'relationship_type' =>'one-to-many'
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
//This enables optimistic locking for Saves From EditView
|
||||
'optimistic_locking'=>true,
|
||||
);
|
||||
require_once('include/SugarObjects/VardefManager.php');
|
||||
VardefManager::createVardef('ContactLeads','ContactLead', array('default', 'assignable',
|
||||
|
||||
|
||||
|
||||
'person'));
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
|
||||
class ContactLeadsViewCloseContactLeadAddressPopup extends ViewList {
|
||||
|
||||
function CloseContactLeadAddressPopup(){
|
||||
parent::ViewList();
|
||||
}
|
||||
|
||||
function display() {
|
||||
if(isset($_REQUEST['close_window'])) echo "<script>window.close();</script>";
|
||||
parent::display();
|
||||
}
|
||||
}
|
||||
?>
|
||||
62
modules/ContactLeads/views/view.contactleadaddresspopup.php
Normal file
62
modules/ContactLeads/views/view.contactleadaddresspopup.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* ContactLeadsViewContactLeadAddressPopup
|
||||
*
|
||||
* */
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/ContactLeads/Popup_picker.php');
|
||||
|
||||
class ContactLeadsViewContactLeadAddressPopup extends SugarView {
|
||||
|
||||
function ContactLeadAddressPopup(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function process() {
|
||||
$this->display();
|
||||
}
|
||||
|
||||
function display() {
|
||||
$this->displayJavascript();
|
||||
echo '<script type="text/javascript" src="' . getJSPath('themes/'.$GLOBALS['theme'].'/menu.js') . '"></script>';
|
||||
$popup = new Popup_Picker();
|
||||
echo $popup->process_page_for_address();
|
||||
}
|
||||
}
|
||||
?>
|
||||
68
modules/ContactLeads/views/view.detail.php
Normal file
68
modules/ContactLeads/views/view.detail.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/json_config.php');
|
||||
require_once('include/MVC/View/views/view.detail.php');
|
||||
|
||||
class ContactLeadsViewDetail extends ViewDetail {
|
||||
|
||||
|
||||
function ContactLeadsViewDetail(){
|
||||
parent::ViewDetail();
|
||||
}
|
||||
|
||||
/**
|
||||
* display
|
||||
*
|
||||
* We are overridding the display method to manipulate the portal information.
|
||||
* If portal is not enabled then don't show the portal fields.
|
||||
*/
|
||||
function display() {
|
||||
$pl55 = $this->bean->showPositions55();
|
||||
|
||||
$this->ss->assign('POSITIONS55', $pl55);
|
||||
$admin = new Administration();
|
||||
$admin->retrieveSettings();
|
||||
if(isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
|
||||
$this->ss->assign("PORTAL_ENABLED", true);
|
||||
}
|
||||
parent::display();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
102
modules/ContactLeads/views/view.edit.php
Normal file
102
modules/ContactLeads/views/view.edit.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: This file is used to override the default Meta-data EditView behavior
|
||||
* to provide customization specific to the ContactLeads module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/json_config.php');
|
||||
require_once('include/MVC/View/views/view.edit.php');
|
||||
|
||||
class ContactLeadsViewEdit extends ViewEdit {
|
||||
|
||||
function ContactLeadsViewEdit(){
|
||||
parent::ViewEdit();
|
||||
$this->useForSubpanel = true;
|
||||
$this->useModuleQuickCreateTemplate = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* display
|
||||
*
|
||||
* We are overridding the display method to manipulate the sectionPanels.
|
||||
* If portal is not enabled then don't show the Portal Information panel.
|
||||
*/
|
||||
function display() {
|
||||
$json = getJSONobj();
|
||||
global $mod_strings;
|
||||
echo '
|
||||
<script language="javascript">
|
||||
|
||||
var MOD = '.str_replace('"','\"',$json->encode($mod_strings)).';
|
||||
|
||||
</script>';
|
||||
$pl55 = $this->bean->getPositionList55();
|
||||
|
||||
$this->ss->assign('POSITION_LIST55', $pl55);
|
||||
$this->ev->process();
|
||||
if ( !empty($_REQUEST['contactlead_name']) && !empty($_REQUEST['contactlead_id'])
|
||||
&& $this->ev->fieldDefs['report_to_name']['value'] == ''
|
||||
&& $this->ev->fieldDefs['reports_to_id']['value'] == '') {
|
||||
$this->ev->fieldDefs['report_to_name']['value'] = $_REQUEST['contactlead_name'];
|
||||
$this->ev->fieldDefs['reports_to_id']['value'] = $_REQUEST['contactlead_id'];
|
||||
}
|
||||
$admin = new Administration();
|
||||
$admin->retrieveSettings();
|
||||
if(empty($admin->settings['portal_on']) || !$admin->settings['portal_on']) {
|
||||
unset($this->ev->sectionPanels[strtoupper('lbl_portal_information')]);
|
||||
} else {
|
||||
echo '<script src="modules/ContactLeads/ContactLead.js"></script>';
|
||||
echo '<script language="javascript">';
|
||||
echo 'addToValidateComparison(\'EditView\', \'portal_password\', \'varchar\', false, SUGAR.language.get(\'app_strings\', \'ERR_SQS_NO_MATCH_FIELD\') + SUGAR.language.get(\'ContactLeads\', \'LBL_PORTAL_PASSWORD\'), \'portal_password1\');';
|
||||
echo 'addToValidateVerified(\'EditView\', \'portal_name_verified\', \'bool\', false, SUGAR.language.get(\'app_strings\', \'ERR_EXISTING_PORTAL_USERNAME\'));';
|
||||
echo 'YAHOO.util.Event.on(\'portal_name\', \'blur\', validatePortalName);';
|
||||
echo 'YAHOO.util.Event.on(\'portal_name\', \'keydown\', handleKeyDown);';
|
||||
echo '</script>';
|
||||
}
|
||||
|
||||
echo $this->ev->display($this->showTitle);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
61
modules/ContactLeads/views/view.mailmergepopup.php
Normal file
61
modules/ContactLeads/views/view.mailmergepopup.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* ContactLeadsViewContactLeadAddressPopup
|
||||
*
|
||||
* */
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/ContactLeads/Popup_picker.php');
|
||||
|
||||
class ContactLeadsViewMailMergePopup extends SugarView {
|
||||
|
||||
function ContactLeadAddressPopup(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function process() {
|
||||
$this->display();
|
||||
}
|
||||
|
||||
function display() {
|
||||
|
||||
$popup = new Popup_Picker();
|
||||
echo $popup->process_page_for_merge();
|
||||
}
|
||||
}
|
||||
?>
|
||||
76
modules/ContactLeads/views/view.retrieveemail.php
Normal file
76
modules/ContactLeads/views/view.retrieveemail.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* ContactLeadsViewRetrieveEmailUsername.php
|
||||
*
|
||||
* This class overrides SugarView and provides an implementation for the RetrieveEmailUsername
|
||||
* method used for returning the information about an email address
|
||||
*
|
||||
* @author Collin Lee
|
||||
* */
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once("include/JSON.php");
|
||||
|
||||
class ContactLeadsViewRetrieveEmail extends SugarView {
|
||||
|
||||
function ContactLeadsViewRetrieveEmail(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function process() {
|
||||
$this->display();
|
||||
}
|
||||
|
||||
function display(){
|
||||
$data = array();
|
||||
$data['target'] = $_REQUEST['target'];
|
||||
if(!empty($_REQUEST['email'])) {
|
||||
$db = DBManagerFactory::getInstance();
|
||||
$email = $GLOBALS['db']->quote(strtoupper(trim($_REQUEST['email'])));
|
||||
$result = $db->query("SELECT * FROM email_addresses WHERE email_address_caps = '$email' AND deleted = 0");
|
||||
if($row = $db->fetchByAssoc($result)) {
|
||||
$data['email'] = $row;
|
||||
} else {
|
||||
$data['email'] = '';
|
||||
}
|
||||
}
|
||||
$json = new JSON(JSON_LOOSE_TYPE);
|
||||
echo $json->encode($data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
75
modules/ContactLeads/views/view.validportalusername.php
Normal file
75
modules/ContactLeads/views/view.validportalusername.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contactlead SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contactlead@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* ContactLeadsViewValidPortalUsername.php
|
||||
*
|
||||
* This class overrides SugarView and provides an implementation for the ValidPortalUsername
|
||||
* method used for checking whether or not an existing portal user_name has already been assigned.
|
||||
* We take advantage of the MVC framework to provide this action which is invoked from
|
||||
* a javascript AJAX request.
|
||||
*
|
||||
* @author Collin Lee
|
||||
* */
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
|
||||
class ContactLeadsViewValidPortalUsername extends SugarView {
|
||||
|
||||
function ValidPortalUsername(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function process() {
|
||||
$this->display();
|
||||
}
|
||||
|
||||
function display(){
|
||||
if(!empty($_REQUEST['portal_name'])) {
|
||||
$db = DBManagerFactory::getInstance();
|
||||
$portalUsername = $_REQUEST['portal_name'];
|
||||
$result = $db->query("Select count(id) as total from contactleads where portal_name = '$portalUsername'");
|
||||
$total = 0;
|
||||
while($row = $db->fetchByAssoc($result)) {
|
||||
$total = $row['total'];
|
||||
}
|
||||
echo $total;
|
||||
} else {
|
||||
echo '0';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user