Add php files
This commit is contained in:
61
modules/ProspectLists/Delete.php
Executable file
61
modules/ProspectLists/Delete.php
Executable file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-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): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$focus = new ProspectList();
|
||||
|
||||
if(!isset($_REQUEST['record']))
|
||||
sugar_die("A record number must be specified to delete the prospect list.");
|
||||
$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']);
|
||||
?>
|
||||
74
modules/ProspectLists/Duplicate.php
Executable file
74
modules/ProspectLists/Duplicate.php
Executable file
@@ -0,0 +1,74 @@
|
||||
<?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 ProspectList();
|
||||
|
||||
$focus->retrieve($_POST['record']);
|
||||
if (isset($_POST['isDuplicate']) && $_POST['isDuplicate'] == true) {
|
||||
|
||||
$focus->id='';
|
||||
$focus->name=$mod_strings['LBL_COPY_PREFIX'].' '.$focus->name;
|
||||
|
||||
$focus->save();
|
||||
$return_id=$focus->id;
|
||||
//duplicate the linked items.
|
||||
$query = "select * from prospect_lists_prospects where prospect_list_id = '".$_POST['record']."'";
|
||||
$result = $focus->db->query($query);
|
||||
if ($result != null) {
|
||||
|
||||
while(($row = $focus->db->fetchByAssoc($result)) != null) {
|
||||
$iquery ="INSERT INTO prospect_lists_prospects (id,prospect_list_id, related_id, related_type,date_modified) ";
|
||||
$iquery .= "VALUES ("."'".create_guid()."',"."'".$focus->id."',"."'".$row['related_id']."',"."'".$row['related_type']."',"."'".gmdate($GLOBALS['timedate']->get_db_date_time_format())."')";
|
||||
$focus->db->query($iquery); //save the record.
|
||||
}
|
||||
}
|
||||
}
|
||||
header("Location: index.php?action=DetailView&module=ProspectLists&record=$return_id");
|
||||
?>
|
||||
105
modules/ProspectLists/Forms.php
Executable file
105
modules/ProspectLists/Forms.php
Executable file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-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 a variety of utility functions used to display UI
|
||||
* components such as form headers and footers. Intended to be modified on a per
|
||||
* theme basis.
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* Create javascript to validate the data entered into a record.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
*/
|
||||
function get_validate_record_js () {
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$err_missing_required_fields = $app_strings['ERR_MISSING_REQUIRED_FIELDS'];
|
||||
|
||||
$the_script = <<<EOQ
|
||||
|
||||
<script type="text/javascript" language="Javascript">
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
function trim(s) {
|
||||
while (s.substring(0,1) == " ") {
|
||||
s = s.substring(1, s.length);
|
||||
}
|
||||
while (s.substring(s.length-1, s.length) == ' ') {
|
||||
s = s.substring(0,s.length-1);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
function verify_data(form) {
|
||||
var isError = false;
|
||||
var errorMessage = "";
|
||||
|
||||
if (isError == true) {
|
||||
alert("$err_missing_required_fields" + errorMessage);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
</script>
|
||||
|
||||
EOQ;
|
||||
|
||||
return $the_script;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create HTML form to enter a new record with the minimum necessary fields.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
*/
|
||||
function get_new_record_form () {
|
||||
|
||||
require_once('modules/ProspectLists/ProspectListFormBase.php');
|
||||
$accountForm = new ProspectListFormBase();
|
||||
return $accountForm->getForm('','ProspectLists');
|
||||
}
|
||||
?>
|
||||
54
modules/ProspectLists/Menu.php
Executable file
54
modules/ProspectLists/Menu.php
Executable 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): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
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");
|
||||
|
||||
|
||||
?>
|
||||
349
modules/ProspectLists/ProspectList.php
Executable file
349
modules/ProspectLists/ProspectList.php
Executable file
@@ -0,0 +1,349 @@
|
||||
<?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:
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class ProspectList extends SugarBean {
|
||||
var $field_name_map;
|
||||
|
||||
// Stored fields
|
||||
var $id;
|
||||
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 $list_type;
|
||||
var $domain_name;
|
||||
|
||||
var $name;
|
||||
var $description;
|
||||
|
||||
// These are related
|
||||
var $assigned_user_name;
|
||||
var $prospect_id;
|
||||
var $contact_id;
|
||||
var $lead_id;
|
||||
|
||||
// module name definitions and table relations
|
||||
var $table_name = "prospect_lists";
|
||||
var $module_dir = 'ProspectLists';
|
||||
var $rel_prospects_table = "prospect_lists_prospects";
|
||||
var $object_name = "ProspectList";
|
||||
|
||||
// This is used to retrieve related fields from form posts.
|
||||
var $additional_column_fields = array(
|
||||
'assigned_user_name', 'assigned_user_id', 'campaign_id',
|
||||
);
|
||||
var $relationship_fields = array(
|
||||
'campaign_id'=>'campaigns',
|
||||
'prospect_list_prospects' => 'prospects',
|
||||
);
|
||||
|
||||
var $entry_count;
|
||||
|
||||
function ProspectList() {
|
||||
global $sugar_config;
|
||||
parent::SugarBean();
|
||||
|
||||
}
|
||||
|
||||
var $new_schema = true;
|
||||
|
||||
function get_summary_text()
|
||||
{
|
||||
return "$this->name";
|
||||
}
|
||||
|
||||
function create_list_query($order_by, $where, $show_deleted = 0)
|
||||
{
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
|
||||
$query = "SELECT ";
|
||||
$query .= "users.user_name as assigned_user_name, ";
|
||||
$query .= "prospect_lists.*";
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM prospect_lists ";
|
||||
|
||||
$query .= "LEFT JOIN users
|
||||
ON prospect_lists.assigned_user_id=users.id ";
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
|
||||
$where_auto = '1=1';
|
||||
if($show_deleted == 0){
|
||||
$where_auto = "$this->table_name.deleted=0";
|
||||
}else if($show_deleted == 1){
|
||||
$where_auto = "$this->table_name.deleted=1";
|
||||
}
|
||||
|
||||
if($where != "")
|
||||
$query .= "where $where AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
if($order_by != "")
|
||||
$query .= " ORDER BY $order_by";
|
||||
else
|
||||
$query .= " ORDER BY prospect_lists.name";
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
function create_export_query($order_by, $where)
|
||||
{
|
||||
|
||||
$query = "SELECT
|
||||
prospect_lists.*,
|
||||
users.user_name as assigned_user_name ";
|
||||
$query .= "FROM prospect_lists ";
|
||||
$query .= "LEFT JOIN users
|
||||
ON prospect_lists.assigned_user_id=users.id ";
|
||||
|
||||
$where_auto = " prospect_lists.deleted=0";
|
||||
|
||||
if($where != "")
|
||||
$query .= " WHERE $where AND ".$where_auto;
|
||||
else
|
||||
$query .= " WHERE ".$where_auto;
|
||||
|
||||
if($order_by != "")
|
||||
$query .= " ORDER BY $order_by";
|
||||
else
|
||||
$query .= " ORDER BY prospect_lists.name";
|
||||
return $query;
|
||||
}
|
||||
|
||||
function create_export_members_query($record_id)
|
||||
{
|
||||
$leads_query = "SELECT l.id AS id, 'Leads' AS related_type, '' AS \"name\", l.first_name AS first_name, l.last_name AS last_name,
|
||||
l.primary_address_street AS primary_address_street,l.primary_address_city AS primary_address_city, l.primary_address_state AS primary_address_state, l.primary_address_postalcode AS primary_address_postalcode, l.primary_address_country AS primary_address_country,
|
||||
l.account_name AS account_name,
|
||||
ea.email_address AS primary_email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address,
|
||||
l.do_not_call AS do_not_call, l.phone_fax AS phone_fax, l.phone_other AS phone_other, l.phone_home AS phone_home, l.phone_mobile AS phone_mobile, l.phone_work AS phone_work
|
||||
FROM prospect_lists_prospects plp
|
||||
INNER JOIN leads l ON plp.related_id=l.id
|
||||
LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=l.id
|
||||
LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id
|
||||
WHERE plp.prospect_list_id = $record_id AND plp.deleted=0
|
||||
AND l.deleted=0";
|
||||
$users_query = "SELECT u.id AS id, 'Users' AS related_type, '' AS \"name\", u.first_name AS first_name, u.last_name AS last_name,
|
||||
u.address_street AS primary_address_street,u.address_city AS primary_address_city, u.address_state AS primary_address_state, u.address_postalcode AS primary_address_postalcode, u.address_country AS primary_address_country,
|
||||
'' AS account_name,
|
||||
ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address,
|
||||
0 AS do_not_call, u.phone_fax AS phone_fax, u.phone_other AS phone_other, u.phone_home AS phone_home, u.phone_mobile AS phone_mobile, u.phone_work AS phone_work
|
||||
FROM prospect_lists_prospects plp
|
||||
INNER JOIN users u ON plp.related_id=u.id
|
||||
LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=u.id
|
||||
LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id
|
||||
WHERE plp.prospect_list_id = $record_id AND plp.deleted=0
|
||||
AND u.deleted=0";
|
||||
$contacts_query = "SELECT c.id AS id, 'Contacts' AS related_type, '' AS \"name\", c.first_name AS first_name, c.last_name AS last_name,
|
||||
c.primary_address_street AS primary_address_street,c.primary_address_city AS primary_address_city, c.primary_address_state AS primary_address_state, c.primary_address_postalcode AS primary_address_postalcode, c.primary_address_country AS primary_address_country,
|
||||
a.name AS account_name,
|
||||
ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address,
|
||||
c.do_not_call AS do_not_call, c.phone_fax AS phone_fax, c.phone_other AS phone_other, c.phone_home AS phone_home, c.phone_mobile AS phone_mobile, c.phone_work AS phone_work
|
||||
FROM accounts a,accounts_contacts ac, prospect_lists_prospects plp
|
||||
INNER JOIN contacts c ON plp.related_id=c.id
|
||||
LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=c.id
|
||||
LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id
|
||||
WHERE plp.prospect_list_id = $record_id AND plp.deleted=0
|
||||
AND c.deleted=0
|
||||
AND ac.contact_id=c.id
|
||||
AND ac.account_id=a.id";
|
||||
$prospects_query = "SELECT p.id AS id, 'Prospects' AS related_type, '' AS \"name\", p.first_name AS first_name, p.last_name AS last_name,
|
||||
p.primary_address_street AS primary_address_street,p.primary_address_city AS primary_address_city, '' AS primary_address_state, p.primary_address_postalcode AS primary_address_postalcode, p.primary_address_country AS primary_address_country,
|
||||
p.account_name AS account_name,
|
||||
ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address,
|
||||
p.do_not_call AS do_not_call, p.phone_fax AS phone_fax, p.phone_other AS phone_other, p.phone_home AS phone_home, p.phone_mobile AS phone_mobile, p.phone_work AS phone_work
|
||||
FROM prospect_lists_prospects plp
|
||||
INNER JOIN prospects p ON plp.related_id=p.id
|
||||
LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=p.id
|
||||
LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id
|
||||
WHERE plp.prospect_list_id = $record_id AND plp.deleted=0
|
||||
AND p.deleted=0";
|
||||
$accounts_query = "SELECT a.id AS id, 'Accounts' AS related_type, a.name AS \"name\", '' AS first_name, '' AS last_name,
|
||||
a.billing_address_street AS primary_address_street,a.billing_address_city AS primary_address_city, a.billing_address_state AS primary_address_state, a.billing_address_postalcode AS primary_address_postalcode, a.billing_address_country AS primary_address_country,
|
||||
'' AS account_name,
|
||||
ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address,
|
||||
0 AS do_not_call, a.phone_fax as phone_fax, a.phone_alternate AS phone_other, '' AS phone_home, '' AS phone_mobile, a.phone_office AS phone_office
|
||||
FROM prospect_lists_prospects plp
|
||||
INNER JOIN accounts a ON plp.related_id=a.id
|
||||
LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=a.id
|
||||
LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id
|
||||
WHERE plp.prospect_list_id = $record_id AND plp.deleted=0
|
||||
AND a.deleted=0";
|
||||
$order_by = "ORDER BY related_type, id, primary_address DESC";
|
||||
$query = "$leads_query UNION ALL $users_query UNION ALL $contacts_query UNION ALL $prospects_query UNION ALL $accounts_query $order_by";
|
||||
return $query;
|
||||
}
|
||||
|
||||
function save_relationship_changes($is_update)
|
||||
{
|
||||
parent::save_relationship_changes($is_update);
|
||||
if($this->lead_id != "")
|
||||
$this->set_prospect_relationship($this->id, $this->lead_id, "lead");
|
||||
if($this->contact_id != "")
|
||||
$this->set_prospect_relationship($this->id, $this->contact_id, "contact");
|
||||
if($this->prospect_id != "")
|
||||
$this->set_prospect_relationship($this->id, $this->contact_id, "prospect");
|
||||
}
|
||||
|
||||
function set_prospect_relationship($prospect_list_id, &$link_ids, $link_name)
|
||||
{
|
||||
$link_field = sprintf("%s_id", $link_name);
|
||||
|
||||
foreach($link_ids as $link_id)
|
||||
{
|
||||
$this->set_relationship('prospect_lists_prospects', array( $link_field=>$link_id, 'prospect_list_id'=>$prospect_list_id ));
|
||||
}
|
||||
}
|
||||
|
||||
function set_prospect_relationship_single($prospect_list_id, $link_id, $link_name)
|
||||
{
|
||||
$link_field = sprintf("%s_id", $link_name);
|
||||
|
||||
$this->set_relationship('prospect_lists_prospects', array( $link_field=>$link_id, 'prospect_list_id'=>$prospect_list_id ));
|
||||
}
|
||||
|
||||
|
||||
function clear_prospect_relationship($prospect_list_id, $link_id, $link_name)
|
||||
{
|
||||
$link_field = sprintf("%s_id", $link_name);
|
||||
$where_clause = " AND $link_field = '$link_id' ";
|
||||
|
||||
$query = sprintf("DELETE FROM prospect_lists_prospects WHERE prospect_list_id='%s' AND deleted = '0' %s", $prospect_list_id, $where_clause);
|
||||
|
||||
$this->db->query($query, true, "Error clearing prospect/prospect_list relationship: ");
|
||||
}
|
||||
|
||||
|
||||
function mark_relationships_deleted($id)
|
||||
{
|
||||
}
|
||||
|
||||
function fill_in_additional_list_fields()
|
||||
{
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields()
|
||||
{
|
||||
parent::fill_in_additional_detail_fields();
|
||||
$this->entry_count = $this->get_entry_count();
|
||||
}
|
||||
|
||||
|
||||
function update_currency_id($fromid, $toid){
|
||||
}
|
||||
|
||||
|
||||
function get_entry_count()
|
||||
{
|
||||
$query = "SELECT count(*) AS num FROM prospect_lists_prospects WHERE prospect_list_id='$this->id' AND deleted = '0'";
|
||||
$result = $this->db->query($query, true, "Grabbing prospect_list entry count");
|
||||
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
|
||||
if($row)
|
||||
return $row['num'];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
function get_list_view_data(){
|
||||
$temp_array = $this->get_list_view_array();
|
||||
$temp_array["ENTRY_COUNT"] = $this->get_entry_count();
|
||||
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, "prospect_lists.name like '$the_query_string%'");
|
||||
|
||||
$the_where = "";
|
||||
foreach($where_clauses as $clause)
|
||||
{
|
||||
if($the_where != "") $the_where .= " or ";
|
||||
$the_where .= $clause;
|
||||
}
|
||||
|
||||
|
||||
return $the_where;
|
||||
}
|
||||
|
||||
function save($check_notify = FALSE) {
|
||||
|
||||
return parent::save($check_notify);
|
||||
|
||||
}
|
||||
|
||||
function bean_implements($interface){
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
164
modules/ProspectLists/ProspectListFormBase.php
Executable file
164
modules/ProspectLists/ProspectListFormBase.php
Executable file
@@ -0,0 +1,164 @@
|
||||
<?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 Notes
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
class ProspectListFormBase {
|
||||
|
||||
|
||||
function getForm($prefix, $mod='', $form=''){
|
||||
|
||||
if(!ACLController::checkAccess('ProspectLists', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
} else {
|
||||
global $mod_strings;
|
||||
}
|
||||
global $app_strings,$current_user;
|
||||
|
||||
$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'];
|
||||
$user_id = $current_user->id;
|
||||
|
||||
|
||||
$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
|
||||
$the_form .= <<<EOQ
|
||||
<form name="${prefix}ProspectListSave" onSubmit="return check_form('${prefix}ProspectListSave');" method="POST" action="index.php">
|
||||
<input type="hidden" name="${prefix}module" value="ProspectLists">
|
||||
<input type="hidden" name="${prefix}action" value="Save">
|
||||
<input type="hidden" name="assigned_user_id" value='${user_id}'>
|
||||
EOQ;
|
||||
|
||||
$the_form .= $this->getFormBody($prefix, $mod, $prefix."ProspectListSave");
|
||||
$the_form .= <<<EOQ
|
||||
<p><input title="$lbl_save_button_title" accessKey="$lbl_save_button_key" class="button" type="submit" name="button" value=" $lbl_save_button_label " ></p>
|
||||
</form>
|
||||
|
||||
EOQ;
|
||||
|
||||
$the_form .= get_left_form_footer();
|
||||
$the_form .= get_validate_record_js();
|
||||
|
||||
return $the_form;
|
||||
}
|
||||
|
||||
function getFormBody($prefix, $mod='',$formname='', $size='30',$script=true) {
|
||||
if(!ACLController::checkAccess('ProspectLists', '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;
|
||||
global $app_list_strings;
|
||||
|
||||
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
|
||||
$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'];
|
||||
$user_id = $current_user->id;
|
||||
|
||||
$list_options=get_select_options_with_id($app_list_strings['prospect_list_type_dom'], 'default');
|
||||
|
||||
$lbl_prospect_list_name = $mod_strings['LBL_PROSPECT_LIST_NAME'];
|
||||
$lbl_list_type = $mod_strings['LBL_LIST_TYPE'];
|
||||
|
||||
$form = <<<EOQ
|
||||
<p><input type="hidden" name="record" value="">
|
||||
$lbl_prospect_list_name <span class="required">$lbl_required_symbol</span><br>
|
||||
<input name='name' type="text" value=""><br>
|
||||
$lbl_list_type <span class="required">$lbl_required_symbol</span><br>
|
||||
<select name="list_type">$list_options</select></p>
|
||||
EOQ;
|
||||
|
||||
|
||||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new ProspectList());
|
||||
$javascript->addRequiredFields($prefix);
|
||||
$form .=$javascript->getScript();
|
||||
$mod_strings = $temp_strings;
|
||||
return $form;
|
||||
}
|
||||
|
||||
function handleSave($prefix,$redirect=true, $useRequired=false){
|
||||
|
||||
|
||||
require_once('include/formbase.php');
|
||||
|
||||
|
||||
$focus = new ProspectList();
|
||||
if($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))){
|
||||
return null;
|
||||
}
|
||||
$focus = populateFromPost($prefix, $focus);
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
if(empty($focus->name)){
|
||||
return null;
|
||||
}
|
||||
if ( !isset($focus->assigned_user_id) || $focus->assigned_user_id == '' )
|
||||
$focus->assigned_user_id = $GLOBALS['current_user']->id;
|
||||
|
||||
$return_id = $focus->save();
|
||||
if($redirect){
|
||||
$GLOBALS['log']->debug("Saved record with id of ".$return_id);
|
||||
handleRedirect($return_id, "ProspectLists");
|
||||
} else {
|
||||
return $focus;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
84
modules/ProspectLists/Save.php
Executable file
84
modules/ProspectLists/Save.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?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): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$focus = new ProspectList();
|
||||
|
||||
$focus->retrieve($_POST['record']);
|
||||
|
||||
if (!empty($_POST['assigned_user_id']) && ($focus->assigned_user_id != $_POST['assigned_user_id']) && ($_POST['assigned_user_id'] != $current_user->id)) {
|
||||
$check_notify = TRUE;
|
||||
}
|
||||
else {
|
||||
$check_notify = FALSE;
|
||||
}
|
||||
|
||||
require_once('include/formbase.php');
|
||||
$focus = populateFromPost('', $focus);
|
||||
|
||||
$focus->save($check_notify);
|
||||
$return_id = $focus->id;
|
||||
|
||||
if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module'];
|
||||
else $return_module = "ProspectLists";
|
||||
if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action'];
|
||||
else $return_action = "DetailView";
|
||||
if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id'];
|
||||
|
||||
if($return_action == "SaveCampaignProspectListRelationshipNew")
|
||||
{
|
||||
$prospect_list_id = $focus->id;
|
||||
|
||||
header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&prospect_list_id=$prospect_list_id");
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['log']->debug("Saved record with id of ".$return_id);
|
||||
header("Location: index.php?action=$return_action&module=$return_module&record=$return_id");
|
||||
}
|
||||
?>
|
||||
118
modules/ProspectLists/SubPanelView.php
Executable file
118
modules/ProspectLists/SubPanelView.php
Executable file
@@ -0,0 +1,118 @@
|
||||
<?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 $app_strings;
|
||||
//we don't want the parent module's string file, but rather the string file specifc to this subpanel
|
||||
global $current_language;
|
||||
$current_module_strings = return_module_language($current_language, 'ProspectLists');
|
||||
|
||||
global $currentModule;
|
||||
|
||||
global $theme;
|
||||
global $focus;
|
||||
global $action;
|
||||
|
||||
// focus_list is the means of passing data to a SubPanelView.
|
||||
global $focus_list;
|
||||
|
||||
$button = "<form action='index.php' method='post' name='ProspectListForm' id='ProspectListForm'>\n";
|
||||
$button .= "<input type='hidden' name='module' value='ProspectLists'>\n";
|
||||
if ($currentModule == 'Campaigns') {
|
||||
$button .= "<input type='hidden' name='campaign_id' value='$focus->id'>\n";
|
||||
$button .= "<input type='hidden' name='record' value='$focus->id'>\n";
|
||||
$button .= "<input type='hidden' name='campaign_name' value=\"$focus->name\">\n";
|
||||
}
|
||||
$button .= "<input type='hidden' name='prospect_list_id' value=''>\n";
|
||||
$button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
|
||||
$button .= "<input type='hidden' name='return_action' value='SaveCampaignProspectListRelationshipNew'>\n";
|
||||
$button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
|
||||
$button .= "<input type='hidden' name='action'>\n";
|
||||
|
||||
$button .= "<input title='".$app_strings['LBL_NEW_BUTTON_TITLE']."' accessyKey='".$app_strings['LBL_NEW_BUTTON_KEY']."' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value=' ".$app_strings['LBL_NEW_BUTTON_LABEL']." '>\n";
|
||||
if ($currentModule == 'Campaigns')
|
||||
{
|
||||
///////////////////////////////////////
|
||||
///
|
||||
/// SETUP PARENT POPUP
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return_prospect_list_and_save',
|
||||
'form_name' => 'ProspectListForm',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'prospect_list_id',
|
||||
),
|
||||
);
|
||||
|
||||
$json = getJSONobj();
|
||||
$encoded_popup_request_data = $json->encode($popup_request_data);
|
||||
|
||||
//
|
||||
///////////////////////////////////////
|
||||
|
||||
$button .= "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE']
|
||||
." 'accessyKey='".$app_strings['LBL_SELECT_BUTTON_KEY']
|
||||
."' type='button' class='button' value=' ".$app_strings['LBL_SELECT_BUTTON_LABEL']
|
||||
." ' name='button' onclick='open_popup(\"ProspectLists\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n";
|
||||
// ." ' name='button' onclick='window.open(\"index.php?module=ProspectLists&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'>\n";
|
||||
}
|
||||
|
||||
$button .= "</form>\n";
|
||||
|
||||
$ListView = new ListView();
|
||||
$ListView->initNewXTemplate('modules/ProspectLists/SubPanelView.html', $current_module_strings);
|
||||
|
||||
$ListView->xTemplateAssign("CAMPAIGN_RECORD", $focus->id);
|
||||
$ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline','align="absmiddle" alt="'.$app_strings['LNK_EDIT'].'" border="0"'));
|
||||
$ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline','align="absmiddle" alt="'.$app_strings['LNK_REMOVE'].'" border="0"'));
|
||||
|
||||
$ListView->xTemplateAssign("RETURN_URL", "&return_module=".$currentModule."&return_action=DetailView&return_id=".$focus->id);
|
||||
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME'] );
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->processListView($focus_list, "main", "PROSPECT_LIST");
|
||||
|
||||
?>
|
||||
64
modules/ProspectLists/TargetListUpdate.php
Executable file
64
modules/ProspectLists/TargetListUpdate.php
Executable file
@@ -0,0 +1,64 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
|
||||
/*
|
||||
ARGS:
|
||||
|
||||
$_REQUEST['module'] : the module associated with this Bean instance (will be used to get the class name)
|
||||
$_REQUEST['prospect_lists'] : the id of the prospect list
|
||||
$_REQUEST['uids'] : the ids of the records to be added to the prospect list, separated by ','
|
||||
|
||||
*/
|
||||
|
||||
|
||||
require_once 'include/formbase.php';
|
||||
|
||||
global $beanFiles,$beanList;
|
||||
$bean_name = $beanList[$_REQUEST['module']];
|
||||
require_once($beanFiles[$bean_name]);
|
||||
$focus = new $bean_name();
|
||||
|
||||
$uids = explode ( ',', $_POST['uids'] );
|
||||
foreach ( $uids as $id)
|
||||
{
|
||||
$focus->retrieve($id);
|
||||
$focus->load_relationship('prospect_lists');
|
||||
$focus->prospect_lists->add( $_REQUEST['prospect_list'] );
|
||||
}
|
||||
handleRedirect();
|
||||
exit;
|
||||
?>
|
||||
56
modules/ProspectLists/field_arrays.php
Executable file
56
modules/ProspectLists/field_arrays.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?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['ProspectList'] = array ('column_fields' => array(
|
||||
"id", "date_entered",
|
||||
"date_modified", "modified_user_id",
|
||||
"assigned_user_id", "created_by",
|
||||
"name", "description",'list_type','domain_name',
|
||||
),
|
||||
'list_fields' => array(
|
||||
'id', 'name', 'description','list_type',
|
||||
'assigned_user_id','assigned_user_name',
|
||||
),
|
||||
'required_fields' => array('name'=>1,'list_type'=>2),
|
||||
);
|
||||
?>
|
||||
95
modules/ProspectLists/language/en_us.lang.php
Executable file
95
modules/ProspectLists/language/en_us.lang.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?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' => 'Target Lists',
|
||||
'LBL_MODULE_ID' => 'Target Lists',
|
||||
'LBL_MODULE_TITLE' => 'Target Lists: Home',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Target Lists Search',
|
||||
'LBL_LIST_FORM_TITLE' => 'Target Lists',
|
||||
'LBL_PROSPECT_LIST_NAME' => 'Target List:',
|
||||
'LBL_NAME' => 'Name',
|
||||
'LBL_ENTRIES' => 'Total Entries',
|
||||
'LBL_LIST_PROSPECT_LIST_NAME' => 'Target List',
|
||||
'LBL_LIST_ENTRIES' => 'Targets in List',
|
||||
'LBL_LIST_DESCRIPTION' => 'Description',
|
||||
'LBL_LIST_TYPE_NO' => 'Type',
|
||||
'LBL_LIST_END_DATE' => 'End Date',
|
||||
'LBL_DATE_ENTERED' => 'Date Entered',
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified',
|
||||
'LBL_MODIFIED' => 'Modified by',
|
||||
'LBL_CREATED' => 'Created by',
|
||||
'LBL_TEAM' => 'Team',
|
||||
'LBL_ASSIGNED_TO' => 'Assigned to',
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
'LNK_NEW_CAMPAIGN' => 'Create Campaign',
|
||||
'LNK_CAMPAIGN_LIST' => 'Campaigns',
|
||||
'LNK_NEW_PROSPECT_LIST' => 'Create Target List',
|
||||
'LNK_PROSPECT_LIST_LIST' => 'Target Lists',
|
||||
'LBL_MODIFIED_BY' => 'Modified by',
|
||||
'LBL_CREATED_BY' => 'Created by',
|
||||
'LBL_DATE_CREATED' => 'Created date',
|
||||
'LBL_DATE_LAST_MODIFIED' => 'Modified date',
|
||||
'LNK_NEW_PROSPECT' => 'Create Target',
|
||||
'LNK_PROSPECT_LIST' => 'Targets',
|
||||
|
||||
'LBL_PROSPECT_LISTS_SUBPANEL_TITLE' => 'Target Lists',
|
||||
'LBL_CONTACTS_SUBPANEL_TITLE' => 'Contacts',
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Leads',
|
||||
'LBL_PROSPECTS_SUBPANEL_TITLE'=>'Targets',
|
||||
'LBL_ACCOUNTS_SUBPANEL_TITLE' => 'Accounts',
|
||||
'LBL_COPY_PREFIX' =>'Copy of',
|
||||
'LBL_USERS_SUBPANEL_TITLE' =>'Users',
|
||||
'LBL_TYPE' => 'Type',
|
||||
'LBL_LIST_TYPE' => 'Type',
|
||||
'LBL_LIST_TYPE_LIST_NAME'=>'Type',
|
||||
'LBL_NEW_FORM_TITLE'=>'New Target List',
|
||||
'LBL_MARKETING_MESSAGE'=>'Email Marketing Message',
|
||||
'LBL_DOMAIN_NAME'=>'Domain Name',
|
||||
'LBL_DOMAIN'=>'No emails to Domain',
|
||||
'LBL_LIST_PROSPECTLIST_NAME'=>'Name',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
85
modules/ProspectLists/language/pl_pl.lang.php
Executable file
85
modules/ProspectLists/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,85 @@
|
||||
<?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' => 'Lista grup odbiorców',
|
||||
'LBL_MODULE_ID' => 'Lista grup odbiorcow',
|
||||
'LBL_MODULE_TITLE' => 'Lista grup odbiorców: Strona główna',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Szukaj grup odbiorców',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista grup odbiorców',
|
||||
'LBL_PROSPECT_LIST_NAME' => 'Nazwa:',
|
||||
'LBL_NAME' => 'Nazwa: ',
|
||||
'LBL_ENTRIES' => 'Wszystkie pozycje: ',
|
||||
'LBL_LIST_PROSPECT_LIST_NAME' => 'Lista grup odbiorców',
|
||||
'LBL_LIST_ENTRIES' => 'Pozycje',
|
||||
'LBL_LIST_DESCRIPTION' => 'Opis',
|
||||
'LBL_LIST_TYPE_NO' => 'Typ',
|
||||
'LBL_LIST_END_DATE' => 'Data zakończenia',
|
||||
'LBL_DATE_ENTERED' => 'Data rozpoczęcia',
|
||||
'LBL_DATE_MODIFIED' => 'Data modyfikacji',
|
||||
'LBL_MODIFIED' => 'Zmodyfikowane przez: ',
|
||||
'LBL_CREATED' => 'Utworzone przez: ',
|
||||
'LBL_TEAM' => 'Zespół: ',
|
||||
'LBL_ASSIGNED_TO' => 'Przydzielony do: ',
|
||||
'LBL_DESCRIPTION' => 'Opis: ',
|
||||
'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',
|
||||
'LBL_MODIFIED_BY' => 'Zmodyfikowane przez: ',
|
||||
'LBL_CREATED_BY' => 'Utworzone przez: ',
|
||||
'LBL_DATE_CREATED' => 'Data utworzenia: ',
|
||||
'LBL_DATE_LAST_MODIFIED' => 'Data modyfikacji: ',
|
||||
'LNK_NEW_PROSPECT' => 'Utwórz grupę odbiorców',
|
||||
'LNK_PROSPECT_LIST' => 'Docelowi odbiorcy',
|
||||
|
||||
'LBL_PROSPECT_LISTS_SUBPANEL_TITLE' => 'Lista grup odbiorców',
|
||||
'LBL_CONTACTS_SUBPANEL_TITLE' => 'Kontakty',
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Decydenci',
|
||||
'LBL_PROSPECTS_SUBPANEL_TITLE'=>'odbiorcy',
|
||||
'LBL_ACCOUNTS_SUBPANEL_TITLE' => 'Klienci',
|
||||
'LBL_COPY_PREFIX' =>'Kopia',
|
||||
'LBL_USERS_SUBPANEL_TITLE' =>'Użytkownicy',
|
||||
'LBL_TYPE' => 'Typ',
|
||||
'LBL_LIST_TYPE' => 'Typ:',
|
||||
'LBL_LIST_TYPE_LIST_NAME'=>'Typ',
|
||||
'LBL_NEW_FORM_TITLE'=>'Nowa lista odbiorców',
|
||||
'LBL_MARKETING_MESSAGE'=>'Wiadomość mailingowa',
|
||||
'LBL_DOMAIN_NAME'=>'Nazwa domeny',
|
||||
'LBL_DOMAIN'=>'Nie ma wiadomości email dla domeny:',
|
||||
'LBL_LIST_PROSPECTLIST_NAME'=>'Nazwa',
|
||||
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
43
modules/ProspectLists/metadata/SearchFields.php
Executable file
43
modules/ProspectLists/metadata/SearchFields.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?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['ProspectLists'] =
|
||||
array (
|
||||
'name' => array( 'query_type'=>'default'),
|
||||
'list_type' => array( 'query_type'=>'default'),
|
||||
'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
|
||||
);
|
||||
?>
|
||||
85
modules/ProspectLists/metadata/detailviewdefs.php
Executable file
85
modules/ProspectLists/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,85 @@
|
||||
<?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['ProspectLists']['DetailView'] = array(
|
||||
'templateMeta' => array('form' => array('closeFormBeforeCustomButtons' => true,'buttons'=>array('EDIT', 'DUPLICATE', 'DELETE',
|
||||
array('customCode'=> '<input title="{$APP.LBL_EXPORT}" class="button" type="button" name="opp_to_quote_button" value="{$APP.LBL_EXPORT}" onclick="document.location.href = \'index.php?entryPoint=export&module=ProspectLists&uid={$fields.id.value}&members=1\'">'),)),
|
||||
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
),
|
||||
'panels' =>array (
|
||||
|
||||
array (
|
||||
'name'
|
||||
),
|
||||
|
||||
array (
|
||||
'list_type',
|
||||
'domain_name',
|
||||
),
|
||||
|
||||
array (
|
||||
'assigned_user_name',
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'date_modified',
|
||||
'label' => 'LBL_DATE_MODIFIED',
|
||||
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
|
||||
),
|
||||
array (
|
||||
'name' => 'date_entered',
|
||||
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'entry_count','label'=>'LBL_ENTRIES'),
|
||||
),
|
||||
|
||||
array (
|
||||
'description',
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
87
modules/ProspectLists/metadata/editviewdefs.php
Executable file
87
modules/ProspectLists/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,87 @@
|
||||
<?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['ProspectLists']['EditView'] = array(
|
||||
'templateMeta' => array('form'=>array('hidden'=>array('<input type="hidden" name="campaign_id" value="{$smarty.request.campaign_id}">')),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
'javascript' => '<script type="text/javascript">
|
||||
function toggle_domain_name(list_type) {ldelim}
|
||||
domain_name = document.getElementById(\'domain_name_div\');
|
||||
domain_label = document.getElementById(\'domain_label_div\');
|
||||
if (list_type.value == \'exempt_domain\') {ldelim}
|
||||
domain_name.style.display=\'block\';
|
||||
domain_label.style.display=\'block\';
|
||||
{rdelim} else {ldelim}
|
||||
domain_name.style.display=\'none\';
|
||||
domain_label.style.display=\'none\';
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
</script>',
|
||||
),
|
||||
'panels' =>array (
|
||||
'default' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
array('name'=>'name', 'displayParams'=>array('required'=>true)),
|
||||
'',
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'list_type', 'displayParams'=>array('required'=>true, 'javascript'=>'onchange="toggle_domain_name(this);"')),
|
||||
array('name' => 'domain_name',
|
||||
'customLabel' => '<div {if $fields.list_type.value != "exempt_domain"} style=\'display:none\'{/if} id=\'domain_label_div\'>{$MOD.LBL_DOMAIN}</div>',
|
||||
'customCode' => '<div {if $fields.list_type.value != "exempt_domain"} style=\'display:none\'{/if} id=\'domain_name_div\'><input name="domain_name" id="domain_name" maxlength="255" type="text" value="{$fields.domain_name.value}"></div>',),
|
||||
),
|
||||
|
||||
array (
|
||||
'assigned_user_name',
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'description'),
|
||||
'',
|
||||
),
|
||||
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
58
modules/ProspectLists/metadata/listviewdefs.php
Executable file
58
modules/ProspectLists/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-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['ProspectLists'] = array(
|
||||
'NAME' => array(
|
||||
'width' => '25',
|
||||
'label' => 'LBL_LIST_PROSPECT_LIST_NAME',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'LIST_TYPE' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_LIST_TYPE_LIST_NAME',
|
||||
'default' => true),
|
||||
'DESCRIPTION' => array(
|
||||
'width' => '50',
|
||||
'label' => 'LBL_LIST_DESCRIPTION',
|
||||
'default' => true),
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true),
|
||||
);
|
||||
63
modules/ProspectLists/metadata/popupdefs.php
Executable file
63
modules/ProspectLists/metadata/popupdefs.php
Executable 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' => 'ProspectList',
|
||||
'varName' => 'PROSPECTLIST',
|
||||
'orderBy' => 'name',
|
||||
'whereClauses' =>
|
||||
array('name' => 'prospect_lists.name',
|
||||
'list_type' => 'prospect_lists.list_type'),
|
||||
'searchInputs' =>
|
||||
array('name', 'list_type'),
|
||||
'selectDoms' =>
|
||||
array('LIST_OPTIONS' =>
|
||||
array('dom' => 'prospect_list_type_dom', 'searchInput' => 'list_type'),
|
||||
),
|
||||
'create' =>
|
||||
array('formBase' => 'ProspectListFormBase.php',
|
||||
'formBaseClass' => 'ProspectListFormBase',
|
||||
'getFormBodyParams' => array('','','ProspectListSave'),
|
||||
'createButton' => $mod_strings['LNK_NEW_PROSPECT_LIST']
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
59
modules/ProspectLists/metadata/searchdefs.php
Executable file
59
modules/ProspectLists/metadata/searchdefs.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on May 29, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$searchdefs['ProspectLists'] = array(
|
||||
'templateMeta' => array(
|
||||
'maxColumns' => '3',
|
||||
'widths' => array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
array('name'=>'name', 'label'=>'LBL_PROSPECT_LIST_NAME',),
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
),
|
||||
'advanced_search' => array(
|
||||
array('name'=>'name', 'label'=>'LBL_PROSPECT_LIST_NAME',),
|
||||
array('name'=>'list_type', 'label'=>'LBL_LIST_TYPE', 'type'=>'enum'),
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
110
modules/ProspectLists/metadata/subpaneldefs.php
Executable file
110
modules/ProspectLists/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,110 @@
|
||||
<?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['ProspectLists'] = array(
|
||||
// list of what Subpanels to show in the DetailView
|
||||
'subpanel_setup' => array(
|
||||
'prospects' => array(
|
||||
'order' => 10,
|
||||
'sort_by' => 'last_name',
|
||||
'sort_order' => 'asc',
|
||||
'module' => 'Prospects',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'prospects',
|
||||
'title_key' => 'LBL_PROSPECTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class'=>'SubPanelTopSelectButton','mode'=>'MultiSelect'),
|
||||
),
|
||||
),
|
||||
'contacts' => array(
|
||||
'order' => 20,
|
||||
'module' => 'Contacts',
|
||||
'sort_by' => 'last_name, first_name',
|
||||
'sort_order' => 'asc',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'contacts',
|
||||
'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class'=>'SubPanelTopSelectButton','mode'=>'MultiSelect'),
|
||||
),
|
||||
),
|
||||
'leads' => array(
|
||||
'order' => 30,
|
||||
'module' => 'Leads',
|
||||
'sort_by' => 'last_name, first_name',
|
||||
'sort_order' => 'asc',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'leads',
|
||||
'title_key' => 'LBL_LEADS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class'=>'SubPanelTopSelectButton','mode'=>'MultiSelect'),
|
||||
),
|
||||
),
|
||||
'users' => array(
|
||||
'order' => 40,
|
||||
'module' => 'Users',
|
||||
'sort_by' => 'name',
|
||||
'sort_order' => 'asc',
|
||||
'subpanel_name' => 'ForProspectLists',
|
||||
'get_subpanel_data' => 'users',
|
||||
'title_key' => 'LBL_USERS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class'=>'SubPanelTopSelectButton','mode'=>'MultiSelect'),
|
||||
),
|
||||
),
|
||||
'accounts' => array(
|
||||
'order' => 40,
|
||||
'module' => 'Accounts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'subpanel_name' => 'ForProspectLists',
|
||||
'get_subpanel_data' => 'accounts',
|
||||
'add_subpanel_data' => 'account_id',
|
||||
'title_key' => 'LBL_ACCOUNTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class'=>'SubPanelTopSelectButton','mode'=>'MultiSelect'),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
82
modules/ProspectLists/metadata/subpanels/default.php
Executable file
82
modules/ProspectLists/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,82 @@
|
||||
<?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', 'popup_module' => 'ProspectLists', 'create'=>"true",'mode'=>'MultiSelect'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
'list_fields'=> array(
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_PROSPECT_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '37%',
|
||||
),
|
||||
'description' => array(
|
||||
'vname' => 'LBL_LIST_DESCRIPTION',
|
||||
'width' => '35%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'list_type' => array(
|
||||
'vname' => 'LBL_LIST_TYPE_NO',
|
||||
'width' => '10%',
|
||||
),
|
||||
'entry_count' => array(
|
||||
'vname' => 'LBL_LIST_ENTRIES',
|
||||
'width' => '8%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'ProspectLists',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'ProspectLists',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
237
modules/ProspectLists/vardefs.php
Executable file
237
modules/ProspectLists/vardefs.php
Executable file
@@ -0,0 +1,237 @@
|
||||
<?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['ProspectList'] = array (
|
||||
|
||||
'table' => 'prospect_lists',
|
||||
'fields' => array (
|
||||
'id' => array (
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required' => true,
|
||||
'reportable'=>false,
|
||||
),
|
||||
'name' => array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '50',
|
||||
'importable' => 'required',
|
||||
),
|
||||
'list_type' => array (
|
||||
'name' => 'list_type',
|
||||
'vname' => 'LBL_TYPE',
|
||||
'type' => 'enum',
|
||||
'options' => 'prospect_list_type_dom',
|
||||
'len'=>25,
|
||||
'importable' => 'required',
|
||||
),
|
||||
'date_entered' => array (
|
||||
'name' => 'date_entered',
|
||||
'vname' => 'LBL_DATE_ENTERED',
|
||||
'type' => 'datetime',
|
||||
),
|
||||
'date_modified' => array (
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'type' => 'datetime',
|
||||
),
|
||||
'modified_user_id' => array (
|
||||
'name' => 'modified_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_MODIFIED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'modified_user_id_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'reportable'=>true,
|
||||
),
|
||||
'modified_by_name' => array (
|
||||
'name' => 'modified_by_name',
|
||||
'vname' => 'LBL_MODIFIED',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'table' => 'users',
|
||||
'id_name' => 'modified_user_id',
|
||||
'module' => 'Users',
|
||||
'duplicate_merge' => 'disabled',
|
||||
),
|
||||
'assigned_user_id' => array (
|
||||
'name' => 'assigned_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'vname' => 'LBL_ASSIGNED_TO',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'reportable'=>true,
|
||||
),
|
||||
'assigned_user_name' =>
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_ASSIGNED_TO_USER',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'table' => 'users',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'module' => 'Users',
|
||||
'duplicate_merge' => 'disabled',
|
||||
),
|
||||
'created_by' => array (
|
||||
'name' => 'created_by',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'created_by',
|
||||
'vname' => 'LBL_CREATED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'created_by_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id'
|
||||
),
|
||||
'created_by_name' => array (
|
||||
'name' => 'created_by_name',
|
||||
'vname' => 'LBL_CREATED',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'table' => 'users',
|
||||
'id_name' => 'created_by',
|
||||
'module' => 'Users',
|
||||
'duplicate_merge' => 'disabled',
|
||||
),
|
||||
'deleted' => array (
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_CREATED_BY',
|
||||
'type' => 'bool',
|
||||
'required' => false,
|
||||
'reportable'=>false,
|
||||
),
|
||||
'description' => array (
|
||||
'name' => 'description',
|
||||
'vname' => 'LBL_DESCRIPTION',
|
||||
'type' => 'text',
|
||||
),
|
||||
'domain_name' => array (
|
||||
'name' => 'domain_name',
|
||||
'vname' => 'LBL_DOMAIN_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
),
|
||||
'entry_count' =>
|
||||
array (
|
||||
'name' => 'entry_count',
|
||||
'type' => 'int',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_LIST_ENTRIES',
|
||||
),
|
||||
'prospects' =>
|
||||
array (
|
||||
'name' => 'prospects',
|
||||
'type' => 'link',
|
||||
'relationship' => 'prospect_list_prospects',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'contacts' =>
|
||||
array (
|
||||
'name' => 'contacts',
|
||||
'type' => 'link',
|
||||
'relationship' => 'prospect_list_contacts',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'leads' =>
|
||||
array (
|
||||
'name' => 'leads',
|
||||
'type' => 'link',
|
||||
'relationship' => 'prospect_list_leads',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'accounts' =>
|
||||
array (
|
||||
'name' => 'accounts',
|
||||
'type' => 'link',
|
||||
'relationship' => 'prospect_list_accounts',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'campaigns'=> array (
|
||||
'name' => 'campaigns',
|
||||
'type' => 'link',
|
||||
'relationship' => 'prospect_list_campaigns',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'users' =>
|
||||
array (
|
||||
'name' => 'users',
|
||||
'type' => 'link',
|
||||
'relationship' => 'prospect_list_users',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'marketing_id' => array (
|
||||
'name' => 'marketing_id',
|
||||
'vname' => 'LBL_MARKETING_ID',
|
||||
'type' => 'varchar',
|
||||
'len'=>'36',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'marketing_name' => array (
|
||||
'name' => 'marketing_name',
|
||||
'vname' => 'LBL_MARKETING_NAME',
|
||||
'type' => 'varchar',
|
||||
'len'=>'255',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
),
|
||||
|
||||
'indices' => array (
|
||||
array (
|
||||
'name' =>'prospectlistsspk',
|
||||
'type' =>'primary',
|
||||
'fields'=>array('id')
|
||||
),
|
||||
array (
|
||||
'name' =>'idx_prospect_list_name',
|
||||
'type' =>'index',
|
||||
'fields'=>array('name')
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
VardefManager::createVardef('ProspectLists','ProspectList', array(
|
||||
));
|
||||
?>
|
||||
Reference in New Issue
Block a user