This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

62
modules/Prospects/Delete.php Executable file
View File

@@ -0,0 +1,62 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
/*********************************************************************************
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
global $mod_strings;
$focus = new Prospect();
if(!isset($_REQUEST['record']))
sugar_die($mod_strings['ERR_DELETE_RECORD']);
$focus->retrieve($_REQUEST['record']);
if(!$focus->ACLAccess('Delete')){
ACLController::displayNoAccess(true);
sugar_cleanup(true);
}
$focus->mark_deleted($_REQUEST['record']);
header("Location: index.php?module=".$_REQUEST['return_module']."&action=".$_REQUEST['return_action']."&record=".$_REQUEST['return_id']);
?>

54
modules/Prospects/Import.php Executable file
View File

@@ -0,0 +1,54 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
/*********************************************************************************
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
include('modules/Import/index.php');
?>

55
modules/Prospects/Menu.php Executable file
View File

@@ -0,0 +1,55 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
/*********************************************************************************
* Description: TODO To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
global $mod_strings, $app_strings;
if(ACLController::checkAccess('Campaigns', 'edit', true))$module_menu[]= Array("index.php?module=Campaigns&action=EditView&return_module=Campaigns&return_action=index", $mod_strings['LNK_NEW_CAMPAIGN'],"CreateCampaigns");
if(ACLController::checkAccess('Campaigns', 'list', true))$module_menu[]= Array("index.php?module=Campaigns&action=index&return_module=Campaigns&return_action=index", $mod_strings['LNK_CAMPAIGN_LIST'],"Campaigns");
if(ACLController::checkAccess('ProspectLists', 'edit', true))$module_menu[]= Array("index.php?module=ProspectLists&action=EditView&return_module=ProspectLists&return_action=DetailView", $mod_strings['LNK_NEW_PROSPECT_LIST'],"CreateProspectLists");
if(ACLController::checkAccess('ProspectLists', 'list', true))$module_menu[]= Array("index.php?module=ProspectLists&action=index&return_module=ProspectLists&return_action=index", $mod_strings['LNK_PROSPECT_LIST_LIST'],"ProspectLists");
if(ACLController::checkAccess('Prospects', 'edit', true))$module_menu[]= Array("index.php?module=Prospects&action=EditView&return_module=Prospects&return_action=DetailView", $mod_strings['LNK_NEW_PROSPECT'],"CreateProspects");
if(ACLController::checkAccess('Prospects', 'list', true))$module_menu[]= Array("index.php?module=Prospects&action=index&return_module=Prospects&return_action=index", $mod_strings['LNK_PROSPECT_LIST'],"Prospects");
if(ACLController::checkAccess('Prospects', 'import', true))$module_menu[]= Array("index.php?module=Import&action=Step1&import_module=Prospects&return_module=Prospects&return_action=index", $mod_strings['LNK_IMPORT_PROSPECTS'],"Import");
?>

View File

@@ -0,0 +1,107 @@
<!--
/*********************************************************************************
* 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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
-->
<!-- 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>
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="edit view">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<form action="index.php" method="post" name="popup_query_form" id="popup_query_form">
<td scope="row" noWrap>{MOD.LBL_LIST_FIRST_NAME}&nbsp;&nbsp;<input type=text size="20" name="first_name" class=dataField value="{FIRST_NAME}" /></td>
<td scope="row" noWrap>{MOD.LBL_LIST_LAST_NAME}&nbsp;&nbsp;<input type=text size="20" name="last_name" class=dataField value="{LAST_NAME}" /></td>
<td align="right"><input type="hidden" name="action" value="PopupProspects"/>
<input type="hidden" name="query" value="true"/>
<input type="hidden" name="record" value="{RECORD_VALUE}"/>
<input type="hidden" name="module" value="{MODULE_NAME}" />
<input type="hidden" name="action" value="Popup" />
<input type="hidden" name="form_submit" value="{FORM_SUBMIT}" />
<input type="hidden" name="request_data" value="{request_data}" />
<input type="hidden" name="form" value="{FORM}" />
<input class="button" type="submit" name="button" value="{APP.LBL_SEARCH_BUTTON_LABEL}"/></td>
</form>
</tr>
</table>
</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());
}
-->
</script>
<!-- END: SearchHeader -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list view">
<!-- BEGIN: list_nav_row -->
{PAGINATION}
<!-- END: list_nav_row -->
<tr height="20">
<td scope="col" NOWRAP>{CHECKALL}</td>
<td scope="col" width="35%" ><slot><a href="{ORDER_BY}last_name" class="listViewThLinkS1">{MOD.LBL_LIST_NAME}{arrow_start}{last_name_arrow}{arrow_end}</a></slot></td>
<td scope="col" width="15%" ><slot><a href="{ORDER_BY}title" class="listViewThLinkS1">{MOD.LBL_LIST_TITLE}{arrow_start}{title_arrow}{arrow_end}</a></slot></td>
<td scope="col" width="35%" nowrap><slot><a href="{ORDER_BY}email1" class="listViewThLinkS1">{MOD.LBL_LIST_EMAIL_ADDRESS}{arrow_start}{email1_arrow}{arrow_end}</a></slot></td>
<td scope="col" width="15%" ><slot><a href="{ORDER_BY}phone_work" class="listViewThLinkS1">{MOD.LBL_LIST_PHONE}{arrow_start}{phone_work_arrow}{arrow_end}</a></slot></td>
</tr>
<!-- BEGIN: row -->
<tr height="20" class="{ROW_COLOR}S1">
<td valign="top">{PREROW}</td>
<td scope='row' valign=TOP><slot><{TAG_TYPE} href="#" onclick="send_back('Prospects','{PROSPECT.ID}');">{PROSPECT.FULL_NAME}</{TAG_TYPE}></slot></td>
<td valign=TOP><slot>{PROSPECT.TITLE}</slot></td>
<td valign=TOP><slot>{PROSPECT.EMAIL1}</slot></td>
<td nowrap="nowrap" valign="top"><slot>{PROSPECT.PHONE_WORK}</slot></td>
</tr>
<tr>
<td colspan="20" class="listViewHRS1"></td>
</tr>
<!-- END: row -->
</table>
{ASSOCIATED_JAVASCRIPT_DATA}
<!-- END: main -->

309
modules/Prospects/Prospect.php Executable file
View File

@@ -0,0 +1,309 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
/*********************************************************************************
* 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/SugarObjects/templates/person/Person.php');
class Prospect extends Person {
var $field_name_map;
// Stored fields
var $id;
var $name = '';
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 $description;
var $salutation;
var $first_name;
var $last_name;
var $full_name;
var $title;
var $department;
var $birthdate;
var $do_not_call;
var $phone_home;
var $phone_mobile;
var $phone_work;
var $phone_other;
var $phone_fax;
var $email1;
var $email2;
var $email_and_name1;
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 $tracker_key;
var $lead_id;
var $account_name;
var $assigned_real_user_name;
// These are for related fields
var $assigned_user_name;
var $module_dir = 'Prospects';
var $table_name = "prospects";
var $object_name = "Prospect";
var $new_schema = true;
var $emailAddress;
var $importable = true;
// This is used to retrieve related fields from form posts.
var $additional_column_fields = Array('assigned_user_name');
function Prospect() {
parent::Person();
}
function create_export_query(&$order_by, &$where, $relate_link_join='')
{
$custom_join = $this->custom_fields->getJOIN(true, true,$where);
if($custom_join)
$custom_join['join'] .= $relate_link_join;
$query = "SELECT
prospects.*,email_addresses.email_address email1,
users.user_name as assigned_user_name ";
if($custom_join){
$query .= $custom_join['select'];
}
$query .= " FROM prospects ";
$query .= "LEFT JOIN users
ON prospects.assigned_user_id=users.id ";
//join email address table too.
$query .= ' LEFT JOIN email_addr_bean_rel on prospects.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module=\'Prospects\' and email_addr_bean_rel.primary_address=1 and email_addr_bean_rel.deleted=0';
$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 = " prospects.deleted=0 ";
if($where != "")
$query .= "where ($where) AND ".$where_auto;
else
$query .= "where ".$where_auto;
if(!empty($order_by))
$query .= " ORDER BY $order_by";
return $query;
}
function fill_in_additional_list_fields() {
global $locale;
$full_name = $locale->getLocaleFormattedName($this->first_name, $this->last_name, $this->salutation, $this->title);
$this->name = $full_name;
$this->full_name = $full_name;
$this->email_and_name1 = $full_name." &lt;".$this->email1."&gt;";
}
function fill_in_additional_detail_fields() {
global $locale;
parent::fill_in_additional_detail_fields();
$full_name = $locale->getLocaleFormattedName($this->first_name, $this->last_name, $this->salutation, $this->title);
$this->name = $full_name;
$this->full_name = $full_name;
}
function get_list_view_data() {
global $locale, $current_user;
$full_name = $locale->getLocaleFormattedName($this->first_name, $this->last_name, $this->salutation, $this->title);
$this->name = $full_name;
$this->full_name = $full_name;
$temp_array = $this->get_list_view_array();
$temp_array["ENCODED_NAME"] = $full_name;
$temp_array["FULL_NAME"] = $full_name;
$temp_array["EMAIL1"] = $this->emailAddress->getPrimaryAddress($this);
$this->email1 = $temp_array['EMAIL1'];
$temp_array["EMAIL1_LINK"] = $current_user->getEmailLink('email1', $this, '', '', 'ListView');
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 = $GLOBALS['db']->quote($the_query_string);
array_push($where_clauses, "prospects.last_name like '$the_query_string%'");
array_push($where_clauses, "prospects.first_name like '$the_query_string%'");
array_push($where_clauses, "prospects.assistant like '$the_query_string%'");
if (is_numeric($the_query_string))
{
array_push($where_clauses, "prospects.phone_home like '%$the_query_string%'");
array_push($where_clauses, "prospects.phone_mobile like '%$the_query_string%'");
array_push($where_clauses, "prospects.phone_work like '%$the_query_string%'");
array_push($where_clauses, "prospects.phone_other like '%$the_query_string%'");
array_push($where_clauses, "prospects.phone_fax like '%$the_query_string%'");
array_push($where_clauses, "prospects.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 converted_prospect($prospectid, $contactid, $accountid, $opportunityid){
$query = "UPDATE prospects set contact_id=$contactid, account_id=$accountid, opportunity_id=$opportunityid where id=$prospectid and deleted=0";
$this->db->query($query,true,"Error converting prospect: ");
//todo--status='Converted', converted='1',
}
function bean_implements($interface){
switch($interface){
case 'ACL':return true;
}
return false;
}
/**
* This method will be used by Mail Merge in order to retieve the targets as specified in the query
* @param query String - this is the query which contains the where clause for the query
*/
function retrieveTargetList($query, $fields, $offset = 0, $limit= -99, $max = -99, $deleted = 0, $module = ''){
global $beanList, $beanFiles;
$module_name = $this->module_dir;
if(empty($module)){
$pattern = '/AND related_type = #(.*)#/i';
if(preg_match($pattern, $query, $matches) && count($matches) > 1){
$module_name = $matches[1];
$query = preg_replace($pattern, "", $query);
}
$GLOBALS['log']->debug("PROSPECT QUERY: ".$query);
}
$GLOBALS['log']->debug(var_export($matches, true));
$count = count($fields);
$index = 1;
$sel_fields = "";
if(!empty($fields)){
foreach($fields as $field){
if($field == 'id'){
$sel_fields .= 'prospect_lists_prospects.id id';
}else{
$sel_fields .= $module_name.".".$field;
}
if($index < $count){
$sel_fields .= ",";
}
$index++;
}
}
$module_name = ucfirst($module_name);
$class_name = $beanList[$module_name];
require_once($beanFiles[$class_name]);
$seed = new $class_name();
if(empty($sel_fields)){
$sel_fields = $seed->table_name.'.*';
}
$select = "SELECT ".$sel_fields." FROM ".$seed->table_name;
$select .= " INNER JOIN prospect_lists_prospects ON prospect_lists_prospects.related_id = ".$seed->table_name.".id";
$select .= " INNER JOIN prospect_lists ON prospect_lists_prospects.prospect_list_id = prospect_lists.id";
$select .= " INNER JOIN prospect_list_campaigns ON prospect_list_campaigns.prospect_list_id = prospect_lists.id";
$select .= " INNER JOIN campaigns on campaigns.id = prospect_list_campaigns.campaign_id";
$select .= " WHERE prospect_list_campaigns.deleted = 0";
$select .= " AND prospect_lists_prospects.deleted = 0";
$select .= " AND prospect_lists.deleted = 0";
if (!empty($query)) {
$select .= " AND ".$query;
}
return $this->process_list_query($select, $offset, $limit, $max, $query);
}
/**
* Given an id, looks up in the prospect_lists_prospects table
* and retrieve the correct type for this id
*/
function retrieveTarget($id){
$query = "SELECT related_id, related_type FROM prospect_lists_prospects WHERE id = '".$id."'";
$result = $this->db->query($query);
if(($row = $this->db->fetchByAssoc($result))){
global $beanList, $beanFiles;
$module_name = $row['related_type'];
$class_name = $beanList[$module_name];
require_once($beanFiles[$class_name]);
$seed = new $class_name();
return $seed->retrieve($row['related_id']);
}else{
return null;
}
}
function get_unlinked_email_query($type=array()) {
return get_unlinked_email_query($type, $this);
}
}

View File

@@ -0,0 +1,510 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
/*********************************************************************************
* Description: Base form for prospect
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
class ProspectFormBase {
function checkForDuplicates($prefix){
global $local_log;
require_once('include/formbase.php');
$focus = new Prospect();
if(!checkRequired($prefix, array_keys($focus->required_fields))){
return null;
}
$query = '';
$baseQuery = 'select id,first_name, last_name, title, email1, email2 from prospects where deleted!=1 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'] ."'";
}
if(!empty($_POST[$prefix.'email1'])){
if(empty($query)){
$query = $baseQuery. " email1='". $_POST[$prefix.'email1'] . "' or email2 = '". $_POST[$prefix.'email1'] ."'";
}else {
$query .= "or email1='". $_POST[$prefix.'email1'] . "' or email2 = '". $_POST[$prefix.'email1'] ."'";
}
}
if(!empty($_POST[$prefix.'email2'])){
if(empty($query)) {
$query = $baseQuery. " email1='". $_POST[$prefix.'email2'] . "' or email2 = '". $_POST[$prefix.'email2'] ."'";
}else{
$query .= "or email1='". $_POST[$prefix.'email2'] . "' or email2 = '". $_POST[$prefix.'email2'] ."'";
}
}
if(!empty($query)){
$rows = array();
$db = DBManagerFactory::getInstance();
$result = $db->query($query.');');
if($db->getRowCount($result) == 0){
return null;
}
for($i = 0; $i < $db->getRowCount($result); $i++){
$rows[$i] = $db->fetchByAssoc($result, $i);
}
return $rows;
}
return null;
}
function buildTableForm($rows, $mod=''){
global $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='dupProspects'><input type='hidden' name='selectedProspect' 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 > ";
if ($action != 'ShowDuplicates')
{
$form .= "<td > &nbsp;</td>";
}
require_once('include/formbase.php');
$form .= getPostToForm();
if(isset($rows[0])){
foreach ($rows[0] as $key=>$value){
if($key != 'id'){
$form .= "<td scope='col' >". $mod_strings[$mod_strings['db_'.$key]]. "</td>";
}
}
$form .= "</tr>";
}
$rowColor = 'oddListRowS1';
foreach($rows as $row){
$form .= "<tr class='$rowColor'>";
if ($action != 'ShowDuplicates')
$form .= "<td width='1%' nowrap='nowrap' ><a href='#' onClick=\"document.dupProspects.selectedProspect.value='${row['id']}';document.dupProspects.submit() \">[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a>&nbsp;&nbsp;</td>\n";
$wasSet = false;
foreach ($row as $key=>$value) {
if($key != 'id') {
if(!$wasSet) {
$form .= "<td scope='row' ><a target='_blank' href='index.php?module=Prospects&action=DetailView&record=${row['id']}'>$value</a></td>\n";
$wasSet = true;
}
else {
$form .= "<td><a target='_blank' href='index.php?module=Prospects&action=DetailView&record=${row['id']}'>$value</a></td>\n";
}
}
}
if($rowColor == 'evenListRowS1'){
$rowColor = 'oddListRowS1';
}else{
$rowColor = 'evenListRowS1';
}
$form .= "</tr>";
}
$form .= "<tr ><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']} '> <input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='${app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='ListView'; this.form.module.value='Prospects';\" type='submit' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
}
else
{
$form .= "</table><br><input type='submit' class='button' name='ContinueProspect' value='${mod_strings['LNK_NEW_PROSPECT']}'></form>";
}
return $form;
}
function getWideFormBody($prefix, $mod='',$formname='', $prospect = ''){
if(!ACLController::checkAccess('Prospects', 'edit', true)){
return '';
}
if(empty($prospect)){
$prospect = new Prospect();
}
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'], $prospect->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'];
$user_id = $current_user->id;
$lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
$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&nbsp;<span class="required">$lbl_required_symbol</span></td>
<td nowrap class='dataLabel'>&nbsp;</td>
<td class='dataLabel'>&nbsp;</td>
</tr>
<tr>
<td nowrap class='dataField'><input name="${prefix}first_name" type="text" value="{$prospect->first_name}"></td>
<td class='dataField'><input name='${prefix}last_name' type="text" value="{$prospect->last_name}"></td>
<td class='dataField' nowrap>&nbsp;</td>
<td class='dataField'>&nbsp;</td>
</tr>
<tr>
<td class='dataLabel' nowrap>${mod_strings['LBL_TITLE']}</td>
<td class='dataLabel' nowrap>${mod_strings['LBL_DEPARTMENT']}</td>
<td class='dataLabel' nowrap>&nbsp;</td>
<td class='dataLabel' nowrap>&nbsp;</td>
</tr>
<tr>
<td class='dataField' nowrap><input name='${prefix}title' type="text" value="{$prospect->title}"></td>
<td class='dataField' nowrap><input name='${prefix}department' type="text" value="{$prospect->department}"></td>
<td class='dataField' nowra>&nbsp;</td>
<td class='dataField' nowrap>&nbsp;</td>
</tr>
<tr>
<td nowrap colspan='4' class='dataLabel'>$lbl_address</td>
</tr>
<tr>
<td nowrap colspan='4' class='dataField'><input type='text' name='${prefix}primary_address_street' size='80' value='{$prospect->primary_address_street}'></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='{$prospect->primary_address_city}'></td>
<td class='dataField'><input name='${prefix}primary_address_state' maxlength='100' value='{$prospect->primary_address_state}'></td>
<td class='dataField'><input name='${prefix}primary_address_postalcode' maxlength='100' value='{$prospect->primary_address_postalcode}'></td>
<td class='dataField'><select name='${prefix}primary_address_country' size='1'>{$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="{$prospect->phone_work}"></td>
<td nowrap class='dataField'><input name='${prefix}phone_mobile' type="text" value="{$prospect->phone_mobile}"></td>
<td nowrap class='dataField'><input name='${prefix}phone_fax' type="text" value="{$prospect->phone_fax}"></td>
<td nowrap class='dataField'><input name='${prefix}phone_home' type="text" value="{$prospect->phone_home}"></td>
</tr>
<tr>
<td class='dataLabel' nowrap>$lbl_email_address</td>
<td class='dataLabel' nowrap>${mod_strings['LBL_OTHER_EMAIL_ADDRESS']}</td>
<td class='dataLabel' nowrap>&nbsp;</td>
<td class='dataLabel' nowrap>&nbsp;</td>
</tr>
<tr>
<td class='dataField' nowrap><input name='${prefix}email1' type="text" value="{$prospect->email1}"></td>
<td class='dataField' nowrap><input name='${prefix}email2' type="text" value="{$prospect->email2}"></td>
<td class='dataField' nowrap>&nbsp;</td>
<td class='dataField' nowrap>&nbsp;</td>
</tr>
<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' >{$prospect->description}</textarea></td>
</tr>
</table>
<input type='hidden' name='${prefix}alt_address_city' value='{$prospect->alt_address_city}'><input type='hidden' name='${prefix}alt_address_state' value='{$prospect->alt_address_state}'><input type='hidden' name='${prefix}alt_address_postalcode' value='{$prospect->alt_address_postalcode}'><input type='hidden' name='${prefix}alt_address_country' value='{$prospect->alt_address_country}'>
<input type='hidden' name='${prefix}do_not_call' value='{$prospect->do_not_call}'><input type='hidden' name='${prefix}email_opt_out' value='{$prospect->email_opt_out}'>
EOQ;
$javascript = new javascript();
$javascript->setFormName($formname);
$javascript->setSugarBean(new Prospect());
$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('Prospects', '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&nbsp;<span class="required">$lbl_required_symbol</span><br>
<input name='${prefix}last_name' type="text" value="" size=10><br>
$lbl_email_address&nbsp;<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&nbsp;<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;
}
$javascript = new javascript();
$javascript->setFormName($formname);
$javascript->setSugarBean(new Prospect());
$javascript->addField('email1','false',$prefix);
$javascript->addRequiredFields($prefix);
$form .=$javascript->getScript();
$mod_strings = $temp_strings;
return $form;
}
function getForm($prefix, $mod=''){
if(!ACLController::checkAccess('Prospects', '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}ProspectSave" onSubmit="return check_form('${prefix}ProspectSave')" method="POST" action="index.php">
<input type="hidden" name="${prefix}module" value="Prospects">
<input type="hidden" name="${prefix}action" value="Save">
EOQ;
$the_form .= $this->getFormBody($prefix,'Prospects', "${prefix}ProspectSave");
$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;
require_once('include/formbase.php');
global $timedate;
$focus = new Prospect();
if($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))){
return null;
}
$focus = populateFromPost($prefix, $focus);
if(!$focus->ACLAccess('Save')){
return null;
}
if (!isset($GLOBALS['check_notify'])) $GLOBALS['check_notify']=false;
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 (empty($_POST['record']) && empty($_POST['dup_checked'])) {
/*
// we don't check dupes on Prospects - this is the dirtiest data in the system
//$duplicateProspects = $this->checkForDuplicates($prefix);
if(isset($duplicateProspects)){
$get='module=Prospects&action=ShowDuplicates';
//add all of the post fields to redirect get string
foreach ($focus->column_fields as $field)
{
if (!empty($focus->$field))
{
$get .= "&Prospects$field=".urlencode($focus->$field);
}
}
foreach ($focus->additional_column_fields as $field)
{
if (!empty($focus->$field))
{
$get .= "&Prospects$field=".urlencode($focus->$field);
}
}
//create list of suspected duplicate prospect id's in redirect get string
$i=0;
foreach ($duplicateProspects as $prospect)
{
$get .= "&duplicate[$i]=".$prospect['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 .= "Prospects";
$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'];
//now redirect the post to modules/Prospects/ShowDuplicates.php
header("Location: index.php?$get");
return null;
}*/
}
global $current_user;
$focus->save($GLOBALS['check_notify']);
$return_id = $focus->id;
$GLOBALS['log']->debug("Saved record with id of ".$return_id);
if(isset($_POST['popup']) && $_POST['popup'] == 'true') {
$get = '&module=';
if(!empty($_POST['return_module'])) $get .= $_POST['return_module'];
else $get .= 'Prospects';
$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){
require_once('include/formbase.php');
handleRedirect($return_id, 'Prospects');
}else{
return $focus;
}
}
}
?>

51
modules/Prospects/Save.php Executable file
View File

@@ -0,0 +1,51 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
/*********************************************************************************
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('modules/Prospects/ProspectFormBase.php');
$prospectForm = new ProspectFormBase();
if (!isset($_REQUEST['return_module'])) $_REQUEST['return_module']='Prospects';
if (!isset($_REQUEST['return_action'])) $_REQUEST['return_action']='index';
$prospectForm->handleSave('', true, false);
?>

View File

@@ -0,0 +1,89 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
/*********************************************************************************
* 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['Prospect'] = array ('column_fields' => Array("id"
,"date_entered"
,"date_modified"
,"modified_user_id"
,"assigned_user_id"
, "created_by"
,"salutation"
,"first_name"
,"last_name"
,"title"
,"department"
,"birthdate"
,"do_not_call"
,"phone_home"
,"phone_mobile"
,"phone_work"
,"phone_other"
,"phone_fax"
,"email1"
,"email2"
,"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"
,"tracker_key"
,'invalid_email'
,'lead_id'
,'account_name'
),
'list_fields' => Array('full_name','id', 'first_name', 'last_name', 'account_name', 'account_id', 'title', 'email1','email2', 'phone_work', 'assigned_user_name', 'assigned_user_id','email_and_name1','email_and_name2'
,'invalid_email'
,'lead_id'
),
'required_fields' => array("last_name"=>1),
);
?>

View File

@@ -0,0 +1,186 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
/*********************************************************************************
* 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_MODULE_NAME' => 'Targets',
'LBL_MODULE_ID' => 'Targets',
'LBL_INVITEE' => 'Direct Reports',
'LBL_MODULE_TITLE' => 'Targets: Home',
'LBL_SEARCH_FORM_TITLE' => 'Target Search',
'LBL_LIST_FORM_TITLE' => 'Target List',
'LBL_NEW_FORM_TITLE' => 'New Target',
'LBL_PROSPECT' => 'Target:',
'LBL_BUSINESSCARD' => 'Business Card',
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_LAST_NAME' => 'Last Name',
'LBL_LIST_PROSPECT_NAME' => 'Target Name',
'LBL_LIST_TITLE' => 'Title',
'LBL_LIST_EMAIL_ADDRESS' => 'Email',
'LBL_LIST_OTHER_EMAIL_ADDRESS' => 'Other Email',
'LBL_LIST_PHONE' => 'Phone',
'LBL_LIST_PROSPECT_ROLE' => 'Role',
'LBL_LIST_FIRST_NAME' => 'First Name',
'LBL_ASSIGNED_TO_NAME' => 'Assigned to',
'LBL_ASSIGNED_TO_ID'=>'Assigned To:',
//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
'LBL_CAMPAIGN_ID' => 'Campaign ID',
'LBL_EXISTING_PROSPECT' => 'Used an existing contact',
'LBL_CREATED_PROSPECT' => 'Created a new contact',
'LBL_EXISTING_ACCOUNT' => 'Used an existing account',
'LBL_CREATED_ACCOUNT' => 'Created a new account',
'LBL_CREATED_CALL' => 'Created a new call',
'LBL_CREATED_MEETING' => 'Created a new meeting',
'LBL_ADDMORE_BUSINESSCARD' => 'Add another business card',
'LBL_ADD_BUSINESSCARD' => 'Enter Business Card',
'LBL_NAME' => 'Name:',
'LBL_FULL_NAME' => 'Name',
'LBL_PROSPECT_NAME' => 'Target Name:',
'LBL_PROSPECT_INFORMATION' => 'Target Overview',
'LBL_MORE_INFORMATION' => 'More Information',
'LBL_FIRST_NAME' => 'First Name:',
'LBL_OFFICE_PHONE' => 'Office Phone:',
'LBL_ANY_PHONE' => 'Any Phone:',
'LBL_PHONE' => 'Phone:',
'LBL_LAST_NAME' => 'Last Name:',
'LBL_MOBILE_PHONE' => 'Mobile:',
'LBL_HOME_PHONE' => 'Home:',
'LBL_OTHER_PHONE' => 'Other Phone:',
'LBL_FAX_PHONE' => 'Fax:',
'LBL_PRIMARY_ADDRESS_STREET' => 'Primary Address Street:',
'LBL_PRIMARY_ADDRESS_CITY' => 'Primary Address City:',
'LBL_PRIMARY_ADDRESS_COUNTRY' => 'Primary Address Country:',
'LBL_PRIMARY_ADDRESS_STATE' => 'Primary Address State:',
'LBL_PRIMARY_ADDRESS_POSTALCODE' => 'Primary Address Postal Code:',
'LBL_ALT_ADDRESS_STREET' => 'Alternate Address Street:',
'LBL_ALT_ADDRESS_CITY' => 'Alternate Address City:',
'LBL_ALT_ADDRESS_COUNTRY' => 'Alternate Address Country:',
'LBL_ALT_ADDRESS_STATE' => 'Alternate Address State:',
'LBL_ALT_ADDRESS_POSTALCODE' => 'Alternate Address Postal Code:',
'LBL_TITLE' => 'Title:',
'LBL_DEPARTMENT' => 'Department:',
'LBL_BIRTHDATE' => 'Birthdate:',
'LBL_EMAIL_ADDRESS' => 'Email Address:',
'LBL_OTHER_EMAIL_ADDRESS' => 'Other Email:',
'LBL_ANY_EMAIL' => 'Any Email:',
'LBL_ASSISTANT' => 'Assistant:',
'LBL_ASSISTANT_PHONE' => 'Assistant Phone:',
'LBL_DO_NOT_CALL' => 'Do Not Call:',
'LBL_EMAIL_OPT_OUT' => 'Email Opt Out:',
'LBL_PRIMARY_ADDRESS' => 'Primary Address:',
'LBL_ALTERNATE_ADDRESS' => 'Other Address:',
'LBL_ANY_ADDRESS' => 'Any Address:',
'LBL_CITY' => 'City:',
'LBL_STATE' => 'State:',
'LBL_POSTAL_CODE' => 'Postal Code:',
'LBL_COUNTRY' => 'Country:',
'LBL_DESCRIPTION_INFORMATION' => 'Description Information',
'LBL_ADDRESS_INFORMATION' => 'Address Information',
'LBL_DESCRIPTION' => 'Description:',
'LBL_PROSPECT_ROLE' => 'Role:',
'LBL_OPP_NAME' => 'Opportunity Name:',
'LBL_IMPORT_VCARD' => 'Import vCard',
'LBL_IMPORT_VCARDTEXT' => 'Automatically create a new contact by importing a vCard from your file system.',
'LBL_DUPLICATE' => 'Possible Duplicate Targets',
'MSG_SHOW_DUPLICATES' => 'The target record you are about to create might be a duplicate of a target record that already exists. Target records containing similar names and/or email addresses are listed below.<br>Click Save to continue creating this new target, or click Cancel to return to the module without creating the target.',
'MSG_DUPLICATE' => 'The target record you are about to create might be a duplicate of a target record that already exists. Target records containing similar names and/or email addresses are listed below.<br>Click Save to continue creating this new target, or click Cancel to return to the module without creating the target.',
'LNK_IMPORT_VCARD' => 'Create From vCard',
'LNK_NEW_ACCOUNT' => 'Create Account',
'LNK_NEW_OPPORTUNITY' => 'Create Opportunity',
'LNK_NEW_CASE' => 'Create Case',
'LNK_NEW_NOTE' => 'Create Note or Attachment',
'LNK_NEW_CALL' => 'Log Call',
'LNK_NEW_EMAIL' => 'Archive Email',
'LNK_NEW_MEETING' => 'Schedule Meeting',
'LNK_NEW_TASK' => 'Create Task',
'LNK_NEW_APPOINTMENT' => 'Create Appointment',
'LNK_IMPORT_PROSPECTS' => 'Import Prospects',
'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to delete this record?',
'NTC_REMOVE_CONFIRMATION' => 'Are you sure you want to remove this contact from the case?',
'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Are you sure you want to remove this record as a direct report?',
'ERR_DELETE_RECORD' => 'A record number must be specified to delete the contact.',
'NTC_COPY_PRIMARY_ADDRESS' => 'Copy primary address to alternate address',
'NTC_COPY_ALTERNATE_ADDRESS' => 'Copy alternate address to primary address',
'LBL_SALUTATION' => 'Salutation',
'LBL_SAVE_PROSPECT' => 'Save Target',
'LBL_CREATED_OPPORTUNITY' =>'Created a new opportunity',
'NTC_OPPORTUNITY_REQUIRES_ACCOUNT' => 'Creating an opportunity requires an account.\n Please either create a new account or select an existing one.',
'LNK_SELECT_ACCOUNT' => "Select Account",
'LNK_NEW_PROSPECT' => 'Create Target',
'LNK_PROSPECT_LIST' => 'View Targets',
'LNK_NEW_CAMPAIGN' => 'Create Campaign',
'LNK_CAMPAIGN_LIST' => 'Campaigns',
'LNK_NEW_PROSPECT_LIST' => 'Create Target List',
'LNK_PROSPECT_LIST_LIST' => 'Target Lists',
'LNK_IMPORT_PROSPECT' => 'Import Targets',
'LBL_SELECT_CHECKED_BUTTON_LABEL' => 'Select Checked Targets',
'LBL_SELECT_CHECKED_BUTTON_TITLE' => 'Select Checked Targets',
'LBL_INVALID_EMAIL'=>'Invalid Email:',
'LBL_DEFAULT_SUBPANEL_TITLE'=>'Targets',
'LBL_PROSPECT_LIST' => 'Prospect List',
'LBL_CONVERT_BUTTON_KEY' => 'V',
'LBL_CONVERT_BUTTON_TITLE' => 'Convert Target',
'LBL_CONVERT_BUTTON_LABEL' => 'Convert Target',
'LBL_CONVERTPROSPECT'=>'Convert Target',
'LNK_NEW_CONTACT'=>'New Contact',
'LBL_CREATED_CONTACT'=>"Created a new contact",
'LBL_BACKTO_PROSPECTS'=>'Back to Targets',
'LBL_CAMPAIGNS'=>'Campaigns',
'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE'=>'Campaign Log',
'LBL_TRACKER_KEY'=>'Tracker Key',
'LBL_LEAD_ID'=>'Lead Id',
'LBL_CONVERTED_LEAD'=>'Converted Lead',
'LBL_ACCOUNT_NAME'=>'Account Name',
'LBL_EDIT_ACCOUNT_NAME'=>'Account Name:',
'LBL_CREATED_USER' => 'Created User',
'LBL_MODIFIED_USER' => 'Modified User',
'LBL_CAMPAIGNS_SUBPANEL_TITLE' => 'Campaigns',
'LBL_HISTORY_SUBPANEL_TITLE'=>'History',
);
?>

View File

@@ -0,0 +1,84 @@
<!--
/*********************************************************************************
* 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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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>Cele</h1>
<p>Aby utworzyc adresata kampanii, wprowadz nastepujace informacje:</p>
<span class="helpButton">Informacje:</span>
<ul>
<li>Imie. Wpisz imie.</li>
<li>Nazwisko. Wpisz nazwisko.</li>
<li>Nr telef. (biuro). Wpisz numer telefonu do biura.</li>
<li>Nr komorkowy. Wpisz numer telefonu komorkowego.</li>
<li>Nr telef.(prywatny). Wpisz prywatny numer telefonu.</li>
<li>Inne nr telef. Wpisz pozostale numery telefonu.</li>
<li>Fax. Wpisz numer faxu .</li>
<li>Email. Wpisz adres email.</li>
<li>Inny email. Wpisz alternatywny adres email.</li>
<li>Asystent. Wpisz nazwisko asystenta.</li>
<li>Nr tel. asystenta. Wpisz tnumer telefonu asystenta.</li>
<li>Email Opt Out. Po wybraniu tej opcji. Jezeli adresat zrezygnuje z otrzymywania naszych email, (poprzez wybranie opcji Unsubscribe dostepnej w adresie url dolaczonym do listu) system wyswietli adres email z adnotacja w subpanelu na stronie stan kampanii.</li>
<li>Nieprawidlowy email. Po wybraniu tego pola, jesli wiadomosci zostanie zwr<77>cona z powodu nieprawidlowego adresu lub adres nie istnieje, system wyswietli adres email z adnotacja o zwrocie w subpanelu na stronie stan kampanii.</li>
<li>Department. Wpisz nazwe departamentu, w kt<6B>rym pracuje adresat kampanii.</li>
<li>Data urodzin. Wpisz date urodzin.</li>
<li>Nazwa klienta. Wpisz nazwe klienta do kt<6B>rego odnosi sie kampania.</li>
<li>Nie dzwonic. Zaznacz to pole, aby dodac adresata do listy Nie Dzwonic.</li>
<li>Przypisany do. Wybierz uzytkownika, kt<6B>ry jest odpowiedzialny za adres, zwiazany z adresatem kampanii.</li>
</ul>
<span class="helpButton">Informacje teleadresowe:</span>
<li>Adres podstawowy. Nazwa ulicy adresata.</li>
<li>Miato. Nazwa miasta.</li>
<li>Stan/ woj. Stan / wojew<65>dztwo w kt<6B>rym znajduje sie masto.</li>
<li>Kod pocztowy. Kod pocztowy adresata.</li>
<li>Kraj. Kraju, w kt<6B>rym znajduje sie miasto.</li>
<li>Inny adres. Dodatkowy adres odbiorcy. Uzyj >> aby skopiowac podstawowy adres.</li>
</ul>
<span class="helpButton">Opis:</SPAN> Wpisz kr<6B>tki opis adresata kampanii.</p>
Click <span class="helpButton">Save</span> aby zachowac ; click <span class="helpButton">Cancel</span> aby opuscic strone bez zapisywania.

View File

@@ -0,0 +1,177 @@
<?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.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 (
'LBL_MODULE_NAME' => 'Docelowi odbiorcy',
'LBL_MODULE_ID' => 'Docelowi odbiorcy',
'LBL_INVITEE' => 'Raportowanie bezpośrednie',
'LBL_MODULE_TITLE' => 'Docelowi odbiorcy: Strona główna',
'LBL_SEARCH_FORM_TITLE' => 'Szukaj ootencjalnych odbiorców',
'LBL_LIST_FORM_TITLE' => 'Lista docelowych odbiorców',
'LBL_NEW_FORM_TITLE' => 'Nowy docelowy odbiorca',
'LBL_PROSPECT' => 'Potencjalny odbiorca:',
'LBL_MORE_INFORMATION'=>'Więcej informacji',
'LBL_BUSINESSCARD' => 'Wizytówka',
'LBL_LIST_NAME' => 'Nazwa',
'LBL_LIST_LAST_NAME' => 'Nazwisko',
'LBL_LIST_PROSPECT_NAME' => 'Nazwa docelowego odbiorcy',
'LBL_LIST_TITLE' => 'Tytuł',
'LBL_LIST_EMAIL_ADDRESS' => 'Email',
'LBL_LIST_OTHER_EMAIL_ADDRESS' => 'Inny email',
'LBL_LIST_PHONE' => 'Telefon',
'LBL_LIST_PROSPECT_ROLE' => 'Rola',
'LBL_LIST_FIRST_NAME' => 'Imię',
'LBL_ASSIGNED_TO_NAME'=>'Przydzielone do:',
'LBL_ASSIGNED_TO_ID'=>'Przydzielone do (Id):',
//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
'LBL_CAMPAIGN_ID' => 'ID Kampanii',
'LBL_EXISTING_PROSPECT' => 'Użyto istniejącego kontaktu',
'LBL_CREATED_PROSPECT' => 'Utworzono nowy kontakt',
'LBL_EXISTING_ACCOUNT' => 'Użyto istniejącego klienta',
'LBL_CREATED_ACCOUNT' => 'Utworzono nowego klienta',
'LBL_CREATED_CALL' => 'Utworzono rozmowę telefoniczną ',
'LBL_CREATED_MEETING' => 'Utworzono nowe spotkanie',
'LBL_ADDMORE_BUSINESSCARD' => 'Dodaj wizytówkę',
'LBL_ADD_BUSINESSCARD' => 'Wprowadź wizytówkę',
'LBL_NAME' => 'Nazwa:',
'LBL_FULL_NAME' => 'Pełna nazwa',
'LBL_PROSPECT_NAME' => 'Nazwa odbiorcy:',
'LBL_PROSPECT_INFORMATION' => 'Informacje o odbiorcy',
'LBL_FIRST_NAME' => 'Imię:',
'LBL_OFFICE_PHONE' => 'Telefon do biura:',
'LBL_ANY_PHONE' => 'Inny telefon:',
'LBL_PHONE' => 'Telefon:',
'LBL_LAST_NAME' => 'Nazwisko:',
'LBL_MOBILE_PHONE' => 'Mobile:',
'LBL_HOME_PHONE' => 'Telefon domowy:',
'LBL_OTHER_PHONE' => 'Inny telefon:',
'LBL_FAX_PHONE' => 'Fax:',
'LBL_PRIMARY_ADDRESS_STREET' => 'Ulica (adres główny):',
'LBL_PRIMARY_ADDRESS_CITY' => 'Miasto (adres główny):',
'LBL_PRIMARY_ADDRESS_COUNTRY' => 'Kraj (adres główny):',
'LBL_PRIMARY_ADDRESS_STATE' => 'Woj. (adres główny):',
'LBL_PRIMARY_ADDRESS_POSTALCODE' => 'Kod pocztowy (adres główny):',
'LBL_ALT_ADDRESS_STREET' => 'Ulica (adres inny):',
'LBL_ALT_ADDRESS_CITY' => 'Miasto (adres inny):',
'LBL_ALT_ADDRESS_COUNTRY' => 'Kraj (adres inny):',
'LBL_ALT_ADDRESS_STATE' => 'Woj. (adres inny):',
'LBL_ALT_ADDRESS_POSTALCODE' => 'Kod pocztowy (adres inny):',
'LBL_TITLE' => 'Tytuł:',
'LBL_DEPARTMENT' => 'Departament:',
'LBL_BIRTHDATE' => 'Data urodzenia:',
'LBL_EMAIL_ADDRESS' => 'Adres email:',
'LBL_OTHER_EMAIL_ADDRESS' => 'Inny email:',
'LBL_ANY_EMAIL' => 'Dodatkowy adres email:',
'LBL_ASSISTANT' => 'Asystent:',
'LBL_ASSISTANT_PHONE' => 'Telefon asystenta:',
'LBL_DO_NOT_CALL' => 'Nie dzwonić:',
'LBL_EMAIL_OPT_OUT' => 'Email Opt Out:',
'LBL_PRIMARY_ADDRESS' => 'Adres główny:',
'LBL_ALTERNATE_ADDRESS' => 'Adres dodatkowy:',
'LBL_ANY_ADDRESS' => 'Inny adres:',
'LBL_CITY' => 'Miasto:',
'LBL_STATE' => 'Woj.:',
'LBL_POSTAL_CODE' => 'Kod pocztowy:',
'LBL_COUNTRY' => 'Kraj:',
'LBL_DESCRIPTION_INFORMATION' => 'Dodatkowe informacje',
'LBL_ADDRESS_INFORMATION' => 'Informacje dot. adresu',
'LBL_DESCRIPTION' => 'Opis:',
'LBL_PROSPECT_ROLE' => 'Role:',
'LBL_OPP_NAME' => 'Nazwa okazji:',
'LBL_IMPORT_VCARD' => 'Import vCard',
'LBL_IMPORT_VCARDTEXT' => 'Automatycznie tworzy nowy kontakt przez import vCard z twojego systemu.',
'LBL_DUPLICATE' => 'Możliwa duplikacja klientów',
'MSG_SHOW_DUPLICATES' => 'Utworzenie tego kontaktu może spowodować duplikację kontaktów. Możesz kliknąć na "Zapisz", kontynuując z użyciem dotychczas wprowadzonych danych, lub kliknąć "Skasuj".',
'MSG_DUPLICATE' => 'Utworzenie tego kontaktu może spowodować duplikację kontaktów. Możesz wybrać kontakt z listy poniżej, lub kliknąć "Zapisz", kontynuując z użyciem dotychczas wprowadzonych danych.',
'LNK_IMPORT_VCARD' => 'Utwórz z vCard',
'LNK_NEW_ACCOUNT' => 'Utwórz odbiorcę',
'LNK_NEW_OPPORTUNITY' => 'Utwórz okazje',
'LNK_NEW_CASE' => 'Utwórz sprawę',
'LNK_NEW_NOTE' => 'Utwórz notatkę lub załącznik',
'LNK_NEW_CALL' => 'Plan telefonów',
'LNK_NEW_EMAIL' => 'Zarchiwizuj emaile',
'LNK_NEW_MEETING' => 'Plan spotkań',
'LNK_NEW_TASK' => 'Utwórz zadanie',
'LNK_NEW_APPOINTMENT' => 'Utwórz spotkanie',
'NTC_DELETE_CONFIRMATION' => 'Czy na pewno usunąć ten rekord?',
'NTC_REMOVE_CONFIRMATION' => 'Czy na pewno usunąć ten kontakt z tej sprawy?',
'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Czy na pewno chcesz usunąć ten zapis jako bezpośredni raport?',
'ERR_DELETE_RECORD' => 'Musisz podać numer rekordu, aby usunąć ten kontakt.',
'NTC_COPY_PRIMARY_ADDRESS' => 'Kopiuj adres podstawowy jako adres alternatywny',
'NTC_COPY_ALTERNATE_ADDRESS' => 'Kopiuj adres alternatywny jako adres podstawowy',
'LBL_SALUTATION' => 'Pozdrowienie',
'LBL_SAVE_PROSPECT' => 'Zachowaj docelowego odbiorcę',
'LBL_CREATED_OPPORTUNITY' =>'Utwórz Nową Okazję',
'NTC_OPPORTUNITY_REQUIRES_ACCOUNT' => 'Utworzenie nowej okazji wymaga podania nazwy klienta.\n Utwórz nowego klienta, lub skorzystaj z już istniejącego.',
'LNK_SELECT_ACCOUNT' => "Wybierz odbiorcę",
'LNK_NEW_PROSPECT' => 'Utwórz docelowego odbiorcę',
'LNK_PROSPECT_LIST' => 'Docelowi odbiorcy',
'LNK_NEW_CAMPAIGN' => 'Utwórz Kampanię',
'LNK_CAMPAIGN_LIST' => 'Kampanie',
'LNK_NEW_PROSPECT_LIST' => 'Utwórz listę grup odbiorców',
'LNK_PROSPECT_LIST_LIST' => 'Lista grup odbiorców',
'LNK_IMPORT_PROSPECT' => 'Import docelowych odbiorców',
'LBL_SELECT_CHECKED_BUTTON_LABEL' => 'Wybierz zaznaczonych docelowych odbiorców',
'LBL_SELECT_CHECKED_BUTTON_TITLE' => 'Wybierz zaznaczonych docelowych odbiorców',
'LBL_INVALID_EMAIL'=>'Niewłaściwy adres email:',
'LBL_DEFAULT_SUBPANEL_TITLE'=>'Docelowi odbiorcy',
'LBL_PROSPECTS_LIST'=>'Lista docelowych klientów',
'LBL_CONVERT_BUTTON_KEY' => 'V',
'LBL_CONVERT_BUTTON_TITLE' => 'Konwertuj docelowych odbiorców',
'LBL_CONVERT_BUTTON_LABEL' => 'Konwertuj docelowych odbiorców',
'LBL_CONVERTPROSPECT'=>'Konwertuj docelowych odbiorców',
'LNK_NEW_CONTACT'=>'Nowy kontakt',
'LBL_CREATED_CONTACT'=>"Utwórz nowy kontakt",
'LBL_BACKTO_PROSPECTS'=>'Wróć do docelowych odbiorców',
'LBL_CAMPAIGNS'=>'Kampanie',
'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE'=>'Log kampanii',
'LBL_TRACKER_KEY'=>'Klucz śledzenia',
'LBL_LEAD_ID'=>'Id Adresu',
'LBL_CONVERTED_LEAD'=>'Przekonwertowane adresu',
'LBL_ACCOUNT_NAME'=>'Nazwa odbiorcy',
'LBL_EDIT_ACCOUNT_NAME'=>'Nazwa odbiorcy:',
'LBL_CREATED_USER' => 'Użytkownik tworzący',
'LBL_MODIFIED_USER' => 'Użytkownik modyfikujący',
'LBL_CAMPAIGNS_SUBPANEL_TITLE' => 'Kampanie',
);
?>

View File

@@ -0,0 +1,62 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
$searchFields['Prospects'] =
array (
'first_name' => array( 'query_type'=>'default'),
'last_name'=> array('query_type'=>'default'),
'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name'),'force_unifiedsearch'=>true),
'do_not_call'=> array('query_type'=>'default', 'operator'=>'='),
'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','phone_home')),
'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, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
'assigned_user_id'=> array('query_type'=>'default'),
);
?>

View File

@@ -0,0 +1,93 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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 additionalDetailsProspect($fields) {
static $mod_strings;
if(empty($mod_strings)) {
global $current_language;
$mod_strings = return_module_language($current_language, 'Prospects');
}
$overlib_string = '';
if(!empty($fields['ACCOUNT_NAME'])) $overlib_string .= '<b>'. $mod_strings['LBL_EDIT_ACCOUNT_NAME'] . '</b> ' . $fields['ACCOUNT_NAME'] . '<br>';
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['EMAIL1']))
$overlib_string .= '<b>'. $mod_strings['LBL_EMAIL_ADDRESS'] . '</b> ' .
"<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" .
"parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" .
"={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL1']}&" .
"to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL1']}>") .
"&return_module=Contacts&return_action=ListView'>{$fields['EMAIL1']}</a><br>";
if(!empty($fields['EMAIL2']))
$overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' .
"<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" .
"parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" .
"={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" .
"to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") .
"&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><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 .= '...';
}
return array('fieldToAddTo' => 'FULL_NAME',
'string' => $overlib_string,
'editLink' => "index.php?action=EditView&module=Prospects&return_module=Prospects&record={$fields['ID']}",
'viewLink' => "index.php?action=DetailView&module=Prospects&return_module=Prospects&record={$fields['ID']}");
}
?>

View File

@@ -0,0 +1,133 @@
<?php
/*********************************************************************************
* 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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
$viewdefs['Prospects']['DetailView'] = array(
'templateMeta' => array('form' => array('buttons' => array('EDIT', 'DUPLICATE', 'DELETE',
array('customCode' => '<input title="{$MOD.LBL_CONVERT_BUTTON_TITLE}" accessKey="{$MOD.LBL_CONVERT_BUTTON_KEY}" class="button" onclick="this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\';this.form.module.value=\'Leads\';this.form.action.value=\'EditView\';" type="submit" name="CONVERT_LEAD_BTN" value="{$MOD.LBL_CONVERT_BUTTON_LABEL}"/>'),
array('customCode' => '<input title="{$APP.LBL_MANAGE_SUBSCRIPTIONS}" class="button" onclick="this.form.return_module.value=\'Prospects\'; 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}"/>'),
),
'hidden'=>array('<input type="hidden" name="prospect_id" value="{$fields.id.value}">'),
'headerTpl'=>'modules/Prospects/tpls/DetailViewHeader.tpl',
),
'maxColumns' => '2',
'widths' => array(
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30')
),
),
'panels' =>array (
'lbl_prospect_information' => array(
array (
'full_name',
array (
'name' => 'phone_work',
'label' => 'LBL_OFFICE_PHONE',
),
),
array (
'title',
'phone_mobile',
),
array (
'department',
'phone_fax',
),
array (
'account_name',
),
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 (
'email1',
),
array (
'description',
),
),
'LBL_MORE_INFORMATION' => array(
array (
'email_opt_out',
'do_not_call',
),
),
'LBL_PANEL_ASSIGNMENT' => array(
array (
'assigned_user_name',
array (
'name' => 'modified_by_name',
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}&nbsp;',
'label' => 'LBL_DATE_MODIFIED',
),
),
array (
array (
'name' => 'created_by_name',
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}&nbsp;',
'label' => 'LBL_DATE_ENTERED',
),
),
),
)
);
?>

View File

@@ -0,0 +1,111 @@
<?php
/*********************************************************************************
* 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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
$viewdefs['Prospects']['EditView'] = array(
'templateMeta' => array('maxColumns' => '2',
'widths' => array(
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30')
),
),
'panels' =>array (
'lbl_prospect_information' =>
array (
array (
array (
'name' => 'first_name',
'customCode' => '{html_options name="salutation" options=$fields.salutation.options selected=$fields.salutation.value}&nbsp;<input name="first_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">',
),
),
array (
array('name'=>'last_name',
'displayParams'=>array('required'=>true),
),
'phone_work',
),
array (
'title',
'phone_mobile',
),
array (
'department',
'phone_fax',
),
array (
'account_name',
),
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),
),
),
array('email1'),
array (
array('name'=>'description',
'label'=>'LBL_DESCRIPTION'),
),
),
'LBL_MORE_INFORMATION' => array(
array (
'do_not_call',
),
),
'LBL_PANEL_ASSIGNMENT' => array(
array (
'assigned_user_name',
),
),
)
);
?>

View 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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
$listViewDefs['Prospects'] = array(
'FULL_NAME' => array(
'width' => '25',
'label' => 'LBL_LIST_NAME',
'link' => true,
'related_fields' => array('first_name', 'last_name'),
'orderBy' => 'last_name',
'default' => true),
'TITLE' => array(
'width' => '20',
'label' => 'LBL_LIST_TITLE',
'link' => false,
'default' => true),
'EMAIL1' => array(
'width' => '20',
'label' => 'LBL_LIST_EMAIL_ADDRESS',
'sortable' => false,
'link' => false,
'default' => true),
'PHONE_WORK' => array(
'width' => '10',
'label' => 'LBL_LIST_PHONE',
'link' => false,
'default' => true),
);
?>

View File

@@ -0,0 +1,63 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
global $mod_strings;
$popupMeta = array('moduleMain' => 'Prospect',
'varName' => 'PROSPECT',
'orderBy' => 'prospects.last_name, prospects.first_name',
'whereClauses' =>
array('first_name' => 'prospects.first_name',
'last_name' => 'prospects.last_name'),
'searchInputs' =>
array('first_name', 'last_name'),
'selectDoms' =>
array('LIST_OPTIONS' =>
array('dom' => 'prospect_list_type_dom', 'searchInput' => 'list_type'),
),
'create' =>
array('formBase' => 'ProspectFormBase.php',
'formBaseClass' => 'ProspectFormBase',
'getFormBodyParams' => array('','','ProspectSave'),
'createButton' => $mod_strings['LNK_NEW_PROSPECT']
)
);
?>

View File

@@ -0,0 +1,162 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
/*********************************************************************************
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
$viewdefs = array (
'Prospects' =>
array (
'QuickCreate' =>
array (
'templateMeta' =>
array (
'maxColumns' => '2',
'widths' =>
array (
0 =>
array (
'label' => '10',
'field' => '30',
),
1 =>
array (
'label' => '10',
'field' => '30',
),
),
),
'panels' =>
array (
'LBL_PROSPECT_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' => 'team_name',
),
1 =>
array (
'name' => 'do_not_call',
),
),
5 =>
array (
0 =>
array (
'name' => 'assigned_user_name',
),
),
),
'lbl_email_addresses' =>
array (
0 =>
array (
0 =>
array (
'name' => 'email1',
),
),
),
'LBL_ADDRESS_INFORMATION' =>
array (
0 =>
array (
0 =>
array (
'name' => 'primary_address_street',
),
1 =>
array (
'name' => 'alt_address_street',
),
),
),
),
),
),
);
?>

View File

@@ -0,0 +1,61 @@
<?php
/*********************************************************************************
* 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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
$searchdefs['Prospects'] = array(
'templateMeta' => array('maxColumns' => '3',
'widths' => array('label' => '10', 'field' => '30'),
),
'layout' => array(
'basic_search' => array(
array('name'=>'search_name','label' =>'LBL_NAME', 'type' => 'name'),
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
),
'advanced_search' => array(
'first_name',
'last_name',
array('name' => 'phone', 'label' =>'LBL_ANY_PHONE', 'type' => 'name'),
array('name' => 'email', 'label' =>'LBL_ANY_EMAIL', 'type' => 'name'),
'assistant',
'do_not_call',
array('name' => 'address_street', 'label'=>'LBL_ANY_ADDRESS', 'type' => 'name'),
array('name' => 'address_state', 'label' =>'LBL_STATE', 'type' => 'name'),
array('name' => 'address_postalcode', 'label' =>'LBL_POSTAL_CODE', 'type' => 'name'),
array('name' => 'primary_address_country', 'label' =>'LBL_COUNTRY', 'type' => 'name', 'options' => 'countries_dom', ),
array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
),
),
);
?>

View 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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
$GLOBALS['studioDefs']['Prospects'] = array(
'LBL_DETAILVIEW'=>array(
'template'=>'xtpl',
'template_file'=>'modules/Prospects/DetailView.html',
'php_file'=>'modules/Prospects/DetailView.php',
'type'=>'DetailView',
),
'LBL_EDITVIEW'=>array(
'template'=>'xtpl',
'template_file'=>'modules/Prospects/EditView.html',
'php_file'=>'modules/Prospects/EditView.php',
'type'=>'EditView',
),
'LBL_LISTVIEW'=>array(
'template'=>'listview',
'meta_file'=>'modules/Prospects/listviewdefs.php',
'type'=>'ListView',
),
'LBL_SEARCHFORM'=>array(
'template'=>'xtpl',
'template_file'=>'modules/Prospects/SearchForm.html',
'php_file'=>'modules/Prospects/ListView.php',
'type'=>'SearchForm',
),
);

View File

@@ -0,0 +1,139 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
$layout_defs['Prospects'] = 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'),
),
)
),
'campaigns' => array(
'order' => 30,
'sort_by' => 'activity_date',
'sort_order' => 'desc',
'module' => 'CampaignLog',
'get_subpanel_data'=>'campaigns',
'subpanel_name' => 'ForTargets',
'title_key' => 'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE',
'top_buttons' => array(),
),
),
);
?>

View File

@@ -0,0 +1,90 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
$subpanel_layout = array(
'top_buttons' => array(
array('widget_class'=>'SubPanelTopCreateButton'),
array('widget_class'=>'SubPanelTopSelectButton'),
),
'where' => '',
'list_fields'=> array(
'first_name' => array(
'usage' => 'query_only',
),
'last_name' => array(
'usage' => 'query_only',
),
'full_name'=>array(
'vname' => 'LBL_LIST_NAME',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '40%',
'sort_by' => 'last_name',
),
'title'=>array(
'vname' => 'LBL_LIST_TITLE',
'width' => '25%',
),
'email1'=>array(
'vname' => 'LBL_LIST_EMAIL_ADDRESS',
'width' => '15%',
'widget_class' => 'SubPanelEmailLink',
),
'phone_work'=>array(
'vname' => 'LBL_LIST_PHONE',
'width' => '10%',
),
'edit_button'=>array(
'vname' => 'LBL_EDIT_BUTTON',
'widget_class' => 'SubPanelEditButton',
'module' => 'Contacts',
'width' => '5%',
),
'remove_button'=>array(
'vname' => 'LBL_REMOVE',
'widget_class' => 'SubPanelRemoveButton',
'module' => 'Contacts',
'width' => '5%',
),
),
);
?>

View File

@@ -0,0 +1,57 @@
{*
/*********************************************************************************
* 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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
*}
{assign var=preForm value="<table width='100%' border='1' cellspacing='0' cellpadding='0'><tr><td><table width='100%'><tr><td>"}
{assign var=displayPreform value=false}
{if isset($bean->lead_id) && !empty($bean->lead_id)}
{assign var=displayPreform value=true}
{assign var=preForm value=$preForm|cat:$MOD.LBL_CONVERTED_LEAD}
{assign var=preForm value=$preForm|cat:"&nbsp;<a href='index.php?module=Leads&action=DetailView&record="}
{assign var=preForm value=$preForm|cat:$bean->lead_id}
{assign var=preForm value=$preForm|cat:"'>"}
{assign var=preForm value=$preForm|cat:$lead->name}
{assign var=preForm value=$preForm|cat:"</a>"}
{/if}
{assign var=preForm value=$preForm|cat:"</td><td>"}
{assign var=preForm value=$preForm|cat:"</td></tr></table></td></tr></table>"}
{if $displayPreform}
{$preForm}
<br>
{/if}
{{include file='include/DetailView/header.tpl'}}

236
modules/Prospects/vardefs.php Executable file
View File

@@ -0,0 +1,236 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
$dictionary['Prospect'] = array(
'table' => 'prospects',
'fields' => array (
'tracker_key' => array (
'name' => 'tracker_key',
'vname' => 'LBL_TRACKER_KEY',
'type' => 'int',
'len' => '11',
'required'=>true,
'auto_increment' => true,
'importable' => 'false',
'studio' => array('editview' => false),
),
'birthdate' =>
array (
'name' => 'birthdate',
'vname' => 'LBL_BIRTHDATE',
'massupdate' => false,
'type' => 'date',
),
'do_not_call' =>
array (
'name' => 'do_not_call',
'vname' => 'LBL_DO_NOT_CALL',
'type'=>'bool',
'default' =>'0',
),
'lead_id' =>
array (
'name' => 'lead_id',
'type' => 'id',
'reportable'=>false,
'vname'=>'LBL_LEAD_ID',
),
'account_name' =>
array (
'name' => 'account_name',
'vname' => 'LBL_ACCOUNT_NAME',
'type' => 'varchar',
'len' => '150',
),
'campaign_id' =>
array (
'name' => 'campaign_id',
'comment' => 'Campaign that generated lead',
'vname'=>'LBL_CAMPAIGN_ID',
'rname' => 'id',
'id_name' => 'campaign_id',
'type' => 'id',
'table' => 'campaigns',
'isnull' => 'true',
'module' => 'Campaigns',
//'dbType' => 'char',
'reportable'=>false,
'massupdate' => false,
'duplicate_merge'=> 'disabled',
),
'email_addresses' =>
array (
'name' => 'email_addresses',
'type' => 'link',
'relationship' => 'prospects_email_addresses',
'source' => 'non-db',
'vname' => 'LBL_EMAIL_ADDRESSES',
'reportable'=>false,
),
'email_addresses_primary' =>
array (
'name' => 'email_addresses_primary',
'type' => 'link',
'relationship' => 'prospects_email_addresses_primary',
'source' => 'non-db',
'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
'duplicate_merge'=> 'disabled',
),
'campaigns' =>
array (
'name' => 'campaigns',
'type' => 'link',
'relationship' => 'prospect_campaign_log',
'module'=>'CampaignLog',
'bean_name'=>'CampaignLog',
'source'=>'non-db',
'vname'=>'LBL_CAMPAIGNLOG',
),
'prospect_lists' =>
array (
'name' => 'prospect_lists',
'type' => 'link',
'relationship' => 'prospect_list_prospects',
'module'=>'ProspectLists',
'source'=>'non-db',
'vname'=>'LBL_PROSPECT_LIST',
),
'calls' =>
array (
'name' => 'calls',
'type' => 'link',
'relationship' => 'prospect_calls',
'source' => 'non-db',
'vname' => 'LBL_CALLS',
),
'meetings'=>
array (
'name' => 'meetings',
'type' => 'link',
'relationship' => 'prospect_meetings',
'source' => 'non-db',
'vname' => 'LBL_MEETINGS',
),
'notes'=>
array (
'name' => 'notes',
'type' => 'link',
'relationship' => 'prospect_notes',
'source' => 'non-db',
'vname' => 'LBL_NOTES',
),
'tasks'=>
array (
'name' => 'tasks',
'type' => 'link',
'relationship' => 'prospect_tasks',
'source' => 'non-db',
'vname' => 'LBL_TASKS',
),
'emails'=>
array (
'name' => 'emails',
'type' => 'link',
'relationship' => 'emails_prospects_rel',
'source' => 'non-db',
'vname' => 'LBL_EMAILS',
),
),
'indices' =>
array (
array(
'name' => 'prospect_auto_tracker_key' ,
'type'=>'index' ,
'fields'=>array('tracker_key')
),
array( 'name' => 'idx_prospects_last_first',
'type' => 'index',
'fields'=> array(
'last_name',
'first_name',
'deleted'
)
),
array(
'name' => 'idx_prospecs_del_last',
'type' => 'index',
'fields'=> array(
'last_name',
'deleted'
)
),
),
'relationships' => array (
'prospect_tasks' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
'relationship_role_column_value'=>'Prospects'),
'prospect_notes' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
'relationship_role_column_value'=>'Prospects'),
'prospect_meetings' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
'relationship_role_column_value'=>'Prospects'),
'prospect_calls' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
'relationship_role_column_value'=>'Prospects'),
'prospect_emails' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
'relationship_role_column_value'=>'Prospects'),
'prospect_campaign_log' => array(
'lhs_module' => 'Prospects',
'lhs_table' => 'prospects',
'lhs_key' => 'id',
'rhs_module' => 'CampaignLog',
'rhs_table' => 'campaign_log',
'rhs_key' => 'target_id',
'relationship_type' =>'one-to-many'
),
)
);
VardefManager::createVardef('Prospects','Prospect', array('default', 'assignable',
'person'));
?>

View File

@@ -0,0 +1,66 @@
<?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-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 contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@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".
********************************************************************************/
/*********************************************************************************
* Description: This file is used to override the default Meta-data DetailView behavior
* to provide customization specific to the Prospects module.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('include/MVC/View/views/view.detail.php');
class ProspectsViewDetail extends ViewDetail {
function ProspectsViewDetail(){
parent::ViewDetail();
}
function display() {
if(isset($this->bean->lead_id) && !empty($this->bean->lead_id)){
//get lead name
$lead = new Lead();
$lead->retrieve($this->bean->lead_id);
$this->ss->assign('lead', $lead);
}
parent::display();
}
}
?>