Add php files
This commit is contained in:
17
modules/Contacts/AS_Popup.php
Executable file
17
modules/Contacts/AS_Popup.php
Executable file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
if(!empty($_REQUEST['html'])) {
|
||||
require_once('modules/Contacts/Popup_picker.php');
|
||||
$popup = new Popup_Picker();
|
||||
if($_REQUEST['html'] == 'Dial' )
|
||||
$popup->process_page_dial();
|
||||
|
||||
|
||||
} else {
|
||||
require_once('include/Popups/Popup_picker.php');
|
||||
$popup = new Popup_Picker();
|
||||
echo $popup->process_page();
|
||||
}
|
||||
|
||||
?>
|
||||
114
modules/Contacts/AcceptDecline.php
Executable file
114
modules/Contacts/AcceptDecline.php
Executable file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
global $sugar_config, $dbconfig, $beanList, $beanFiles, $app_strings, $app_list_strings;
|
||||
|
||||
|
||||
if ( !empty($_REQUEST['user_id'])) {
|
||||
$current_user = new User();
|
||||
$result = $current_user->retrieve($_REQUEST['user_id']);
|
||||
if ($result == null) {
|
||||
session_destroy();
|
||||
sugar_cleanup();
|
||||
die("The user id doesn't exist");
|
||||
}
|
||||
$current_entity = $current_user;
|
||||
}
|
||||
else if ( ! empty($_REQUEST['contact_id'])) {
|
||||
$current_entity = new Contact();
|
||||
$current_entity->disable_row_level_security = true;
|
||||
$result = $current_entity->retrieve($_REQUEST['contact_id']);
|
||||
if($result == null) {
|
||||
session_destroy();
|
||||
sugar_cleanup();
|
||||
die("The contact id doesn't exist");
|
||||
}
|
||||
}
|
||||
else if ( ! empty($_REQUEST['lead_id'])) {
|
||||
$current_entity = new Lead();
|
||||
$current_entity->disable_row_level_security = true;
|
||||
$result = $current_entity->retrieve($_REQUEST['lead_id']);
|
||||
if($result == null) {
|
||||
session_destroy();
|
||||
sugar_cleanup();
|
||||
die("The lead id doesn't exist");
|
||||
}
|
||||
}
|
||||
|
||||
$bean = $beanList[clean_string($_REQUEST['module'])];
|
||||
require_once($beanFiles[$bean]);
|
||||
$focus = new $bean;
|
||||
$focus->disable_row_level_security = true;
|
||||
$result = $focus->retrieve($_REQUEST['record']);
|
||||
|
||||
if($result == null) {
|
||||
session_destroy();
|
||||
sugar_cleanup();
|
||||
die("The focus id doesn't exist");
|
||||
}
|
||||
|
||||
$focus->set_accept_status($current_entity,$_REQUEST['accept_status']);
|
||||
|
||||
print $app_strings['LBL_STATUS_UPDATED']."<BR><BR>";
|
||||
print $app_strings['LBL_STATUS']. " ". $app_list_strings['dom_meeting_accept_status'][$_REQUEST['accept_status']];
|
||||
print "<BR><BR>";
|
||||
$script = <<<EOQ
|
||||
<SCRIPT language="JavaScript">
|
||||
<!--
|
||||
var browserName=navigator.appName;
|
||||
if (browserName=="Netscape") {
|
||||
// C.L. fix for Mozilla/Netscape flavors... need a parent window
|
||||
function closeme()
|
||||
{
|
||||
window.open('','_parent','');
|
||||
window.close();
|
||||
}
|
||||
} else {
|
||||
function closeme()
|
||||
{
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
EOQ;
|
||||
|
||||
print $script;
|
||||
print "<a href='#' onclick='window.closeme(); return false;'>".$app_strings['LBL_CLOSE_WINDOW']."</a><br>";
|
||||
sugar_cleanup();
|
||||
exit;
|
||||
?>
|
||||
367
modules/Contacts/BusinessCard.php
Executable file
367
modules/Contacts/BusinessCard.php
Executable file
@@ -0,0 +1,367 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Business Card Wizard
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
require_once('XTemplate/xtpl.php');
|
||||
global $theme;
|
||||
$error_msg = '';
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'Contacts');
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$mod_strings['LBL_BUSINESSCARD'], true);
|
||||
echo "\n</p>\n";
|
||||
$xtpl=new XTemplate ('modules/Contacts/BusinessCard.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
|
||||
$xtpl->assign("HEADER", $mod_strings['LBL_ADD_BUSINESSCARD']);
|
||||
|
||||
$xtpl->assign("MODULE", $_REQUEST['module']);
|
||||
if ($error_msg != '')
|
||||
{
|
||||
$xtpl->assign("ERROR", $error_msg);
|
||||
$xtpl->parse("main.error");
|
||||
}
|
||||
|
||||
if(isset($_POST['handle']) && $_POST['handle'] == 'Save'){
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
require_once('modules/Contacts/ContactFormBase.php');
|
||||
$contactForm = new ContactFormBase();
|
||||
require_once('modules/Accounts/AccountFormBase.php');
|
||||
$accountForm = new AccountFormBase();
|
||||
require_once('modules/Opportunities/Opportunity.php');
|
||||
require_once('modules/Opportunities/OpportunityFormBase.php');
|
||||
$oppForm = new OpportunityFormBase();
|
||||
if(!isset($_POST['selectedContact']) && !isset($_POST['ContinueContact'])){
|
||||
$duplicateContacts = $contactForm->checkForDuplicates('Contacts');
|
||||
if(isset($duplicateContacts)){
|
||||
$formBody = $contactForm->buildTableForm($duplicateContacts);
|
||||
$xtpl->assign('FORMBODY', $formBody);
|
||||
$xtpl->parse('main.formnoborder');
|
||||
$xtpl->parse('main');
|
||||
$xtpl->out('main');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($_POST['selectedAccount']) && empty($_POST['ContinueAccount'])){
|
||||
$duplicateAccounts = $accountForm->checkForDuplicates('Accounts');
|
||||
|
||||
if(isset($duplicateAccounts)){
|
||||
$xtpl->assign('FORMBODY', $accountForm->buildTableForm($duplicateAccounts));
|
||||
$xtpl->parse('main.formnoborder');
|
||||
$xtpl->parse('main');
|
||||
$xtpl->out('main');
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['newopportunity']) && $_POST['newopportunity']=='on' &&!isset($_POST['selectedOpportunity']) && !isset($_POST['ContinueOpportunity'])){
|
||||
|
||||
$duplicateOpps = $oppForm->checkForDuplicates('Opportunities');
|
||||
if(isset($duplicateOpps)){
|
||||
$xtpl->assign('FORMBODY', $oppForm->buildTableForm($duplicateOpps));
|
||||
$xtpl->parse('main.formnoborder');
|
||||
$xtpl->parse('main');
|
||||
$xtpl->out('main');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!empty($_POST['selectedContact'])){
|
||||
$contact = new Contact();
|
||||
$contact->retrieve($_POST['selectedContact']);
|
||||
}else{
|
||||
$contact= $contactForm->handleSave('Contacts',false, false);
|
||||
}
|
||||
if(!empty($_POST['selectedAccount'])){
|
||||
$account = new Account();
|
||||
$account->retrieve($_POST['selectedAccount']);
|
||||
}else if(isset($_POST['newaccount']) && $_POST['newaccount']=='on' ){
|
||||
$account= $accountForm->handleSave('Accounts',false, false);
|
||||
}
|
||||
if(isset($_POST['newopportunity']) && $_POST['newopportunity']=='on' ){
|
||||
if(!empty($_POST['selectedOpportunity'])){
|
||||
$opportunity = new Opportunity();
|
||||
$opportunity->retrieve($_POST['selectedOpportunity']);
|
||||
}else{
|
||||
if(isset($account)){
|
||||
$_POST['Opportunitiesaccount_id'] = $account->id;
|
||||
$_POST['Opportunitiesaccount_name'] = $account->name;
|
||||
|
||||
}
|
||||
if(isset($_POST['Contactslead_source']) && !empty($_POST['Contactslead_source'])){
|
||||
$_POST['Opportunitieslead_source'] = $_POST['Contactslead_source'];
|
||||
}
|
||||
$opportunity= $oppForm->handleSave('Opportunities',false, false);
|
||||
|
||||
}
|
||||
}
|
||||
require_once('modules/Notes/NoteFormBase.php');
|
||||
|
||||
$noteForm = new NoteFormBase();
|
||||
if(isset($account))
|
||||
$_POST['AccountNotesparent_id'] = $account->id;
|
||||
$accountnote= $noteForm->handleSave('AccountNotes',false, false);
|
||||
if(isset($contact))
|
||||
$_POST['ContactNotesparent_type'] = "Contacts";
|
||||
$_POST['ContactNotesparent_id'] = $contact->id;
|
||||
$contactnote= $noteForm->handleSave('ContactNotes',false, false);
|
||||
if(isset($opportunity)){
|
||||
$_POST['OpportunityNotesparent_type'] = "Opportunities";
|
||||
$_POST['OpportunityNotesparent_id'] = $opportunity->id;
|
||||
$opportunitynote= $noteForm->handleSave('OpportunityNotes',false, false);
|
||||
}
|
||||
if(isset($_POST['newappointment']) && $_POST['newappointment']=='on' ){
|
||||
if(isset($_POST['appointment']) && $_POST['appointment'] == 'Meeting'){
|
||||
require_once('modules/Meetings/MeetingFormBase.php');
|
||||
$meetingForm = new MeetingFormBase();
|
||||
$meeting= $meetingForm->handleSave('Appointments',false, false);
|
||||
}else{
|
||||
require_once('modules/Calls/CallFormBase.php');
|
||||
$callForm = new CallFormBase();
|
||||
$call= $callForm->handleSave('Appointments',false, false);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($call)){
|
||||
if(isset($contact)) {
|
||||
$call->load_relationship('contacts');
|
||||
$call->contacts->add($contact->id);
|
||||
} else if(isset($account)){
|
||||
$call->load_relationship('account');
|
||||
$call->account->add($account->id);
|
||||
}else if(isset($opportunity)){
|
||||
$call->load_relationship('opportunity');
|
||||
$call->opportunity->add($opportunity->id);
|
||||
}
|
||||
}
|
||||
if(isset($meeting)){
|
||||
if(isset($contact)) {
|
||||
$meeting->load_relationship('contacts');
|
||||
$meeting->contacts->add($contact->id);
|
||||
} else if(isset($account)){
|
||||
$meeting->load_relationship('account');
|
||||
$meeting->account->add($account->id);
|
||||
}else if(isset($opportunity)){
|
||||
$meeting->load_relationship('opportunity');
|
||||
$meeting->opportunity->add($opportunity->id);
|
||||
}
|
||||
}
|
||||
if(isset($account)){
|
||||
if(isset($contact)) {
|
||||
$account->load_relationship('contacts');
|
||||
$account->contacts->add($contact->id);
|
||||
} else if(isset($accountnote)){
|
||||
$account->load_relationship('notes');
|
||||
$account->notes->add($accountnote->id);
|
||||
}else if(isset($opportunity)){
|
||||
$account->load_relationship('opportunities');
|
||||
$account->opportunities->add($opportunity->id);
|
||||
}
|
||||
}
|
||||
if(isset($opportunity)){
|
||||
if(isset($contact)) {
|
||||
$opportunity->load_relationship('contacts');
|
||||
$opportunity->contacts->add($contact->id);
|
||||
} else if(isset($accountnote)){
|
||||
$opportunity->load_relationship('notes');
|
||||
$opportunity->notes->add($accountnote->id);
|
||||
}
|
||||
}
|
||||
if(isset($contact)){
|
||||
if(isset($contactnote)){
|
||||
$contact->load_relationship('notes');
|
||||
$contact->notes->add($contactnote->id);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($contact)){
|
||||
$contact->track_view($current_user->id, 'Contacts');
|
||||
if(isset($_POST['selectedContact']) && $_POST['selectedContact'] == $contact->id){
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_EXISTING_CONTACT']." - <a href='index.php?action=DetailView&module=Contacts&record=".$contact->id."'>".$contact->first_name ." ".$contact->last_name."</a>" );
|
||||
$xtpl->parse('main.row');
|
||||
}else{
|
||||
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_CREATED_CONTACT']." - <a href='index.php?action=DetailView&module=Contacts&record=".$contact->id."'>".$contact->first_name ." ".$contact->last_name."</a>" );
|
||||
$xtpl->parse('main.row');
|
||||
}
|
||||
}
|
||||
if(isset($account)){
|
||||
$account->track_view($current_user->id, 'Accounts');
|
||||
if(isset($_POST['selectedAccount']) && $_POST['selectedAccount'] == $account->id){
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_EXISTING_ACCOUNT']. " - <a href='index.php?action=DetailView&module=Accounts&record=".$account->id."'>".$account->name."</a>");
|
||||
$xtpl->parse('main.row');
|
||||
}else{
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_CREATED_ACCOUNT']. " - <a href='index.php?action=DetailView&module=Accounts&record=".$account->id."'>".$account->name."</a>");
|
||||
$xtpl->parse('main.row');
|
||||
}
|
||||
|
||||
}
|
||||
if(isset($opportunity)){
|
||||
$opportunity->track_view($current_user->id, 'Opportunities');
|
||||
if(isset($_POST['selectedOpportunity']) && $_POST['selectedOpportunity'] == $opportunity->id){
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_EXISTING_OPPORTUNITY']. " - <a href='index.php?action=DetailView&module=Opportunities&record=".$opportunity->id."'>".$opportunity->name."</a>");
|
||||
$xtpl->parse('main.row');
|
||||
}else{
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_CREATED_OPPORTUNITY']. " - <a href='index.php?action=DetailView&module=Opportunities&record=".$opportunity->id."'>".$opportunity->name."</a>");
|
||||
$xtpl->parse('main.row');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(isset($call)){
|
||||
$call->track_view($current_user->id, 'Calls');
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_CREATED_CALL']. " - <a href='index.php?action=DetailView&module=Calls&record=".$call->id."'>".$call->name."</a>");
|
||||
$xtpl->parse('main.row');
|
||||
}
|
||||
if(isset($meeting)){
|
||||
$meeting->track_view($current_user->id, 'Meetings');
|
||||
$xtpl->assign('ROWVALUE', "<LI>".$mod_strings['LBL_CREATED_MEETING']. " - <a href='index.php?action=DetailView&module=Calls&record=".$meeting->id."'>".$meeting->name."</a>");
|
||||
$xtpl->parse('main.row');
|
||||
}
|
||||
$xtpl->assign('ROWVALUE'," ");
|
||||
$xtpl->parse('main.row');
|
||||
$xtpl->assign('ROWVALUE',"<a href='index.php?module=Contacts&action=BusinessCard'>{$mod_strings['LBL_ADDMORE_BUSINESSCARD']}</a>");
|
||||
$xtpl->parse('main.row');
|
||||
$xtpl->parse('main');
|
||||
$xtpl->out('main');
|
||||
}
|
||||
|
||||
else{
|
||||
|
||||
|
||||
//CONTACT
|
||||
$xtpl->assign('FORMHEADER',$mod_strings['LNK_NEW_CONTACT']);
|
||||
$xtpl->parse("main.startform");
|
||||
require_once('modules/Contacts/ContactFormBase.php');
|
||||
$xtpl->assign('OPPNEEDSACCOUNT',$mod_strings['NTC_OPPORTUNITY_REQUIRES_ACCOUNT']);
|
||||
if ($sugar_config['require_accounts']) {
|
||||
$xtpl->assign('CHECKOPPORTUNITY', "&& checkOpportunity()");
|
||||
}
|
||||
else {
|
||||
$xtpl->assign('CHECKOPPORTUNITY', "");
|
||||
}
|
||||
$contactForm = new ContactFormBase();
|
||||
$xtpl->assign('FORMBODY',$contactForm->getWideFormBody('Contacts', 'Contacts', 'BusinessCard', '', false));
|
||||
$xtpl->assign('TABLECLASS', 'tabForm');
|
||||
$xtpl->assign('CLASS', 'dataLabel');
|
||||
require_once('modules/Notes/NoteFormBase.php');
|
||||
$noteForm = new NoteFormBase();
|
||||
$postform = "<div id='contactnotelink'><p><a href='javascript:toggleDisplay(\"contactnote\");addToValidate(\"BusinessCard\", \"ContactNotesname\", \"varchar\", true,\"".$mod_strings['LBL_NOTE_SUBJECT']."\");' class='tabFormLink'>${mod_strings['LNK_NEW_NOTE']}</a></p></div>";
|
||||
$postform .= '<div id="contactnote" style="display:none">'.'<input type=hidden name=CreateContactNote value=0>'.$noteForm->getFormBody('ContactNotes','Notes','BusinessCard', 85, false).'</div>';
|
||||
$xtpl->assign('POSTFORM',$postform);
|
||||
$xtpl->parse("main.form");
|
||||
|
||||
|
||||
$xtpl->assign('HEADER', $app_strings['LBL_RELATED_RECORDS']);
|
||||
$xtpl->parse("main.hrrow");
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'BusinessCard',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'selectedAccount',
|
||||
'name' => 'display_account_name',
|
||||
),
|
||||
);
|
||||
|
||||
$json = getJSONobj();
|
||||
$encoded_contact_popup_request_data = $json->encode($popup_request_data);
|
||||
|
||||
//Account
|
||||
require_once('include/QuickSearchDefaults.php');
|
||||
$qsd = new QuickSearchDefaults();
|
||||
$sqs_objects = array('display_account_name' => $qsd->getQSParent());
|
||||
$sqs_objects['display_account_name']['populate_list'] = array('display_account_name', 'selectedAccount');
|
||||
$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . ';
|
||||
addToValidateBinaryDependency(\'BusinessCard\', \'display_account_name\', \'alpha\', false, \'' . $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ACCOUNT'] . '\', \'selectedAccount\' );
|
||||
</script>';
|
||||
|
||||
$selectAccountButton = $quicksearch_js;
|
||||
$selectAccountButton .= "<div id='newaccountdivlink' style='display:inline' class='dataLabel'>{$mod_strings['LNK_SELECT_ACCOUNT']}: <input class='sqsEnabled' name='display_account_name' id='display_account_name' type=\"text\" value=\"\"><input name='selectedAccount' id='selectedAccount' type=\"hidden\" value=''> <input type='button' title=\"{$app_strings['LBL_SELECT_BUTTON_TITLE']}\" accessKey=\"{$app_strings['LBL_SELECT_BUTTON_KEY']}\" type=\"button\" class=\"button\" value='{$app_strings['LBL_SELECT_BUTTON_LABEL']}' name=btn1 LANGUAGE=javascript onclick='open_popup(\"Accounts\", 600, 400, \"\", true, false, $encoded_contact_popup_request_data);'/> <input type='button' title=\"{$app_strings['LBL_CLEAR_BUTTON_TITLE']}\" accessKey=\"{$app_strings['LBL_CLEAR_BUTTON_KEY']}\" type=\"button\" class=\"button\" value='{$app_strings['LBL_CLEAR_BUTTON_LABEL']}' name=btn1 LANGUAGE=javascript onclick='document.forms[\"ConvertLead\"].selectedAccount.value=\"\";document.forms[\"ConvertLead\"].display_account_name.value=\"\"; '><br><b>{$app_strings['LBL_OR']}</b></div><br><br>";
|
||||
$xtpl->assign('FORMHEADER',get_form_header($mod_strings['LNK_NEW_ACCOUNT'], '', ''));
|
||||
require_once('modules/Accounts/AccountFormBase.php');
|
||||
$accountForm = new AccountFormBase();
|
||||
$xtpl->assign('CLASS', 'evenListRow');
|
||||
$xtpl->assign('FORMBODY',$selectAccountButton."<slot class='dataLabel'><input class='checkbox' type='checkbox' name='newaccount' onclick='document.forms[\"BusinessCard\"].selectedAccount.value=\"\";document.forms[\"BusinessCard\"].display_account_name.value=\"\";toggleDisplay(\"newaccountdiv\");'> ".$mod_strings['LNK_NEW_ACCOUNT']."</slot> <div id='newaccountdiv' style='display:none'>".$accountForm->getWideFormBody('Accounts', 'Accounts','BusinessCard', '' ));
|
||||
require_once('modules/Notes/NoteFormBase.php');
|
||||
$noteForm = new NoteFormBase();
|
||||
$postform = "<div id='accountnotelink'><p><a href='javascript:toggleDisplay(\"accountnote\");'>${mod_strings['LNK_NEW_NOTE']}</a></p></div>";
|
||||
$postform .= '<div id="accountnote" style="display:none">'.$noteForm->getFormBody('AccountNotes', 'Notes', 'BusinessCard', 85).'</div>';
|
||||
$xtpl->assign('POSTFORM',$postform);
|
||||
$xtpl->parse("main.headlessform");
|
||||
|
||||
//OPPORTUNITTY
|
||||
$xtpl->assign('FORMHEADER',get_form_header($mod_strings['LNK_NEW_OPPORTUNITY'], '', ''));
|
||||
require_once('modules/Opportunities/OpportunityFormBase.php');
|
||||
$oppForm = new OpportunityFormBase();
|
||||
$xtpl->assign('CLASS', 'evenListRow');
|
||||
$xtpl->assign('FORMBODY',"<slot class='dataLabel'><input class='checkbox' type='checkbox' name='newopportunity' onclick='toggleDisplay(\"newoppdiv\");'> ".$mod_strings['LNK_NEW_OPPORTUNITY']."</slot><div id='newoppdiv' style='display:none'>".$oppForm->getWideFormBody('Opportunities', 'Opportunities','BusinessCard', '' , false));
|
||||
require_once('modules/Notes/NoteFormBase.php');
|
||||
$noteForm = new NoteFormBase();
|
||||
$postform = "<div id='oppnotelink'><a href='javascript:toggleDisplay(\"oppnote\");'>${mod_strings['LNK_NEW_NOTE']}</a></div>";
|
||||
$postform .= '<div id="oppnote" style="display:none">'.$noteForm->getFormBody('OpportunityNotes', 'Notes','BusinessCard', 85).'</div><br>';
|
||||
$xtpl->assign('POSTFORM',$postform);
|
||||
$xtpl->parse("main.headlessform");
|
||||
|
||||
//Appointment
|
||||
$xtpl->assign('FORMHEADER',$mod_strings['LNK_NEW_APPOINTMENT']);
|
||||
require_once('modules/Calls/CallFormBase.php');
|
||||
$callForm = new CallFormBase();
|
||||
$xtpl->assign('FORMBODY', "<input class='checkbox' type='checkbox' name='newappointment' onclick='toggleDisplay(\"newappointmentdiv\");'> ".$mod_strings['LNK_NEW_APPOINTMENT']."<div id='newappointmentdiv' style='display:none'>".$callForm->getWideFormBody('Appointments', 'Calls',85));
|
||||
$xtpl->assign('POSTFORM','');
|
||||
$xtpl->parse("main.headlessform");
|
||||
$xtpl->parse("main.save");
|
||||
$xtpl->parse("main.endform");
|
||||
$xtpl->parse("main");
|
||||
|
||||
$xtpl->out("main");
|
||||
|
||||
}
|
||||
?>
|
||||
864
modules/Contacts/Contact.php
Executable file
864
modules/Contacts/Contact.php
Executable file
@@ -0,0 +1,864 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/SugarObjects/templates/person/Person.php');
|
||||
require_once('include/utils.php');
|
||||
require_once('modules/Opportunities/Opportunity.php');
|
||||
|
||||
|
||||
|
||||
require_once('modules/Cases/Case.php');
|
||||
require_once('modules/Tasks/Task.php');
|
||||
require_once('modules/Notes/Note.php');
|
||||
require_once('modules/Leads/Lead.php');
|
||||
require_once('modules/Meetings/Meeting.php');
|
||||
require_once('modules/Calls/Call.php');
|
||||
require_once('modules/Emails/Email.php');
|
||||
require_once('modules/Bugs/Bug.php');
|
||||
require_once('modules/Users/User.php');
|
||||
require_once('modules/Campaigns/Campaign.php');
|
||||
require_once('include/SugarObjects/templates/person/Person.php');
|
||||
// Contact is used to store customer information.
|
||||
class Contact extends Person {
|
||||
var $field_name_map;
|
||||
// Stored fields
|
||||
var $id;
|
||||
var $name = '';
|
||||
var $lead_source;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $assigned_user_id;
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $modified_by_name;
|
||||
|
||||
|
||||
|
||||
|
||||
var $foreign_contact;
|
||||
var $description;
|
||||
var $salutation;
|
||||
var $first_name;
|
||||
var $last_name;
|
||||
var $title;
|
||||
var $department;
|
||||
var $birthdate;
|
||||
var $reports_to_id;
|
||||
var $do_not_call;
|
||||
var $phone_home;
|
||||
var $phone_mobile;
|
||||
var $phone_work;
|
||||
var $phone_other;
|
||||
var $phone_fax;
|
||||
var $email1;
|
||||
var $email_and_name1;
|
||||
var $email_and_name2;
|
||||
var $email2;
|
||||
var $assistant;
|
||||
var $assistant_phone;
|
||||
var $email_opt_out;
|
||||
var $primary_address_street;
|
||||
var $primary_address_city;
|
||||
var $primary_address_state;
|
||||
var $primary_address_postalcode;
|
||||
var $primary_address_country;
|
||||
var $alt_address_street;
|
||||
var $alt_address_city;
|
||||
var $alt_address_state;
|
||||
var $alt_address_postalcode;
|
||||
var $alt_address_country;
|
||||
var $portal_name;
|
||||
var $portal_app;
|
||||
var $portal_active;
|
||||
var $contacts_users_id;
|
||||
// These are for related fields
|
||||
var $bug_id;
|
||||
var $account_name;
|
||||
var $account_id;
|
||||
var $report_to_name;
|
||||
var $opportunity_role;
|
||||
var $opportunity_rel_id;
|
||||
var $opportunity_id;
|
||||
var $case_role;
|
||||
var $case_rel_id;
|
||||
var $case_id;
|
||||
var $task_id;
|
||||
var $note_id;
|
||||
var $meeting_id;
|
||||
var $call_id;
|
||||
var $email_id;
|
||||
var $assigned_user_name;
|
||||
var $accept_status;
|
||||
var $accept_status_id;
|
||||
var $accept_status_name;
|
||||
var $alt_address_street_2;
|
||||
var $alt_address_street_3;
|
||||
var $opportunity_role_id;
|
||||
var $portal_password;
|
||||
var $primary_address_street_2;
|
||||
var $primary_address_street_3;
|
||||
var $campaign_id;
|
||||
var $sync_contact;
|
||||
|
||||
var $mailing_tag;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var $full_name; // l10n localized name
|
||||
var $invalid_email;
|
||||
var $table_name = "contacts";
|
||||
var $rel_account_table = "accounts_contacts";
|
||||
//This is needed for upgrade. This table definition moved to Opportunity module.
|
||||
var $rel_opportunity_table = "opportunities_contacts";
|
||||
|
||||
|
||||
|
||||
|
||||
var $object_name = "Contact";
|
||||
var $module_dir = 'Contacts';
|
||||
var $emailAddress;
|
||||
var $new_schema = true;
|
||||
var $importable = true;
|
||||
|
||||
// This is used to retrieve related fields from form posts.
|
||||
var $additional_column_fields = Array('bug_id', 'assigned_user_name', 'account_name', 'account_id', 'opportunity_id', 'case_id', 'task_id', 'note_id', 'meeting_id', 'call_id', 'email_id'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
var $relationship_fields = Array('account_id'=> 'accounts','bug_id' => 'bugs', 'call_id'=>'calls','case_id'=>'cases','email_id'=>'emails',
|
||||
'meeting_id'=>'meetings','note_id'=>'notes','task_id'=>'tasks', 'opportunity_id'=>'opportunities', 'contacts_users_id' => 'user_sync'
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Contact() {
|
||||
parent::Person();
|
||||
global $current_user;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function fill_in_relationship_fields(){
|
||||
if(!empty($this->relDepth)) {
|
||||
if($this->relDepth > 1)return;
|
||||
}else $this->relDepth = 0;
|
||||
|
||||
foreach($this->field_defs as $field){
|
||||
if(0 == strcmp($field['type'],'relate') && !empty($field['module'])){
|
||||
$name = $field['name'];
|
||||
|
||||
if(empty($this->$name)){
|
||||
|
||||
// set the value of this relate field in this bean ($this->$field['name']) to the value of the 'name' field in the related module for the record identified by the value of $this->$field['id_name']
|
||||
$related_module = $field['module'];
|
||||
$id_name = $field['id_name'];
|
||||
|
||||
// first, load the link field. This is not done automatically by the bean; usually bean subclasses load any needed link fields in fill_in_additional_fields()
|
||||
// here though we need it to be loaded as it contains the id of the related record
|
||||
if (empty($this->$id_name))
|
||||
$this->fill_in_link_field($id_name);
|
||||
|
||||
if(!empty($this->$id_name) && $this->$id_name != $this->id){
|
||||
if(isset($GLOBALS['beanList'][ $related_module])){
|
||||
$class = $GLOBALS['beanList'][$related_module];
|
||||
|
||||
if(!empty($this->$id_name) && file_exists($GLOBALS['beanFiles'][$class]) && isset($this->$name)){
|
||||
require_once($GLOBALS['beanFiles'][$class]);
|
||||
$mod = new $class();
|
||||
$mod->relDepth = $this->relDepth + 1;
|
||||
$mod->retrieve($this->$id_name);
|
||||
if (!empty($field['rname'])) {
|
||||
$this->$name = $mod->$field['rname'];
|
||||
} else
|
||||
if (isset($mod->name)) {
|
||||
$this->$name = $mod->name;
|
||||
}
|
||||
if(isset($field['additionalFields'])){
|
||||
foreach($field['additionalFields'] as $field=>$to){
|
||||
if(isset($mod->$field)){
|
||||
$this->$to = $mod->$field;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function add_list_count_joins(&$query, $where)
|
||||
{
|
||||
// accounts.name
|
||||
if(eregi("accounts.name", $where))
|
||||
{
|
||||
// add a join to the accounts table.
|
||||
$query .= "
|
||||
LEFT JOIN accounts_contacts
|
||||
ON contacts.id=accounts_contacts.contact_id
|
||||
LEFT JOIN accounts
|
||||
ON accounts_contacts.account_id=accounts.id
|
||||
";
|
||||
}
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function listviewACLHelper(){
|
||||
$array_assign = parent::listviewACLHelper();
|
||||
$is_owner = false;
|
||||
//MFH BUG 18281; JChi #15255
|
||||
$is_owner = !empty($this->assigned_user_id) && $this->assigned_user_id == $GLOBALS['current_user']->id;
|
||||
if(!ACLController::moduleSupportsACL('Accounts') || ACLController::checkAccess('Accounts', 'view', $is_owner)){
|
||||
$array_assign['ACCOUNT'] = 'a';
|
||||
}else{
|
||||
$array_assign['ACCOUNT'] = 'span';
|
||||
|
||||
}
|
||||
return $array_assign;
|
||||
}
|
||||
|
||||
function create_list_query($order_by, $where, $show_deleted = 0)
|
||||
{
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
// MFH - BUG #14208 creates alias name for select
|
||||
$query = "SELECT ";
|
||||
$query .= db_concat($this->table_name,array('first_name','last_name')) . " name, ";
|
||||
$query .= "
|
||||
$this->table_name.*,
|
||||
accounts.name as account_name,
|
||||
accounts.id as account_id,
|
||||
accounts.assigned_user_id account_id_owner,
|
||||
users.user_name as assigned_user_name ";
|
||||
|
||||
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= "
|
||||
FROM contacts ";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$query .= "LEFT JOIN users
|
||||
ON contacts.assigned_user_id=users.id
|
||||
LEFT JOIN accounts_contacts
|
||||
ON contacts.id=accounts_contacts.contact_id and accounts_contacts.deleted = 0
|
||||
LEFT JOIN accounts
|
||||
ON accounts_contacts.account_id=accounts.id AND accounts.deleted=0 ";
|
||||
|
||||
|
||||
|
||||
$query .= "LEFT JOIN email_addr_bean_rel eabl ON eabl.bean_id = contacts.id AND eabl.bean_module = 'Contacts' and eabl.primary_address = 1 and eabl.deleted=0 ";
|
||||
$query .= "LEFT JOIN email_addresses ea ON (ea.id = eabl.email_address_id) ";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$where_auto = '1=1';
|
||||
if($show_deleted == 0){
|
||||
$where_auto = " $this->table_name.deleted=0 ";
|
||||
//$where_auto .= " AND accounts.deleted=0 ";
|
||||
}else if($show_deleted == 1){
|
||||
$where_auto = " $this->table_name.deleted=1 ";
|
||||
}
|
||||
|
||||
|
||||
if($where != "")
|
||||
$query .= "where ($where) AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
if(!empty($order_by))
|
||||
$query .= " ORDER BY ". $this->process_order_by($order_by, null);
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function create_export_query(&$order_by, &$where)
|
||||
{
|
||||
$custom_join = $this->custom_fields->getJOIN(true, true);
|
||||
$query = "SELECT
|
||||
contacts.*,email_addresses.email_address email1,
|
||||
accounts.name as account_name,
|
||||
users.user_name as assigned_user_name ";
|
||||
|
||||
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM contacts ";
|
||||
|
||||
|
||||
|
||||
|
||||
$query .= "LEFT JOIN users
|
||||
ON contacts.assigned_user_id=users.id ";
|
||||
|
||||
|
||||
|
||||
$query .= "LEFT JOIN accounts_contacts
|
||||
ON ( contacts.id=accounts_contacts.contact_id and (accounts_contacts.deleted is null or accounts_contacts.deleted = 0))
|
||||
LEFT JOIN accounts
|
||||
ON accounts_contacts.account_id=accounts.id ";
|
||||
|
||||
//join email address table too.
|
||||
$query .= ' LEFT JOIN email_addr_bean_rel on contacts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module=\'Contacts\' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 ';
|
||||
$query .= ' LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id ' ;
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
|
||||
$where_auto = "( accounts.deleted IS NULL OR accounts.deleted=0 )
|
||||
AND contacts.deleted=0 ";
|
||||
|
||||
if($where != "")
|
||||
$query .= "where ($where) AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
if(!empty($order_by))
|
||||
$query .= " ORDER BY ". $this->process_order_by($order_by, null);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
function fill_in_additional_list_fields() {
|
||||
parent::fill_in_additional_list_fields();
|
||||
// cn: bug 8586 - l10n names for Contacts in Email TO: field
|
||||
$this->_create_proper_name_field();
|
||||
$this->email_and_name1 = "{$this->full_name} <".$this->email1.">";
|
||||
$this->email_and_name2 = "{$this->full_name} <".$this->email2.">";
|
||||
|
||||
if($this->force_load_details == true) {
|
||||
$this->fill_in_additional_detail_fields();
|
||||
}
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields() {
|
||||
parent::fill_in_additional_detail_fields();
|
||||
global $locale, $app_list_strings, $current_user;
|
||||
|
||||
|
||||
// retrieve the account information and the information about the person the contact reports to.
|
||||
$query = "SELECT acc.id, acc.name, con_reports_to.first_name, con_reports_to.last_name
|
||||
from contacts
|
||||
left join accounts_contacts a_c on a_c.contact_id = '".$this->id."' and a_c.deleted=0
|
||||
left join accounts acc on a_c.account_id = acc.id and acc.deleted=0
|
||||
left join contacts con_reports_to on con_reports_to.id = contacts.reports_to_id
|
||||
where contacts.id = '".$this->id."'";
|
||||
|
||||
$result = $this->db->query($query,true," Error filling in additional detail fields: ");
|
||||
|
||||
// Get the id and the name.
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
/*
|
||||
if($row != null)
|
||||
{
|
||||
$this->account_name = $row['name'];
|
||||
$this->account_id = $row['id'];
|
||||
$this->report_to_name = $row['first_name'].' '.$row['last_name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->account_name = '';
|
||||
$this->account_id = '';
|
||||
$this->report_to_name = '';
|
||||
} */
|
||||
$this->load_contacts_users_relationship();
|
||||
/** concating this here because newly created Contacts do not have a
|
||||
* 'name' attribute constructed to pass onto related items, such as Tasks
|
||||
* Notes, etc.
|
||||
*/
|
||||
$this->name = $locale->getLocaleFormattedName($this->first_name, $this->last_name);
|
||||
if(!empty($this->contacts_users_id)) {
|
||||
$this->sync_contact = true;
|
||||
}
|
||||
|
||||
if(!empty($this->portal_active) && $this->portal_active == 1) {
|
||||
$this->portal_active = true;
|
||||
}
|
||||
|
||||
// Set campaign name if there is a campaign id
|
||||
if( !empty($this->campaign_id)){
|
||||
require_once('modules/Campaigns/Campaign.php');
|
||||
$camp = new Campaign();
|
||||
$where = "campaigns.id='{$this->campaign_id}'";
|
||||
$campaign_list = $camp->get_full_list("campaigns.name", $where, true);
|
||||
$this->campaign_name = $campaign_list[0]->name;
|
||||
}
|
||||
|
||||
//asterisk phone extension
|
||||
if ($_REQUEST['action']=='DetailView') {
|
||||
require_once("include/ECM/EcmFormatPhoneNumber/EcmFormatPhoneNumber.php");
|
||||
$this->phone_work = EcmFormatPhoneNumber($this->phone_work, "Contact", "Contacts", $this->id);
|
||||
$this->phone_mobile = EcmFormatPhoneNumber($this->phone_mobile, "Contact", "Contacts", $this->id);
|
||||
$this->phone_home = EcmFormatPhoneNumber($this->phone_home, "Contact", "Contacts", $this->id);
|
||||
$this->phone_other = EcmFormatPhoneNumber($this->phone_other, "Contact", "Contacts", $this->id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
loads the contacts_users relationship to populate a checkbox
|
||||
where a user can select if they would like to sync a particular
|
||||
contact to Outlook
|
||||
*/
|
||||
function load_contacts_users_relationship(){
|
||||
/*global $current_user;
|
||||
|
||||
$this->load_relationship("user_sync");
|
||||
$query_array=$this->user_sync->getQuery(true);
|
||||
|
||||
$query_array['where'] .= " AND users.id = '$current_user->id'";
|
||||
|
||||
$query='';
|
||||
foreach ($query_array as $qstring) {
|
||||
$query.=' '.$qstring;
|
||||
}
|
||||
|
||||
$list = $this->build_related_list($query, new User());
|
||||
if(!empty($list)){
|
||||
//this should only return one possible value so set it
|
||||
$this->contacts_users_id = $list[0]->id;
|
||||
}*/
|
||||
}
|
||||
|
||||
function get_list_view_data() {
|
||||
global $system_config;
|
||||
global $current_user;
|
||||
|
||||
$this->_create_proper_name_field();
|
||||
$temp_array = $this->get_list_view_array();
|
||||
$temp_array['NAME'] = $this->name;
|
||||
$temp_array['ENCODED_NAME'] = $this->name;
|
||||
|
||||
/*
|
||||
if(isset($system_config->settings['system_skypeout_on'])
|
||||
&& $system_config->settings['system_skypeout_on'] == 1)
|
||||
{
|
||||
if(!empty($temp_array['PHONE_WORK'])
|
||||
&& skype_formatted($temp_array['PHONE_WORK']))
|
||||
{
|
||||
$temp_array['PHONE_WORK'] = '<a href="callto://'
|
||||
. $temp_array['PHONE_WORK']. '">'
|
||||
. $temp_array['PHONE_WORK']. '</a>' ;
|
||||
}
|
||||
}
|
||||
*/
|
||||
require_once("include/ECM/EcmFormatPhoneNumber/EcmFormatPhoneNumber.php");
|
||||
$temp_array['PHONE_WORK'] = EcmFormatPhoneNumber($temp_array['PHONE_WORK'], "Contact", "Contacts", $this->id);
|
||||
$temp_array['PHONE_MOBILE'] = EcmFormatPhoneNumber($temp_array['PHONE_MOBILE'], "Contact", "Contacts", $this->id);
|
||||
$temp_array['PHONE_HOME'] = EcmFormatPhoneNumber($temp_array['PHONE_HOME'], "Contact", "Contacts", $this->id);
|
||||
$temp_array['PHONE_OTHER'] = EcmFormatPhoneNumber($temp_array['PHONE_OTHER'], "Contact", "Contacts", $this->id);
|
||||
|
||||
$temp_array['EMAIL1'] = $this->emailAddress->getPrimaryAddress($this);
|
||||
$this->email1 = $temp_array['EMAIL1'];
|
||||
$temp_array['EMAIL1_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView');
|
||||
$temp_array['EMAIL_AND_NAME1'] = "{$this->full_name} <".$temp_array['EMAIL1'].">";
|
||||
|
||||
include_once("modules/Accounts/Account.php");
|
||||
$addrs=Account::get_email_addresses($this->id,'Contacts');
|
||||
|
||||
$temp_array["EMAIL"] = $r['addr'];
|
||||
$temp_array["ADDRS"] = @implode("||",$addrs);
|
||||
$temp_array["CNT_DATA"] = $cnt;
|
||||
$temp_array["ACC_DATA"] = $acc;
|
||||
|
||||
return $temp_array;
|
||||
}
|
||||
|
||||
/**
|
||||
builds a generic search based on the query string using or
|
||||
do not include any $this-> because this is called on without having the class instantiated
|
||||
*/
|
||||
function build_generic_where_clause ($the_query_string)
|
||||
{
|
||||
$where_clauses = Array();
|
||||
$the_query_string = $this->db->quote($the_query_string);
|
||||
|
||||
array_push($where_clauses, "contacts.last_name like '$the_query_string%'");
|
||||
array_push($where_clauses, "contacts.first_name like '$the_query_string%'");
|
||||
array_push($where_clauses, "accounts.name like '$the_query_string%'");
|
||||
array_push($where_clauses, "contacts.assistant like '$the_query_string%'");
|
||||
array_push($where_clauses, "ea.email_address like '$the_query_string%'");
|
||||
|
||||
if (is_numeric($the_query_string))
|
||||
{
|
||||
array_push($where_clauses, "contacts.phone_home like '%$the_query_string%'");
|
||||
array_push($where_clauses, "contacts.phone_mobile like '%$the_query_string%'");
|
||||
array_push($where_clauses, "contacts.phone_work like '%$the_query_string%'");
|
||||
array_push($where_clauses, "contacts.phone_other like '%$the_query_string%'");
|
||||
array_push($where_clauses, "contacts.phone_fax like '%$the_query_string%'");
|
||||
array_push($where_clauses, "contacts.assistant_phone like '%$the_query_string%'");
|
||||
}
|
||||
|
||||
$the_where = "";
|
||||
foreach($where_clauses as $clause)
|
||||
{
|
||||
if($the_where != "") $the_where .= " or ";
|
||||
$the_where .= $clause;
|
||||
}
|
||||
|
||||
|
||||
return $the_where;
|
||||
}
|
||||
|
||||
function set_notification_body($xtpl, $contact)
|
||||
{
|
||||
$xtpl->assign("CONTACT_NAME", trim($contact->first_name . " " . $contact->last_name));
|
||||
$xtpl->assign("CONTACT_DESCRIPTION", $contact->description);
|
||||
|
||||
return $xtpl;
|
||||
}
|
||||
|
||||
function get_contact_id_by_email($email)
|
||||
{
|
||||
$email = trim($email);
|
||||
if(empty($email)){
|
||||
//email is empty, no need to query, return null
|
||||
return null;
|
||||
}
|
||||
|
||||
$where_clause = "(email1='$email' OR email2='$email') AND deleted=0";
|
||||
|
||||
$query = "SELECT * FROM $this->table_name WHERE $where_clause";
|
||||
$GLOBALS['log']->debug("Retrieve $this->object_name: ".$query);
|
||||
//requireSingleResult has beeen deprecated.
|
||||
//$result = $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:");
|
||||
$result = $this->db->limitQuery($query,0,1,true, "Retrieving record $where_clause:");
|
||||
|
||||
if( empty($result))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$row = $this->db->fetchByAssoc($result, -1, true);
|
||||
return $row['id'];
|
||||
|
||||
}
|
||||
|
||||
function save_relationship_changes($is_update) {
|
||||
|
||||
//if account_id was replaced unlink the previous account_id.
|
||||
//this rel_fields_before_value is populated by sugarbean during the retrieve call.
|
||||
if (!empty($this->account_id) and !empty($this->rel_fields_before_value['account_id']) and
|
||||
(trim($this->account_id) != trim($this->rel_fields_before_value['account_id']))) {
|
||||
//unlink the old record.
|
||||
$this->load_relationship('accounts');
|
||||
$this->accounts->delete($this->id,$this->rel_fields_before_value['account_id']);
|
||||
}
|
||||
parent::save_relationship_changes($is_update);
|
||||
}
|
||||
|
||||
function bean_implements($interface){
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function get_unlinked_email_query($type=array()) {
|
||||
require_once('include/utils.php');
|
||||
return get_unlinked_email_query($type, $this);
|
||||
}
|
||||
|
||||
/**
|
||||
* used by import to add a list of users
|
||||
*
|
||||
* Parameter can be one of the following:
|
||||
* - string 'all': add this contact for all users
|
||||
* - comma deliminated lists of teams and/or users
|
||||
*
|
||||
* @param string $list_of_user
|
||||
*/
|
||||
|
||||
function process_sync_to_outlook(
|
||||
$list_of_users
|
||||
)
|
||||
{
|
||||
static $focus_user;
|
||||
|
||||
// cache this object since we'll be reusing it a bunch
|
||||
if ( !($focus_user instanceof User) ) {
|
||||
require_once('modules/Users/User.php');
|
||||
$focus_user = new User();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ( empty($list_of_users) ) {
|
||||
return;
|
||||
}
|
||||
if ( !isset($this->users) ) {
|
||||
$this->load_relationship('user_sync');
|
||||
}
|
||||
|
||||
if ( strtolower($list_of_users) == 'all' ) {
|
||||
// add all non-deleted users
|
||||
$sql = "SELECT id FROM users WHERE deleted=0 AND is_group=0 AND portal_only=0";
|
||||
$result=$this->db->query($sql);
|
||||
while ( $hash = $this->db->fetchByAssoc($result) ) {
|
||||
$this->user_sync->add($hash['id']);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$theList = explode(",",$list_of_users);
|
||||
foreach ($theList as $eachItem) {
|
||||
if ( $focus_user->retrieve_user_id($eachItem)
|
||||
|| $focus_user->retrieve($eachItem)) {
|
||||
// it is a user, add user
|
||||
$this->user_sync->add($this->id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showPositions55(){
|
||||
$arr=$this->getPositionList55(true);
|
||||
|
||||
global $mod_strings;
|
||||
if(count($arr)>0){
|
||||
$table='
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="list view" width="40%">
|
||||
<tr class="oddListRowS1">
|
||||
<th><b>Nazwa grupy</b></td>
|
||||
<th><b>Aktywna</b></td>
|
||||
</tr>
|
||||
';
|
||||
$i == 0;
|
||||
foreach($arr as $a){
|
||||
$i++;
|
||||
|
||||
|
||||
$table.='
|
||||
<tr class="oddListRowS1">
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;"><a href="index.php?module=EcmMailingCategories&action=DetailView&record='.$a['cat_id'].'">'.$a['product_group'].'</a></td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.($a['discount']==1 ? 'Tak' : "Nie").'</td>
|
||||
|
||||
';
|
||||
}
|
||||
$table.='</table>';
|
||||
}
|
||||
|
||||
return $table;
|
||||
}
|
||||
|
||||
function getPositionList55($array = false) {
|
||||
if(isset($this->id) && $this->id != '') {
|
||||
$query = "SELECT * FROM ecmmailingcategories_relation WHERE parent_id='".$this->id."' AND deleted='0' AND parent_type='Contact'";
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
if($r) {
|
||||
|
||||
while($w = $this->db->fetchByAssoc($r)) {
|
||||
//get category name && assigned_file
|
||||
$n = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT name FROM ecmmailingcategories WHERE id='".$w['ecmmailingcategoriy_id']."'"));
|
||||
$w['product_group'] = $n['name'];
|
||||
$w['cat_id'] =$w['ecmmailingcategoriy_id'];
|
||||
$w['discount'] =$w['available'];
|
||||
$return_array [] = $w;
|
||||
|
||||
}
|
||||
$json = getJSONobj();
|
||||
|
||||
return $array ? $return_array : $json->encode($return_array);
|
||||
}
|
||||
}
|
||||
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
|
||||
//end managing addresses
|
||||
function savePositions55($pl) {
|
||||
|
||||
global $current_user;
|
||||
|
||||
$exists = array();
|
||||
foreach ($pl as $p) {
|
||||
|
||||
if (!isset($p['product_group']) || $p['product_group']=='') continue;
|
||||
|
||||
|
||||
if (isset($p['id']) && $p['id']!='') {
|
||||
|
||||
//update exists
|
||||
$q = "
|
||||
UPDATE ecmmailingcategories_relation set
|
||||
parent_id = '".addslashes($this->id)."',
|
||||
ecmmailingcategoriy_id= '".addslashes($p['cat_id'])."',
|
||||
available = '".addslashes($p['discount'])."',
|
||||
parent_type = 'Contact',
|
||||
parent_name = '".addslashes($p['product_group'])."'
|
||||
WHERE id = '".$p['id']."'
|
||||
";
|
||||
|
||||
//$GLOBALS['db']->query("INSERT INTO log VALUES ('".addslashes($q)."')");
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $p['id'];
|
||||
|
||||
} else {
|
||||
//insert new record
|
||||
$id = create_guid();
|
||||
$t = array(
|
||||
$id,
|
||||
addslashes($p['cat_id']),
|
||||
'0',
|
||||
addslashes($p['discount']),
|
||||
$this->id,
|
||||
addslashes($p['product_group']),
|
||||
'Contact'
|
||||
|
||||
);
|
||||
$q = "INSERT INTO ecmmailingcategories_relation VALUES ('".implode("','", $t)."')";
|
||||
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//delete old
|
||||
$GLOBALS['db']->query("UPDATE ecmmailingcategories_relation SET deleted='1' WHERE parent_id='".$this->id."' AND id NOT IN ('".implode("','",$exists)."')");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
823
modules/Contacts/ContactFormBase.php
Executable file
823
modules/Contacts/ContactFormBase.php
Executable file
@@ -0,0 +1,823 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Base form for contact
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
class ContactFormBase {
|
||||
|
||||
function checkForDuplicates($prefix){
|
||||
global $local_log;
|
||||
require_once('include/formbase.php');
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
$focus = new Contact();
|
||||
$query = '';
|
||||
$baseQuery = 'SELECT id, first_name, last_name, title FROM contacts where deleted = 0 AND ';
|
||||
if(!empty($_POST[$prefix.'first_name']) && !empty($_POST[$prefix.'last_name'])){
|
||||
$query = $baseQuery ." first_name LIKE '". $_POST[$prefix.'first_name'] . "%' AND last_name = '". $_POST[$prefix.'last_name'] ."'";
|
||||
}else{
|
||||
$query = $baseQuery ." last_name = '". $_POST[$prefix.'last_name'] ."'";
|
||||
}
|
||||
|
||||
$rows = array();
|
||||
global $db;
|
||||
$result = $db->query($query);
|
||||
while (($row = $db->fetchByAssoc($result)) != null) {
|
||||
if(!isset($rows[$row['id']])) {
|
||||
$rows[]=$row;
|
||||
}
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
$emails = array();
|
||||
$emailStr = '';
|
||||
while(isset($_POST['emailAddress' . $count])) {
|
||||
$emailStr .= ",'" . strtoupper(trim($_POST['emailAddress' . $count++])) . "'";
|
||||
} //while
|
||||
|
||||
if($count > 0) {
|
||||
$emailStr = substr($emailStr, 1);
|
||||
$query = 'SELECT DISTINCT er.bean_id AS id FROM email_addr_bean_rel er, ' .
|
||||
'email_addresses ea WHERE ea.id = er.email_address_id ' .
|
||||
'AND ea.deleted = 0 AND er.deleted = 0 AND er.bean_module = \'Contacts\' ' .
|
||||
'AND email_address_caps IN (' . $emailStr . ')';
|
||||
$result = $db->query($query);
|
||||
while (($row= $db->fetchByAssoc($result)) != null) {
|
||||
if(!isset($rows[$row['id']])) {
|
||||
$query2 = "SELECT id, first_name, last_name, title FROM contacts WHERE deleted = 0 AND id = '" . $row['id'] . "'";
|
||||
$result2 = $db->query($query2);
|
||||
$r = $db->fetchByAssoc($result2);
|
||||
if(isset($r['id'])) {
|
||||
$rows[]=$r;
|
||||
}
|
||||
} //if
|
||||
}
|
||||
} //if
|
||||
|
||||
return !empty($rows) ? $rows : null;
|
||||
}
|
||||
|
||||
function buildTableForm($rows, $mod=''){
|
||||
global $odd_bg, $even_bg, $action;
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}else global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$cols = sizeof($rows[0]) * 2 + 1;
|
||||
if ($action != 'ShowDuplicates')
|
||||
{
|
||||
$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>';
|
||||
$form .= "<form action='index.php' method='post' name='dupContacts'>
|
||||
<input type='hidden' name='selectedContact' value=''>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_SHOW_DUPLICATES']. '</td></tr><tr><td height="20"></td></tr></table>';
|
||||
}
|
||||
$form .= get_form_header($mod_strings['LBL_DUPLICATE'],"", '');
|
||||
$form .= "<table width='100%' cellpadding='0' cellspacing='0'> <tr class='listViewThS1'> ";
|
||||
if ($action != 'ShowDuplicates')
|
||||
{
|
||||
$form .= "<td class='listViewThS1'> </td>";
|
||||
}
|
||||
|
||||
require_once('include/formbase.php');
|
||||
|
||||
if(isset($_POST['return_action']) && $_POST['return_action'] == 'SubPanelViewer') {
|
||||
$_POST['return_action'] = 'DetailView';
|
||||
}
|
||||
|
||||
if(isset($_POST['return_action']) && $_POST['return_action'] == 'DetailView' && empty($_REQUEST['return_id'])) {
|
||||
unset($_POST['return_action']);
|
||||
}
|
||||
|
||||
$form .= getPostToForm('/emailAddress(PrimaryFlag|OptOutFlag|InvalidFlag)?[0-9]*?$/', true);
|
||||
|
||||
if(isset($rows[0])){
|
||||
foreach ($rows[0] as $key=>$value){
|
||||
if($key != 'id'){
|
||||
$form .= "<td scope='col' class='listViewThS1'>". $mod_strings[$mod_strings['db_'.$key]]. "</td>";
|
||||
}
|
||||
}
|
||||
$form .= "</tr>";
|
||||
}
|
||||
$bgcolor = $odd_bg;
|
||||
$rowColor = 'oddListRowS1';
|
||||
foreach($rows as $row){
|
||||
|
||||
$form .= "<tr class='$rowColor' bgcolor='$bgcolor'>";
|
||||
if ($action != 'ShowDuplicates')
|
||||
{
|
||||
$form .= "<td width='1%' bgcolor='$bgcolor' nowrap ><a href='#' onClick=\"document.dupContacts.selectedContact.value='${row['id']}';document.dupContacts.submit() \">[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>\n";
|
||||
}
|
||||
$wasSet = false;
|
||||
|
||||
foreach ($row as $key=>$value){
|
||||
if($key != 'id'){
|
||||
if(isset($_POST['popup']) && $_POST['popup']==true){
|
||||
$form .= "<td scope='row' class='$rowColor' bgcolor='$bgcolor'><a href='#' onclick=\"window.opener.location='index.php?module=Contacts&action=DetailView&record=${row['id']}'\">$value</a></td>\n";
|
||||
}
|
||||
else if(!$wasSet){
|
||||
$form .= "<td scope='row' class='$rowColor' bgcolor='$bgcolor'><a target='_blank' href='index.php?module=Contacts&action=DetailView&record=${row['id']}'>$value</a></td>\n";
|
||||
$wasSet = true;
|
||||
}else{
|
||||
$form .= "<td class='$rowColor' bgcolor='$bgcolor'><a target='_blank' href='index.php?module=Contacts&action=DetailView&record=${row['id']}'>$value</a></td>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($rowColor == 'evenListRowS1'){
|
||||
$rowColor = 'oddListRowS1';
|
||||
$bgcolor = $odd_bg;
|
||||
}else{
|
||||
$rowColor = 'evenListRowS1';
|
||||
$bgcolor = $even_bg;
|
||||
}
|
||||
$form .= "</tr>";
|
||||
}
|
||||
$form .= "<tr class='listViewThS1'><td colspan='$cols' class='blackline'></td></tr>";
|
||||
if ($action == 'ShowDuplicates')
|
||||
{
|
||||
$form .= "</table><br> <input title='${app_strings['LBL_SAVE_BUTTON_TITLE']}' accessKey='${app_strings['LBL_SAVE_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value=' ${app_strings['LBL_SAVE_BUTTON_LABEL']} '> ";
|
||||
if (!empty($_POST['return_module']) && !empty($_POST['return_action']) && !empty($_POST['return_id']))
|
||||
$form .= "<input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='${app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"location.href='index.php?module=".$_POST['return_module']."&action=". $_POST['return_action']."&record=".$_REQUEST['return_id']."'\" type='button' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
|
||||
else if (!empty($_POST['return_module']) && !empty($_POST['return_action']))
|
||||
$form .= "<input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='${app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"location.href='index.php?module=".$_POST['return_module']."&action=". $_POST['return_action']."'\" type='button' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
|
||||
else
|
||||
$form .= "<input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='${app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"location.href='index.php?module=Contacts&action=ListView'\" type='button' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$form .= "</table><br><input type='submit' class='button' name='ContinueContact' value='${mod_strings['LNK_NEW_CONTACT']}'></form>";
|
||||
}
|
||||
return $form;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
function getWideFormBody($prefix, $mod='',$formname='', $contact = '', $portal = true){
|
||||
|
||||
if(!ACLController::checkAccess('Contacts', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
if(empty($contact)){
|
||||
$contact = new Contact();
|
||||
}
|
||||
|
||||
global $mod_strings;
|
||||
$temp_strings = $mod_strings;
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}
|
||||
global $app_strings;
|
||||
global $current_user;
|
||||
global $app_list_strings;
|
||||
$primary_address_country_options = get_select_options_with_id($app_list_strings['countries_dom'], $contact->primary_address_country);
|
||||
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
|
||||
$lbl_first_name = $mod_strings['LBL_FIRST_NAME'];
|
||||
$lbl_last_name = $mod_strings['LBL_LAST_NAME'];
|
||||
$lbl_phone = $mod_strings['LBL_OFFICE_PHONE'];
|
||||
$lbl_address = $mod_strings['LBL_PRIMARY_ADDRESS'];
|
||||
|
||||
if (isset($contact->assigned_user_id)) {
|
||||
$user_id=$contact->assigned_user_id;
|
||||
} else {
|
||||
$user_id = $current_user->id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Retrieve Email address and set email1, email2
|
||||
$sugarEmailAddress = new SugarEmailAddress();
|
||||
$sugarEmailAddress->handleLegacyRetrieve($contact);
|
||||
if(!isset($contact->email1)){
|
||||
$contact->email1 = '';
|
||||
}
|
||||
if(!isset($contact->email2)){
|
||||
$contact->email2 = '';
|
||||
}
|
||||
if(!isset($contact->email_opt_out)){
|
||||
$contact->email_opt_out = '';
|
||||
}
|
||||
$lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
|
||||
$salutation_options=get_select_options_with_id($app_list_strings['salutation_dom'], $contact->salutation);
|
||||
if (isset($contact->lead_source)) {
|
||||
$lead_source_options=get_select_options_with_id($app_list_strings['lead_source_dom'], $contact->lead_source);
|
||||
} else {
|
||||
$lead_source_options=get_select_options_with_id($app_list_strings['lead_source_dom'], '');
|
||||
}
|
||||
|
||||
$form="";
|
||||
|
||||
|
||||
|
||||
if ($formname == 'ConvertProspect') {
|
||||
$lead_source_label = "<td class='dataLabel'> </td>";
|
||||
$lead_source_field = "<td class='dataField'> </td>";
|
||||
} else {
|
||||
$lead_source_label = "<td class='dataLabel' nowrap>${mod_strings['LBL_LEAD_SOURCE']}</td>";
|
||||
$lead_source_field = "<td class='dataField'><select name='${prefix}lead_source'>$lead_source_options</select></td>";
|
||||
}
|
||||
|
||||
$form .= <<<EOQ
|
||||
<input type="hidden" name="${prefix}record" value="">
|
||||
<input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
|
||||
<table border='0' celpadding="0" cellspacing="0" width='100%'>
|
||||
<tr>
|
||||
<td nowrap class='dataLabel'>$lbl_first_name</td>
|
||||
<td class='dataLabel'>$lbl_last_name <span class="required">$lbl_required_symbol</span></td>
|
||||
<td class='dataLabel' nowrap>${mod_strings['LBL_TITLE']}</td>
|
||||
<td class='dataLabel' nowrap>${mod_strings['LBL_DEPARTMENT']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='dataField'><select name='${prefix}salutation'>$salutation_options</select> <input name="${prefix}first_name" type="text" value="{$contact->first_name}"></td>
|
||||
<td class='dataField'><input name='${prefix}last_name' type="text" value="{$contact->last_name}"></td>
|
||||
<td class='dataField' nowrap><input name='${prefix}title' type="text" value="{$contact->title}"></td>
|
||||
<td class='dataField' nowrap><input name='${prefix}department' type="text" value="{$contact->department}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap colspan='4' class='dataLabel'>$lbl_address</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td nowrap colspan='4' class='dataField'><textarea cols='80' rows='2' name='${prefix}primary_address_street'>{$contact->primary_address_street}</textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataLabel'>${mod_strings['LBL_CITY']}</td>
|
||||
<td class='dataLabel'>${mod_strings['LBL_STATE']}</td>
|
||||
<td class='dataLabel'>${mod_strings['LBL_POSTAL_CODE']}</td>
|
||||
<td class='dataLabel'>${mod_strings['LBL_COUNTRY']}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataField'><input name='${prefix}primary_address_city' maxlength='100' value='{$contact->primary_address_city}'></td>
|
||||
<td class='dataField'><input name='${prefix}primary_address_state' maxlength='100' value='{$contact->primary_address_state}'></td>
|
||||
<td class='dataField'><input name='${prefix}primary_address_postalcode' maxlength='100' value='{$contact->primary_address_postalcode}'></td>
|
||||
<td class='dataField'><select name='${prefix}primary_address_country' size='1' selected='{$contact->primary_address_country}'>{$primary_address_country_options}</select></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td nowrap class='dataLabel'>$lbl_phone</td>
|
||||
<td nowrap class='dataLabel'>${mod_strings['LBL_MOBILE_PHONE']}</td>
|
||||
<td nowrap class='dataLabel'>${mod_strings['LBL_FAX_PHONE']}</td>
|
||||
<td nowrap class='dataLabel'>${mod_strings['LBL_HOME_PHONE']}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td nowrap class='dataField'><input name='${prefix}phone_work' type="text" value="{$contact->phone_work}"></td>
|
||||
<td nowrap class='dataField'><input name='${prefix}phone_mobile' type="text" value="{$contact->phone_mobile}"></td>
|
||||
<td nowrap class='dataField'><input name='${prefix}phone_fax' type="text" value="{$contact->phone_fax}"></td>
|
||||
<td nowrap class='dataField'><input name='${prefix}phone_home' type="text" value="{$contact->phone_home}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataLabel' nowrap>${mod_strings['LBL_OTHER_PHONE']}</td>
|
||||
$lead_source_label
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataField' nowrap><input name='${prefix}phone_other' type="text" value="{$contact->phone_other}"></td>
|
||||
$lead_source_field
|
||||
</tr>
|
||||
EOQ;
|
||||
|
||||
$form .= $sugarEmailAddress->getEmailAddressWidgetEditView($contact->id, $_REQUEST['action']=='ConvertLead'?'Leads':'Contacts', false, 'include/SugarEmailAddress/templates/forWideFormBodyView.tpl');
|
||||
|
||||
|
||||
$form .= <<<EOQ
|
||||
<tr>
|
||||
<td nowrap colspan='4' class='dataLabel'>${mod_strings['LBL_DESCRIPTION']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap colspan='4' class='dataField'><textarea cols='80' rows='4' name='${prefix}description' >{$contact->description}</textarea></td>
|
||||
</tr>
|
||||
EOQ;
|
||||
|
||||
|
||||
|
||||
//carry forward custom lead fields common to contacts during Lead Conversion
|
||||
$tempContact = new Contact();
|
||||
|
||||
if (method_exists($contact, 'convertCustomFieldsForm')) $contact->convertCustomFieldsForm($form, $tempContact, $prefix);
|
||||
unset($tempContact);
|
||||
|
||||
$form .= <<<EOQ
|
||||
</table>
|
||||
<input type='hidden' name='${prefix}alt_address_street' value='{$contact->alt_address_street}'>
|
||||
<input type='hidden' name='${prefix}alt_address_city' value='{$contact->alt_address_city}'><input type='hidden' name='${prefix}alt_address_state' value='{$contact->alt_address_state}'><input type='hidden' name='${prefix}alt_address_postalcode' value='{$contact->alt_address_postalcode}'><input type='hidden' name='${prefix}alt_address_country' value='{$contact->alt_address_country}'>
|
||||
<input type='hidden' name='${prefix}do_not_call' value='{$contact->do_not_call}'>
|
||||
<input type='hidden' name='${prefix}email_opt_out' value='{$contact->email_opt_out}'>
|
||||
EOQ;
|
||||
|
||||
if ($portal == true){
|
||||
if (isset($contact->portal_name)) {
|
||||
$form.="<input type='hidden' name='${prefix}portal_name' value='{$contact->portal_name}'>";
|
||||
} else {
|
||||
$form.="<input type='hidden' name='${prefix}portal_name' value=''>";
|
||||
}
|
||||
if (isset($contact->portal_app)) {
|
||||
$form.="<input type='hidden' name='${prefix}portal_app' value='{$contact->portal_app}'>";
|
||||
} else {
|
||||
$form.="<input type='hidden' name='${prefix}portal_app' value=''>";
|
||||
}
|
||||
|
||||
|
||||
if(!empty($contact->portal_name) && !empty($contact->portal_app)){
|
||||
$form .= "<input name='${prefix}portal_active' type='hidden' size='25' value='1' >";
|
||||
}
|
||||
|
||||
if(isset($contact->portal_password)){
|
||||
$form.="<input type='password' name='${prefix}portal_password1' value='{$contact->portal_password}'>";
|
||||
$form.="<input type='password' name='${prefix}portal_password' value='{$contact->portal_password}'>";
|
||||
$form .= "<input name='${prefix}old_portal_password' type='hidden' size='25' value='{$contact->portal_password}' >";
|
||||
}else{
|
||||
$form.="<input type='password' name='${prefix}portal_password1' value=''>";
|
||||
$form.="<input type='password' name='${prefix}portal_password' value=''>";
|
||||
$form .= "<input name='${prefix}old_portal_password' type='hidden' size='25' value='' >";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
require_once('include/javascript/javascript.php');
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new Contact());
|
||||
$javascript->addField('email1','false',$prefix);
|
||||
$javascript->addField('email2','false',$prefix);
|
||||
$javascript->addRequiredFields($prefix);
|
||||
|
||||
$form .=$javascript->getScript();
|
||||
$mod_strings = $temp_strings;
|
||||
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
function getFormBody($prefix, $mod='', $formname=''){
|
||||
if(!ACLController::checkAccess('Contacts', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
global $mod_strings;
|
||||
$temp_strings = $mod_strings;
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}
|
||||
global $app_strings;
|
||||
global $current_user;
|
||||
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
|
||||
$lbl_first_name = $mod_strings['LBL_FIRST_NAME'];
|
||||
$lbl_last_name = $mod_strings['LBL_LAST_NAME'];
|
||||
$lbl_phone = $mod_strings['LBL_PHONE'];
|
||||
$user_id = $current_user->id;
|
||||
$lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
|
||||
if ($formname == 'EmailEditView')
|
||||
{
|
||||
$form = <<<EOQ
|
||||
<input type="hidden" name="${prefix}record" value="">
|
||||
<input type="hidden" name="${prefix}email2" value="">
|
||||
<input type="hidden" name="${prefix}phone_work" value="">
|
||||
<input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
|
||||
$lbl_first_name<br>
|
||||
<input name="${prefix}first_name" type="text" value="" size=10><br>
|
||||
$lbl_last_name <span class="required">$lbl_required_symbol</span><br>
|
||||
<input name='${prefix}last_name' type="text" value="" size=10><br>
|
||||
$lbl_email_address <span class="required">$lbl_required_symbol</span><br>
|
||||
<input name='${prefix}email1' type="text" value=""><br><br>
|
||||
|
||||
EOQ;
|
||||
}
|
||||
else
|
||||
{
|
||||
$form = <<<EOQ
|
||||
<input type="hidden" name="${prefix}record" value="">
|
||||
<input type="hidden" name="${prefix}email2" value="">
|
||||
<input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
|
||||
$lbl_first_name<br>
|
||||
<input name="${prefix}first_name" type="text" value=""><br>
|
||||
$lbl_last_name <span class="required">$lbl_required_symbol</span><br>
|
||||
<input name='${prefix}last_name' type="text" value=""><br>
|
||||
$lbl_phone<br>
|
||||
<input name='${prefix}phone_work' type="text" value=""><br>
|
||||
$lbl_email_address<br>
|
||||
<input name='${prefix}email1' type="text" value=""><br><br>
|
||||
|
||||
EOQ;
|
||||
}
|
||||
require_once('include/javascript/javascript.php');
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new Contact());
|
||||
$javascript->addField('email1','false',$prefix);
|
||||
$javascript->addRequiredFields($prefix);
|
||||
|
||||
$form .=$javascript->getScript();
|
||||
$mod_strings = $temp_strings;
|
||||
return $form;
|
||||
|
||||
}
|
||||
function getForm($prefix, $mod=''){
|
||||
if(!ACLController::checkAccess('Contacts', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}else global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
|
||||
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
|
||||
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
|
||||
|
||||
|
||||
$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
|
||||
$the_form .= <<<EOQ
|
||||
|
||||
<form name="${prefix}ContactSave" onSubmit="return check_form('${prefix}ContactSave')" method="POST" action="index.php">
|
||||
<input type="hidden" name="${prefix}module" value="Contacts">
|
||||
<input type="hidden" name="${prefix}action" value="Save">
|
||||
EOQ;
|
||||
$the_form .= $this->getFormBody($prefix,'Contacts', "${prefix}ContactSave");
|
||||
$the_form .= <<<EOQ
|
||||
<input title="$lbl_save_button_title" accessKey="$lbl_save_button_key" class="button" type="submit" name="${prefix}button" value=" $lbl_save_button_label " >
|
||||
</form>
|
||||
|
||||
EOQ;
|
||||
$the_form .= get_left_form_footer();
|
||||
$the_form .= get_validate_record_js();
|
||||
|
||||
return $the_form;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function handleSave($prefix, $redirect=true, $useRequired=false){
|
||||
global $theme, $current_user;
|
||||
$theme_path="themes/".$theme."/";
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
|
||||
require_once ('include/utils.php');
|
||||
require_once('include/formbase.php');
|
||||
require_once('XTemplate/xtpl.php');
|
||||
global $timedate;
|
||||
|
||||
$focus = new Contact();
|
||||
|
||||
if($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))){
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!empty($_POST[$prefix.'new_reports_to_id'])) {
|
||||
$focus->retrieve($_POST[$prefix.'new_reports_to_id']);
|
||||
$focus->reports_to_id = $_POST[$prefix.'record'];
|
||||
} else {
|
||||
$focus = populateFromPost($prefix, $focus);
|
||||
|
||||
if(isset($focus->portal_password) && $focus->portal_password != $_POST[$prefix.'old_portal_password']){
|
||||
$focus->portal_password = md5($focus->portal_password);
|
||||
}
|
||||
if (!isset($_POST[$prefix.'email_opt_out'])) $focus->email_opt_out = 0;
|
||||
if (!isset($_POST[$prefix.'do_not_call'])) $focus->do_not_call = 0;
|
||||
|
||||
}
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
if($_REQUEST['action'] != 'BusinessCard' && $_REQUEST['action'] != 'ConvertLead' && $_REQUEST['action'] != 'ConvertProspect')
|
||||
{
|
||||
if ($_POST[$prefix.'sync_contact']){
|
||||
$focus->contacts_users_id = $current_user->id;
|
||||
}
|
||||
else{
|
||||
if (!isset($focus->users))
|
||||
{
|
||||
$focus->load_relationship('user_sync');
|
||||
}
|
||||
$focus->contacts_users_id = null;
|
||||
//$focus->user_sync->delete($focus->id, $current_user->id);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($GLOBALS['check_notify'])) {
|
||||
$check_notify = $GLOBALS['check_notify'];
|
||||
}
|
||||
else {
|
||||
$check_notify = FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (empty($_POST['record']) && empty($_POST['dup_checked'])) {
|
||||
|
||||
$duplicateContacts = $this->checkForDuplicates($prefix);
|
||||
if(isset($duplicateContacts)){
|
||||
$location='module=Contacts&action=ShowDuplicates';
|
||||
$get = '';
|
||||
if(isset($_POST['inbound_email_id']) && !empty($_POST['inbound_email_id'])) {
|
||||
$get .= '&inbound_email_id='.$_POST['inbound_email_id'];
|
||||
}
|
||||
|
||||
//add all of the post fields to redirect get string
|
||||
foreach ($focus->column_fields as $field)
|
||||
{
|
||||
if (!empty($focus->$field))
|
||||
{
|
||||
$get .= "&Contacts$field=".urlencode($focus->$field);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($focus->additional_column_fields as $field)
|
||||
{
|
||||
if (!empty($focus->$field))
|
||||
{
|
||||
$get .= "&Contacts$field=".urlencode($focus->$field);
|
||||
}
|
||||
}
|
||||
|
||||
if($focus->hasCustomFields()) {
|
||||
foreach($focus->field_defs as $name=>$field) {
|
||||
if (!empty($field['source']) && $field['source'] == 'custom_fields')
|
||||
{
|
||||
$get .= "&Contacts$name=".urlencode($focus->$name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require_once('include/SugarEmailAddress/SugarEmailAddress.php');
|
||||
$emailAddress = new SugarEmailAddress();
|
||||
$get .= $emailAddress->getFormBaseURL($focus);
|
||||
|
||||
//create list of suspected duplicate contact id's in redirect get string
|
||||
$i=0;
|
||||
foreach ($duplicateContacts as $contact)
|
||||
{
|
||||
$get .= "&duplicate[$i]=".$contact['id'];
|
||||
$i++;
|
||||
}
|
||||
|
||||
//add return_module, return_action, and return_id to redirect get string
|
||||
$get .= "&return_module=";
|
||||
if(!empty($_POST['return_module'])) $get .= $_POST['return_module'];
|
||||
else $get .= "Contacts";
|
||||
$get .= "&return_action=";
|
||||
if(!empty($_POST['return_action'])) $get .= $_POST['return_action'];
|
||||
//else $get .= "DetailView";
|
||||
if(!empty($_POST['return_id'])) $get .= "&return_id=".$_POST['return_id'];
|
||||
if(!empty($_POST['popup'])) $get .= '&popup='.$_POST['popup'];
|
||||
if(!empty($_POST['create'])) $get .= '&create='.$_POST['create'];
|
||||
|
||||
// for InboundEmail flow
|
||||
if(!empty($_POST['start'])) $get .= '&start='.$_POST['start'];
|
||||
|
||||
//now redirect the post to modules/Contacts/ShowDuplicates.php
|
||||
if (!empty($_POST['is_ajax_call']) && $_POST['is_ajax_call'] == '1')
|
||||
{
|
||||
ob_clean();
|
||||
$json = getJSONobj();
|
||||
$_SESSION['SHOW_DUPLICATES'] = $get;
|
||||
echo $json->encode(array('status' => 'dupe', 'get' => $location . $get));
|
||||
} else {
|
||||
if(!empty($_POST['to_pdf'])) $location .= '&to_pdf='.$_POST['to_pdf'];
|
||||
$_SESSION['SHOW_DUPLICATES'] = $get;
|
||||
header("Location: index.php?$location");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
global $current_user;
|
||||
if(is_admin($current_user)){
|
||||
if (!isset($_POST[$prefix.'portal_active'])) $focus->portal_active = '0';
|
||||
//if no password is set set account to inactive for portal
|
||||
if(empty($_POST[$prefix.'portal_name']))$focus->portal_active = '0';
|
||||
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// INBOUND EMAIL HANDLING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
if(isset($_REQUEST['inbound_email_id']) && !empty($_REQUEST['inbound_email_id'])) {
|
||||
// fake this case like it's already saved.
|
||||
$focus->save($check_notify);
|
||||
require_once('modules/Emails/Email.php');
|
||||
$email = new Email();
|
||||
$email->retrieve($_REQUEST['inbound_email_id']);
|
||||
$email->parent_type = 'Contacts';
|
||||
$email->parent_id = $focus->id;
|
||||
$email->assigned_user_id = $current_user->id;
|
||||
$email->status = 'read';
|
||||
$email->save();
|
||||
$email->load_relationship('contacts');
|
||||
$email->contacts->add($focus->id);
|
||||
|
||||
header("Location: index.php?&module=Emails&action=EditView&type=out&inbound_email_id=".$_REQUEST['inbound_email_id']."&parent_id=".$email->parent_id."&parent_type=".$email->parent_type.'&start='.$_REQUEST['start'].'&assigned_user_id='.$current_user->id);
|
||||
exit();
|
||||
}
|
||||
//// END INBOUND EMAIL HANDLING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$focus->save($check_notify);
|
||||
$focus->savePositions55($_POST['position_list55']);
|
||||
$return_id = $focus->id;
|
||||
if($_POST[$prefix.'email_id2']!='' && $_POST[$prefix.'email_address']!=''){
|
||||
global $db;
|
||||
$create_id=create_guid();
|
||||
|
||||
$db->query("INSERT INTO email_addresses VALUES(
|
||||
'".$create_id."',
|
||||
LOWER('".$_POST[$prefix.'email_address']."'),
|
||||
upper('".$_POST[$prefix.'email_address']."'),
|
||||
'0',
|
||||
'0',
|
||||
NOW(),
|
||||
NOW(),
|
||||
'0'
|
||||
);");
|
||||
$db->query("INSERT INTO `email_addr_bean_rel`
|
||||
(`id`,
|
||||
`email_address_id`,
|
||||
`bean_id`,
|
||||
`bean_module`,
|
||||
`primary_address`,
|
||||
`reply_to_address`,
|
||||
`date_created`,
|
||||
`date_modified`,
|
||||
`deleted`)
|
||||
VALUES
|
||||
('".create_guid()."',
|
||||
'".$create_id."',
|
||||
'".$return_id."',
|
||||
'Contacts',
|
||||
'1',
|
||||
'0',
|
||||
NOW(),
|
||||
NOW(),
|
||||
'0');");
|
||||
$ser=$db->query("select txt.email_id from emails as em
|
||||
join emails_text as txt
|
||||
where txt.from_addr like '".$_POST[$prefix.'email_address']."'
|
||||
or txt.from_addr like '%".$_POST[$prefix.'email_address']."%'
|
||||
or txt.from_addr like '".$_POST[$prefix.'email_address']."%'
|
||||
or txt.from_addr like '%".$_POST[$prefix.'email_address']."'
|
||||
group by txt.email_id");
|
||||
while($wynik=$db->fetchByAssoc($ser)){
|
||||
$db->query("update emails set parent_type='Contacts',parent_id='".$return_id."' where id='".$wynik['email_id']."'");
|
||||
$db->query("insert into email_id_rel VALUES ('".create_guid()."',
|
||||
'".$wynik['email_id']."',
|
||||
'".$return_id."',
|
||||
'Contacts',
|
||||
'0');");
|
||||
$db->query("insert into emails_email_addr_rel values ('".create_guid()."',
|
||||
'".$wynik['email_id']."',
|
||||
'from',
|
||||
'".$create_id."',
|
||||
0,
|
||||
'');");
|
||||
}
|
||||
$ser=$db->query("select txt.email_id from emails as em
|
||||
join emails_text as txt
|
||||
where txt.to_addrs like '".$_POST[$prefix.'email_address']."'
|
||||
or txt.to_addrs like '%".$_POST[$prefix.'email_address']."%'
|
||||
or txt.to_addrs like '".$_POST[$prefix.'email_address']."%'
|
||||
or txt.to_addrs like '%".$_POST[$prefix.'email_address']."'
|
||||
group by txt.email_id");
|
||||
while($wynik=$db->fetchByAssoc($ser)){
|
||||
$db->query("update emails set parent_type='Contacts',parent_id='".$return_id."' where id='".$wynik['email_id']."'");
|
||||
$db->query("insert into email_id_rel VALUES ('".create_guid()."',
|
||||
'".$wynik['email_id']."',
|
||||
'".$return_id."',
|
||||
'Contacts',
|
||||
'0');");
|
||||
$db->query("insert into emails_email_addr_rel values ('".create_guid()."',
|
||||
'".$wynik['email_id']."',
|
||||
'to',
|
||||
'".$create_id."',
|
||||
0,
|
||||
'');");
|
||||
}
|
||||
}
|
||||
$GLOBALS['log']->debug("Saved record with id of ".$return_id);
|
||||
|
||||
if (!empty($_POST['is_ajax_call']) && $_POST['is_ajax_call'] == '1') {
|
||||
$json = getJSONobj();
|
||||
echo $json->encode(array('status' => 'success',
|
||||
'get' => ''));
|
||||
return null;
|
||||
}
|
||||
|
||||
if(isset($_POST['popup']) && $_POST['popup'] == 'true') {
|
||||
$get = '&module=';
|
||||
if(!empty($_POST['return_module'])) $get .= $_POST['return_module'];
|
||||
else $get .= 'Contacts';
|
||||
$get .= '&action=';
|
||||
if(!empty($_POST['return_action'])) $get .= $_POST['return_action'];
|
||||
else $get .= 'Popup';
|
||||
if(!empty($_POST['return_id'])) $get .= '&return_id='.$_POST['return_id'];
|
||||
if(!empty($_POST['popup'])) $get .= '&popup='.$_POST['popup'];
|
||||
if(!empty($_POST['create'])) $get .= '&create='.$_POST['create'];
|
||||
if(!empty($_POST['to_pdf'])) $get .= '&to_pdf='.$_POST['to_pdf'];
|
||||
$get .= '&first_name=' . $focus->first_name;
|
||||
$get .= '&last_name=' . $focus->last_name;
|
||||
$get .= '&query=true';
|
||||
header("Location: index.php?$get");
|
||||
return;
|
||||
}
|
||||
|
||||
if($redirect){
|
||||
$this->handleRedirect($return_id);
|
||||
}else{
|
||||
return $return_id;
|
||||
}
|
||||
}
|
||||
|
||||
function handleRedirect($return_id){
|
||||
if(isset($_POST['return_module']) && $_POST['return_module'] != "") {
|
||||
$return_module = $_POST['return_module'];
|
||||
}
|
||||
else {
|
||||
$return_module = "Contacts";
|
||||
}
|
||||
|
||||
if(isset($_POST['return_action']) && $_POST['return_action'] != "") {
|
||||
if($_REQUEST['return_module'] == 'Emails') {
|
||||
$return_action = $_REQUEST['return_action'];
|
||||
}
|
||||
// if we create a new record "Save", we want to redirect to the DetailView
|
||||
elseif($_REQUEST['action'] == "Save" && $_REQUEST['return_module'] != "Home") {
|
||||
$return_action = 'DetailView';
|
||||
} else {
|
||||
// if we "Cancel", we go back to the list view.
|
||||
$return_action = $_REQUEST['return_action'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$return_action = "DetailView";
|
||||
}
|
||||
|
||||
if(isset($_POST['return_id']) && $_POST['return_id'] != "") {
|
||||
$return_id = $_POST['return_id'];
|
||||
}
|
||||
|
||||
header("Location: index.php?action=$return_action&module=$return_module&record=$return_id");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
137
modules/Contacts/ContactOpportunityRelationship.php
Executable file
137
modules/Contacts/ContactOpportunityRelationship.php
Executable file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
require_once('data/SugarBean.php');
|
||||
|
||||
// Contact is used to store customer information.
|
||||
class ContactOpportunityRelationship extends SugarBean {
|
||||
// Stored fields
|
||||
var $id;
|
||||
var $contact_id;
|
||||
var $contact_role;
|
||||
var $opportunity_id;
|
||||
|
||||
// Related fields
|
||||
var $contact_name;
|
||||
var $opportunity_name;
|
||||
|
||||
var $table_name = "opportunities_contacts";
|
||||
var $object_name = "ContactOpportunityRelationship";
|
||||
var $column_fields = Array("id"
|
||||
,"contact_id"
|
||||
,"opportunity_id"
|
||||
,"contact_role"
|
||||
,'date_modified'
|
||||
);
|
||||
|
||||
var $new_schema = true;
|
||||
|
||||
var $additional_column_fields = Array();
|
||||
var $field_defs = array (
|
||||
'id'=>array('name' =>'id', 'type' =>'char', 'len'=>'36', 'default'=>'')
|
||||
, 'contact_id'=>array('name' =>'contact_id', 'type' =>'char', 'len'=>'36', )
|
||||
, 'opportunity_id'=>array('name' =>'opportunity_id', 'type' =>'char', 'len'=>'36',)
|
||||
, 'contact_role'=>array('name' =>'contact_role', 'type' =>'char', 'len'=>'50')
|
||||
, 'date_modified'=>array ('name' => 'date_modified','type' => 'datetime')
|
||||
, 'deleted'=>array('name' =>'deleted', 'type' =>'bool', 'len'=>'1', 'default'=>'0', 'required'=>true)
|
||||
);
|
||||
function ContactOpportunityRelationship() {
|
||||
$this->db = DBManagerFactory::getInstance();
|
||||
$this->dbManager = DBManagerFactory::getInstance();
|
||||
|
||||
$this->disable_row_level_security =true;
|
||||
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields()
|
||||
{
|
||||
if(isset($this->contact_id) && $this->contact_id != "")
|
||||
{
|
||||
$query = "SELECT first_name, last_name from contacts where id='$this->contact_id' AND deleted=0";
|
||||
$result =$this->db->query($query,true," Error filling in additional detail fields: ");
|
||||
// Get the id and the name.
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
|
||||
if($row != null)
|
||||
{
|
||||
$this->contact_name = return_name($row, 'first_name', 'last_name');
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($this->opportunity_id) && $this->opportunity_id != "")
|
||||
{
|
||||
$query = "SELECT name from opportunities where id='$this->opportunity_id' AND deleted=0";
|
||||
$result =$this->db->query($query,true," Error filling in additional detail fields: ");
|
||||
// Get the id and the name.
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
|
||||
if($row != null)
|
||||
{
|
||||
$this->opportunity_name = $row['name'];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function create_list_query(&$order_by, &$where)
|
||||
{
|
||||
$query = "SELECT id, first_name, last_name, phone_work, title, email1 FROM contacts ";
|
||||
$where_auto = "deleted=0";
|
||||
|
||||
if($where != "")
|
||||
$query .= "where $where AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
$query .= " ORDER BY last_name, first_name";
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
122
modules/Contacts/ContactOpportunityRelationshipEdit.php
Executable file
122
modules/Contacts/ContactOpportunityRelationshipEdit.php
Executable file
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once('modules/Contacts/ContactOpportunityRelationship.php');
|
||||
require_once('modules/Contacts/Forms.php');
|
||||
require_once('include/utils.php');
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $mod_strings;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$focus = new ContactOpportunityRelationship();
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
|
||||
$focus->id = "";
|
||||
}
|
||||
|
||||
// Prepopulate either side of the relationship if passed in.
|
||||
safe_map('opportunity_name', $focus);
|
||||
safe_map('opportunity_id', $focus);
|
||||
safe_map('contact_name', $focus);
|
||||
safe_map('contact_id', $focus);
|
||||
safe_map('contact_role', $focus);
|
||||
|
||||
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
|
||||
$GLOBALS['log']->info("Contact opportunity relationship");
|
||||
|
||||
$json = getJSONobj();
|
||||
require_once('include/QuickSearchDefaults.php');
|
||||
$qsd = new QuickSearchDefaults();
|
||||
$sqs_objects = array('opportunity_name' => $qsd->getQSParent());
|
||||
$sqs_objects['opportunity_name']['populate_list'] = array('opportunity_name', 'opportunity_id');
|
||||
$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
|
||||
echo $quicksearch_js;
|
||||
|
||||
$xtpl=new XTemplate ('modules/Contacts/ContactOpportunityRelationshipEdit.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
|
||||
$xtpl->assign("RETURN_URL", "&return_module=$currentModule&return_action=DetailView&return_id=$focus->id");
|
||||
$xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
|
||||
$xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
|
||||
$xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
|
||||
$xtpl->assign("THEME", $theme);
|
||||
$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("ID", $focus->id);
|
||||
$xtpl->assign("CONTACT",$contactName = Array("NAME" => $focus->contact_name, "ID" => $focus->contact_id));
|
||||
$xtpl->assign("OPPORTUNITY",$oppName = Array("NAME" => $focus->opportunity_name, "ID" => $focus->opportunity_id));
|
||||
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CONTACT_OPP_FORM_TITLE']." ".$contactName['NAME'] . " - ". $oppName['NAME'], true);
|
||||
echo "\n</p>\n";
|
||||
|
||||
$xtpl->assign("CONTACT_ROLE_OPTIONS", get_select_options_with_id($app_list_strings['opportunity_relationship_type_dom'], $focus->contact_role));
|
||||
|
||||
|
||||
|
||||
|
||||
$xtpl->parse("main");
|
||||
|
||||
$xtpl->out("main");
|
||||
|
||||
require_once('include/javascript/javascript.php');
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName('EditView');
|
||||
$javascript->setSugarBean($focus);
|
||||
$javascript->addToValidateBinaryDependency('opportunity_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $mod_strings['LBL_OPP_NAME'], 'false', '', 'opportunity_id');
|
||||
echo $javascript->getScript();
|
||||
|
||||
|
||||
?>
|
||||
71
modules/Contacts/ContactsQuickCreate.php
Executable file
71
modules/Contacts/ContactsQuickCreate.php
Executable file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/EditView/QuickCreate.php');
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
require_once('include/javascript/javascript.php');
|
||||
|
||||
class ContactsQuickCreate extends QuickCreate {
|
||||
|
||||
var $javascript;
|
||||
|
||||
function process() {
|
||||
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
|
||||
$mod_strings = return_module_language($current_language, 'Contacts');
|
||||
|
||||
parent::process();
|
||||
|
||||
$this->ss->assign("SALUTATION_OPTIONS", get_select_options_with_id($app_list_strings['salutation_dom'], ''));
|
||||
|
||||
if($this->viaAJAX) { // override for ajax call
|
||||
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"contactsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"contacts\"); else return false;'");
|
||||
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_contacts\")';");
|
||||
}
|
||||
|
||||
$this->ss->assign('viaAJAX', $this->viaAJAX);
|
||||
|
||||
$this->javascript = new javascript();
|
||||
$this->javascript->setFormName('contactsQuickCreate');
|
||||
|
||||
$focus = new Contact();
|
||||
$this->javascript->setSugarBean($focus);
|
||||
$this->javascript->addAllFields('');
|
||||
|
||||
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
|
||||
}
|
||||
}
|
||||
?>
|
||||
161
modules/Contacts/CreateMailingTags.php
Executable file
161
modules/Contacts/CreateMailingTags.php
Executable file
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
/*
|
||||
define('RELATIVE_PATH','include/html2fpdf/');
|
||||
define('FPDF_FONTPATH','include/html2fpdf/font/');
|
||||
require_once("include/html2fpdf/html2fpdf.php");
|
||||
|
||||
$pdf = new HTML2FPDF("P");
|
||||
$pdf->SetMargins(12,12,12);
|
||||
$pdf->SetAutoPageBreak(true,0);
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('arialpl', '', 10);
|
||||
|
||||
$cids=explode(",",$_REQUEST['uid']);
|
||||
$count=count($cids);
|
||||
$y=0;
|
||||
for($i=0;$i<$count;$i++){
|
||||
if($i%3==0)$x=5;
|
||||
if($i%3==1)$x=75;
|
||||
if($i%3==2)$x=145;
|
||||
|
||||
$nm=array();
|
||||
$r=mysql_fetch_array(mysql_query("select * from contacts where id='".$cids[$i]."'"));
|
||||
if($r['salutation'])$nm[]=$r['saultation'];
|
||||
if($r['first_name'])$nm[]=$r['first_name'];
|
||||
if($r['last_name'])$nm[]=$r['last_name'];
|
||||
|
||||
$rr=mysql_fetch_array(mysql_query("select account_id from accounts_contacts where contact_id='".$r['id']."' and deleted='0'"));
|
||||
$rr=mysql_fetch_array(mysql_query("select * from accounts where id='".$rr['account_id']."'"));
|
||||
$r['primary_address_street']=$rr['billing_address_street'];
|
||||
$r['primary_address_postalcode']=$rr['billing_address_postalcode'];
|
||||
$r['primary_address_city']=$rr['billing_address_city'];
|
||||
$r['primary_address_country']=$rr['billing_address_country'];
|
||||
|
||||
$name=iconv("UTF-8","ISO-8859-2",implode(" ",$nm));
|
||||
$pdf->SetXY($x,$y);
|
||||
$pdf->SetFont('arialpl', 'B', 10);
|
||||
$yy=$y;
|
||||
$pdf->Cell(60,6,$name,0,0,"C");
|
||||
$yy+=5;
|
||||
$pdf->SetXY($x,$yy);
|
||||
$pdf->SetFont('arialpl', '', 8);
|
||||
if($r['primary_address_street']){
|
||||
$pdf->Cell(60,6,iconv("UTF-8","ISO-8859-2",$rr['name']),0,0,"C");
|
||||
$yy+=5;
|
||||
}
|
||||
$pdf->SetXY($x,$yy);
|
||||
$pdf->SetFont('arialpl', '', 10);
|
||||
if($r['primary_address_street']){
|
||||
$pdf->Cell(60,6,iconv("UTF-8","ISO-8859-2",$r['primary_address_street']),0,0,"C");
|
||||
$yy+=5;
|
||||
}
|
||||
$pdf->SetXY($x,$yy);
|
||||
if($r['primary_address_postalcode'] || $r['primary_address_city']){
|
||||
$pdf->Cell(60,6,iconv("UTF-8","ISO-8859-2",$r['primary_address_postalcode'].' '.$r['primary_address_city']),0,0,"C");
|
||||
$yy+=5;
|
||||
}
|
||||
$pdf->SetXY($x,$yy);
|
||||
if($r['primary_address_country']){
|
||||
$pdf->Cell(60,6,iconv("UTF-8","ISO-8859-2",$r['primary_address_country']),0,0,"C");
|
||||
$yy+=5;
|
||||
}
|
||||
$ph=array();
|
||||
if($r['phone_work'])$ph[]="Tel.: ".$r['phone_work'];
|
||||
if($r['phone_mobile'])$ph[]="Kom.: ".$r['phone_mobile'];
|
||||
$phone=implode(" ",$ph);
|
||||
$pdf->SetXY($x,$yy);
|
||||
$pdf->SetFont('arialpl', '', 8);
|
||||
if($phone){
|
||||
$pdf->Cell(60,6,iconv("UTF-8","ISO-8859-2",$phone),0,0,"C");
|
||||
$yy+=5;
|
||||
}
|
||||
if($i%3==2)$y+=38;
|
||||
if($i==23){
|
||||
$pdf->AddPage();
|
||||
$y=0;
|
||||
$x=5;
|
||||
}
|
||||
}
|
||||
|
||||
$pdf->Output("MailingTags.pdf", "D");*/
|
||||
|
||||
define('RELATIVE_PATH','include/html2fpdf/');
|
||||
define('FPDF_FONTPATH','include/html2fpdf/font/');
|
||||
require_once("include/html2fpdf/html2fpdf.php");
|
||||
|
||||
$pdf = new HTML2FPDF("L");
|
||||
$pdf->SetMargins(12,12,12);
|
||||
$pdf->SetAutoPageBreak(true,0);
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('arialpl', '', 20);
|
||||
|
||||
$cids=explode(",",$_REQUEST['uid']);
|
||||
$count=count($cids);
|
||||
$y=37;
|
||||
for($i=0;$i<$count;$i++){
|
||||
if($i%2==0)$x=0;
|
||||
if($i%2==1)$x=135;
|
||||
|
||||
$nm=array();
|
||||
$r=mysql_fetch_array(mysql_query("select * from contacts where id='".$cids[$i]."'"));
|
||||
if($r['salutation'])$nm[]=$r['saultation'];
|
||||
if($r['first_name'])$nm[]=$r['first_name'];
|
||||
if($r['last_name'])$nm[]=$r['last_name'];
|
||||
|
||||
$rr=mysql_fetch_array(mysql_query("select account_id from accounts_contacts where contact_id='".$r['id']."' and deleted='0'"));
|
||||
$rr=mysql_fetch_array(mysql_query("select * from accounts where id='".$rr['account_id']."'"));
|
||||
$r['primary_address_street']=$rr['billing_address_street'];
|
||||
$r['primary_address_postalcode']=$rr['billing_address_postalcode'];
|
||||
$r['primary_address_city']=$rr['billing_address_city'];
|
||||
$r['primary_address_country']=$rr['billing_address_country'];
|
||||
|
||||
$name=iconv("UTF-8","ISO-8859-2",implode(" ",$nm));
|
||||
$pdf->SetXY($x,$y);
|
||||
$pdf->SetFont('arialpl', 'B', 20);
|
||||
$yy=$y;
|
||||
$pdf->Cell(160,6,$name,0,0,"C");
|
||||
$yy+=9;
|
||||
$pdf->SetXY($x,$yy);
|
||||
$pdf->SetFont('arialpl', '', 16);
|
||||
if($r['primary_address_street']){
|
||||
$pdf->Cell(160,6,iconv("UTF-8","ISO-8859-2",$rr['name']),0,0,"C");
|
||||
$yy+=9;
|
||||
}
|
||||
$pdf->SetXY($x,$yy);
|
||||
$pdf->SetFont('arialpl', '', 20);
|
||||
if($r['primary_address_street']){
|
||||
$pdf->Cell(160,6,iconv("UTF-8","ISO-8859-2",$r['primary_address_street']),0,0,"C");
|
||||
$yy+=9;
|
||||
}
|
||||
$pdf->SetXY($x,$yy);
|
||||
if($r['primary_address_postalcode'] || $r['primary_address_city']){
|
||||
$pdf->Cell(160,6,iconv("UTF-8","ISO-8859-2",$r['primary_address_postalcode'].' '.$r['primary_address_city']),0,0,"C");
|
||||
$yy+=9;
|
||||
}
|
||||
$pdf->SetXY($x,$yy);
|
||||
if($r['primary_address_country']){
|
||||
$pdf->Cell(160,6,iconv("UTF-8","ISO-8859-2",$r['primary_address_country']),0,0,"C");
|
||||
$yy+=9;
|
||||
}
|
||||
$ph=array();
|
||||
if($r['phone_work'])$ph[]="Tel.: ".$r['phone_work'];
|
||||
if($r['phone_mobile'])$ph[]="Kom.: ".$r['phone_mobile'];
|
||||
$phone=implode(" ",$ph);
|
||||
$pdf->SetXY($x,$yy);
|
||||
$pdf->SetFont('arialpl', '', 16);
|
||||
if($phone){
|
||||
$pdf->Cell(160,6,iconv("UTF-8","ISO-8859-2",""),0,0,"C");
|
||||
$yy+=9;
|
||||
}
|
||||
if($i%2==1)$y+=85;
|
||||
if($i%4==3 && $i!=$count-1){
|
||||
$pdf->AddPage();
|
||||
$y=37;
|
||||
$x=5;
|
||||
}
|
||||
}
|
||||
|
||||
$pdf->Output("MailingTags.pdf", "D");
|
||||
|
||||
|
||||
?>
|
||||
88
modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.data.php
Executable file
88
modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.data.php
Executable file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $current_user;
|
||||
$dashletData['MyContactsDashlet']['searchFields'] = array('date_entered' => array('default' => ''),
|
||||
|
||||
|
||||
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name));
|
||||
$dashletData['MyContactsDashlet']['columns'] = array('name' => array('width' => '30',
|
||||
'label' => 'LBL_NAME',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'related_fields' => array('first_name', 'last_name')),
|
||||
'account_name' => array('width' => '20',
|
||||
'label' => 'LBL_ACCOUNT_NAME',
|
||||
'sortable' => false,
|
||||
'link' => true,
|
||||
'id' => 'account_id',
|
||||
'ACLTag' => 'ACCOUNT'),
|
||||
'title' => array('width' => '10',
|
||||
'label' => 'LBL_TITLE'),
|
||||
'email1' => array('width' => '10',
|
||||
'label' => 'LBL_EMAIL_ADDRESS',
|
||||
'sortable' => false,
|
||||
'customCode' => '{$EMAIL1_LINK}{$EMAIL1}</a>',),
|
||||
'phone_work' => array('width' => '10',
|
||||
'label' => 'LBL_OFFICE_PHONE',
|
||||
'default' => true),
|
||||
'phone_home' => array('width' => '10',
|
||||
'label' => 'LBL_HOME_PHONE'),
|
||||
'phone_mobile' => array('width' => '10',
|
||||
'label' => 'LBL_MOBILE_PHONE'),
|
||||
'phone_other' => array('width' => '10',
|
||||
'label' => 'LBL_OTHER_PHONE'),
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
'default' => true),
|
||||
'date_modified' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_MODIFIED'),
|
||||
'created_by' => array('width' => '8',
|
||||
'label' => 'LBL_CREATED'),
|
||||
'assigned_user_name' => array('width' => '8',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true),
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
46
modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.meta.php
Executable file
46
modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.meta.php
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['MyContactsDashlet'] = array('module' => 'Contacts',
|
||||
'title' => translate('LBL_HOMEPAGE_TITLE', 'Contacts'),
|
||||
'description' => 'A customizable view into Contacts',
|
||||
'category' => 'Module Views');
|
||||
?>
|
||||
60
modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.php
Executable file
60
modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/Dashlets/DashletGeneric.php');
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
|
||||
class MyContactsDashlet extends DashletGeneric {
|
||||
function MyContactsDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings;
|
||||
require('modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.data.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'Contacts');
|
||||
|
||||
$this->searchFields = $dashletData['MyContactsDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['MyContactsDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new Contact();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
37
modules/Contacts/Forms.php
Executable file
37
modules/Contacts/Forms.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*********************************************************************************/
|
||||
require_once('include/EditView/SideQuickCreate.php');
|
||||
83
modules/Contacts/ImportVCard.php
Executable file
83
modules/Contacts/ImportVCard.php
Executable file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
********************************************************************************/
|
||||
|
||||
if(isset($_FILES['vcard']['tmp_name']) && isset($_FILES['vcard']['size']) > 0){
|
||||
require_once('include/vCard.php');
|
||||
$vcard = new vCard();
|
||||
$record = $vcard->importVCard($_FILES['vcard']['tmp_name']);
|
||||
header("Location: index.php?action=DetailView&module=Contacts&record=$record");
|
||||
exit();
|
||||
}else{
|
||||
require_once('XTemplate/xtpl.php');
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME']." ".$mod_strings['LBL_IMPORT_VCARD'], true);
|
||||
echo "\n</p>\n";
|
||||
global $theme;
|
||||
$error_msg = '';
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'Contacts');
|
||||
|
||||
$xtpl=new XTemplate ('modules/Contacts/ImportVCard.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("ERROR_TEXT", $mod_strings['LBL_EMPTY_VCARD']);
|
||||
$xtpl->assign("HEADER", $mod_strings['LBL_IMPORT_VCARD']);
|
||||
|
||||
$xtpl->assign("MODULE", $_REQUEST['module']);
|
||||
if ($error_msg != '')
|
||||
{
|
||||
$xtpl->assign("ERROR", $error_msg);
|
||||
$xtpl->parse("main.error");
|
||||
}
|
||||
|
||||
|
||||
$xtpl->parse("main");
|
||||
|
||||
$xtpl->out("main");
|
||||
}?>
|
||||
50
modules/Contacts/Menu.php
Executable file
50
modules/Contacts/Menu.php
Executable file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings, $app_strings, $sugar_config;
|
||||
if(ACLController::checkAccess('Contacts', 'edit', true))$module_menu[] = Array("index.php?module=Contacts&action=EditView&return_module=Contacts&return_action=DetailView", $mod_strings['LNK_NEW_CONTACT'],"CreateContacts", 'Contacts');
|
||||
if(ACLController::checkAccess('Contacts', 'list', true))$module_menu[] =Array("index.php?module=Contacts&action=index&return_module=Contacts&return_action=DetailView", $mod_strings['LNK_CONTACT_LIST'],"Contacts", 'Contacts');
|
||||
|
||||
|
||||
?>
|
||||
57
modules/Contacts/Popup1.php
Executable file
57
modules/Contacts/Popup1.php
Executable file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Popup
|
||||
*
|
||||
* The contents of this file are subject to the SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(!empty($_REQUEST['html'])) {
|
||||
require_once('modules/Contacts/Popup_picker.php');
|
||||
$popup = new Popup_Picker();
|
||||
|
||||
if($_REQUEST['html'] == 'Email_picker')
|
||||
{
|
||||
echo $popup->process_page_for_email();
|
||||
}
|
||||
elseif($_REQUEST['html'] == 'change_address')
|
||||
{
|
||||
echo $popup->process_page_for_address();
|
||||
}
|
||||
elseif($_REQUEST['html'] == 'mail_merge')
|
||||
{
|
||||
echo $popup->process_page_for_merge();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once('include/Popups/Popup_picker.php');
|
||||
$popup = new Popup_Picker();
|
||||
|
||||
echo $popup->process_page();
|
||||
}
|
||||
|
||||
?>
|
||||
57
modules/Contacts/PopupEmails.php
Executable file
57
modules/Contacts/PopupEmails.php
Executable file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
require_once('modules/Contacts/Popup_pickerEmails.php');
|
||||
|
||||
$popup = new Popup_Picker();
|
||||
|
||||
echo $popup->process_page();
|
||||
|
||||
?>
|
||||
847
modules/Contacts/Popup_picker.php
Executable file
847
modules/Contacts/Popup_picker.php
Executable file
@@ -0,0 +1,847 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Popup Picker
|
||||
*
|
||||
* The contents of this file are subject to the SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $theme;
|
||||
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
require_once('modules/Contacts/ContactFormBase.php');
|
||||
require_once('themes/'.$theme.'/layout_utils.php');
|
||||
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
class Popup_Picker
|
||||
{
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function Popup_Picker()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function _get_where_clause(){
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query'])){
|
||||
$where_clauses = array();
|
||||
append_where_clause($where_clauses, "first_name", "contacts.first_name");
|
||||
append_where_clause($where_clauses, "last_name", "contacts.last_name");
|
||||
append_where_clause($where_clauses, "first_name_advanced", "contacts.first_name");
|
||||
append_where_clause($where_clauses, "last_name_advanced", "contacts.last_name");
|
||||
append_where_clause($where_clauses, "address_postalcode", "contacts.primary_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_postalcode_advanced", "contacts.primary_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_street", "contacts.primary_address_street");
|
||||
append_where_clause($where_clauses, "address_street_advanced", "contacts.primary_address_street");
|
||||
append_where_clause($where_clauses, "address_city", "contacts.primary_address_city");
|
||||
append_where_clause($where_clauses, "address_city_advanced", "contacts.primary_address_city");
|
||||
append_where_clause($where_clauses, "address_country", "contacts.primary_address_country");
|
||||
append_where_clause($where_clauses, "address_country_advanced", "contacts.primary_address_country");
|
||||
append_where_clause($where_clauses, "address_state", "contacts.primary_address_state");
|
||||
append_where_clause($where_clauses, "address_state_advanced", "contacts.primary_address_state");
|
||||
append_where_clause($where_clauses, "phone", "contacts.phone_work");
|
||||
append_where_clause($where_clauses, "phone_advanced", "contacts.phone_work");
|
||||
/*
|
||||
append_where_clause($where_clauses, "account_id", "accounts.id");
|
||||
append_where_clause($where_clauses, "account_id_advanced", "accounts.id");
|
||||
append_where_clause($where_clauses, "account_name", "accounts.name");
|
||||
append_where_clause($where_clauses, "account_name_advanced", "accounts.name");
|
||||
*/
|
||||
append_where_clause($where_clauses, "assistant", "contacts.assistant");
|
||||
append_where_clause($where_clauses, "assistant_advanced", "contacts.assistant");
|
||||
append_where_clause($where_clauses, "do_not_call_advanced", "contacts.do_not_call");
|
||||
//append_where_clause($where_clauses, "assigned_user_id", "contacts.assigned_user_id");
|
||||
if(($_REQUEST['foreign_contact_advanced']==1 || $_REQUEST['foreign_contact_advanced']==0) && !isset($_REQUEST['foreign_contact_advanced']))append_where_clause($where_clauses, "foreign_contact_advanced", "contacts.foreign_contact");
|
||||
if(($_REQUEST['mailing_tag_advanced']==1 || $_REQUEST['mailing_tag_advanced']==0) && !isset($_REQUEST['mailing_tag_advanced']))append_where_clause($where_clauses, "mailing_tag_advanced", "contacts.mailing_tag");
|
||||
if(count($_REQUEST['assigned_user_id'])>0){
|
||||
foreach($_REQUEST['assigned_user_id'] as $au){
|
||||
$where_clauses[]="contacts.assigned_user_id='".$au."'";
|
||||
}
|
||||
}
|
||||
if(count($_REQUEST['assigned_user_id_advanced'])>0){
|
||||
foreach($_REQUEST['assigned_user_id_advanced'] as $au){
|
||||
$where_clauses[]="contacts.assigned_user_id='".$au."'";
|
||||
}
|
||||
}
|
||||
if($_REQUEST['account_id']){
|
||||
|
||||
$where_clauses[]="contacts.id IN (select contact_id as id from accounts_contacts as ac join accounts acc on acc.id=ac.account_id where acc.id='".$_REQUEST['account_id']."')";
|
||||
|
||||
}
|
||||
if($_REQUEST['only_my_items'])$where_clauses[]="contacts.assigned_user_id='".$_SESSION['authenticated_user_id']."'";
|
||||
/*append_where_clause($where_clauses, "address_postalcode", "contacts.alt_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_street", "contacts.alt_address_street");
|
||||
append_where_clause($where_clauses, "address_city", "contacts.alt_address_city");
|
||||
append_where_clause($where_clauses, "address_country", "contacts.alt_address_country");
|
||||
append_where_clause($where_clauses, "address_state", "contacts.alt_address_state");*/
|
||||
|
||||
//append_where_clause($where_clauses, "assigned_user_advanced", "contacts.assigned_user_id");
|
||||
$where = generate_where_statement($where_clauses);
|
||||
// echo $where;
|
||||
}
|
||||
return $where;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page_dial()
|
||||
{
|
||||
global $system_config;
|
||||
/*
|
||||
* CHECK IF USER WOULD LIKE TO USE PRO VERSION
|
||||
*/
|
||||
if( isset($system_config->settings['system_asterisk_pro']) && $system_config->settings['system_asterisk_pro'] == 1)
|
||||
{
|
||||
$asterisk_popup='include/asterisk/Asterisk_popup.tpl';
|
||||
$pro='include/asterisk/pro.php';
|
||||
/*
|
||||
* CHECK THAT ALL NECESSARY FILES FOR PRO VERSION ARE AVAILABLE
|
||||
*/
|
||||
if( file_exists($asterisk_popup) && file_exists($pro) ){
|
||||
require_once('include/asterisk/pro.php');
|
||||
proLogic();
|
||||
}
|
||||
/*
|
||||
* IF ALL FILES ARE NOT THERE THEN DISPLAY WHERE THEY ARE AVAILABLE AT
|
||||
*/
|
||||
else
|
||||
{
|
||||
/*
|
||||
* TRYING TO USE PRO WITHOUT NECESSARY FILES
|
||||
*/
|
||||
echo "<html><body onLoad=\"javascript:self.resizeTo(400,130)\"><center><font color='red'><br>Either the PRO version is not enabled or you are not using the PRO version. For more information you may visit <a href='http://www.voicerd.com/products.php'>http://www.voicerd.com/products.php</a><br> or email VoiceRD ( <a href='mailto:voicerd@novacoast.com?subject=Acquiring SugarCRM Pro'>voicerd@novacoast.com</a> )</font></center></body></html>";
|
||||
}
|
||||
}
|
||||
/*
|
||||
* USE THE OPEN SOURCE VERSION
|
||||
*/
|
||||
else{
|
||||
$this->openSourceLogic();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function openSourceLogic()
|
||||
{
|
||||
global $system_config;
|
||||
global $current_user;
|
||||
|
||||
$display_number = $_REQUEST['number'];
|
||||
//remove anything that is not a number or an asterisk(*)
|
||||
$number = preg_replace ( "/[^\d\*]/", "", $_REQUEST['number'] );
|
||||
|
||||
/*
|
||||
* If there is a prefix to be dialed then pre-pend that to the number that will be dialed
|
||||
*/
|
||||
if(!isset($system_config->settings['system_asterisk_prefix']) || $system_config->settings['system_asterisk_prefix'] != "" )
|
||||
{
|
||||
/*
|
||||
* Grab the prefix number and remove anything that is not a number or an asterisk(*)
|
||||
*/
|
||||
$prefix = $system_config->settings['system_asterisk_prefix'];
|
||||
$prefix = preg_replace ( "/[^\d\*]/", "", $prefix );
|
||||
/*
|
||||
* Pre-prend the prefix to the dial number and to the display number
|
||||
*/
|
||||
$display_number = $prefix."+".$display_number;
|
||||
$number = $prefix.$number;
|
||||
}
|
||||
|
||||
/*
|
||||
* If asterisk port was left empty in admin setting then default to 5038
|
||||
*/
|
||||
if(!isset($system_config->settings['system_asterisk_port']) || $system_config->settings['system_asterisk_port'] == "" )
|
||||
$system_config->settings['system_asterisk_port'] = "5038";
|
||||
|
||||
/*
|
||||
* If asterisk internal context was left empty in admin settings then default to "from-internal"
|
||||
*/
|
||||
if(!isset($system_config->settings['system_asterisk_internal_context']) || $system_config->settings['system_asterisk_internal_context'] == "" )
|
||||
$system_config->settings['system_asterisk_internal_context'] = "from-internal";
|
||||
|
||||
/*
|
||||
* If asterisk external context was left empty in admin settings then default to "from-internal"
|
||||
*/
|
||||
if(!isset($system_config->settings['system_asterisk_external_context']) || $system_config->settings['system_asterisk_external_context'] == "" )
|
||||
$system_config->settings['system_asterisk_external_context'] = "from-internal";
|
||||
|
||||
/*
|
||||
* If asterisk auto pickup is blank default to *3
|
||||
*/
|
||||
if(!isset($system_config->settings['system_asterisk_auto_pickup']) || $system_config->settings['system_asterisk_auto_pickup'] == "" )
|
||||
$system_config->settings['system_asterisk_auto_pickup'] = "*3";
|
||||
|
||||
/*
|
||||
* if any of the required fields were left empty in admin settings then signal error.
|
||||
*/
|
||||
if( !isset($system_config->settings['system_asterisk_server']) || $system_config->settings['system_asterisk_server'] == "" || !isset($system_config->settings['system_asterisk_username']) || $system_config->settings['system_asterisk_username'] == "" || !isset($system_config->settings['system_asterisk_secret']) || $system_config->settings['system_asterisk_secret'] == "" )
|
||||
{
|
||||
return "Asterisk Configuration Error.";
|
||||
}
|
||||
/*
|
||||
* If all required fields are filled in then dial
|
||||
*/
|
||||
else
|
||||
{
|
||||
//HTML code
|
||||
$output_html="<html>";
|
||||
if( isset($system_config->settings['system_asterisk_popup_timer']) && $system_config->settings['system_asterisk_popup_timer'] !="" )
|
||||
{
|
||||
$output_html.= "<body onLoad=\"javascript:self.resizeTo(350,130);setTimeout(window.close,".($system_config->settings['system_asterisk_popup_timer']*1000).")\">";
|
||||
}
|
||||
else
|
||||
{
|
||||
$output_html="<body onLoad=\"javascript:self.resizeTo(350,130)\">";
|
||||
}
|
||||
$output_html.=<<<EOQ
|
||||
<table width='100%' colspacing='0' colpadding'0'>
|
||||
<tr>
|
||||
<th align='center'><font size='5'>Dialing...$display_number</font></th>
|
||||
</tr><!--<tr>
|
||||
<th valign='bottom' align='center'><font color='red'><br>Go to <a href='http://www.voicerd.com/products.php'>http://www.voicerd.com/products.php</a><br>for more information or email <a href='mailto:ehoward@novacoast.com?subject=Acquiring SugarCRM Pro'>ehoward@novacoast.com</a></font></th>
|
||||
</tr>-->
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
EOQ;
|
||||
|
||||
///If user has auto pickup selected then pre-pend
|
||||
if(isset($current_user->asterisk_auto_pickup) && $current_user->asterisk_auto_pickup == '1'){
|
||||
$number = $system_config->settings['system_asterisk_auto_pickup'].$number;
|
||||
}
|
||||
|
||||
//Asterisk DialCode
|
||||
$timeout = 30;
|
||||
$socket = fsockopen( $system_config->settings['system_asterisk_server'],$system_config->settings['system_asterisk_port'], $errno, $errstr, $timeout);
|
||||
if(!$socket){ die("Error Connecting to Asterisk Server"); }
|
||||
fputs($socket, "Action: Login\r\n");
|
||||
fputs($socket, "UserName: ".$system_config->settings['system_asterisk_username']."\r\n");
|
||||
fputs($socket, "Secret: ".$system_config->settings['system_asterisk_secret']."\r\n\r\n");
|
||||
fputs($socket, "Action: Originate\r\n");
|
||||
//Partially contributed by SugarForge User mikeyb
|
||||
$callerid = $current_user->asterisk_extension;
|
||||
if (strpos($current_user->asterisk_extension, '/') === false) {
|
||||
fputs($socket, "Channel: Local/".$current_user->asterisk_extension."@".$system_config->settings['system_asterisk_internal_context']."\r\n");
|
||||
} else {
|
||||
fputs($socket, "Channel: ".$current_user->asterisk_extension."\r\n");
|
||||
}
|
||||
fputs($socket, "Context: ".$system_config->settings['system_asterisk_external_context']."\r\n");
|
||||
fputs($socket, "Exten: ".$number."\r\n");
|
||||
fputs($socket, "Priority: 1\r\n");
|
||||
fputs($socket, "Callerid: ".$current_user->asterisk_extension."\r\n\r\n");
|
||||
$wrets=fgets($socket,128);
|
||||
echo $output_html;
|
||||
}
|
||||
}
|
||||
////////END ASTERISK PATCH////////
|
||||
function process_page()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$formBase = new ContactFormBase();
|
||||
if(isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'save')
|
||||
{
|
||||
$formBase->handleSave('', false, true);
|
||||
}
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
|
||||
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
|
||||
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
|
||||
|
||||
// TODO: cleanup the construction of $addform
|
||||
$formbody = $formBase->getFormBody('','','EmailEditView');
|
||||
$addform = '<table><tr><td nowrap="nowrap" valign="top">'
|
||||
.str_replace('<br>', '</td><td nowrap="nowrap" valign="top"> ', $formbody)
|
||||
. '</td></tr></table>'
|
||||
. '<input type="hidden" name="action" value="Popup" />';
|
||||
$formSave = <<<EOQ
|
||||
<input type="submit" name="button" class="button" title="$lbl_save_button_title" accesskey="$lbl_save_button_key" value=" $lbl_save_button_label " />
|
||||
<input type="button" name="button" class="button" title="{$app_strings['LBL_CANCEL_BUTTON_TITLE']}" accesskey="{$app_strings['LBL_CANCEL_BUTTON_KEY']}" value="{$app_strings['LBL_CANCEL_BUTTON_LABEL']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$createContact = <<<EOQ
|
||||
<input type="button" name="showAdd" class="button" value="{$mod_strings['LNK_NEW_CONTACT']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$addformheader = get_form_header($mod_strings['LNK_NEW_CONTACT'], $formSave, false);
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
//if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
|
||||
$multi_select=true;
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('Contacts',document.MassUpdate,'mass[]','" .$app_strings['ERR_NOTHING_SELECTED']."');\" title='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']." ' />\n";
|
||||
//}
|
||||
//END:FOR MULTI-SELECT
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
//$button.="<input type='hidden' name='saved_associated_data' value=''><input type='hidden' name='Contacts_CONTACT_offset' id='Contacts_CONTACT_offset' value='".$_REQUEST['Contacts_CONTACT_offset']."'>";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$form = new XTemplate('modules/Contacts/Popup_picker.html');
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
|
||||
$fields=array("first_name","last_name","address_postalcode","address_street","address_state","address_city","address_country","phone","account_id","account_name","assistant","assigned_user_id");
|
||||
|
||||
foreach($fields as $f){
|
||||
if($_REQUEST[$f])$form->assign(strtoupper($f),$_REQUEST[$f]);
|
||||
else $form->assign(strtoupper($f),$_REQUEST[$f."_advanced"]);
|
||||
}
|
||||
|
||||
$w=mysql_query("select id,first_name,last_name from users where status='Active' and deleted='0' order by first_name asc, last_name asc");
|
||||
while($r=mysql_fetch_array($w)){
|
||||
$atr.='<option value="'.$r['id'].'"';
|
||||
if(@in_array($r['id'],$_REQUEST['assigned_user_id_advanced']))$atr.=' selected';
|
||||
$atr.='>'.$r['first_name'].' '.$r['last_name'].'</option>';
|
||||
}
|
||||
if($_REQUEST['tab'])$form->assign("TABB",$_REQUEST['tab']);
|
||||
else $form->assign("TABB","basic");
|
||||
|
||||
|
||||
$form->assign('ASSIGNED_TO_LIST',$atr);
|
||||
$atr="";
|
||||
$arr=array(""=>"","1"=>"Yes","0"=>"No");
|
||||
foreach($arr as $k=>$v){
|
||||
$atr.='<option value="'.$k.'"';
|
||||
if($k==$_REQUEST['foreign_contact_advanced'])$atr.=' selected';
|
||||
$atr.='>'.$v.'</option>';
|
||||
}
|
||||
$form->assign('FOREIGN_CONTACT',$atr);
|
||||
$atr="";
|
||||
$arr=array(""=>"","1"=>"Yes","0"=>"No");
|
||||
foreach($arr as $k=>$v){
|
||||
$atr.='<option value="'.$k.'"';
|
||||
if($k==$_REQUEST['mailing_tag_advanced'])$atr.=' selected';
|
||||
$atr.='>'.$v.'</option>';
|
||||
}
|
||||
$form->assign('MAILING_TAG',$atr);
|
||||
|
||||
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('CREATECONTACT', $createContact);
|
||||
$form->assign('ADDFORMHEADER', $addformheader);
|
||||
$form->assign('ADDFORM', $addform);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
$form->assign('request_data', $request_data);
|
||||
//if(!$_REQUEST['Contacts_CONTACT_offset'])$offset=0;
|
||||
//else $offset=$_REQUEST['Contacts_CONTACT_offset']+20;
|
||||
//print_r($_REQUEST);
|
||||
if(!isset($_REQUEST['Contacts_CONTACT_offset'])){
|
||||
$form->assign("PAG","<input type='hidden' name='saved_associated_data' value=''>
|
||||
<input type='hidden' name='Contacts_CONTACT_offset' id='Contacts_CONTACT_offset' value='0'>".$button);
|
||||
|
||||
}
|
||||
else{
|
||||
$form->assign("PAG",$button);
|
||||
}
|
||||
|
||||
$form->assign('offset',$offset);
|
||||
$form->assign('DIV',$_REQUEST['div']);
|
||||
$form->assign('PRE',$_REQUEST['pre']);
|
||||
if($_REQUEST['only_my_items'])$form->assign("OMI_CHECKED","checked");
|
||||
|
||||
$dnc.='<option value="" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="")$dnc.='selected="selected"';
|
||||
$dnc.='></option>';
|
||||
$dnc.='<option value="0" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="0")$dnc.='selected="selected"';
|
||||
$dnc.='> No</option>';
|
||||
$dnc.='<option value="1" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="1")$dnc.='selected="selected"';
|
||||
$dnc.='> Yes</option';
|
||||
$form->assign('DO_NOT_CALL_LIST',$dnc);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
// $output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new Contact();
|
||||
$ListView = new ListView();
|
||||
$ListView->display_header_and_footer=false;
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->setQuery($where, '', '', 'CONTACT');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
$ListView->multi_select_popup=true;
|
||||
|
||||
ob_start();
|
||||
$ListView->processListView($seed_bean, 'main', 'CONTACT');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
//$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
|
||||
function process_page_for_merge()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
//START:FOR MULTI-SELECT
|
||||
$multi_select=false;
|
||||
if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
|
||||
$multi_select=true;
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('Contacts',document.MassUpdate,'mass[]','" .$app_strings['ERR_NOTHING_SELECTED']."');\" title='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
//END:FOR MULTI-SELECT
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/Contacts/Popup_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$form->assign('request_data', $request_data);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new Contact();
|
||||
$ListView = new ListView();
|
||||
$ListView->display_header_and_footer=false;
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->multi_select_popup=$multi_select;
|
||||
if ($multi_select) $ListView->xTemplate->assign("TAG_TYPE","SPAN"); else $ListView->xTemplate->assign("TAG_TYPE","A");
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setQuery($where, '', 'contacts.last_name, contacts.first_name', 'CONTACT');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false);
|
||||
//BEGIN ATHENA CUSTOMIZATION - rsmith
|
||||
$query = $_REQUEST['select'].' WHERE '.$_REQUEST['where']."'".$_REQUEST['id']."'";
|
||||
|
||||
//$response = $seed_bean->process_list_query($_REQUEST['select'], 0, -1, -1, $_REQUEST['where']."'".$_REQUEST['id']."'");
|
||||
|
||||
$result = $seed_bean->db->query($query,true,"Error retrieving $seed_bean->object_name list: ");
|
||||
|
||||
$list = Array();
|
||||
if(empty($rows_found))
|
||||
{
|
||||
$rows_found = $seed_bean->db->getRowCount($result);
|
||||
}
|
||||
|
||||
$row_offset = 0;
|
||||
global $sugar_config;
|
||||
$max_per_page = $sugar_config['list_max_entries_per_page'];
|
||||
|
||||
while(($row = $seed_bean->db->fetchByAssoc($result)) != null)
|
||||
{
|
||||
$seed_bean = new Contact();
|
||||
foreach($seed_bean->field_defs as $field=>$value)
|
||||
{
|
||||
if (isset($row[$field]))
|
||||
{
|
||||
$seed_bean->$field = $row[$field];
|
||||
}
|
||||
else if (isset($row[$seed_bean->table_name .'.'.$field]))
|
||||
{
|
||||
$seed_bean->$field = $row[$seed_bean->table_name .'.'.$field];
|
||||
}
|
||||
else
|
||||
{
|
||||
$seed_bean->$field = "";
|
||||
}
|
||||
}
|
||||
$seed_bean->fill_in_additional_list_fields();
|
||||
|
||||
$list[] = $seed_bean;
|
||||
}
|
||||
|
||||
$ListView->processListViewTwo($list, 'main', 'CONTACT');
|
||||
|
||||
//END ATHENA CUSTOMIZATION - rsmith
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page_for_email()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
//START:FOR MULTI-SELECT
|
||||
$multi_select=false;
|
||||
if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
|
||||
$multi_select=true;
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('Contacts',document.MassUpdate,'mass[]','" .$app_strings['ERR_NOTHING_SELECTED']."');\" title='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
//END:FOR MULTI-SELECT
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/Contacts/Popup_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new Contact();
|
||||
$ListView = new ListView();
|
||||
$ListView->display_header_and_footer=false;
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->multi_select_popup=$multi_select;
|
||||
if ($multi_select) $ListView->xTemplate->assign("TAG_TYPE","SPAN"); else $ListView->xTemplate->assign("TAG_TYPE","A");
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setQuery($where, '', 'contacts.last_name, contacts.first_name', 'CONTACT');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false);
|
||||
$ListView->processListView($seed_bean, 'main', 'CONTACT');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page_for_address()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$formBase = new ContactFormBase();
|
||||
if(isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'save')
|
||||
{
|
||||
|
||||
$formBase->handleSave('', false, true);
|
||||
}
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
|
||||
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
|
||||
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
|
||||
|
||||
// TODO: cleanup the construction of $addform
|
||||
$formbody = $formBase->getFormBody('','','EmailEditView');
|
||||
$addform = '<table><tr><td nowrap="nowrap" valign="top">'
|
||||
.str_replace('<br>', '</td><td nowrap="nowrap" valign="top"> ', $formbody)
|
||||
. '</td></tr></table>'
|
||||
. '<input type="hidden" name="action" value="Popup" />';
|
||||
$formSave = <<<EOQ
|
||||
<input type="submit" name="button" class="button" title="$lbl_save_button_title" accesskey="$lbl_save_button_key" value=" $lbl_save_button_label " />
|
||||
<input type="button" name="button" class="button" title="{$app_strings['LBL_CANCEL_BUTTON_TITLE']}" accesskey="{$app_strings['LBL_CANCEL_BUTTON_KEY']}" value="{$app_strings['LBL_CANCEL_BUTTON_LABEL']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$createContact = <<<EOQ
|
||||
<input type="button" name="showAdd" class="button" value="{$mod_strings['LNK_NEW_CONTACT']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$addformheader = get_form_header($mod_strings['LNK_NEW_CONTACT'], $formSave, false);
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/Contacts/Address_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
//$form->assign('CREATECONTACT', $createContact);
|
||||
$form->assign('ADDFORMHEADER', $addformheader);
|
||||
$form->assign('ADDFORM', $addform);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
$form->assign('request_data', $request_data);
|
||||
|
||||
// fill in for mass update
|
||||
$button = "<input type='hidden' name='module' value='Contacts'><input type='hidden' id='form_action' name='action' value='index'><input type='hidden' name='massupdate' value='true'><input type='hidden' name='delete' value='false'><input type='hidden' name='mass' value='Array'><input type='hidden' name='Update' value='Update'>";
|
||||
if(isset($_REQUEST['mass']) && is_array($_REQUEST['mass'])) {
|
||||
foreach(array_unique($_REQUEST['mass']) as $record) {
|
||||
$button .= "<input style='display: none' checked type='checkbox' name='mass[]' value='$record'>\n";
|
||||
}
|
||||
}
|
||||
$button .= "<input type='hidden' name='saved_associated_data' value=''>";
|
||||
$button .= "<input type='hidden' name='query' value='true'>";
|
||||
$button .= "<input type='hidden' name='close_window' value='true'>";
|
||||
$button .= "<input type='hidden' name='html' value='change_address'>";
|
||||
$button .= "<input type='hidden' name='account_name' value='$account_name'>";
|
||||
$button .= "<span style='display: none'><textarea name='primary_address_street'>" . str_replace("<br>", "\n", $_REQUEST["primary_address_street"]) . "</textarea></span>";
|
||||
$button .= "<input type='hidden' name='primary_address_city' value='". $_REQUEST["primary_address_city"] ."'>";
|
||||
$button .= "<input type='hidden' name='primary_address_state' value='". $_REQUEST["primary_address_state"] ."'>";
|
||||
$button .= "<input type='hidden' name='primary_address_postalcode' value='". $_REQUEST["primary_address_postalcode"] ."'>";
|
||||
$button .= "<input type='hidden' name='primary_address_country' value='". $_REQUEST["primary_address_country"] ."'>";
|
||||
//$button .= "<input type='hidden' name='Contacts_CONTACT_offset' value=''>";
|
||||
$button .= "<input title='".$mod_strings['LBL_COPY_ADDRESS_CHECKED']."' class='button' LANGUAGE=javascript type='submit' name='button' value=' ".$mod_strings['LBL_COPY_ADDRESS_CHECKED']." '>\n";
|
||||
$button .= "<input title='".$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accessKey='".$app_strings['LBL_CANCEL_BUTTON_KEY']."' class='button' LANGUAGE=javascript onclick=\"window.close()\" type='submit' name='button' value=' ".$app_strings['LBL_CANCEL_BUTTON_LABEL']." '>\n";
|
||||
|
||||
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
//$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
//$form->parse('main.SearchHeader');
|
||||
//$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new Contact();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->multi_select_popup=true;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->setQuery($where, '', '', 'CONTACT');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
|
||||
ob_start();
|
||||
$ListView->processListViewMulti($seed_bean, 'main', 'CONTACT');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// Regular Expression to override sListView
|
||||
$exp = '/sListView.save_checks/si';
|
||||
$change = 'save_checks';
|
||||
$output_html = preg_replace(array($exp), array($change), $output_html);
|
||||
$output_html .= '<script>
|
||||
|
||||
checked_items = Array();
|
||||
inputs_array = document.MassUpdate.elements;
|
||||
|
||||
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
||||
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].style.display == "none") {
|
||||
checked_items.push(inputs_array[wp].value);
|
||||
}
|
||||
}
|
||||
for(i in checked_items) {
|
||||
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
||||
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].value == checked_items[i]) {
|
||||
inputs_array[wp].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>';
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
}
|
||||
?>
|
||||
645
modules/Contacts/Popup_picker1.php
Executable file
645
modules/Contacts/Popup_picker1.php
Executable file
@@ -0,0 +1,645 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Popup Picker
|
||||
*
|
||||
* The contents of this file are subject to the SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $theme;
|
||||
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
require_once('modules/Contacts/ContactFormBase.php');
|
||||
require_once('themes/'.$theme.'/layout_utils.php');
|
||||
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
class Popup_Picker
|
||||
{
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function Popup_Picker()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function _get_where_clause(){
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query'])){
|
||||
$where_clauses = array();
|
||||
append_where_clause($where_clauses, "first_name", "contacts.first_name");
|
||||
append_where_clause($where_clauses, "last_name", "contacts.last_name");
|
||||
append_where_clause($where_clauses, "first_name_advanced", "contacts.first_name");
|
||||
append_where_clause($where_clauses, "last_name_advanced", "contacts.last_name");
|
||||
append_where_clause($where_clauses, "address_postalcode", "contacts.primary_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_postalcode_advanced", "contacts.primary_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_street", "contacts.primary_address_street");
|
||||
append_where_clause($where_clauses, "address_street_advanced", "contacts.primary_address_street");
|
||||
append_where_clause($where_clauses, "address_city", "contacts.primary_address_city");
|
||||
append_where_clause($where_clauses, "address_city_advanced", "contacts.primary_address_city");
|
||||
append_where_clause($where_clauses, "address_country", "contacts.primary_address_country");
|
||||
append_where_clause($where_clauses, "address_country_advanced", "contacts.primary_address_country");
|
||||
append_where_clause($where_clauses, "address_state", "contacts.primary_address_state");
|
||||
append_where_clause($where_clauses, "address_state_advanced", "contacts.primary_address_state");
|
||||
append_where_clause($where_clauses, "phone", "contacts.phone_work");
|
||||
append_where_clause($where_clauses, "phone_advanced", "contacts.phone_work");
|
||||
append_where_clause($where_clauses, "account_id", "accounts.id");
|
||||
append_where_clause($where_clauses, "account_id_advanced", "accounts.id");
|
||||
append_where_clause($where_clauses, "account_name", "accounts.name");
|
||||
append_where_clause($where_clauses, "account_name_advanced", "accounts.name");
|
||||
append_where_clause($where_clauses, "assistant", "contacts.assistant");
|
||||
append_where_clause($where_clauses, "assistant_advanced", "contacts.assistant");
|
||||
append_where_clause($where_clauses, "do_not_call_advanced", "contacts.do_not_call");
|
||||
//append_where_clause($where_clauses, "assigned_user_id", "contacts.assigned_user_id");
|
||||
//append_where_clause($where_clauses, "assigned_user_id_advanced", "contacts.assigned_user_id");
|
||||
if(count($_REQUEST['assigned_user_id'])>0){
|
||||
foreach($_REQUEST['assigned_user_id'] as $au){
|
||||
$where_clauses[]="contacts.assigned_user_id='".$au."'";
|
||||
}
|
||||
}
|
||||
if(count($_REQUEST['assigned_user_id_advanced'])>0){
|
||||
foreach($_REQUEST['assigned_user_id_advanced'] as $au){
|
||||
$where_clauses[]="contacts.assigned_user_id='".$au."'";
|
||||
}
|
||||
}
|
||||
if($_REQUEST['only_my_items'])$where_clauses[]="contacts.assigned_user_id='".$_SESSION['authenticated_user_id']."'";
|
||||
/*append_where_clause($where_clauses, "address_postalcode", "contacts.alt_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_street", "contacts.alt_address_street");
|
||||
append_where_clause($where_clauses, "address_city", "contacts.alt_address_city");
|
||||
append_where_clause($where_clauses, "address_country", "contacts.alt_address_country");
|
||||
append_where_clause($where_clauses, "address_state", "contacts.alt_address_state");*/
|
||||
|
||||
//append_where_clause($where_clauses, "assigned_user_advanced", "contacts.assigned_user_id");
|
||||
$where = generate_where_statement($where_clauses);
|
||||
}
|
||||
return $where;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page_for_email()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$formBase = new ContactFormBase();
|
||||
if(isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'save')
|
||||
{
|
||||
$formBase->handleSave('', false, true);
|
||||
}
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
|
||||
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
|
||||
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
|
||||
|
||||
// TODO: cleanup the construction of $addform
|
||||
$formbody = $formBase->getFormBody('','','EmailEditView');
|
||||
$addform = '<table><tr><td nowrap="nowrap" valign="top">'
|
||||
.str_replace('<br>', '</td><td nowrap="nowrap" valign="top"> ', $formbody)
|
||||
. '</td></tr></table>'
|
||||
. '<input type="hidden" name="action" value="Popup" />';
|
||||
$formSave = <<<EOQ
|
||||
<input type="submit" name="button" class="button" title="$lbl_save_button_title" accesskey="$lbl_save_button_key" value=" $lbl_save_button_label " />
|
||||
<input type="button" name="button" class="button" title="{$app_strings['LBL_CANCEL_BUTTON_TITLE']}" accesskey="{$app_strings['LBL_CANCEL_BUTTON_KEY']}" value="{$app_strings['LBL_CANCEL_BUTTON_LABEL']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$createContact = <<<EOQ
|
||||
<input type="button" name="showAdd" class="button" value="{$mod_strings['LNK_NEW_CONTACT']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$addformheader = get_form_header($mod_strings['LNK_NEW_CONTACT'], $formSave, false);
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
|
||||
$fields=array("first_name","last_name","address_postalcode","address_street","address_state","address_city","address_country","phone","account_id","account_name","assistant","assigned_user_id");
|
||||
|
||||
foreach($fields as $f){
|
||||
if($_REQUEST[$f])$form->assign(strtoupper($f),$_REQUEST[$f]);
|
||||
else $form->assign(strtoupper($f),$_REQUEST[$f."_advanced"]);
|
||||
}
|
||||
|
||||
$w=mysql_query("select id,first_name,last_name from users where status='Active' and deleted='0' order by first_name asc, last_name asc");
|
||||
while($r=mysql_fetch_array($w)){
|
||||
$atr.='<option value="'.$r['id'].'"';
|
||||
if(@in_array($r['id'],$_REQUEST['assigned_user_id_advanced']))$atr.=' selected';
|
||||
$atr.='>'.$r['first_name'].' '.$r['last_name'].'</option>';
|
||||
}
|
||||
if($_REQUEST['tab'])$form->assign("TABB",$_REQUEST['tab']);
|
||||
else $form->assign("TABB","basic");
|
||||
|
||||
$form = new XTemplate('modules/Contacts/Email_picker.html');
|
||||
$form->assign('ASSIGNED_TO_LIST',$atr);
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('CREATECONTACT', $createContact);
|
||||
$form->assign('ADDFORMHEADER', $addformheader);
|
||||
$form->assign('ADDFORM', $addform);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
$form->assign('request_data', $request_data);
|
||||
$form->assign('DIV',$_REQUEST['div']);
|
||||
$form->assign('PRE',$_REQUEST['pre']);
|
||||
if($_REQUEST['only_my_items'])$form->assign("OMI_CHECKED","checked");
|
||||
|
||||
$dnc.='<option value="" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="")$dnc.='selected="selected"';
|
||||
$dnc.='></option>';
|
||||
$dnc.='<option value="0" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="0")$dnc.='selected="selected"';
|
||||
$dnc.='> No</option>';
|
||||
$dnc.='<option value="1" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="1")$dnc.='selected="selected"';
|
||||
$dnc.='> Yes</option';
|
||||
$form->assign('DO_NOT_CALL_LIST',$dnc);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new Contact();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->setQuery($where, '', '', 'CONTACT');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$ListView->processListView($seed_bean, 'main', 'CONTACT');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
|
||||
function process_page_for_merge()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
//START:FOR MULTI-SELECT
|
||||
$multi_select=false;
|
||||
if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
|
||||
$multi_select=true;
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('Contacts',document.MassUpdate,'mass[]','" .$app_strings['ERR_NOTHING_SELECTED']."');\" title='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
//END:FOR MULTI-SELECT
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/Contacts/Popup_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$form->assign('request_data', $request_data);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new Contact();
|
||||
$ListView = new ListView();
|
||||
$ListView->display_header_and_footer=false;
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->multi_select_popup=$multi_select;
|
||||
if ($multi_select) $ListView->xTemplate->assign("TAG_TYPE","SPAN"); else $ListView->xTemplate->assign("TAG_TYPE","A");
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setQuery($where, '', 'contacts.last_name, contacts.first_name', 'CONTACT');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false);
|
||||
//BEGIN ATHENA CUSTOMIZATION - rsmith
|
||||
$query = $_REQUEST['select'].' WHERE '.$_REQUEST['where']."'".$_REQUEST['id']."'";
|
||||
|
||||
//$response = $seed_bean->process_list_query($_REQUEST['select'], 0, -1, -1, $_REQUEST['where']."'".$_REQUEST['id']."'");
|
||||
|
||||
$result = $seed_bean->db->query($query,true,"Error retrieving $seed_bean->object_name list: ");
|
||||
|
||||
$list = Array();
|
||||
if(empty($rows_found))
|
||||
{
|
||||
$rows_found = $seed_bean->db->getRowCount($result);
|
||||
}
|
||||
|
||||
$row_offset = 0;
|
||||
global $sugar_config;
|
||||
$max_per_page = $sugar_config['list_max_entries_per_page'];
|
||||
|
||||
while(($row = $seed_bean->db->fetchByAssoc($result)) != null)
|
||||
{
|
||||
$seed_bean = new Contact();
|
||||
foreach($seed_bean->field_defs as $field=>$value)
|
||||
{
|
||||
if (isset($row[$field]))
|
||||
{
|
||||
$seed_bean->$field = $row[$field];
|
||||
}
|
||||
else if (isset($row[$seed_bean->table_name .'.'.$field]))
|
||||
{
|
||||
$seed_bean->$field = $row[$seed_bean->table_name .'.'.$field];
|
||||
}
|
||||
else
|
||||
{
|
||||
$seed_bean->$field = "";
|
||||
}
|
||||
}
|
||||
$seed_bean->fill_in_additional_list_fields();
|
||||
|
||||
$list[] = $seed_bean;
|
||||
}
|
||||
|
||||
$ListView->processListViewTwo($list, 'main', 'CONTACT');
|
||||
|
||||
//END ATHENA CUSTOMIZATION - rsmith
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
//START:FOR MULTI-SELECT
|
||||
$multi_select=false;
|
||||
if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
|
||||
$multi_select=true;
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('Contacts',document.MassUpdate,'mass[]','" .$app_strings['ERR_NOTHING_SELECTED']."');\" title='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
//END:FOR MULTI-SELECT
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/Contacts/Popup_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new Contact();
|
||||
$ListView = new ListView();
|
||||
$ListView->display_header_and_footer=false;
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->multi_select_popup=$multi_select;
|
||||
if ($multi_select) $ListView->xTemplate->assign("TAG_TYPE","SPAN"); else $ListView->xTemplate->assign("TAG_TYPE","A");
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setQuery($where, '', 'contacts.last_name, contacts.first_name', 'CONTACT');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false);
|
||||
$ListView->processListView($seed_bean, 'main', 'CONTACT');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page_for_address()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$formBase = new ContactFormBase();
|
||||
if(isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'save')
|
||||
{
|
||||
|
||||
$formBase->handleSave('', false, true);
|
||||
}
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$account_name = empty($_REQUEST['account_name']) ? '' : $_REQUEST['account_name'];
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
|
||||
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
|
||||
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
|
||||
|
||||
// TODO: cleanup the construction of $addform
|
||||
$formbody = $formBase->getFormBody('','','EmailEditView');
|
||||
$addform = '<table><tr><td nowrap="nowrap" valign="top">'
|
||||
.str_replace('<br>', '</td><td nowrap="nowrap" valign="top"> ', $formbody)
|
||||
. '</td></tr></table>'
|
||||
. '<input type="hidden" name="action" value="Popup" />';
|
||||
$formSave = <<<EOQ
|
||||
<input type="submit" name="button" class="button" title="$lbl_save_button_title" accesskey="$lbl_save_button_key" value=" $lbl_save_button_label " />
|
||||
<input type="button" name="button" class="button" title="{$app_strings['LBL_CANCEL_BUTTON_TITLE']}" accesskey="{$app_strings['LBL_CANCEL_BUTTON_KEY']}" value="{$app_strings['LBL_CANCEL_BUTTON_LABEL']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$createContact = <<<EOQ
|
||||
<input type="button" name="showAdd" class="button" value="{$mod_strings['LNK_NEW_CONTACT']}" onclick="toggleDisplay('addform');" />
|
||||
EOQ;
|
||||
$addformheader = get_form_header($mod_strings['LNK_NEW_CONTACT'], $formSave, false);
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form = new XTemplate('modules/Contacts/Address_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
//$form->assign('CREATECONTACT', $createContact);
|
||||
$form->assign('ADDFORMHEADER', $addformheader);
|
||||
$form->assign('ADDFORM', $addform);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
$form->assign('ACCOUNT_NAME', $account_name);
|
||||
$form->assign('request_data', $request_data);
|
||||
|
||||
// fill in for mass update
|
||||
$button = "<input type='hidden' name='module' value='Contacts'><input type='hidden' id='form_action' name='action' value='index'><input type='hidden' name='massupdate' value='true'><input type='hidden' name='delete' value='false'><input type='hidden' name='mass' value='Array'><input type='hidden' name='Update' value='Update'>";
|
||||
if(isset($_REQUEST['mass']) && is_array($_REQUEST['mass'])) {
|
||||
foreach(array_unique($_REQUEST['mass']) as $record) {
|
||||
$button .= "<input style='display: none' checked type='checkbox' name='mass[]' value='$record'>\n";
|
||||
}
|
||||
}
|
||||
$button .= "<input type='hidden' name='saved_associated_data' value=''>";
|
||||
$button .= "<input type='hidden' name='query' value='true'>";
|
||||
$button .= "<input type='hidden' name='close_window' value='true'>";
|
||||
$button .= "<input type='hidden' name='html' value='change_address'>";
|
||||
$button .= "<input type='hidden' name='account_name' value='$account_name'>";
|
||||
$button .= "<span style='display: none'><textarea name='primary_address_street'>" . str_replace("<br>", "\n", $_REQUEST["primary_address_street"]) . "</textarea></span>";
|
||||
$button .= "<input type='hidden' name='primary_address_city' value='". $_REQUEST["primary_address_city"] ."'>";
|
||||
$button .= "<input type='hidden' name='primary_address_state' value='". $_REQUEST["primary_address_state"] ."'>";
|
||||
$button .= "<input type='hidden' name='primary_address_postalcode' value='". $_REQUEST["primary_address_postalcode"] ."'>";
|
||||
$button .= "<input type='hidden' name='primary_address_country' value='". $_REQUEST["primary_address_country"] ."'>";
|
||||
//$button .= "<input type='hidden' name='Contacts_CONTACT_offset' value=''>";
|
||||
$button .= "<input title='".$mod_strings['LBL_COPY_ADDRESS_CHECKED']."' class='button' LANGUAGE=javascript type='submit' name='button' value=' ".$mod_strings['LBL_COPY_ADDRESS_CHECKED']." '>\n";
|
||||
$button .= "<input title='".$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accessKey='".$app_strings['LBL_CANCEL_BUTTON_KEY']."' class='button' LANGUAGE=javascript onclick=\"window.close()\" type='submit' name='button' value=' ".$app_strings['LBL_CANCEL_BUTTON_LABEL']." '>\n";
|
||||
|
||||
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
//$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
//$form->parse('main.SearchHeader');
|
||||
//$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new Contact();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->setQuery($where, '', '', 'CONTACT');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
// Added
|
||||
$ListView->process_for_popups = true;
|
||||
|
||||
ob_start();
|
||||
$ListView->processListViewMulti($seed_bean, 'main', 'CONTACT');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// Regular Expression to override sListView
|
||||
$exp = '/sListView.save_checks/si';
|
||||
$change = 'save_checks';
|
||||
$output_html = preg_replace(array($exp), array($change), $output_html);
|
||||
$output_html .= '<script>
|
||||
|
||||
checked_items = Array();
|
||||
inputs_array = document.MassUpdate.elements;
|
||||
|
||||
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
||||
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].style.display == "none") {
|
||||
checked_items.push(inputs_array[wp].value);
|
||||
}
|
||||
}
|
||||
for(i in checked_items) {
|
||||
for(wp = 0 ; wp < inputs_array.length; wp++) {
|
||||
if(inputs_array[wp].name == "mass[]" && inputs_array[wp].value == checked_items[i]) {
|
||||
inputs_array[wp].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>';
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
}
|
||||
?>
|
||||
236
modules/Contacts/Popup_pickerEmails.php
Executable file
236
modules/Contacts/Popup_pickerEmails.php
Executable file
@@ -0,0 +1,236 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
global $theme;
|
||||
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
require_once('themes/'.$theme.'/layout_utils.php');
|
||||
require_once('log4php/LoggerManager.php');
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
class Popup_Picker{
|
||||
|
||||
function Popup_Picker(){
|
||||
;
|
||||
}
|
||||
|
||||
function _get_where_clause(){
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query'])){
|
||||
$where_clauses = array();
|
||||
append_where_clause($where_clauses, "first_name", "contacts.first_name");
|
||||
append_where_clause($where_clauses, "last_name", "contacts.last_name");
|
||||
append_where_clause($where_clauses, "first_name_advanced", "contacts.first_name");
|
||||
append_where_clause($where_clauses, "last_name_advanced", "contacts.last_name");
|
||||
append_where_clause($where_clauses, "address_postalcode", "contacts.primary_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_postalcode_advanced", "contacts.primary_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_street", "contacts.primary_address_street");
|
||||
append_where_clause($where_clauses, "address_street_advanced", "contacts.primary_address_street");
|
||||
append_where_clause($where_clauses, "address_city", "contacts.primary_address_city");
|
||||
append_where_clause($where_clauses, "address_city_advanced", "contacts.primary_address_city");
|
||||
append_where_clause($where_clauses, "address_country", "contacts.primary_address_country");
|
||||
append_where_clause($where_clauses, "address_country_advanced", "contacts.primary_address_country");
|
||||
append_where_clause($where_clauses, "address_state", "contacts.primary_address_state");
|
||||
append_where_clause($where_clauses, "address_state_advanced", "contacts.primary_address_state");
|
||||
append_where_clause($where_clauses, "phone", "contacts.phone_work");
|
||||
append_where_clause($where_clauses, "phone_advanced", "contacts.phone_work");
|
||||
append_where_clause($where_clauses, "account_id", "accounts.id");
|
||||
append_where_clause($where_clauses, "account_id_advanced", "accounts.id");
|
||||
append_where_clause($where_clauses, "account_name", "accounts.name");
|
||||
append_where_clause($where_clauses, "account_name_advanced", "accounts.name");
|
||||
append_where_clause($where_clauses, "assistant", "contacts.assistant");
|
||||
append_where_clause($where_clauses, "assistant_advanced", "contacts.assistant");
|
||||
append_where_clause($where_clauses, "do_not_call_advanced", "contacts.do_not_call");
|
||||
//append_where_clause($where_clauses, "assigned_user_id", "contacts.assigned_user_id");
|
||||
//append_where_clause($where_clauses, "assigned_user_id_advanced", "contacts.assigned_user_id");
|
||||
if(count($_REQUEST['assigned_user_id'])>0){
|
||||
foreach($_REQUEST['assigned_user_id'] as $au){
|
||||
$where_clauses[]="contacts.assigned_user_id='".$au."'";
|
||||
}
|
||||
}
|
||||
if(count($_REQUEST['assigned_user_id_advanced'])>0){
|
||||
foreach($_REQUEST['assigned_user_id_advanced'] as $au){
|
||||
$where_clauses[]="contacts.assigned_user_id='".$au."'";
|
||||
}
|
||||
}
|
||||
if($_REQUEST['only_my_items'])$where_clauses[]="contacts.assigned_user_id='".$_SESSION['authenticated_user_id']."'";
|
||||
/*append_where_clause($where_clauses, "address_postalcode", "contacts.alt_address_postalcode");
|
||||
append_where_clause($where_clauses, "address_street", "contacts.alt_address_street");
|
||||
append_where_clause($where_clauses, "address_city", "contacts.alt_address_city");
|
||||
append_where_clause($where_clauses, "address_country", "contacts.alt_address_country");
|
||||
append_where_clause($where_clauses, "address_state", "contacts.alt_address_state");*/
|
||||
|
||||
//append_where_clause($where_clauses, "assigned_user_advanced", "contacts.assigned_user_id");
|
||||
$where = generate_where_statement($where_clauses);
|
||||
}
|
||||
return $where;
|
||||
}
|
||||
|
||||
function process_page(){
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
if(!$hide_clear_button){
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY'] ."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY'] ."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= '<input type="button" onclick="addAll(i);" value="Select" class="button" />';
|
||||
$button .= "</form>\n";
|
||||
$form = new XTemplate('modules/Contacts/Popup_pickerEmails.html');
|
||||
|
||||
$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
|
||||
$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
|
||||
$form->assign('FIRST_NAME', $first_name);
|
||||
$form->assign('LAST_NAME', $last_name);
|
||||
|
||||
$fields=array("first_name","last_name","address_postalcode","address_street","address_state","address_city","address_country","phone","account_id","account_name","assistant","assigned_user_id");
|
||||
|
||||
foreach($fields as $f){
|
||||
if($_REQUEST[$f])$form->assign(strtoupper($f),$_REQUEST[$f]);
|
||||
else $form->assign(strtoupper($f),$_REQUEST[$f."_advanced"]);
|
||||
}
|
||||
|
||||
$w=mysql_query("select id,first_name,last_name from users where status='Active' and deleted='0' order by first_name asc, last_name asc");
|
||||
while($r=mysql_fetch_array($w)){
|
||||
$atr.='<option value="'.$r['id'].'"';
|
||||
if(@in_array($r['id'],$_REQUEST['assigned_user_id_advanced']))$atr.=' selected';
|
||||
$atr.='>'.$r['first_name'].' '.$r['last_name'].'</option>';
|
||||
}
|
||||
if($_REQUEST['tab'])$form->assign("TABB",$_REQUEST['tab']);
|
||||
else $form->assign("TABB","basic");
|
||||
$form->assign('ASSIGNED_TO_LIST',$atr);
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('request_data', $request_data);
|
||||
$form->assign('DIV',$_REQUEST['div']);
|
||||
$form->assign('PRE',$_REQUEST['pre']);
|
||||
if($_REQUEST['only_my_items'])$form->assign("OMI_CHECKED","checked");
|
||||
|
||||
$dnc.='<option value="" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="")$dnc.='selected="selected"';
|
||||
$dnc.='></option>';
|
||||
$dnc.='<option value="0" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="0")$dnc.='selected="selected"';
|
||||
$dnc.='> No</option>';
|
||||
$dnc.='<option value="1" ';
|
||||
if($_REQUEST['do_not_call_advanced']=="1")$dnc.='selected="selected"';
|
||||
$dnc.='> Yes</option';
|
||||
$form->assign('DO_NOT_CALL_LIST',$dnc);
|
||||
|
||||
|
||||
$output_html .= "
|
||||
<script type=\"text/javascript\">
|
||||
function save_checks(offset) {
|
||||
//location.href=\"index.php?module=Contacts&action=PopupEmails&Contacts_CONTACT_offset=\"+offset;
|
||||
document.getElementById('Contacts_CONTACT_offset').value=offset;
|
||||
document.popup_query_form.submit();
|
||||
}
|
||||
</script>";
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// RESET THE SECTIONS THAT ARE ALREADY IN THE PAGE SO THAT THEY DO NOT PRINT AGAIN LATER.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// CREATE THE LISTVIEW
|
||||
$seed_bean = new Contact();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->multi_select_popup=true;
|
||||
|
||||
$ListView->setQuery($where, '', 'name', 'CONTACT');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$ListView->processListView($seed_bean, 'main', 'CONTACT');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
} // end of class Popup_Picker
|
||||
?>
|
||||
85
modules/Contacts/Save.php
Executable file
85
modules/Contacts/Save.php
Executable file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
require_once('modules/Contacts/ContactFormBase.php');
|
||||
require_once('include/formbase.php');
|
||||
require_once('include/Upload.php');
|
||||
$contactForm = new ContactFormBase();
|
||||
//$focus = new Contact();
|
||||
|
||||
include('modules/Contacts/SimpleImage.php');
|
||||
|
||||
if($_FILES['contact_picture']['name']){
|
||||
$_POST['contact_picture']=upload_file("contact_picture","modules/Contacts/upload/images/");
|
||||
$img="modules/Contacts/upload/images/".$_POST['contact_picture'];
|
||||
copy($img,"modules/Contacts/upload/images/big/".$_POST['contact_picture']);
|
||||
chmod("modules/Contacts/upload/images/big/".$_POST['contact_picture'],0777);
|
||||
$size=getSize($img,125);
|
||||
$image = new SimpleImage();
|
||||
$image->load($img);
|
||||
$image->resize($size[0],$size[1]);
|
||||
$image->save($img);
|
||||
|
||||
}
|
||||
if($_REQUEST['delete_contact_picture']){
|
||||
$_POST['contact_picture']=$_REQUEST['contact_picture']="";
|
||||
}
|
||||
|
||||
$json = getJSONobj();
|
||||
//categories
|
||||
$pll = array();
|
||||
$exp=explode("||||",$_POST['position_list55']);
|
||||
foreach($exp as $ep){
|
||||
if($ep){
|
||||
$pll[] = $json->decode(htmlspecialchars_decode($ep));
|
||||
}
|
||||
}
|
||||
$_POST['position_list55'] = $pll;
|
||||
|
||||
$prefix = empty($_REQUEST['dup_checked']) ? '' : 'Contacts';
|
||||
$id= $contactForm->handleSave($prefix, false, false);
|
||||
if($id!=''){
|
||||
header("Location: index.php?module=Contacts&action=DetailView&record=".$id);
|
||||
}
|
||||
|
||||
?>
|
||||
80
modules/Contacts/SaveContactOpportunityRelationship.php
Executable file
80
modules/Contacts/SaveContactOpportunityRelationship.php
Executable file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('modules/Contacts/ContactOpportunityRelationship.php');
|
||||
|
||||
require_once('include/utils.php');
|
||||
|
||||
|
||||
$focus = new ContactOpportunityRelationship();
|
||||
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
foreach($focus->column_fields as $field)
|
||||
{
|
||||
safe_map($field, $focus, true);
|
||||
}
|
||||
|
||||
foreach($focus->additional_column_fields as $field)
|
||||
{
|
||||
safe_map($field, $focus, true);
|
||||
}
|
||||
|
||||
// send them to the edit screen.
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record'] != "")
|
||||
{
|
||||
$recordID = $_REQUEST['record'];
|
||||
}
|
||||
|
||||
$focus->save();
|
||||
$recordID = $focus->id;
|
||||
|
||||
$GLOBALS['log']->debug("Saved record with id of ".$recordID);
|
||||
|
||||
$header_URL = "Location: index.php?action={$_REQUEST['return_action']}&module={$_REQUEST['return_module']}&record={$_REQUEST['return_id']}";
|
||||
$GLOBALS['log']->debug("about to post header URL of: $header_URL");
|
||||
|
||||
header($header_URL);
|
||||
?>
|
||||
|
||||
168
modules/Contacts/ShowDuplicates.php
Executable file
168
modules/Contacts/ShowDuplicates.php
Executable file
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
// retrieve $_POST values out of the $_SESSION variable - placed in there by ContactFormBase to avoid the length limitations on URLs implicit with GETS
|
||||
//$GLOBALS['log']->debug('ShowDuplicates.php: _POST = '.print_r($_SESSION['SHOW_DUPLICATES'],true));
|
||||
parse_str($_SESSION['SHOW_DUPLICATES'],$_POST);
|
||||
unset($_SESSION['SHOW_DUPLICATES']);
|
||||
//$GLOBALS['log']->debug('ShowDuplicates.php: _POST = '.print_r($_POST,true));
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $theme;
|
||||
require_once('XTemplate/xtpl.php');
|
||||
$error_msg = '';
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'Contacts');
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$mod_strings['LBL_SAVE_CONTACT'], true);
|
||||
echo "\n</p>\n";
|
||||
$xtpl=new XTemplate ('modules/Contacts/ShowDuplicates.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("MODULE", $_REQUEST['module']);
|
||||
if ($error_msg != '')
|
||||
{
|
||||
$xtpl->assign("ERROR", $error_msg);
|
||||
$xtpl->parse("main.error");
|
||||
}
|
||||
|
||||
if((isset($_REQUEST['popup']) && $_REQUEST['popup'] == 'true') ||(isset($_POST['popup']) && $_POST['popup']==true)) insert_popup_header($theme);
|
||||
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
$contact = new Contact();
|
||||
require_once('modules/Contacts/ContactFormBase.php');
|
||||
$contactForm = new ContactFormBase();
|
||||
$GLOBALS['check_notify'] = FALSE;
|
||||
|
||||
|
||||
$query = 'select id, first_name, last_name, title from contacts where deleted=0 ';
|
||||
$duplicates = $_POST['duplicate'];
|
||||
$count = count($duplicates);
|
||||
if ($count > 0)
|
||||
{
|
||||
$query .= "and (";
|
||||
$first = true;
|
||||
foreach ($duplicates as $duplicate_id)
|
||||
{
|
||||
if (!$first) $query .= ' OR ';
|
||||
$first = false;
|
||||
$query .= "id='$duplicate_id' ";
|
||||
}
|
||||
$query .= ')';
|
||||
}
|
||||
|
||||
$duplicateContacts = array();
|
||||
|
||||
$db = DBManagerFactory::getInstance();
|
||||
$result = $db->query($query);
|
||||
$i=0;
|
||||
while (($row=$db->fetchByAssoc($result)) != null) {
|
||||
$duplicateContacts[$i] = $row;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$xtpl->assign('FORMBODY', $contactForm->buildTableForm($duplicateContacts, 'Contacts'));
|
||||
|
||||
$input = '';
|
||||
foreach ($contact->column_fields as $field)
|
||||
{
|
||||
if (!empty($_POST['Contacts'.$field])) {
|
||||
$input .= "<input type='hidden' name='$field' value='${_POST['Contacts'.$field]}'>\n";
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($contact->additional_column_fields as $field)
|
||||
{
|
||||
if (!empty($_POST['Contacts'.$field])) {
|
||||
$input .= "<input type='hidden' name='$field' value='${_POST['Contacts'.$field]}'>\n";
|
||||
}
|
||||
}
|
||||
|
||||
require_once('include/SugarEmailAddress/SugarEmailAddress.php');
|
||||
$emailAddress = new SugarEmailAddress();
|
||||
$input .= $emailAddress->getEmailAddressWidgetDuplicatesView($contact);
|
||||
|
||||
$get = '';
|
||||
if(!empty($_POST['return_module'])) $xtpl->assign('RETURN_MODULE', $_POST['return_module']);
|
||||
else $get .= "Contacts";
|
||||
$get .= "&return_action=";
|
||||
if(!empty($_POST['return_action'])) $xtpl->assign('RETURN_ACTION', $_POST['return_action']);
|
||||
else $get .= "DetailView";
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// INBOUND EMAIL WORKFLOW
|
||||
if(isset($_REQUEST['inbound_email_id'])) {
|
||||
$xtpl->assign('INBOUND_EMAIL_ID', $_REQUEST['inbound_email_id']);
|
||||
$xtpl->assign('RETURN_MODULE', 'Emails');
|
||||
$xtpl->assign('RETURN_ACTION', 'EditView');
|
||||
if(isset($_REQUEST['start'])) {
|
||||
$xtpl->assign('START', $_REQUEST['start']);
|
||||
}
|
||||
|
||||
}
|
||||
//// END INBOUND EMAIL WORKFLOW
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
if(!empty($_POST['popup']))
|
||||
$input .= '<input type="hidden" name="popup" value="'.$_POST['popup'].'">';
|
||||
else
|
||||
$input .= '<input type="hidden" name="popup" value="false">';
|
||||
|
||||
if(!empty($_POST['to_pdf']))
|
||||
$input .= '<input type="hidden" name="to_pdf" value="'.$_POST['to_pdf'].'">';
|
||||
else
|
||||
$input .= '<input type="hidden" name="to_pdf" value="false">';
|
||||
|
||||
if(!empty($_POST['create']))
|
||||
$input .= '<input type="hidden" name="create" value="'.$_POST['create'].'">';
|
||||
else
|
||||
$input .= '<input type="hidden" name="create" value="false">';
|
||||
|
||||
if(!empty($_POST['return_id'])) $xtpl->assign('RETURN_ID', $_POST['return_id']);
|
||||
|
||||
$xtpl->assign('INPUT_FIELDS',$input);
|
||||
$xtpl->parse('main');
|
||||
$xtpl->out('main');
|
||||
|
||||
?>
|
||||
84
modules/Contacts/SimpleImage.php
Executable file
84
modules/Contacts/SimpleImage.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?
|
||||
class SimpleImage {
|
||||
|
||||
var $image;
|
||||
var $image_type;
|
||||
|
||||
function load($filename) {
|
||||
$image_info = getimagesize($filename);
|
||||
$this->image_type = $image_info[2];
|
||||
if( $this->image_type == IMAGETYPE_JPEG ) {
|
||||
$this->image = imagecreatefromjpeg($filename);
|
||||
} elseif( $this->image_type == IMAGETYPE_GIF ) {
|
||||
$this->image = imagecreatefromgif($filename);
|
||||
} elseif( $this->image_type == IMAGETYPE_PNG ) {
|
||||
$this->image = imagecreatefrompng($filename);
|
||||
}
|
||||
}
|
||||
function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) {
|
||||
if( $image_type == IMAGETYPE_JPEG ) {
|
||||
imagejpeg($this->image,$filename,$compression);
|
||||
} elseif( $image_type == IMAGETYPE_GIF ) {
|
||||
imagegif($this->image,$filename);
|
||||
} elseif( $image_type == IMAGETYPE_PNG ) {
|
||||
imagepng($this->image,$filename);
|
||||
}
|
||||
if( $permissions != null) {
|
||||
chmod($filename,$permissions);
|
||||
}
|
||||
}
|
||||
function output($image_type=IMAGETYPE_JPEG) {
|
||||
if( $image_type == IMAGETYPE_JPEG ) {
|
||||
imagejpeg($this->image);
|
||||
} elseif( $image_type == IMAGETYPE_GIF ) {
|
||||
imagegif($this->image);
|
||||
} elseif( $image_type == IMAGETYPE_PNG ) {
|
||||
imagepng($this->image);
|
||||
}
|
||||
}
|
||||
function getWidth() {
|
||||
return imagesx($this->image);
|
||||
}
|
||||
function getHeight() {
|
||||
return imagesy($this->image);
|
||||
}
|
||||
function resizeToHeight($height) {
|
||||
$ratio = $height / $this->getHeight();
|
||||
$width = $this->getWidth() * $ratio;
|
||||
$this->resize($width,$height);
|
||||
}
|
||||
function resizeToWidth($width) {
|
||||
$ratio = $width / $this->getWidth();
|
||||
$height = $this->getheight() * $ratio;
|
||||
$this->resize($width,$height);
|
||||
}
|
||||
function scale($scale) {
|
||||
$width = $this->getWidth() * $scale/100;
|
||||
$height = $this->getheight() * $scale/100;
|
||||
$this->resize($width,$height);
|
||||
}
|
||||
function resize($width,$height) {
|
||||
$new_image = imagecreatetruecolor($width, $height);
|
||||
imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight());
|
||||
$this->image = $new_image;
|
||||
}
|
||||
}
|
||||
function getSize($img,$width)
|
||||
{
|
||||
if(is_file($img))
|
||||
{
|
||||
$im=@GetImageSize($img);
|
||||
if($im[0]>=$width)
|
||||
{
|
||||
$wi=180;
|
||||
$he=$im[1]*$wi/$im[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
$wi=$im[0];
|
||||
$he=$im[1];
|
||||
}
|
||||
}
|
||||
return array($wi,$he);
|
||||
}
|
||||
?>
|
||||
59
modules/Contacts/SugarFeeds/ContactFeed.php
Executable file
59
modules/Contacts/SugarFeeds/ContactFeed.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('modules/SugarFeed/feedLogicBase.php');
|
||||
require_once('modules/SugarFeed/SugarFeed.php');
|
||||
|
||||
class ContactFeed extends FeedLogicBase{
|
||||
var $module = 'Contacts';
|
||||
function pushFeed($bean, $event, $arguments){
|
||||
$text = '';
|
||||
if(empty($bean->fetched_row)){
|
||||
$text = '{SugarFeed.CREATED_CONTACT} [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->first_name . ' ' . $bean->last_name . ']';
|
||||
}
|
||||
|
||||
if(!empty($text)){
|
||||
SugarFeed::pushFeed($text, $bean->module_dir, $bean->id
|
||||
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
21305
modules/Contacts/contactSeedData.php
Executable file
21305
modules/Contacts/contactSeedData.php
Executable file
File diff suppressed because it is too large
Load Diff
177
modules/Contacts/contactSeedData_jp.php
Executable file
177
modules/Contacts/contactSeedData_jp.php
Executable file
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
// FILE SUGAR INT ONLY
|
||||
$last_name_array = array(
|
||||
"Cumberbund",
|
||||
"Reînhold",
|
||||
"für Büurigérre",
|
||||
"Înténåénd",
|
||||
"Väestörekisterikeskus",
|
||||
"Elenå",
|
||||
"あおき",
|
||||
"オーラム",
|
||||
"タイロー",
|
||||
"ノルドウエル",
|
||||
"ロベルトス",
|
||||
"上原",
|
||||
"伊藤",
|
||||
"吉田",
|
||||
"土見",
|
||||
"大空寺",
|
||||
"天川",
|
||||
"小林",
|
||||
"平",
|
||||
"玉野",
|
||||
"石橋",
|
||||
"窪田",
|
||||
"真田",
|
||||
"徳川",
|
||||
"菊地",
|
||||
"谷山",
|
||||
"速瀬",
|
||||
"野島",
|
||||
"青木",
|
||||
"香月",
|
||||
"鳴海",
|
||||
);
|
||||
|
||||
$first_name_array = array(
|
||||
"Johånnes",
|
||||
"Hénri",
|
||||
"Marîe",
|
||||
"Lars",
|
||||
"Österreich",
|
||||
"Klaüse",
|
||||
"Александра",
|
||||
"Валерия",
|
||||
"Виктория",
|
||||
"あゆ",
|
||||
"クリス",
|
||||
"クリント",
|
||||
"さやか",
|
||||
"ジェイコブ",
|
||||
"ジョン",
|
||||
"はるか",
|
||||
"ひと美",
|
||||
"まゆ",
|
||||
"まりこ",
|
||||
"モトコ",
|
||||
"ラーズ",
|
||||
"孝之",
|
||||
"五郎",
|
||||
"徹",
|
||||
"紀章",
|
||||
"勝昭",
|
||||
"正二",
|
||||
"健太",
|
||||
"敏文",
|
||||
);
|
||||
|
||||
|
||||
$company_name_array = array(
|
||||
"Butée Torique",
|
||||
"Targéte",
|
||||
"Wally Marté",
|
||||
"Bünde-Mitte",
|
||||
"Fabriqué Interationål",
|
||||
"Életriqué Géneråle",
|
||||
"Bénellî GMBh",
|
||||
"реклама",
|
||||
"Berufskolleg für Elektrotechnik",
|
||||
"プロダクションG.I.",
|
||||
"パンダビジュアル",
|
||||
"A.B.ケアブレインズ",
|
||||
"株式会社未来商事",
|
||||
);
|
||||
|
||||
|
||||
$street_address_array = array(
|
||||
"123 Any Street",
|
||||
"562 38th Avenue",
|
||||
"2 Penultimate Loop",
|
||||
"3 Ôester Ĭsland",
|
||||
"777 ΩΔΠβκτηηκμ",
|
||||
"10 Besançon Ave",
|
||||
"4542 Rue Chambéry",
|
||||
"678 Rue St. Angoulême",
|
||||
"三番町1-2-5",
|
||||
"富士見が丘545",
|
||||
"北見通り659",
|
||||
"海岸通り975",
|
||||
"3丁目2-5",
|
||||
"金岡町54654",
|
||||
"多古4678",
|
||||
"大洲5454",
|
||||
"海浜幕張4789",
|
||||
"御茶ノ水647",
|
||||
);
|
||||
|
||||
|
||||
$city_array = array (
|
||||
"Nice",
|
||||
"Orléans",
|
||||
"San Francisco",
|
||||
"Cupertino",
|
||||
"New York",
|
||||
"London",
|
||||
"Moscow",
|
||||
"Lisbon",
|
||||
"Böblingen",
|
||||
"Thüringen",
|
||||
"中央区",
|
||||
"京都市",
|
||||
"ニューヨーク",
|
||||
"サンフランシスコ",
|
||||
"ロサンゼルス",
|
||||
"ロンドン",
|
||||
"シカゴ",
|
||||
);
|
||||
|
||||
$last_name_count = count($last_name_array);
|
||||
$first_name_count = count($first_name_array);
|
||||
$company_name_count = count($company_name_array);
|
||||
$street_address_count = count($street_address_array);
|
||||
$city_array_count = count($city_array);
|
||||
|
||||
?>
|
||||
67
modules/Contacts/controller.php
Executable file
67
modules/Contacts/controller.php
Executable file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
class ContactsController extends SugarController
|
||||
{
|
||||
function action_Popup(){
|
||||
if(!empty($_REQUEST['html']) && $_REQUEST['html'] == 'mail_merge'){
|
||||
$this->view = 'mailmergepopup';
|
||||
}else{
|
||||
$this->view = 'popup';
|
||||
}
|
||||
}
|
||||
|
||||
function action_ValidPortalUsername()
|
||||
{
|
||||
$this->view = 'validportalusername';
|
||||
}
|
||||
|
||||
function action_RetrieveEmail()
|
||||
{
|
||||
$this->view = 'retrieveemail';
|
||||
}
|
||||
|
||||
function action_ContactAddressPopup()
|
||||
{
|
||||
$this->view = 'contactaddresspopup';
|
||||
}
|
||||
|
||||
function action_CloseContactAddressPopup()
|
||||
{
|
||||
$this->view = 'closecontactaddresspopup';
|
||||
}
|
||||
}
|
||||
?>
|
||||
105
modules/Contacts/field_arrays.php
Executable file
105
modules/Contacts/field_arrays.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 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* 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['Contact'] = array ('column_fields' => Array("id"
|
||||
,"date_entered"
|
||||
,"date_modified"
|
||||
,"modified_user_id"
|
||||
,"assigned_user_id"
|
||||
, "created_by"
|
||||
|
||||
|
||||
|
||||
,"salutation"
|
||||
,"first_name"
|
||||
,"last_name"
|
||||
,"lead_source"
|
||||
,"title"
|
||||
,"department"
|
||||
,"birthdate"
|
||||
,"reports_to_id"
|
||||
,"do_not_call"
|
||||
,"phone_home"
|
||||
,"phone_mobile"
|
||||
, "portal_name"
|
||||
, "portal_app"
|
||||
,"portal_active"
|
||||
,"portal_password"
|
||||
,"phone_work"
|
||||
,"phone_other"
|
||||
,"phone_fax"
|
||||
,"assistant"
|
||||
,"assistant_phone"
|
||||
,"email_opt_out"
|
||||
,"primary_address_street"
|
||||
,"primary_address_city"
|
||||
,"primary_address_state"
|
||||
,"primary_address_postalcode"
|
||||
,"primary_address_country"
|
||||
,"alt_address_street"
|
||||
,"alt_address_city"
|
||||
,"alt_address_state"
|
||||
,"alt_address_postalcode"
|
||||
,"alt_address_country"
|
||||
,"description"
|
||||
,'invalid_email'
|
||||
,"campaign_id"
|
||||
,"mailing_tag"
|
||||
,"foreign_contact"
|
||||
),
|
||||
'list_fields' => Array('id', 'first_name', 'last_name', 'account_name', 'account_id', 'title', 'phone_work', 'assigned_user_name', 'assigned_user_id', "case_role", 'case_rel_id', 'opportunity_role', 'opportunity_rel_id','foreign_contact'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
,'invalid_email'
|
||||
|
||||
|
||||
|
||||
|
||||
),
|
||||
'required_fields' => array("last_name"=>1),
|
||||
);
|
||||
?>
|
||||
238
modules/Contacts/language/en_us.lang.php
Executable file
238
modules/Contacts/language/en_us.lang.php
Executable file
@@ -0,0 +1,238 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_FOREIGN_CONTACT'=>'Foreign contact',
|
||||
'LBL_MAILING_TAG'=>'Mailing Tag',
|
||||
//DON'T CONVERT THESE THEY ARE MAPPINGS
|
||||
'db_last_name' => 'LBL_LIST_LAST_NAME',
|
||||
'db_first_name' => 'LBL_LIST_FIRST_NAME',
|
||||
'db_title' => 'LBL_LIST_TITLE',
|
||||
'db_email1' => 'LBL_LIST_EMAIL_ADDRESS',
|
||||
'db_email2' => 'LBL_LIST_OTHER_EMAIL_ADDRESS',
|
||||
//END DON'T CONVERT
|
||||
|
||||
|
||||
|
||||
'ERR_DELETE_RECORD' => 'Specify the record number to delete the contact.',
|
||||
'LBL_ACCOUNT_ID' => 'Account ID:',
|
||||
'LBL_ACCOUNT_NAME' => 'Account Name:',
|
||||
'LBL_CAMPAIGN' => 'Campaign:',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Activities',
|
||||
'LBL_ADD_BUSINESSCARD' => 'Enter Business Card',
|
||||
'LBL_ADDMORE_BUSINESSCARD' => 'Add another business card',
|
||||
'LBL_ADDRESS_INFORMATION' => 'Address Information',
|
||||
'LBL_ALT_ADDRESS_CITY' => 'Alternate Address City:',
|
||||
'LBL_ALT_ADDRESS_COUNTRY' => 'Alternate Address Country:',
|
||||
'LBL_ALT_ADDRESS_POSTALCODE' => 'Alternate Address Postal Code:',
|
||||
'LBL_ALT_ADDRESS_STATE' => 'Alternate Address State:',
|
||||
'LBL_ALT_ADDRESS_STREET_2' => 'Alternate Address Street 2:',
|
||||
'LBL_ALT_ADDRESS_STREET_3' => 'Alternate Address Street 3:',
|
||||
'LBL_ALT_ADDRESS_STREET' => 'Alternate Address Street:',
|
||||
'LBL_ALTERNATE_ADDRESS' => 'Other Address:',
|
||||
'LBL_ANY_ADDRESS' => 'Any Address:',
|
||||
'LBL_ANY_EMAIL' => 'Any Email:',
|
||||
'LBL_ANY_PHONE' => 'Any Phone:',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Assigned to:',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned User',
|
||||
'LBL_ASSISTANT_PHONE' => 'Assistant Phone:',
|
||||
'LBL_ASSISTANT' => 'Assistant:',
|
||||
'LBL_BIRTHDATE' => 'Birthdate:',
|
||||
'LBL_BUSINESSCARD' => 'Business Card',
|
||||
'LBL_CITY' => 'City:',
|
||||
'LBL_CAMPAIGN_ID' => 'Campaign ID',
|
||||
'LBL_CONTACT_INFORMATION' => 'Contact Information',
|
||||
'LBL_CONTACT_NAME' => 'Contact Name:',
|
||||
'LBL_CONTACT_OPP_FORM_TITLE' => 'Contact-Opportunity:',
|
||||
'LBL_CONTACT_ROLE' => 'Role:',
|
||||
'LBL_CONTACT' => 'Contact:',
|
||||
'LBL_COUNTRY' => 'Country:',
|
||||
'LBL_CREATED_ACCOUNT' => 'Created a new account',
|
||||
'LBL_CREATED_CALL' => 'Created a new call',
|
||||
'LBL_CREATED_CONTACT' => 'Created a new contact',
|
||||
'LBL_CREATED_MEETING' => 'Created a new meeting',
|
||||
'LBL_CREATED_OPPORTUNITY' =>'Created a new opportunity',
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified:',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Contacts',
|
||||
'LBL_DEPARTMENT' => 'Department:',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Description Information',
|
||||
'LBL_DESCRIPTION' => 'Description:',
|
||||
'LBL_DIRECT_REPORTS_SUBPANEL_TITLE'=>'Direct Reports',
|
||||
'LBL_DO_NOT_CALL' => 'Do Not Call:',
|
||||
'LBL_DUPLICATE' => 'Possible Duplicate Contacts',
|
||||
'LBL_EMAIL_ADDRESS' => 'Email:',
|
||||
'LBL_EMAIL_OPT_OUT' => 'Email Opt Out:',
|
||||
'LBL_EMPTY_VCARD' => 'Please select a vCard file',
|
||||
'LBL_EXISTING_ACCOUNT' => 'Used an existing account',
|
||||
'LBL_EXISTING_CONTACT' => 'Used an existing contact',
|
||||
'LBL_EXISTING_OPPORTUNITY'=> 'Used an existing opportunity',
|
||||
'LBL_FAX_PHONE' => 'Fax:',
|
||||
'LBL_FIRST_NAME' => 'First Name:',
|
||||
'LBL_FULL_NAME' => 'Full Name:',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE'=>'History',
|
||||
'LBL_HOME_PHONE' => 'Home:',
|
||||
'LBL_ID' => 'ID:',
|
||||
'LBL_IMPORT_VCARD' => 'Import vCard',
|
||||
'LBL_VCARD' => 'vCard',
|
||||
'LBL_IMPORT_VCARDTEXT' => 'Automatically create a new contact by importing a vCard from your file system.',
|
||||
'LBL_INVALID_EMAIL'=>'Invalid Email:',
|
||||
'LBL_INVITEE' => 'Direct Reports',
|
||||
'LBL_LAST_NAME' => 'Last Name:',
|
||||
'LBL_LEAD_SOURCE' => 'Lead Source:',
|
||||
'LBL_LIST_ACCEPT_STATUS' => 'Accept Status',
|
||||
'LBL_LIST_ACCOUNT_NAME' => 'Account Name',
|
||||
'LBL_LIST_CONTACT_NAME' => 'Contact Name',
|
||||
'LBL_LIST_CONTACT_ROLE' => 'Role',
|
||||
'LBL_LIST_EMAIL_ADDRESS' => 'Email',
|
||||
'LBL_LIST_FIRST_NAME' => 'First Name',
|
||||
'LBL_LIST_FORM_TITLE' => 'Contact List',
|
||||
'LBL_VIEW_FORM_TITLE' => 'Contact View',
|
||||
'LBL_LIST_LAST_NAME' => 'Last Name',
|
||||
'LBL_LIST_DATE_MODIFIED' => 'Data Modyfikacji',
|
||||
'LBL_LIST_NAME' => 'Name',
|
||||
'LBL_LIST_OTHER_EMAIL_ADDRESS' => 'Other Email',
|
||||
'LBL_LIST_PHONE' => 'Office Phone',
|
||||
'LBL_LIST_TITLE' => 'Title',
|
||||
'LBL_MOBILE_PHONE' => 'Mobile:',
|
||||
'LBL_MODIFIED' => 'Modified By:',
|
||||
'LBL_MODULE_NAME' => 'Contacts',
|
||||
'LBL_MODULE_TITLE' => 'Contacts: Home',
|
||||
'LBL_NAME' => 'Name:',
|
||||
'LBL_NEW_FORM_TITLE' => 'New Contact',
|
||||
'LBL_NEW_PORTAL_PASSWORD' => 'New Portal Password:',
|
||||
'LBL_NOTE_SUBJECT' =>'Note Subject',
|
||||
'LBL_OFFICE_PHONE' => 'Office Phone:',
|
||||
'LBL_OPP_NAME' => 'Opportunity Name:',
|
||||
'LBL_OPPORTUNITY_ROLE_ID'=>'Opportunity Role ID:',
|
||||
'LBL_OPPORTUNITY_ROLE'=>'Opportunity Role',
|
||||
'LBL_OTHER_EMAIL_ADDRESS' => 'Other Email:',
|
||||
'LBL_OTHER_PHONE' => 'Other Phone:',
|
||||
'LBL_PHONE' => 'Phone:',
|
||||
'LBL_PORTAL_ACTIVE' => 'Portal Active:',
|
||||
'LBL_PORTAL_APP'=>'Portal Application:',
|
||||
'LBL_PORTAL_INFORMATION' => 'Portal Information',
|
||||
'LBL_PORTAL_NAME' => 'Portal Name:',
|
||||
'LBL_PORTAL_PASSWORD_ISSET' => 'Portal Password is Set:',
|
||||
'LBL_POSTAL_CODE' => 'Postal Code:',
|
||||
'LBL_PRIMARY_ADDRESS_CITY' => 'Primary Address City:',
|
||||
'LBL_PRIMARY_ADDRESS_COUNTRY' => 'Primary Address Country:',
|
||||
'LBL_PRIMARY_ADDRESS_POSTALCODE' => 'Primary Address Postal Code:',
|
||||
'LBL_PRIMARY_ADDRESS_STATE' => 'Primary Address State:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET_2' => 'Primary Address Street 2:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET_3' => 'Primary Address Street 3:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET' => 'Primary Address Street:',
|
||||
'LBL_PRIMARY_ADDRESS' => 'Primary Address:',
|
||||
'LBL_PRODUCTS_TITLE'=>'Products',
|
||||
'LBL_RELATED_CONTACTS_TITLE'=>'Related Contacts',
|
||||
'LBL_REPORTS_TO_ID'=>'Reports to ID:',
|
||||
'LBL_REPORTS_TO' => 'Reports To:',
|
||||
'LBL_RESOURCE_NAME' => 'Resource Name',
|
||||
'LBL_SALUTATION' => 'Salutation:',
|
||||
'LBL_SAVE_CONTACT' => 'Save Contact',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Contact Search',
|
||||
'LBL_SELECT_CHECKED_BUTTON_LABEL' => 'Select Checked Contacts',
|
||||
'LBL_SELECT_CHECKED_BUTTON_TITLE' => 'Select Checked Contacts',
|
||||
'LBL_STATE' => 'State:',
|
||||
'LBL_SYNC_CONTACT' => 'Sync to Outlook®:',
|
||||
'LBL_PROSPECT_LIST' => 'Prospect List',
|
||||
|
||||
|
||||
|
||||
'LBL_TITLE' => 'Title:',
|
||||
'LNK_CONTACT_LIST' => 'Contacts',
|
||||
'LNK_IMPORT_VCARD' => 'Create From vCard',
|
||||
'LNK_NEW_ACCOUNT' => 'Create Account',
|
||||
'LNK_NEW_APPOINTMENT' => 'Create Appointment',
|
||||
'LNK_NEW_CALL' => 'Schedule Call',
|
||||
'LNK_NEW_CASE' => 'Create Case',
|
||||
'LNK_NEW_CONTACT' => 'Create Contact',
|
||||
'LNK_NEW_EMAIL' => 'Archive Email',
|
||||
'LNK_NEW_MEETING' => 'Schedule Meeting',
|
||||
'LNK_NEW_NOTE' => 'Create Note',
|
||||
'LNK_NEW_OPPORTUNITY' => 'Create Opportunity',
|
||||
'LNK_NEW_TASK' => 'Create Task',
|
||||
'LNK_SELECT_ACCOUNT' => "Select Account",
|
||||
'MSG_DUPLICATE' => 'The contact record you are about to create might be a duplicate of a contact record that already exists. Contact records containing similar names and/or email addresses are listed below.<br>Click Save to continue creating this new contact, or click Cancel to return to the module without creating the contact.',
|
||||
'MSG_SHOW_DUPLICATES' => 'The contact record you are about to create might be a duplicate of a contact record that already exists. Contact records containing similar names and/or email addresses are listed below.<br>Click Save to continue creating this new contact, or click Cancel to return to the module without creating the contact.',
|
||||
'NTC_COPY_ALTERNATE_ADDRESS' => 'Copy alternate address to primary address',
|
||||
'NTC_COPY_PRIMARY_ADDRESS' => 'Copy primary address to alternate address',
|
||||
'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to delete this record?',
|
||||
'NTC_OPPORTUNITY_REQUIRES_ACCOUNT' => 'Creating an opportunity requires an account.\n Please either create a new account or select an existing one.',
|
||||
'NTC_REMOVE_CONFIRMATION' => 'Are you sure you want to remove this contact from the case?',
|
||||
'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Are you sure you want to remove this record as a direct report?',
|
||||
|
||||
'LBL_USER_PASSWORD' => 'Password:',
|
||||
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Leads',
|
||||
'LBL_OPPORTUNITIES_SUBPANEL_TITLE' => 'Opportunities',
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_CASES_SUBPANEL_TITLE' => 'Cases',
|
||||
'LBL_BUGS_SUBPANEL_TITLE' => 'Bugs',
|
||||
'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projects',
|
||||
'LBL_COPY_ADDRESS_CHECKED' => 'Copy Address to Checked Contacts',
|
||||
'LBL_TARGET_OF_CAMPAIGNS' => 'Campaigns (Target of) :',
|
||||
'LBL_CAMPAIGNS' => 'Campaigns',
|
||||
'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE'=>'Campaigns',
|
||||
'LBL_LIST_CITY' => 'City',
|
||||
'LBL_LIST_STATE' => 'State',
|
||||
'LBL_HOMEPAGE_TITLE' => 'My Contacts',
|
||||
'LBL_OPPORTUNITIES' => 'Opportunities',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_CHECKOUT_DATE'=>'Checkout Date',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)
|
||||
?>
|
||||
235
modules/Contacts/language/ge_ge.lang.php
Executable file
235
modules/Contacts/language/ge_ge.lang.php
Executable file
@@ -0,0 +1,235 @@
|
||||
i<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
//DON'T CONVERT THESE THEY ARE MAPPINGS
|
||||
'db_last_name' => 'LBL_LIST_LAST_NAME',
|
||||
'db_first_name' => 'LBL_LIST_FIRST_NAME',
|
||||
'db_title' => 'LBL_LIST_TITLE',
|
||||
'db_email1' => 'LBL_LIST_EMAIL_ADDRESS',
|
||||
'db_email2' => 'LBL_LIST_OTHER_EMAIL_ADDRESS',
|
||||
//END DON'T CONVERT
|
||||
|
||||
|
||||
|
||||
'ERR_DELETE_RECORD' => 'Die Nummer eines Eintrages muss angegeben werden um einen Kontakt zu löschen!',
|
||||
'LBL_ACCOUNT_ID' => 'Firma ID',
|
||||
'LBL_ACCOUNT_NAME' => 'Firmenname:',
|
||||
'LBL_CAMPAIGN' => 'Kampagne:',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Aktivitäten',
|
||||
'LBL_ADD_BUSINESSCARD' => 'Eingabe Visitenkarte',
|
||||
'LBL_ADDMORE_BUSINESSCARD' => 'Weitere Visitenkarte anlegen',
|
||||
'LBL_ADDRESS_INFORMATION' => 'Adressinformation',
|
||||
'LBL_ALT_ADDRESS_CITY' => '2. Adresse Stadt:',
|
||||
'LBL_ALT_ADDRESS_COUNTRY' => '2. Adresse Land:',
|
||||
'LBL_ALT_ADDRESS_POSTALCODE' => '2. Adresse PLZ:',
|
||||
'LBL_ALT_ADDRESS_STATE' => '2. Adresse Bundesland:',
|
||||
'LBL_ALT_ADDRESS_STREET_2' => '2. Adresse Straße 2:',
|
||||
'LBL_ALT_ADDRESS_STREET_3' => '2. Adresse Straße 3:',
|
||||
'LBL_ALT_ADDRESS_STREET' => '2. Adresse Straße:',
|
||||
'LBL_ALTERNATE_ADDRESS' => 'Weitere Adresse:',
|
||||
'LBL_ANY_ADDRESS' => 'Irgendeine Adresse:',
|
||||
'LBL_ANY_EMAIL' => 'Irgendeine E-Mail:',
|
||||
'LBL_ANY_PHONE' => 'Irgendeine Telefonnummer:',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Zugewiesen an:',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Zugew. Benutzer',
|
||||
'LBL_ASSISTANT_PHONE' => 'Telefonnr. Assistent:',
|
||||
'LBL_ASSISTANT' => 'Assistent:',
|
||||
'LBL_BIRTHDATE' => 'Geburtstag:',
|
||||
'LBL_BUSINESSCARD' => 'Visitenkarte',
|
||||
'LBL_CITY' => 'Stadt:',
|
||||
'LBL_CAMPAIGN_ID' => 'Kampagnen ID',
|
||||
'LBL_CONTACT_INFORMATION' => 'Kontakt Information',
|
||||
'LBL_CONTACT_NAME' => 'Name:',
|
||||
'LBL_CONTACT_OPP_FORM_TITLE' => 'Kontakt-Verkaufschance:',
|
||||
'LBL_CONTACT_ROLE' => 'Beruf:',
|
||||
'LBL_CONTACT' => 'Kontakt:',
|
||||
'LBL_COUNTRY' => 'Land:',
|
||||
'LBL_CREATED_ACCOUNT' => 'Neue Firma angelegt',
|
||||
'LBL_CREATED_CALL' => 'Neuer Anruf angelegt',
|
||||
'LBL_CREATED_CONTACT' => 'Neuer Kontakt angelegt',
|
||||
'LBL_CREATED_MEETING' => 'Neues Meeting angelegt',
|
||||
'LBL_CREATED_OPPORTUNITY' =>'Neue Verkaufschance erstellt',
|
||||
'LBL_DATE_MODIFIED' => 'Geändert am:',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Kontakte',
|
||||
'LBL_DEPARTMENT' => 'Abteilung:',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Beschreibungsinformation',
|
||||
'LBL_DESCRIPTION' => 'Beschreibung:',
|
||||
'LBL_DIRECT_REPORTS_SUBPANEL_TITLE'=>'Direkt-Unterstellte',
|
||||
'LBL_DO_NOT_CALL' => 'Nicht anrufen:',
|
||||
'LBL_DUPLICATE' => 'Mögliche doppelte Kontakte',
|
||||
'LBL_EMAIL_ADDRESS' => 'E-Mail:',
|
||||
'LBL_EMAIL_OPT_OUT' => 'Keine E-Mails senden:',
|
||||
'LBL_EMPTY_VCARD' => 'Bitte wählen Sie eine vCard Datei aus',
|
||||
'LBL_EXISTING_ACCOUNT' => 'Vorhandene Firma ausgewählt',
|
||||
'LBL_EXISTING_CONTACT' => 'Vorhandener Kontakt ausgewählt',
|
||||
'LBL_EXISTING_OPPORTUNITY'=> 'Vorhandene Verkaufschance benutzt',
|
||||
'LBL_FAX_PHONE' => 'Fax:',
|
||||
'LBL_FIRST_NAME' => 'Vorname:',
|
||||
'LBL_FULL_NAME' => 'Ganzer Name:',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE'=>'Verlauf',
|
||||
'LBL_HOME_PHONE' => 'Privat:',
|
||||
'LBL_ID' => 'ID:',
|
||||
'LBL_IMPORT_VCARD' => 'vCard importieren',
|
||||
'LBL_VCARD' => 'vCard',
|
||||
'LBL_IMPORT_VCARDTEXT' => 'Durch Import einer vCard neuen Kontakt automatisch anlegen.',
|
||||
'LBL_INVALID_EMAIL'=>'Ungültige E-Mail:',
|
||||
'LBL_INVITEE' => 'Direkt-Unterstellte',
|
||||
'LBL_LAST_NAME' => 'Nachname:',
|
||||
'LBL_LEAD_SOURCE' => 'Quelle:',
|
||||
'LBL_LIST_ACCEPT_STATUS' => 'Status',
|
||||
'LBL_LIST_ACCOUNT_NAME' => 'Firmenname',
|
||||
'LBL_LIST_CONTACT_NAME' => 'Kontakt:',
|
||||
'LBL_LIST_CONTACT_ROLE' => 'Rolle',
|
||||
'LBL_LIST_EMAIL_ADDRESS' => 'E-Mail',
|
||||
'LBL_LIST_FIRST_NAME' => 'Vorname',
|
||||
'LBL_LIST_FORM_TITLE' => 'Kontakt Liste',
|
||||
'LBL_VIEW_FORM_TITLE' => 'Kontakt Ansicht',
|
||||
'LBL_LIST_LAST_NAME' => 'Nachname',
|
||||
'LBL_LIST_NAME' => 'Name',
|
||||
'LBL_LIST_OTHER_EMAIL_ADDRESS' => 'Weitere E-Mail',
|
||||
'LBL_LIST_PHONE' => 'Telefon Büro',
|
||||
'LBL_LIST_TITLE' => 'Funktion',
|
||||
'LBL_MOBILE_PHONE' => 'Mobiltelefon:',
|
||||
'LBL_MODIFIED' => 'Geändert von:',
|
||||
'LBL_MODULE_NAME' => 'Kontakte',
|
||||
'LBL_MODULE_TITLE' => 'Kontakte: Home',
|
||||
'LBL_NAME' => 'Name:',
|
||||
'LBL_NEW_FORM_TITLE' => 'Neuer Kontakt',
|
||||
'LBL_NEW_PORTAL_PASSWORD' => 'Neues Portal Passwort:',
|
||||
'LBL_NOTE_SUBJECT' =>'Betreff Notiz',
|
||||
'LBL_OFFICE_PHONE' => 'Bürotelefon:',
|
||||
'LBL_OPP_NAME' => 'Verkaufschance Name:',
|
||||
'LBL_OPPORTUNITY_ROLE_ID'=>'Verkaufschance Rollen ID:',
|
||||
'LBL_OPPORTUNITY_ROLE'=>'Verkaufschance Rolle',
|
||||
'LBL_OTHER_EMAIL_ADDRESS' => 'Weitere E-Mail:',
|
||||
'LBL_OTHER_PHONE' => 'Weiteres Telefon:',
|
||||
'LBL_PHONE' => 'Telefon:',
|
||||
'LBL_PORTAL_ACTIVE' => 'Portal Aktiv:',
|
||||
'LBL_PORTAL_APP'=>'Portal Anwendung',
|
||||
'LBL_PORTAL_INFORMATION' => 'Portal Information',
|
||||
'LBL_PORTAL_NAME' => 'Portal Name:',
|
||||
'LBL_PORTAL_PASSWORD_ISSET' => 'Portal Password ist gesetzt:',
|
||||
'LBL_POSTAL_CODE' => 'PLZ:',
|
||||
'LBL_PRIMARY_ADDRESS_CITY' => 'Hauptadresse Stadt:',
|
||||
'LBL_PRIMARY_ADDRESS_COUNTRY' => 'Hauptadresse Land:',
|
||||
'LBL_PRIMARY_ADDRESS_POSTALCODE' => 'Hauptadresse PLZ:',
|
||||
'LBL_PRIMARY_ADDRESS_STATE' => 'Hauptadresse Bundesland:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET_2' => 'Hauptadresse Straße 2:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET_3' => 'Hauptadresse Straße 3:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET' => 'Hauptadresse Straße:',
|
||||
'LBL_PRIMARY_ADDRESS' => 'Hauptadresse:',
|
||||
'LBL_PRODUCTS_TITLE'=>'Produkte',
|
||||
'LBL_RELATED_CONTACTS_TITLE'=>'Verknüpfte Kontakte',
|
||||
'LBL_REPORTS_TO_ID'=>'Berichtet an ID',
|
||||
'LBL_REPORTS_TO' => 'Berichtet an:',
|
||||
'LBL_RESOURCE_NAME' => 'Ressourcenname',
|
||||
'LBL_SALUTATION' => 'Anrede:',
|
||||
'LBL_SAVE_CONTACT' => 'Kontakt speichern',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Kontakte Suche',
|
||||
'LBL_SELECT_CHECKED_BUTTON_LABEL' => 'Markierte Kontakte auswählen',
|
||||
'LBL_SELECT_CHECKED_BUTTON_TITLE' => 'Markierte Kontakte auswählen',
|
||||
'LBL_STATE' => 'Bundesland:',
|
||||
'LBL_SYNC_CONTACT' => 'Sync mit Outlook®:',
|
||||
'LBL_PROSPECT_LIST' => 'Kontaktliste',
|
||||
|
||||
|
||||
|
||||
'LBL_TITLE' => 'Funktion:',
|
||||
'LNK_CONTACT_LIST' => 'Kontakte',
|
||||
'LNK_IMPORT_VCARD' => 'vCard importieren',
|
||||
'LNK_NEW_ACCOUNT' => 'Neue Firma',
|
||||
'LNK_NEW_APPOINTMENT' => 'Neuer Termin',
|
||||
'LNK_NEW_CALL' => 'Neuer Anruf',
|
||||
'LNK_NEW_CASE' => 'Neuer Fall',
|
||||
'LNK_NEW_CONTACT' => 'Neuer Kontakt',
|
||||
'LNK_NEW_EMAIL' => 'E-Mail archivieren',
|
||||
'LNK_NEW_MEETING' => 'Neues Meeting',
|
||||
'LNK_NEW_NOTE' => 'Neue Notiz',
|
||||
'LNK_NEW_OPPORTUNITY' => 'Neue Verkaufschance',
|
||||
'LNK_NEW_TASK' => 'Neue Aufgabe',
|
||||
'LNK_SELECT_ACCOUNT' => "Firma auswählen",
|
||||
'MSG_DUPLICATE' => 'Der Kontakt den Sie gerade erstellen, könnte eine Dublette eines bereits bestehenden Kontakts sein. Kontakte mit ähnlichen Namen / E-Mail Adressen sind unten aufgeführt.<br>Drücken Sie auf Speichern um fortzusetzen oder auf Abbrechen um zum Modul zurückzukehren ohne den Kontakt zu speichern.',
|
||||
'MSG_SHOW_DUPLICATES' => 'Der Kontakt den Sie gerade erstellen, könnte eine Dublette eines bereits bestehenden Kontakts sein. Kontakte mit ähnlichen Namen / E-Mail Adressen sind unten aufgeführt.<br>Drücken Sie auf Speichern um fortzusetzen oder auf Abbrechen um zum Modul zurückzukehren ohne den Kontakt zu speichern.',
|
||||
'NTC_COPY_ALTERNATE_ADDRESS' => 'Weitere Adresse in Hauptadresse kopieren',
|
||||
'NTC_COPY_PRIMARY_ADDRESS' => 'Hauptadresse in weitere Adresse kopieren',
|
||||
'NTC_DELETE_CONFIRMATION' => 'Sind Sie sicher, dass Sie diesen Eintrag löschen wollen?',
|
||||
'NTC_OPPORTUNITY_REQUIRES_ACCOUNT' => 'Zum erstellen einer Verkaufschance benötigen Sie eine Firma. Bitte erstellen Sie eine Firma oder wählen Sie eine existierende aus.',
|
||||
'NTC_REMOVE_CONFIRMATION' => 'Möchten Sie diesen Kontakt wirklich von diesem Fall entfernen?',
|
||||
'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Möchten Sie diesen Eintrag wirklich als direkten Bericht entfernen?',
|
||||
|
||||
'LBL_USER_PASSWORD' => 'Passwort:',
|
||||
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Interessenten',
|
||||
'LBL_OPPORTUNITIES_SUBPANEL_TITLE' => 'Verkaufschancen',
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_CASES_SUBPANEL_TITLE' => 'Fälle',
|
||||
'LBL_BUGS_SUBPANEL_TITLE' => 'Fehler',
|
||||
'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projekte',
|
||||
'LBL_COPY_ADDRESS_CHECKED' => 'Adresse zu gewählten Kontakten kopieren',
|
||||
'LBL_TARGET_OF_CAMPAIGNS' => 'Kampagnen (Ziele von):',
|
||||
'LBL_CAMPAIGNS' => 'Kampagnen',
|
||||
'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE'=>'Kampagnen',
|
||||
'LBL_LIST_CITY' => 'Stadt',
|
||||
'LBL_LIST_STATE' => 'Bundesland',
|
||||
'LBL_HOMEPAGE_TITLE' => 'Meine Kontakte',
|
||||
'LBL_OPPORTUNITIES' => 'Verkaufschancen',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_CHECKOUT_DATE'=>'Datum ausgecheckt',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)
|
||||
?>
|
||||
224
modules/Contacts/language/pl_pl.lang.php
Executable file
224
modules/Contacts/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,224 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2005 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1 -->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
//DON'T CONVERT THESE THEY ARE MAPPINGS
|
||||
'db_last_name' => 'LBL_LIST_LAST_NAME',
|
||||
'db_first_name' => 'LBL_LIST_FIRST_NAME',
|
||||
'db_title' => 'LBL_LIST_TITLE',
|
||||
'db_email1' => 'LBL_LIST_EMAIL_ADDRESS',
|
||||
'db_email2' => 'LBL_LIST_OTHER_EMAIL_ADDRESS',
|
||||
//END DON'T CONVERT
|
||||
|
||||
'LNK_CONTACT_REPORTS' => 'Raporty Kontaktów',
|
||||
'LBL_PANEL_MAILINGGROUPS'=>'Grupy mailingowe',
|
||||
'LBL_MAILINGGROUP_NAME'=>"Nazwa grupy",
|
||||
'LBL_MAILINGGROUP_AVAILABLE'=>"Aktywna",
|
||||
'ERR_DELETE_RECORD' => 'Numer rekordu musi być określony, aby usunąć kontakt.',
|
||||
'LBL_ACCOUNT_ID' => 'ID Klienta:',
|
||||
'LBL_ACCOUNT_NAME' => 'Nazwa Klienta:',
|
||||
'LBL_CAMPAIGN' => 'Kampania:',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Działania',
|
||||
'LBL_ADD_BUSINESSCARD' => 'Wprowadź wizytówkę',
|
||||
'LBL_ADDMORE_BUSINESSCARD' => 'Dodaj inną wizytówkę',
|
||||
'LBL_ADDRESS_INFORMATION' => 'Dane adresowe',
|
||||
'LBL_ALT_ADDRESS_CITY' => 'Inne miasto Adresata:',
|
||||
'LBL_ALT_ADDRESS_COUNTRY' => 'Inny kraj Adresata:',
|
||||
'LBL_ALT_ADDRESS_POSTALCODE' => 'Inny Kod pocztowy Adresata:',
|
||||
'LBL_ALT_ADDRESS_STATE' => 'Nazwa innego województwa Adresata:',
|
||||
'LBL_ALT_ADDRESS_STREET_2' => 'Inna nazwa ulicy Adresata 2:',
|
||||
'LBL_ALT_ADDRESS_STREET_3' => 'Inna nazwa ulicy Adresata 3:',
|
||||
'LBL_ALT_ADDRESS_STREET' => 'Inna nazwy ulicy Adresata:',
|
||||
'LBL_ALTERNATE_ADDRESS' => 'Adres 2:<br><br><br>Gmina:',
|
||||
'LBL_ANY_ADDRESS' => 'Dodaktowy adres:',
|
||||
'LBL_ANY_EMAIL' => 'Dodaktowy Email:',
|
||||
'LBL_ANY_PHONE' => 'Dodaktowy numer telefonu:',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Przydzielone do:',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Przydzielone do Użytkownika',
|
||||
'LBL_ASSISTANT_PHONE' => 'Telefon asystenta:',
|
||||
'LBL_FOREIGN_CONTACT' => 'Kontakt zagraniczny',
|
||||
'LBL_ASSISTANT' => 'Asystent:',
|
||||
'LBL_BIRTHDATE' => 'Data urodzin:',
|
||||
'LBL_MAILING_TAG' => 'Etykieta pocztowa',
|
||||
'LBL_BUSINESSCARD' => 'Wizytówka',
|
||||
'LBL_CITY' => 'Miasto:',
|
||||
'LBL_CAMPAIGN_ID' => 'ID Kampanii:',
|
||||
'LBL_CONTACT_INFORMATION' => 'Dane kontaktowe',
|
||||
'LBL_CONTACT_NAME' => 'Nazwa kontaktowa:',
|
||||
'LBL_CONTACT_OPP_FORM_TITLE' => 'Kontakt-Temat:',
|
||||
'LBL_CONTACT_ROLE' => 'Zależność:',
|
||||
'LBL_CONTACT' => 'Kontakt:',
|
||||
'LBL_COUNTRY' => 'Kraj:',
|
||||
'LBL_CREATED_ACCOUNT' => 'Utwórz nowego Klienta',
|
||||
'LBL_CREATED_CALL' => 'Utwórz rozmowę telefoniczną',
|
||||
'LBL_CREATED_CONTACT' => 'Utwórz nowy Kontakt',
|
||||
'LBL_CREATED_MEETING' => 'Utwórz nowe Spotkanie',
|
||||
'LBL_CREATED_OPPORTUNITY' =>'Utwóż nowy Temat',
|
||||
'LBL_DATE_MODIFIED' => 'Zmodyfikowano:',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Kontakty',
|
||||
'LBL_CONTACT_IMAGE'=>'Zdjęcie',
|
||||
'LBL_UPLOADED'=>'[Załadowany]',
|
||||
'LBL_DEPARTMENT' => 'Departament:',
|
||||
'LBL_ECMCOMMUNE'=>'Gmina',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Informacje opisujące',
|
||||
'LBL_DESCRIPTION' => 'Opis:',
|
||||
'LBL_DIRECT_REPORTS_SUBPANEL_TITLE'=>'Raportowanie bezpośrednie',
|
||||
'LBL_DO_NOT_CALL' => 'Nie dzwonić',
|
||||
'LBL_DUPLICATE' => 'Moliwość zduplikowania Kontaktu',
|
||||
'LBL_EMAIL_ADDRESS' => 'Email:',
|
||||
'LBL_EMAIL_OPT_OUT' => 'Opcjonalny Email:',
|
||||
'LBL_EXISTING_ACCOUNT' => 'Użyto istniejcego Klienta',
|
||||
'LBL_EXISTING_CONTACT' => 'Użyto istniejcego Kontaktu',
|
||||
'LBL_EXISTING_OPPORTUNITY'=> 'Użyto istniejącego Tematu',
|
||||
'LBL_FAX_PHONE' => 'Fax:',
|
||||
'LBL_FIRST_NAME' => 'Imię',
|
||||
'LBL_FULL_NAME' => 'Pełna nazwa:',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE'=>'Historia',
|
||||
'LBL_LIST_DATE_MODIFIED' => 'Data Modyfikacji',
|
||||
'LBL_ECMQUOTES_SUBPANEL_TITLE' => 'Oferty',
|
||||
'LBL_HOME_PHONE' => 'Dom:',
|
||||
'LBL_ID' => 'ID:',
|
||||
'LBL_IMPORT_VCARD' => 'Importuj vCard',
|
||||
'LBL_VCARD' => 'vCard',
|
||||
'LBL_IMPORT_VCARDTEXT' => 'Automatycznie twórz nowy kontakt z pliku vCard pobranego z Twojego sytemu.',
|
||||
'LBL_INVALID_EMAIL'=>'Niewłaściwy format Email:',
|
||||
'LBL_INVITEE' => 'Raportowanie bezpośrednie',
|
||||
'LBL_LAST_NAME' => 'Nazwisko:',
|
||||
'LBL_LEAD_SOURCE' => 'Źródło pozyskania:',
|
||||
'LBL_LIST_ACCEPT_STATUS' => 'Status Akceptacji',
|
||||
'LBL_LIST_ACCOUNT_NAME' => 'Nazwisko Klienta',
|
||||
'LBL_LIST_CONTACT_NAME' => 'Nazwa Kontaktu',
|
||||
'LBL_LIST_CONTACT_ROLE' => 'Zależność',
|
||||
'LBL_LIST_EMAIL_ADDRESS' => 'Email',
|
||||
'LBL_LIST_FIRST_NAME' => 'Imię',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista Kontaktów',
|
||||
'LBL_VIEW_FORM_TITLE' => 'Widok Kontaktów',
|
||||
'LBL_LIST_LAST_NAME' => 'Nazwisko',
|
||||
'LBL_LIST_NAME' => 'Imię Nazwisko',
|
||||
'LBL_LIST_OTHER_EMAIL_ADDRESS' => 'Inny adres Email',
|
||||
'LBL_LIST_PHONE' => 'Telefon do biura',
|
||||
'LBL_LIST_TITLE' => 'Tytuł',
|
||||
'LBL_MOBILE_PHONE' => 'Telefon komórkowy:',
|
||||
'LBL_MODIFIED' => 'Zmodyfikowano przez Użytkownika ID:',
|
||||
'LBL_MODULE_NAME' => 'Kontakty',
|
||||
'LBL_MODULE_TITLE' => 'Kontakty: Strona Główna',
|
||||
'LBL_NAME' => 'Nazwisko:',
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowy kontakt',
|
||||
'LBL_NEW_PORTAL_PASSWORD' => 'Nowe hasło Portalu:',
|
||||
'LBL_NOTE_SUBJECT' =>'Tytuł Notatki',
|
||||
'LBL_OFFICE_PHONE' => 'Telefon do biura:',
|
||||
'LBL_OPP_NAME' => 'Nazwa Tematu:',
|
||||
'LBL_OPPORTUNITY_ROLE_ID'=>'ID Zależności w Temacie:',
|
||||
'LBL_OPPORTUNITY_ROLE'=>'Zalezność w Temacie',
|
||||
'LBL_OTHER_EMAIL_ADDRESS' => 'Inny Adres Email:',
|
||||
'LBL_OTHER_PHONE' => 'Inny Numer Telefonu:',
|
||||
'LBL_PHONE' => 'Telefon:',
|
||||
'LBL_PORTAL_ACTIVE' => 'Aktywny Użytkownik portalu:',
|
||||
'LBL_PORTAL_APP'=>'Aplikacje Portalu:',
|
||||
'LBL_PORTAL_INFORMATION' => 'Informacje o Portalu',
|
||||
'LBL_PORTAL_NAME' => 'Nazwa portalu:',
|
||||
'LBL_PORTAL_PASSWORD_ISSET' => 'Hasło dla Portalu ustalone?:',
|
||||
'LBL_POSTAL_CODE' => 'Kod Pocztowy:',
|
||||
'LBL_PRIMARY_ADDRESS_CITY' => 'Główny Adres - Miasto:',
|
||||
'LBL_PRIMARY_ADDRESS_COUNTRY' => 'Główny Adres - Kraj:',
|
||||
'LBL_PRIMARY_ADDRESS_POSTALCODE' => 'Główny Adres - Kod Pocztowy:',
|
||||
'LBL_PRIMARY_ADDRESS_STATE' => 'Główny Adres - Wojewódzwto:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET_2' => 'Główny Adres - Ulica 2:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET_3' => 'Główny Adres - Ulica 3:',
|
||||
'LBL_PRIMARY_ADDRESS_STREET' => 'Główny Adres - Ulica:',
|
||||
'LBL_PRIMARY_ADDRESS' => 'Adres 1:<br><br><br>Gmina:',
|
||||
'LBL_PRODUCTS_TITLE'=>'Produkty',
|
||||
'LBL_RELATED_CONTACTS_TITLE'=>'Kontakty połączone',
|
||||
'LBL_REPORTS_TO_ID'=>'Raportuje do ID:',
|
||||
'LBL_REPORTS_TO' => 'Raportuje do:',
|
||||
'LBL_RESOURCE_NAME' => 'Nazwa Źródła',
|
||||
'LBL_SALUTATION' => 'Pozdrowienie:',
|
||||
'LBL_SAVE_CONTACT' => 'Zapisz kontakt',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukiwanie kontaktu',
|
||||
'LBL_SELECT_CHECKED_BUTTON_LABEL' => 'Wybierz zaznaczone kontakty',
|
||||
'LBL_SELECT_CHECKED_BUTTON_TITLE' => 'Wybierz zaznaczone kontakty',
|
||||
'LBL_STATE' => 'Województwo:',
|
||||
'LBL_SYNC_CONTACT' => 'Synchronizuj kontakt:',
|
||||
|
||||
'LBL_TEAM_ID' => 'ID Zespołu:',
|
||||
|
||||
'LBL_TITLE' => 'Tytuł:',
|
||||
'LNK_CONTACT_LIST' => 'Lista Kontaktów',
|
||||
'LNK_IMPORT_VCARD' => 'Utwórz vCard',
|
||||
'LNK_NEW_ACCOUNT' => 'Utwórz Klienta',
|
||||
'LNK_NEW_APPOINTMENT' => 'Utwórz Spotkanie',
|
||||
'LNK_NEW_CALL' => 'Zaplanowane rozmowy tel.',
|
||||
'LNK_NEW_CASE' => 'Utwórz Sprawę',
|
||||
'LNK_NEW_CONTACT' => 'Utwórz Kontakt',
|
||||
'LNK_NEW_EMAIL' => 'Archiwum Email',
|
||||
'LNK_NEW_MEETING' => 'Zaplanowane Spotkania',
|
||||
'LNK_NEW_NOTE' => 'Utwórz Notatkę',
|
||||
'LNK_NEW_OPPORTUNITY' => 'Utwórz Temat',
|
||||
'LNK_NEW_TASK' => 'Utwórz Zadanie',
|
||||
'LNK_SELECT_ACCOUNT' => 'Wybierz Klienta',
|
||||
'MSG_DUPLICATE' => 'Stworzenie tego kontaktu może spowodować utworzenie zduplikowanego kontaktu. Możesz wybrać kontakt z listy poniejż lub utworzyć kontakt klikając [Zapisz],z wykorzystaniem wprowadzonych danych, lub możesz kliknąć [Skasuj].',
|
||||
'MSG_SHOW_DUPLICATES' => 'Stworzenie tego kontaktu może spowodować utworzenie zduplikowanego kontaktu. \n Możesz wybrać kontakt z listy poniżej, utworzyć kontakt z wykorzystaniem wprowadzonych danych klikając [Zapisz], lub możesz kliknąć [Skasuj].',
|
||||
'NTC_COPY_ALTERNATE_ADDRESS' => 'Kopiuj alternatywny adres do adresu podstawowego',
|
||||
'NTC_COPY_PRIMARY_ADDRESS' => 'Kopiuj adres podstawowy do adresu alternatywnego',
|
||||
'NTC_DELETE_CONFIRMATION' => 'Czy na pewno chcesz usunąć wskazane informacje?',
|
||||
'NTC_OPPORTUNITY_REQUIRES_ACCOUNT' => 'Utworzenie Tematu wymaga wybrania Klienta. Wybierz już istniejącego, lub utwórz nowego.',
|
||||
'NTC_REMOVE_CONFIRMATION' => 'Czy na pewno chcesz usunąć ten kontakt z tej Sprawy?',
|
||||
'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Are you sure you want to remove this record as a direct report?',
|
||||
|
||||
'LBL_USER_PASSWORD' => 'Hasło:',
|
||||
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Wizytówki',
|
||||
'LBL_OPPORTUNITIES_SUBPANEL_TITLE' => 'Tematy',
|
||||
|
||||
'LBL_QUOTES_SUBPANEL_TITLE' => 'Zapytania',
|
||||
'LBL_PRODUCTS_SUBPANEL_TITLE' => 'Produkty',
|
||||
|
||||
'LBL_CASES_SUBPANEL_TITLE' => 'Sprawy',
|
||||
'LBL_BUGS_SUBPANEL_TITLE' => 'Błędy',
|
||||
'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projekty',
|
||||
'LBL_COPY_ADDRESS_CHECKED' => 'Kopiuj adresy do zaznaczonych kontaktów',
|
||||
'LBL_TARGET_OF_CAMPAIGNS' => 'Kampanie (Cel kampanii) :',
|
||||
'LBL_CAMPAIGNS' => 'Kampanie',
|
||||
'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE'=>'Zapis Kampanii',
|
||||
'LBL_LIST_CITY' => 'Miasto',
|
||||
'LBL_LIST_STATE' => 'Województwo',
|
||||
'LBL_HOMEPAGE_TITLE' => 'Moje Kontakty',
|
||||
|
||||
|
||||
'LBL_PORTAL_PASSWORD' => 'Hasło Portalu',
|
||||
'LBL_CONFIRM_PORTAL_PASSWORD' => 'Potwierdź Hasło Portalu',
|
||||
'LBL_PORTAL_DUPLICATE_USER_NAME' => 'Użyta nazwa Portalu już istnieje. Wybierz inną nazwę Nazwę portalu dla tego Kontaktu.',
|
||||
'LBL_CHECKOUT_DATE'=>'Data Zatwierdzenia',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
68
modules/Contacts/metadata/SearchFields.php
Executable file
68
modules/Contacts/metadata/SearchFields.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$searchFields['Contacts'] =
|
||||
array (
|
||||
'first_name' => array( 'query_type'=>'default'),
|
||||
'last_name'=> array('query_type'=>'default'),
|
||||
'account_name'=> array('query_type'=>'default','db_field'=>array('accounts.name')),
|
||||
'lead_source'=> array('query_type'=>'default','operator'=>'=', 'options' => 'lead_source_dom', 'template_var' => 'LEAD_SOURCE_OPTIONS'),
|
||||
'do_not_call'=> array('query_type'=>'default', 'input_type' => 'checkbox', 'operator'=>'='),
|
||||
'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','assistant_phone')),
|
||||
'email'=> array(
|
||||
'query_type' => 'default',
|
||||
'operator' => 'subquery',
|
||||
'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 and ea.email_address LIKE',
|
||||
'db_field' => array(
|
||||
'id',
|
||||
)
|
||||
),
|
||||
'assistant'=> array('query_type'=>'default'),
|
||||
'address_street'=> array('query_type'=>'default','db_field'=>array('primary_address_street','alt_address_street')),
|
||||
'address_city'=> array('query_type'=>'default','db_field'=>array('primary_address_city','alt_address_city')),
|
||||
'address_state'=> array('query_type'=>'default','db_field'=>array('primary_address_state','alt_address_state')),
|
||||
'address_postalcode'=> array('query_type'=>'default','db_field'=>array('primary_address_postalcode','alt_address_postalcode')),
|
||||
'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')),
|
||||
'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true),
|
||||
'assigned_user_id'=> array('query_type'=>'default'),
|
||||
'account_id'=> array('query_type'=>'default','db_field'=>array('accounts.id')),
|
||||
'campaign_name'=> array(
|
||||
'query_type'=>'default',
|
||||
'operator' => 'subquery',
|
||||
'subquery' => 'SELECT campaigns.id FROM campaigns WHERE campaigns.deleted=0 and campaigns.name LIKE',
|
||||
'db_field'=>array('campaign_id')),
|
||||
);
|
||||
?>
|
||||
81
modules/Contacts/metadata/additionalDetails.php
Executable file
81
modules/Contacts/metadata/additionalDetails.php
Executable file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*********************************************************************************/
|
||||
|
||||
function additionalDetailsContact($fields) {
|
||||
static $mod_strings;
|
||||
if(empty($mod_strings)) {
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'Contacts');
|
||||
}
|
||||
|
||||
$overlib_string = '<div style="overflow:auto; height:100px; max-height:100px;">';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) ||
|
||||
!empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) ||
|
||||
!empty($fields['PRIMARY_ADDRESS_COUNTRY']))
|
||||
$overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', ';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' ';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' ';
|
||||
if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>';
|
||||
if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4))
|
||||
$overlib_string .= '<br>';
|
||||
if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> ' . $fields['PHONE_MOBILE'] . '<br>';
|
||||
if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> ' . $fields['PHONE_HOME'] . '<br>';
|
||||
if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> ' . $fields['PHONE_OTHER'] . '<br>';
|
||||
|
||||
if(!empty($fields['DATE_MODIFIED'])) $overlib_string .= '<b>'. $mod_strings['LBL_DATE_MODIFIED'] . '</b> ' . $fields['DATE_MODIFIED'] . '<br>';
|
||||
|
||||
/*
|
||||
if(!empty($fields['DESCRIPTION'])) {
|
||||
$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
|
||||
if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
|
||||
}
|
||||
*/
|
||||
|
||||
$overlib_string .= "</div>";
|
||||
return array('fieldToAddTo' => 'NAME',
|
||||
'string' => $overlib_string,
|
||||
'editLink' => "index.php?action=EditView&module=Contacts&return_module=Contacts&record={$fields['ID']}",
|
||||
'viewLink' => "index.php?action=DetailView&module=Contacts&return_module=Contacts&record={$fields['ID']}");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
196
modules/Contacts/metadata/detailviewdefs.php
Executable file
196
modules/Contacts/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,196 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs['Contacts']['DetailView'] = array(
|
||||
'templateMeta' => array('preForm' => '<form name="vcard" action="index.php">' .
|
||||
'<input type="hidden" name="entryPoint" value="vCard">' .
|
||||
'<input type="hidden" name="contact_id" value="{$fields.id.value}">' .
|
||||
'<input type="hidden" name="module" value="Contacts">' .
|
||||
'</form>',
|
||||
'form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE', 'FIND_DUPLICATES',
|
||||
|
||||
array('customCode'=>'<input title="{$APP.LBL_MANAGE_SUBSCRIPTIONS}" class="button" onclick="this.form.return_module.value=\'Contacts\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Subscriptions\'; this.form.module.value=\'Campaigns\';" type="submit" name="Manage Subscriptions" value="{$APP.LBL_MANAGE_SUBSCRIPTIONS}">'),
|
||||
|
||||
),
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
'includes'=> array(
|
||||
array('file'=>'modules/Leads/Lead.js'),
|
||||
),
|
||||
),
|
||||
'panels' =>array (
|
||||
'default'=>array(
|
||||
array (
|
||||
array (
|
||||
'name' => 'full_name',
|
||||
'customCode' => '{$fields.full_name.value} <input type="button" class="button" name="vCardButton" value="{$MOD.LBL_VCARD}" onClick="document.vcard.submit();">',
|
||||
'label' => 'LBL_NAME',
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'phone_work',
|
||||
'label' => 'LBL_OFFICE_PHONE',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'account_name',
|
||||
|
||||
array (
|
||||
'name' => 'phone_mobile',
|
||||
'label' => 'LBL_MOBILE_PHONE',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'lead_source',
|
||||
|
||||
array (
|
||||
'name' => 'phone_home',
|
||||
'label' => 'LBL_HOME_PHONE',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
|
||||
'birthdate',
|
||||
array (
|
||||
'name' => 'phone_other',
|
||||
'label' => 'LBL_OTHER_PHONE',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'title',
|
||||
array (
|
||||
'name' => 'phone_fax',
|
||||
'label' => 'LBL_FAX_PHONE',
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'primary_address_street',
|
||||
'label'=> 'LBL_PRIMARY_ADDRESS',
|
||||
'type' => 'address',
|
||||
'displayParams'=>array('key'=>'primary'),
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'alt_address_street',
|
||||
'label'=> 'LBL_ALTERNATE_ADDRESS',
|
||||
'type' => 'address',
|
||||
'displayParams'=>array('key'=>'alt'),
|
||||
),
|
||||
),
|
||||
array (
|
||||
array('name'=>'portal_name',
|
||||
'customCode'=>'{if $PORTAL_ENABLED}{$fields.portal_name.value}{/if}',
|
||||
'customLabel'=>'{if $PORTAL_ENABLED}{sugar_translate label="LBL_PORTAL_NAME" module="Contacts"}{/if}'),
|
||||
array('name'=>'portal_active',
|
||||
'customCode'=>'{if $PORTAL_ENABLED}
|
||||
{if strval($fields.portal_active.value) == "1" || strval($fields.portal_active.value) == "yes" || strval($fields.portal_active.value) == "on"}
|
||||
{assign var="checked" value="CHECKED"}
|
||||
{else}
|
||||
{assign var="checked" value=""}
|
||||
{/if}
|
||||
<input type="checkbox" class="checkbox" name="{$fields.portal_active.name}" size="{$displayParams.size}" disabled="true" {$checked}>
|
||||
{/if}',
|
||||
'customLabel'=>'{if $PORTAL_ENABLED}{sugar_translate label="LBL_PORTAL_ACTIVE" module="Contacts"}{/if}'),
|
||||
),
|
||||
array (
|
||||
'description',
|
||||
),
|
||||
|
||||
array (
|
||||
'email1',
|
||||
),
|
||||
|
||||
array(
|
||||
array(
|
||||
'label' => 'LBL_CONTACT_IMAGE',
|
||||
'customCode' => '{$CONTACT_IMAGE}',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
|
||||
|
||||
|
||||
array (
|
||||
'name' => 'date_modified',
|
||||
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
|
||||
'label' => 'LBL_DATE_MODIFIED',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'assigned_user_name',
|
||||
|
||||
array (
|
||||
'name' => 'date_entered',
|
||||
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
),
|
||||
),
|
||||
),
|
||||
'LBL_PANEL_MAILINGGROUPS' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '{$POSITIONS55}',
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
245
modules/Contacts/metadata/editviewdefs.php
Executable file
245
modules/Contacts/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,245 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs ['Contacts'] ['EditView'] = array (
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'buttons' => array (
|
||||
0 => array (
|
||||
'customCode' => '<input type="submit" name="save" class="button" value="Zapisz" onclick="saveItems55(true);this.form.action.value=\'Save\';return check_form(\'EditView\');" />'
|
||||
),
|
||||
1 => 'CANCEL'
|
||||
),
|
||||
'enctype' => 'multipart/form-data',
|
||||
'hidden' => array (
|
||||
'<input type="hidden" name="opportunity_id" value="{$smarty.request.opportunity_id}"><link rel="stylesheet" href="modules/Accounts/css/jquery-ui.css">',
|
||||
|
||||
'<input type="hidden" name="case_id" value="{$smarty.request.case_id}">',
|
||||
'<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">',
|
||||
'<input type="hidden" name="email_id" value="{$smarty.request.email_id}">',
|
||||
'<input type="hidden" name="email_id2" value="{$smarty.request.email_id2}">',
|
||||
'<input type="hidden" name="email_address" value="{$smarty.request.email_address}">',
|
||||
'<input type="hidden" name="inbound_email_id" value="{$smarty.request.inbound_email_id}">'
|
||||
)
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
),
|
||||
'includes' => array (
|
||||
array (
|
||||
'file' => 'modules/Contacts/js/States.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/Contacts/Contact.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/Accounts/MailingGroups.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/Accounts/MyTable.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/Accounts/paramsMT.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'include/JSON.js'
|
||||
),
|
||||
)
|
||||
),
|
||||
'panels' => array (
|
||||
'lbl_contact_information' => array (
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'first_name',
|
||||
'customCode' => '{html_options name="salutation" options=$fields.salutation.options selected=$fields.salutation.value} <input name="first_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">'
|
||||
),
|
||||
'phone_work'
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'last_name',
|
||||
'displayParams' => array (
|
||||
'required' => true
|
||||
)
|
||||
),
|
||||
'phone_mobile'
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'account_name',
|
||||
'displayParams' => array (
|
||||
'key' => 'billing',
|
||||
'copy' => 'primary',
|
||||
'billingKey' => 'primary',
|
||||
'additionalFields' => array (
|
||||
'phone_office' => 'phone_work'
|
||||
)
|
||||
)
|
||||
),
|
||||
'phone_home'
|
||||
),
|
||||
|
||||
array (
|
||||
'lead_source',
|
||||
'phone_other'
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
'phone_fax'
|
||||
),
|
||||
|
||||
array (
|
||||
'title',
|
||||
// 'birthdate'
|
||||
),
|
||||
|
||||
array (
|
||||
'assigned_user_name'
|
||||
)
|
||||
),
|
||||
'lbl_email_addresses' => array (
|
||||
array (
|
||||
'email1'
|
||||
)
|
||||
),
|
||||
'LBL_CONTACT_IMAGE' => array (
|
||||
array (
|
||||
array (
|
||||
'label' => 'LBL_CONTACT_IMAGE',
|
||||
'customCode' => '<input name="contact_picture" type="file" maxlength="255" value="" />{$CONTACT_PICTURE}'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'label' => 'Usuń grafikę',
|
||||
'customCode' => '<input name="delete_contact_picture" type="checkbox" maxlength="255" value="1" />'
|
||||
)
|
||||
)
|
||||
),
|
||||
'lbl_address_information' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'primary_address_street',
|
||||
'hideLabel' => true,
|
||||
'type' => 'address',
|
||||
'displayParams' => array (
|
||||
'key' => 'primary',
|
||||
'rows' => 2,
|
||||
'cols' => 30,
|
||||
'maxlength' => 150
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'alt_address_street',
|
||||
'hideLabel' => true,
|
||||
'type' => 'address',
|
||||
'displayParams' => array (
|
||||
'key' => 'alt',
|
||||
'copy' => 'primary',
|
||||
'rows' => 2,
|
||||
'cols' => 30,
|
||||
'maxlength' => 150
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'LBL_PANEL_MAILINGGROUPS' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '
|
||||
<input type="hidden" name="position_list55" id="position_list55" value=\'{$POSITION_LIST55}\'>
|
||||
<link rel="stylesheet" type="text/css" href="modules/Accounts/MyTable.css" />
|
||||
<div style="width:30%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV2">
|
||||
<table class="positions" style="width:100%;" id="itemsTable55">
|
||||
<thead id="head">
|
||||
<tr id="tr">
|
||||
<td width="70%">{$MOD.LBL_MAILINGGROUP_NAME}</td>
|
||||
<td width="20%">{$MOD.LBL_MAILINGGROUP_AVAILABLE}</td>
|
||||
<td width="10%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div><br>'
|
||||
)
|
||||
)
|
||||
),
|
||||
'lbl_description_information' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'description',
|
||||
'displayParams' => array (
|
||||
'rows' => 6,
|
||||
'cols' => 80
|
||||
),
|
||||
'label' => 'LBL_DESCRIPTION'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'lbl_portal_information' => array (
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'portal_name',
|
||||
'customCode' => '<table border="0" cellspacing="0" cellpadding="0"><tr><td>
|
||||
<input id="portal_name" name="portal_name" type="text" size="30" maxlength="30" value="{$fields.portal_name.value}" autocomplete="off">
|
||||
<input type="hidden" id="portal_name_existing" value="{$fields.portal_name.value}" autocomplete="off">
|
||||
</td><tr><tr><td><input type="hidden" id="portal_name_verified" value="true"></td></tr></table>'
|
||||
),
|
||||
'portal_active'
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
174
modules/Contacts/metadata/listviewdefs.php
Executable file
174
modules/Contacts/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$listViewDefs['Contacts'] = array(
|
||||
'NAME' => array(
|
||||
'width' => '20%',
|
||||
'label' => 'LBL_LIST_NAME',
|
||||
'link' => true,
|
||||
'contextMenu' => array('objectType' => 'sugarPerson',
|
||||
'metaData' => array('contact_id' => '{$ID}',
|
||||
'module' => 'Contacts',
|
||||
'return_action' => 'ListView',
|
||||
'contact_name' => '{$FULL_NAME}',
|
||||
'parent_id' => '{$ACCOUNT_ID}',
|
||||
'parent_name' => '{$ACCOUNT_NAME}',
|
||||
'return_module' => 'Contacts',
|
||||
'return_action' => 'ListView',
|
||||
'parent_type' => 'Account',
|
||||
'notes_parent_type' => 'Account')
|
||||
),
|
||||
'orderBy' => 'name',
|
||||
'default' => true,
|
||||
'related_fields' => array('first_name', 'last_name', 'salutation', 'account_name', 'account_id'),
|
||||
),
|
||||
'TITLE' => array(
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_LIST_TITLE',
|
||||
'default' => true),
|
||||
'ACCOUNT_NAME' => array(
|
||||
'width' => '34%',
|
||||
'label' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'module' => 'Accounts',
|
||||
'id' => 'ACCOUNT_ID',
|
||||
'link' => true,
|
||||
'contextMenu' => array('objectType' => 'sugarAccount',
|
||||
'metaData' => array('return_module' => 'Contacts',
|
||||
'return_action' => 'ListView',
|
||||
'module' => 'Accounts',
|
||||
'return_action' => 'ListView',
|
||||
'parent_id' => '{$ACCOUNT_ID}',
|
||||
'parent_name' => '{$ACCOUNT_NAME}',
|
||||
'account_id' => '{$ACCOUNT_ID}',
|
||||
'account_name' => '{$ACCOUNT_NAME}'),
|
||||
),
|
||||
'default' => true,
|
||||
'sortable'=> true,
|
||||
'ACLTag' => 'ACCOUNT',
|
||||
'related_fields' => array('account_id')),
|
||||
'EMAIL1' => array(
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_LIST_EMAIL_ADDRESS',
|
||||
'sortable' => false,
|
||||
'link' => true,
|
||||
'customCode' => '{$EMAIL1_LINK}{$EMAIL1}</a>',
|
||||
'default' => true
|
||||
),
|
||||
'PHONE_WORK' => array(
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_OFFICE_PHONE',
|
||||
'default' => true),
|
||||
'DEPARTMENT' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_DEPARTMENT'),
|
||||
'DO_NOT_CALL' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_DO_NOT_CALL'),
|
||||
'PHONE_HOME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_HOME_PHONE'),
|
||||
'PHONE_MOBILE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_MOBILE_PHONE'),
|
||||
'PHONE_OTHER' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_OTHER_PHONE'),
|
||||
'PHONE_FAX' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_FAX_PHONE'),
|
||||
'EMAIL2' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_LIST_EMAIL_ADDRESS',
|
||||
'sortable' => false,
|
||||
'customCode' => '{$EMAIL2_LINK}{$EMAIL2}</a>'),
|
||||
'EMAIL_OPT_OUT' => array(
|
||||
'width' => '10',
|
||||
|
||||
'label' => 'LBL_EMAIL_OPT_OUT'),
|
||||
'PRIMARY_ADDRESS_STREET' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_STREET'),
|
||||
'PRIMARY_ADDRESS_CITY' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_CITY'),
|
||||
'PRIMARY_ADDRESS_STATE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_STATE'),
|
||||
'PRIMARY_ADDRESS_POSTALCODE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_POSTALCODE'),
|
||||
'ALT_ADDRESS_COUNTRY' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_ALT_ADDRESS_COUNTRY'),
|
||||
'ALT_ADDRESS_STREET' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_ALT_ADDRESS_STREET'),
|
||||
'ALT_ADDRESS_CITY' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_ALT_ADDRESS_CITY'),
|
||||
'ALT_ADDRESS_STATE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_ALT_ADDRESS_STATE'),
|
||||
'ALT_ADDRESS_POSTALCODE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_ALT_ADDRESS_POSTALCODE'),
|
||||
'ALT_ADDRESS_COUNTRY' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_ALT_ADDRESS_COUNTRY'),
|
||||
'DATE_ENTERED' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
'CREATED_BY_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_CREATED'),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true),
|
||||
'MODIFIED_BY_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_MODIFIED')
|
||||
);
|
||||
?>
|
||||
50
modules/Contacts/metadata/metafiles.php
Executable file
50
modules/Contacts/metadata/metafiles.php
Executable file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on Jun 1, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$metafiles['Contacts'] = array(
|
||||
'detailviewdefs' => 'modules/Contacts/metadata/detailviewdefs.php',
|
||||
'editviewdefs' => 'modules/Contacts/metadata/editviewdefs.php',
|
||||
'listviewdefs' => 'modules/Contacts/metadata/listviewdefs.php',
|
||||
'searchdefs' => 'modules/Contacts/metadata/searchdefs.php',
|
||||
'popupdefs' => 'modules/Contacts/metadata/popupdefs.php',
|
||||
'searchfields' => 'modules/Contacts/metadata/SearchFields.php',
|
||||
);
|
||||
?>
|
||||
69
modules/Contacts/metadata/popupdefs.php
Executable file
69
modules/Contacts/metadata/popupdefs.php
Executable file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
$popupMeta = array('moduleMain' => 'Contact',
|
||||
'varName' => 'CONTACT',
|
||||
'orderBy' => 'contacts.first_name, contacts.last_name',
|
||||
'whereClauses' =>
|
||||
array('first_name' => 'contacts.first_name',
|
||||
'last_name' => 'contacts.last_name',
|
||||
'account_name' => 'accounts.name',
|
||||
'account_id' => 'accounts.id'),
|
||||
'searchInputs' =>
|
||||
array('first_name', 'last_name', 'account_name'),
|
||||
|
||||
'listviewdefs' => array(
|
||||
'NAME' => array(
|
||||
'width' => '20%',
|
||||
'label' => 'LBL_LIST_NAME',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'related_fields' => array('first_name', 'last_name', 'salutation', 'account_name', 'account_id')),
|
||||
'TITLE' => array(
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_LIST_TITLE',
|
||||
'default' => true),
|
||||
'EMAIL1' => array(
|
||||
'width' => '15%',
|
||||
'label' => 'Email',
|
||||
'default' => true),
|
||||
),
|
||||
|
||||
);
|
||||
?>
|
||||
58
modules/Contacts/metadata/popupdefsEmail.php
Executable file
58
modules/Contacts/metadata/popupdefsEmail.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 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
$popupMeta = array('moduleMain' => 'Contact',
|
||||
'varName' => 'CONTACT',
|
||||
'orderBy' => 'contacts.first_name, contacts.last_name',
|
||||
'whereClauses' =>
|
||||
array('first_name' => 'contacts.first_name',
|
||||
'last_name' => 'contacts.last_name',
|
||||
'account_name' => 'accounts.name',
|
||||
'account_id' => 'accounts.id'),
|
||||
'searchInputs' =>
|
||||
array('first_name', 'last_name', 'account_name'),
|
||||
'create' =>
|
||||
array('formBase' => 'ContactFormBase.php',
|
||||
'formBaseClass' => 'ContactFormBase',
|
||||
'getFormBodyParams' => array('','','ContactSave'),
|
||||
'createButton' => $mod_strings['LNK_NEW_CONTACT']
|
||||
),
|
||||
'templateForm' => 'modules/Contacts/Email_picker.html',
|
||||
);
|
||||
?>
|
||||
167
modules/Contacts/metadata/quickcreatedefs.php
Executable file
167
modules/Contacts/metadata/quickcreatedefs.php
Executable file
@@ -0,0 +1,167 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Id$
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$viewdefs = array (
|
||||
'Contacts' =>
|
||||
array (
|
||||
'QuickCreate' =>
|
||||
array (
|
||||
'templateMeta' =>
|
||||
array (
|
||||
'form' =>
|
||||
array (
|
||||
'hidden' =>
|
||||
array (
|
||||
0 => '<input type="hidden" name="opportunity_id" value="{$smarty.request.opportunity_id}">',
|
||||
1 => '<input type="hidden" name="case_id" value="{$smarty.request.case_id}">',
|
||||
2 => '<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">',
|
||||
3 => '<input type="hidden" name="email_id" value="{$smarty.request.email_id}">',
|
||||
4 => '<input type="hidden" name="inbound_email_id" value="{$smarty.request.inbound_email_id}">',
|
||||
5 => '<input type="hidden" name="reports_to_id" value="{$smarty.request.contact_id}">',
|
||||
6 => '<input type="hidden" name="report_to_name" value="{$smarty.request.contact_name}">',
|
||||
|
||||
|
||||
|
||||
),
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
),
|
||||
),
|
||||
'panels' =>
|
||||
array (
|
||||
'lbl_contact_information' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'first_name',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'name' => 'phone_work',
|
||||
),
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'last_name',
|
||||
'displayParams'=>array('required'=>true),
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'name' => 'phone_mobile',
|
||||
),
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'account_name',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'name' => 'phone_fax',
|
||||
),
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'title',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'name' => 'department',
|
||||
),
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'lead_source',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'name' => 'do_not_call',
|
||||
),
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'team_name',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
),
|
||||
),
|
||||
),
|
||||
'lbl_email_addresses' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'email1',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
67
modules/Contacts/metadata/searchdefs.php
Executable file
67
modules/Contacts/metadata/searchdefs.php
Executable file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$searchdefs['Contacts'] = array(
|
||||
'templateMeta' => array('maxColumns' => '3',
|
||||
'widths' => array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
'first_name',
|
||||
'last_name',
|
||||
'account_name',
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
),
|
||||
'advanced_search' => array(
|
||||
'first_name',
|
||||
array('name' => 'address_street', 'label' =>'LBL_ANY_ADDRESS', 'type' => 'name'),
|
||||
array('name' => 'phone', 'label' =>'LBL_ANY_PHONE', 'type' => 'name'),
|
||||
'last_name',
|
||||
array('name' => 'address_city', 'label' =>'LBL_CITY', 'type' => 'name'),
|
||||
array('name' => 'email', 'label' =>'LBL_ANY_EMAIL', 'type' => 'name'),
|
||||
'account_name',
|
||||
array('name' => 'address_state', 'label' =>'LBL_STATE', 'type' => 'name'),
|
||||
'do_not_call',
|
||||
'assistant',
|
||||
array('name' => 'address_postalcode', 'label' =>'LBL_POSTAL_CODE', 'type' => 'name'),
|
||||
array('name' => 'primary_address_country', 'label' =>'LBL_COUNTRY', 'type' => 'name', 'options' => 'countries_dom', ),
|
||||
'lead_source',
|
||||
'foreign_contact',
|
||||
'mailing_tag',
|
||||
array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
87
modules/Contacts/metadata/sidecreateviewdefs.php
Executable file
87
modules/Contacts/metadata/sidecreateviewdefs.php
Executable file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*********************************************************************************/
|
||||
$viewdefs['Contacts']['SideQuickCreate'] = array(
|
||||
'templateMeta' => array('form'=>array('hidden'=>array('<input type="hidden" name="opportunity_id" value="{$smarty.request.opportunity_id}">',
|
||||
|
||||
|
||||
|
||||
'<input type="hidden" name="case_id" value="{$smarty.request.case_id}">',
|
||||
'<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">',
|
||||
'<input type="hidden" name="email_id" value="{$smarty.request.email_id}">',
|
||||
'<input type="hidden" name="inbound_email_id" value="{$smarty.request.inbound_email_id}">')
|
||||
,'buttons'=>array('SAVE'),
|
||||
'headerTpl'=>'include/EditView/header.tpl',
|
||||
'footerTpl'=>'include/EditView/footer.tpl',
|
||||
'button_location'=>'bottom',
|
||||
),
|
||||
'maxColumns' => '1',
|
||||
|
||||
'panelClass'=>'none',
|
||||
'labelsOnTop'=>true,
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
|
||||
),
|
||||
),
|
||||
'panels' =>array (
|
||||
'DEFAULT' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
array('name'=>'first_name', 'displayParams'=>array('size'=>20)),
|
||||
),
|
||||
array (
|
||||
array('name'=>'last_name',
|
||||
'displayParams'=>array('required'=>true, 'size'=>20),
|
||||
),
|
||||
),
|
||||
array (
|
||||
array('name'=>'phone_work', 'displayParams'=>array('size'=>20)),
|
||||
),
|
||||
array (
|
||||
array('name'=>'email1', 'customCode'=>'<input type="text" name="emailAddress0" size=20><input type="hidden" name="emailAddressPrimaryFlag" value="emailAddress0"><input type="hidden" name="useEmailWidget" value="true"><script language="Javascript">addToValidate("form_SideQuickCreate_Contacts", "emailAddress0", "email", false, SUGAR.language.get("app_strings", "LBL_EMAIL_ADDRESS_BOOK_EMAIL_ADDR"));</script>'),
|
||||
),
|
||||
array (
|
||||
array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)),
|
||||
),
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
65
modules/Contacts/metadata/studio.php
Executable file
65
modules/Contacts/metadata/studio.php
Executable file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$GLOBALS['studioDefs']['Contacts'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Contacts/DetailView.html',
|
||||
'php_file'=>'modules/Contacts/DetailView.php',
|
||||
'type'=>'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Contacts/EditView.html',
|
||||
'php_file'=>'modules/Contacts/EditView.php',
|
||||
'type'=>'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template'=>'listview',
|
||||
'meta_file'=>'modules/Contacts/listviewdefs.php',
|
||||
'type'=>'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Contacts/SearchForm.html',
|
||||
'php_file'=>'modules/Contacts/ListView.php',
|
||||
'type'=>'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
251
modules/Contacts/metadata/subpaneldefs.php
Executable file
251
modules/Contacts/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,251 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Layout definition for Contacts
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$layout_defs['Contacts'] = array(
|
||||
// list of what Subpanels to show in the DetailView
|
||||
'subpanel_setup' => array(
|
||||
|
||||
'activities' => array(
|
||||
'order' => 10,
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'date_start',
|
||||
'title_key' => 'LBL_ACTIVITIES_SUBPANEL_TITLE',
|
||||
'type' => 'collection',
|
||||
'subpanel_name' => 'activities', //this values is not associated with a physical file.
|
||||
'module'=>'Activities',
|
||||
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateTaskButton'),
|
||||
|
||||
array('widget_class' => 'SubPanelTopScheduleMeetingButton'),
|
||||
array('widget_class' => 'SubPanelTopScheduleCallButton'),
|
||||
|
||||
array('widget_class' => 'SubPanelTopComposeEmailButton'),
|
||||
),
|
||||
'collection_list' => array(
|
||||
'tasks' => array(
|
||||
'module' => 'Tasks',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'tasks',
|
||||
),
|
||||
|
||||
'meetings' => array(
|
||||
'module' => 'Meetings',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'meetings',
|
||||
),
|
||||
'calls' => array(
|
||||
'module' => 'Calls',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'calls',
|
||||
),
|
||||
|
||||
)
|
||||
),
|
||||
|
||||
'history' => array(
|
||||
'order' => 20,
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'date_modified',
|
||||
'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE',
|
||||
'type' => 'collection',
|
||||
'subpanel_name' => 'history', //this values is not associated with a physical file.
|
||||
'module'=>'History',
|
||||
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateNoteButton'),
|
||||
array('widget_class' => 'SubPanelTopArchiveEmailButton'),
|
||||
array('widget_class' => 'SubPanelTopSummaryButton'),
|
||||
),
|
||||
|
||||
'collection_list' => array(
|
||||
'tasks' => array(
|
||||
'module' => 'Tasks',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'tasks',
|
||||
),
|
||||
|
||||
'meetings' => array(
|
||||
'module' => 'Meetings',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'meetings',
|
||||
),
|
||||
'calls' => array(
|
||||
'module' => 'Calls',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'calls',
|
||||
),
|
||||
|
||||
'notes' => array(
|
||||
'module' => 'Notes',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'notes',
|
||||
),
|
||||
'emails' => array(
|
||||
'module' => 'Emails',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'emails',
|
||||
),
|
||||
'linkedemails' => array(
|
||||
'module' => 'Emails',
|
||||
'subpanel_name' => 'ForUnlinkedEmailHistory',
|
||||
'get_subpanel_data' => 'function:get_unlinked_email_query',
|
||||
'generate_select'=>true,
|
||||
'function_parameters' => array('return_as_array'=>'true'),
|
||||
),
|
||||
)
|
||||
),
|
||||
'documents' => array(
|
||||
'order' => 130,
|
||||
'module' => 'Documents',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'date_entered',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'documents',
|
||||
'add_subpanel_data' => 'document_id',
|
||||
'title_key' => 'Dokumenty',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
),
|
||||
|
||||
'leads' => array(
|
||||
'order' => 30,
|
||||
'module' => 'Leads',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'last_name, first_name',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'leads',
|
||||
'add_subpanel_data' => 'lead_id',
|
||||
'title_key' => 'LBL_LEADS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateLeadNameButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton',
|
||||
'popup_module' => 'Opportunities',
|
||||
'mode' => 'MultiSelect',
|
||||
),
|
||||
),
|
||||
),
|
||||
'opportunities' => array(
|
||||
'order' => 40,
|
||||
'module' => 'Opportunities',
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'date_closed',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'opportunities',
|
||||
'add_subpanel_data' => 'opportunity_id',
|
||||
'title_key' => 'LBL_OPPORTUNITIES_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
|
||||
'cases' => array(
|
||||
'order' => 70,
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'case_number',
|
||||
'module' => 'Cases',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'cases',
|
||||
'add_subpanel_data' => 'case_id',
|
||||
'title_key' => 'LBL_CASES_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
|
||||
'bugs' => array(
|
||||
'order' => 80,
|
||||
'module' => 'Bugs',
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'bug_number',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'bugs',
|
||||
'add_subpanel_data' => 'bug_id',
|
||||
'title_key' => 'LBL_BUGS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
|
||||
'contacts' => array(
|
||||
'order' => 90,
|
||||
'module' => 'Contacts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'last_name, first_name',
|
||||
'subpanel_name' => 'ForContacts',
|
||||
'get_subpanel_data' => 'direct_reports',
|
||||
'add_subpanel_data' => 'contact_id',
|
||||
'title_key' => 'LBL_DIRECT_REPORTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
|
||||
'project' => array(
|
||||
'order' => 100,
|
||||
'module' => 'Project',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'project',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_PROJECTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
),
|
||||
),
|
||||
'campaigns' => array(
|
||||
'order' => 110,
|
||||
'module' => 'CampaignLog',
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'activity_date',
|
||||
'get_subpanel_data'=>'campaigns',
|
||||
'subpanel_name' => 'ForTargets',
|
||||
'title_key' => 'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE',
|
||||
),
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
100
modules/Contacts/metadata/subpanels/ForAccounts.php
Executable file
100
modules/Contacts/metadata/subpanels/ForAccounts.php
Executable file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Contacts
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'Contacts',
|
||||
'width' => '30%',
|
||||
),
|
||||
'title'=>array(
|
||||
'name'=>'title',
|
||||
'vname' => 'LBL_LIST_TITLE',
|
||||
//'widget_class' => 'SubPanelDetailViewLink',
|
||||
//'module' => 'Contacts',
|
||||
'width' => '10%',
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'phone_mobile'=>array (
|
||||
'name'=>'phone_mobile',
|
||||
'vname' => 'LBL_MOBILE_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
118
modules/Contacts/metadata/subpanels/ForCalls.php
Executable file
118
modules/Contacts/metadata/subpanels/ForCalls.php
Executable file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Contacts
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'accept_status_name'=>array (
|
||||
'vname' => 'LBL_LIST_ACCEPT_STATUS',
|
||||
'width' => '11%',
|
||||
'sortable'=>false
|
||||
),
|
||||
'c_accept_status_fields'=>array(
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'accept_status_id'=>array(
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'Contacts',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'account_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
107
modules/Contacts/metadata/subpanels/ForCases.php
Executable file
107
modules/Contacts/metadata/subpanels/ForCases.php
Executable file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Contacts
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'Contacts',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'account_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
106
modules/Contacts/metadata/subpanels/ForContacts.php
Executable file
106
modules/Contacts/metadata/subpanels/ForContacts.php
Executable file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Layout definition for Contacts
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateDirectReport'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
|
||||
),
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'Contacts',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
101
modules/Contacts/metadata/subpanels/ForEmails.php
Executable file
101
modules/Contacts/metadata/subpanels/ForEmails.php
Executable file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Contacts
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'Contacts',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'account_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
118
modules/Contacts/metadata/subpanels/ForMeetings.php
Executable file
118
modules/Contacts/metadata/subpanels/ForMeetings.php
Executable file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Contacts
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'accept_status_name'=>array (
|
||||
'vname' => 'LBL_LIST_ACCEPT_STATUS',
|
||||
'width' => '11%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'm_accept_status_fields'=>array(
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'accept_status_id'=>array(
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'Contacts',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'account_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
128
modules/Contacts/metadata/subpanels/ForOpportunities.php
Executable file
128
modules/Contacts/metadata/subpanels/ForOpportunities.php
Executable file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Contacts
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'Contacts',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'account_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'opportunity_role_fields'=>array(
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'opportunity_role_id'=>array(
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'opportunity_role'=>array(
|
||||
'name'=>'opportunity_role',
|
||||
'vname' => 'LBL_LIST_CONTACT_ROLE',
|
||||
'width' => '10%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable' => false,
|
||||
),
|
||||
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
//kbrill Bug#17483
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
//'widget_class' => 'SubPanelEditButton',
|
||||
//C.L. Bug#18035, changed to use SubPanelEditRoleButton
|
||||
'widget_class' => 'SubPanelEditRoleButton',
|
||||
'role_id'=>'opportunity_role_id',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
71
modules/Contacts/metadata/subpanels/ForProject.php
Executable file
71
modules/Contacts/metadata/subpanels/ForProject.php
Executable file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Quotes
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'title' => 'LBL_SELECT_USER_RESOURCE', 'popup_module' => 'Users', ),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
'list_fields' => array(
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name'=>array(
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_RESOURCE_NAME',
|
||||
'width' => '93%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButtonProjects',
|
||||
'width' => '5%',
|
||||
),
|
||||
'first_name' => array(
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
'last_name' => array(
|
||||
'usage'=>'query_only',
|
||||
)
|
||||
),
|
||||
);
|
||||
?>
|
||||
109
modules/Contacts/metadata/subpanels/default.php
Executable file
109
modules/Contacts/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Contacts
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'first_name'=>array(
|
||||
'name'=>'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=>array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'sort_by' => 'last_name',
|
||||
'sort_order' => 'asc',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'Contacts',
|
||||
'width' => '23%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'name'=>'account_name',
|
||||
'module' => 'Accounts',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'width' => '22%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'account_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '30%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
5
modules/Contacts/pl_pl.lang.php
Executable file
5
modules/Contacts/pl_pl.lang.php
Executable file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
$mod_strings['LBL_RESOURCE_NAME'] = 'Typ Źródła';
|
||||
|
||||
?>
|
||||
732
modules/Contacts/vardefs.php
Executable file
732
modules/Contacts/vardefs.php
Executable file
@@ -0,0 +1,732 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$dictionary['Contact'] = array('table' => 'contacts', 'audited'=>true, 'unified_search' => true, 'duplicate_merge'=>true, 'fields' =>
|
||||
array (
|
||||
|
||||
'email_and_name1' =>
|
||||
array (
|
||||
'name' => 'email_and_name1',
|
||||
'rname' => 'email_and_name1',
|
||||
'vname' => 'LBL_NAME',
|
||||
'type' => 'varchar',
|
||||
'source' => 'non-db',
|
||||
'len' => '510',
|
||||
'importable' => 'false',
|
||||
),
|
||||
'lead_source' =>
|
||||
array (
|
||||
'name' => 'lead_source',
|
||||
'vname' => 'LBL_LEAD_SOURCE',
|
||||
'type' => 'enum',
|
||||
'options' => 'lead_source_dom',
|
||||
'len' => '100',
|
||||
'comment' => 'How did the contact come about',
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
'account_name' =>
|
||||
array (
|
||||
'name' => 'account_name',
|
||||
'rname' => 'name',
|
||||
'id_name' => 'account_id',
|
||||
'vname' => 'LBL_ACCOUNT_NAME',
|
||||
'join_name'=>'accounts',
|
||||
'type' => 'relate',
|
||||
'link' => 'accounts',
|
||||
'table' => 'accounts',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Accounts',
|
||||
'dbType' => 'varchar',
|
||||
'len' => '255',
|
||||
//'source' => 'non-db',
|
||||
'unified_search' => true,
|
||||
),
|
||||
'account_id' =>
|
||||
array (
|
||||
'name' => 'account_id',
|
||||
'rname' => 'id',
|
||||
'id_name' => 'account_id',
|
||||
'vname' => 'LBL_ACCOUNT_ID',
|
||||
'type' => 'relate',
|
||||
'table' => 'accounts',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Accounts',
|
||||
'dbType' => 'id',
|
||||
'reportable'=>false,
|
||||
//'source' => 'non-db',
|
||||
'massupdate' => false,
|
||||
'duplicate_merge'=> 'disabled',
|
||||
'hideacl'=>true,
|
||||
|
||||
),
|
||||
'contact_picture' => array(
|
||||
'type' => 'varchar',
|
||||
'name' => 'contact_picture',
|
||||
'vname' => 'LBL_PRODUCT_PICTURE',
|
||||
'comment' => 'contact_picture',
|
||||
'max_size' => '255',
|
||||
'len' => '255'
|
||||
),
|
||||
'opportunity_role_fields' =>
|
||||
array (
|
||||
'name' => 'opportunity_role_fields',
|
||||
'rname' => 'id',
|
||||
'relationship_fields'=>array('id' => 'opportunity_role_id', 'contact_role' => 'opportunity_role'),
|
||||
'vname' => 'LBL_ACCOUNT_NAME',
|
||||
'type' => 'relate',
|
||||
'link' => 'opportunities',
|
||||
'link_type' => 'relationship_info',
|
||||
'join_link_name' => 'opportunities_contacts',
|
||||
'source' => 'non-db',
|
||||
'importable' => 'false',
|
||||
'duplicate_merge'=> 'disabled',
|
||||
|
||||
),
|
||||
'opportunity_role_id' =>
|
||||
array(
|
||||
'name' => 'opportunity_role_id',
|
||||
'type' => 'varchar',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_OPPORTUNITY_ROLE_ID',
|
||||
),
|
||||
'opportunity_role' =>
|
||||
array(
|
||||
'name' => 'opportunity_role',
|
||||
'type' => 'enum',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_OPPORTUNITY_ROLE',
|
||||
'options' => 'opportunity_relationship_type_dom',
|
||||
),
|
||||
'reports_to_id'=>
|
||||
array(
|
||||
'name' => 'reports_to_id',
|
||||
'vname' => 'LBL_REPORTS_TO_ID',
|
||||
'type' => 'id',
|
||||
'required'=>false,
|
||||
'reportable'=>false,
|
||||
'comment' => 'The contact this contact reports to'
|
||||
),
|
||||
'report_to_name' =>
|
||||
array (
|
||||
'name' => 'report_to_name',
|
||||
'rname' => 'last_name',
|
||||
'id_name' => 'reports_to_id',
|
||||
'vname' => 'LBL_REPORTS_TO',
|
||||
'type' => 'relate',
|
||||
'link' => 'reports_to_link',
|
||||
'table' => 'contacts',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Contacts',
|
||||
'dbType' => 'varchar',
|
||||
'len' => 'id',
|
||||
'reportable'=>false,
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'birthdate' =>
|
||||
array (
|
||||
'name' => 'birthdate',
|
||||
'vname' => 'LBL_BIRTHDATE',
|
||||
'required'=>false,
|
||||
'type' => 'date',
|
||||
'comment' => 'The birthdate of the contact'
|
||||
),
|
||||
|
||||
|
||||
'portal_name' =>
|
||||
array (
|
||||
'name' => 'portal_name',
|
||||
'vname' => 'LBL_PORTAL_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'group'=>'portal',
|
||||
'comment' => 'Name as it appears in the portal'
|
||||
),
|
||||
'portal_active' =>
|
||||
array (
|
||||
'name' => 'portal_active',
|
||||
'vname' => 'LBL_PORTAL_ACTIVE',
|
||||
'type' => 'bool',
|
||||
'required' => true,
|
||||
'default' => '0',
|
||||
'group'=>'portal',
|
||||
'comment' => 'Indicator whether this contact is a portal user'
|
||||
),
|
||||
'mailing_tag' =>
|
||||
array (
|
||||
'name' => 'mailing_tag',
|
||||
'vname' => 'LBL_MAILING_TAG',
|
||||
'type' => 'bool',
|
||||
'default' => '0',
|
||||
),
|
||||
'foreign_contact' =>
|
||||
array (
|
||||
'name' => 'foreign_contact',
|
||||
'vname' => 'LBL_FOREIGN_CONTACT',
|
||||
'type' => 'bool',
|
||||
'default' => '0',
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'portal_app' =>
|
||||
array (
|
||||
'name' => 'portal_app',
|
||||
'vname' => 'LBL_PORTAL_APP',
|
||||
'type' => 'varchar',
|
||||
'group'=>'portal',
|
||||
'len' => '255',
|
||||
'comment' => 'Reference to the portal'
|
||||
),
|
||||
'accounts' =>
|
||||
array (
|
||||
'name' => 'accounts',
|
||||
'type' => 'link',
|
||||
'relationship' => 'accounts_contacts',
|
||||
'link_type' => 'one',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_ACCOUNT',
|
||||
'duplicate_merge'=> 'disabled',
|
||||
),
|
||||
'reports_to_link' =>
|
||||
array (
|
||||
'name' => 'reports_to_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contact_direct_reports',
|
||||
'link_type' => 'one',
|
||||
'side' => 'right',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_REPORTS_TO',
|
||||
),
|
||||
'opportunities' =>
|
||||
array (
|
||||
'name' => 'opportunities',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunities_contacts',
|
||||
'source' => 'non-db',
|
||||
'module' => 'Opportunities',
|
||||
'bean_name' => 'Opportunity',
|
||||
'vname' => 'LBL_OPPORTUNITIES',
|
||||
),
|
||||
'email_addresses' =>
|
||||
array (
|
||||
'name' => 'email_addresses',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contacts_email_addresses',
|
||||
'module' => 'EmailAddress',
|
||||
'bean_name'=>'EmailAddress',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_EMAIL_ADDRESSES',
|
||||
'reportable'=>false,
|
||||
),
|
||||
'email_addresses_primary' =>
|
||||
array (
|
||||
'name' => 'email_addresses_primary',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contacts_email_addresses_primary',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
|
||||
'duplicate_merge'=> 'disabled',
|
||||
),
|
||||
'bugs' =>
|
||||
array (
|
||||
'name' => 'bugs',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contacts_bugs',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_BUGS',
|
||||
),
|
||||
|
||||
'calls' =>
|
||||
array (
|
||||
'name' => 'calls',
|
||||
'type' => 'link',
|
||||
'relationship' => 'calls_contacts',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_CALLS',
|
||||
),
|
||||
'cases' =>
|
||||
array (
|
||||
'name' => 'cases',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contacts_cases',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_CASES',
|
||||
),
|
||||
'direct_reports'=>
|
||||
array (
|
||||
'name' => 'direct_reports',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contact_direct_reports',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_DIRECT_REPORTS',
|
||||
),
|
||||
'documents' => array (
|
||||
'name' => 'documents',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contacts_documents',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_NOTES'
|
||||
),
|
||||
'emails'=>
|
||||
array (
|
||||
'name' => 'emails',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_contacts_rel',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_EMAILS',
|
||||
),
|
||||
'leads'=>
|
||||
array (
|
||||
'name' => 'leads',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contact_leads',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_LEADS',
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'meetings'=>
|
||||
array (
|
||||
'name' => 'meetings',
|
||||
'type' => 'link',
|
||||
'relationship' => 'meetings_contacts',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_MEETINGS',
|
||||
),
|
||||
'notes'=>
|
||||
array (
|
||||
'name' => 'notes',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contact_notes',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_NOTES',
|
||||
),
|
||||
'project'=>
|
||||
array (
|
||||
'name' => 'project',
|
||||
'type' => 'link',
|
||||
'relationship' => 'projects_contacts',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_PROJECTS',
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'tasks'=>
|
||||
array (
|
||||
'name' => 'tasks',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contact_tasks',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_TASKS',
|
||||
),
|
||||
'user_sync'=>
|
||||
array (
|
||||
'name' => 'users',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contacts_users',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_USER_SYNC',
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'created_by_link' =>
|
||||
array (
|
||||
'name' => 'created_by_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contacts_created_by',
|
||||
'vname' => 'LBL_CREATED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'modified_user_link' =>
|
||||
array (
|
||||
'name' => 'modified_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contacts_modified_user',
|
||||
'vname' => 'LBL_MODIFIED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'assigned_user_link' =>
|
||||
array (
|
||||
'name' => 'assigned_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contacts_assigned_user',
|
||||
'vname' => 'LBL_ASSIGNED_TO_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'table' => 'users',
|
||||
'duplicate_merge'=>'enabled'
|
||||
),
|
||||
|
||||
'campaign_id' =>
|
||||
array (
|
||||
'name' => 'campaign_id',
|
||||
'comment' => 'Campaign that generated lead',
|
||||
'vname'=>'LBL_CAMPAIGN_ID',
|
||||
'rname' => 'id',
|
||||
'id_name' => 'campaign_id',
|
||||
'type' => 'id',
|
||||
//'dbType' => 'char',
|
||||
'table' => 'campaigns',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Campaigns',
|
||||
'reportable'=>false,
|
||||
'massupdate' => false,
|
||||
'duplicate_merge'=> 'disabled',
|
||||
),
|
||||
|
||||
'campaign_name' =>
|
||||
array (
|
||||
'name' => 'campaign_name',
|
||||
'vname' => 'LBL_CAMPAIGN',
|
||||
'type' => 'relate',
|
||||
'reportable'=>false,
|
||||
'source'=>'non-db',
|
||||
'table' => 'campaigns',
|
||||
'id_name' => 'campaign_id',
|
||||
'module'=>'Campaigns',
|
||||
'duplicate_merge'=>'disabled',
|
||||
'comment' => 'The first campaign name for Contact (Meta-data only)',
|
||||
),
|
||||
|
||||
'campaigns' =>
|
||||
array (
|
||||
'name' => 'campaigns',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contact_campaign_log',
|
||||
'module'=>'CampaignLog',
|
||||
'bean_name'=>'CampaignLog',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_CAMPAIGNS',
|
||||
),
|
||||
|
||||
'c_accept_status_fields' =>
|
||||
array (
|
||||
'name' => 'c_accept_status_fields',
|
||||
'rname' => 'id',
|
||||
'relationship_fields'=>array('id' => 'accept_status_id', 'accept_status' => 'accept_status_name'),
|
||||
'vname' => 'LBL_LIST_ACCEPT_STATUS',
|
||||
'type' => 'relate',
|
||||
'link' => 'calls',
|
||||
'link_type' => 'relationship_info',
|
||||
'source' => 'non-db',
|
||||
'importable' => 'false',
|
||||
'duplicate_merge'=> 'disabled',
|
||||
),
|
||||
'm_accept_status_fields' =>
|
||||
array (
|
||||
'name' => 'm_accept_status_fields',
|
||||
'rname' => 'id',
|
||||
'relationship_fields'=>array('id' => 'accept_status_id', 'accept_status' => 'accept_status_name'),
|
||||
'vname' => 'LBL_LIST_ACCEPT_STATUS',
|
||||
'type' => 'relate',
|
||||
'link' => 'meetings',
|
||||
'link_type' => 'relationship_info',
|
||||
'source' => 'non-db',
|
||||
'importable' => 'false',
|
||||
'hideacl'=>true,
|
||||
'duplicate_merge'=> 'disabled',
|
||||
),
|
||||
'accept_status_id' =>
|
||||
array(
|
||||
'name' => 'accept_status_id',
|
||||
'type' => 'varchar',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_LIST_ACCEPT_STATUS',
|
||||
),
|
||||
'accept_status_name' =>
|
||||
array(
|
||||
'massupdate' => false,
|
||||
'name' => 'accept_status_name',
|
||||
'type' => 'enum',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_LIST_ACCEPT_STATUS',
|
||||
'options' => 'dom_meeting_accept_status',
|
||||
'importable' => 'false',
|
||||
),
|
||||
'prospect_lists' =>
|
||||
array (
|
||||
'name' => 'prospect_lists',
|
||||
'type' => 'link',
|
||||
'relationship' => 'prospect_list_contacts',
|
||||
'module'=>'ProspectLists',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_PROSPECT_LIST',
|
||||
),
|
||||
'sync_contact' =>
|
||||
array (
|
||||
'massupdate' => false,
|
||||
'name' => 'sync_contact',
|
||||
'vname' => 'LBL_SYNC_CONTACT',
|
||||
'type' => 'bool',
|
||||
'source' => 'non-db',
|
||||
'comment' => 'Synch to outlook? (Meta-Data only)',
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
),
|
||||
'indices' => array (
|
||||
array(
|
||||
'name' => 'idx_cont_last_first',
|
||||
'type' => 'index',
|
||||
'fields' => array('last_name', 'first_name', 'deleted')
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_contacts_del_last',
|
||||
'type' => 'index',
|
||||
'fields' => array('deleted', 'last_name'),
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_cont_del_reports',
|
||||
'type' => 'index',
|
||||
'fields'=>array('deleted', 'reports_to_id', 'last_name')
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_reports_to_id',
|
||||
'type' => 'index',
|
||||
'fields'=> array('reports_to_id'),
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
array(
|
||||
'name' => 'idx_del_id_user',
|
||||
'type' => 'index',
|
||||
'fields'=> array('deleted', 'id', 'assigned_user_id'),
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_cont_assigned',
|
||||
'type' => 'index',
|
||||
'fields' => array('assigned_user_id')
|
||||
),
|
||||
// array(
|
||||
// 'name' => 'idx_cont_email1',
|
||||
// 'type' => 'index',
|
||||
// 'fields' => array('email1')
|
||||
// ),
|
||||
// array(
|
||||
// 'name' => 'idx_cont_email2',
|
||||
// 'type' => 'index',
|
||||
// 'fields' => array('email2')
|
||||
// ),
|
||||
)
|
||||
, 'relationships' => array (
|
||||
'contact_direct_reports' => array('lhs_module' => 'Contacts', 'lhs_table' => 'contacts', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'Contacts', 'rhs_table' => 'contacts', 'rhs_key' => 'reports_to_id',
|
||||
'relationship_type' => 'one-to-many'),
|
||||
'contact_leads' => array('lhs_module' => 'Contacts', 'lhs_table' => 'contacts', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'Leads', 'rhs_table' => 'leads', 'rhs_key' => 'contact_id',
|
||||
'relationship_type' => 'one-to-many')
|
||||
,'contact_notes' => array('lhs_module' => 'Contacts', 'lhs_table' => 'contacts', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'Notes', 'rhs_table' => 'notes', 'rhs_key' => 'contact_id',
|
||||
'relationship_type' => 'one-to-many')
|
||||
,'contact_tasks' => array('lhs_module' => 'Contacts', 'lhs_table' => 'contacts', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'Tasks', 'rhs_table' => 'tasks', 'rhs_key' => 'contact_id',
|
||||
'relationship_type' => 'one-to-many')
|
||||
,'contacts_assigned_user' =>
|
||||
array('lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'Contacts', 'rhs_table' => 'contacts', 'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type' => 'one-to-many')
|
||||
,'contacts_modified_user' =>
|
||||
array('lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'Contacts', 'rhs_table' => 'contacts', 'rhs_key' => 'modified_user_id',
|
||||
'relationship_type' => 'one-to-many')
|
||||
,'contacts_created_by' =>
|
||||
array('lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id',
|
||||
'rhs_module' => 'Contacts', 'rhs_table' => 'contacts', 'rhs_key' => 'created_by',
|
||||
'relationship_type' => 'one-to-many'),
|
||||
|
||||
|
||||
'contacts_documents' => array (
|
||||
'lhs_module' => 'Contacts',
|
||||
'lhs_table' => 'contacts',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Documents',
|
||||
'rhs_table' => 'documents',
|
||||
'rhs_key' => 'id',
|
||||
'relationship_type' => 'many-to-many',
|
||||
'join_table' => 'documents_accounts',
|
||||
'join_key_lhs' => 'parent_id',
|
||||
'join_key_rhs' => 'document_id',
|
||||
),
|
||||
|
||||
|
||||
|
||||
'calls_contacts' => array (
|
||||
'lhs_module' => 'Contacts',
|
||||
'lhs_table' => 'contacts',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Calls',
|
||||
'rhs_table' => 'calls',
|
||||
'rhs_key' => 'contact_id',
|
||||
'relationship_type' => 'one-to-many',
|
||||
),
|
||||
|
||||
|
||||
|
||||
'contact_campaign_log' => array(
|
||||
'lhs_module' => 'Contacts',
|
||||
'lhs_table' => 'contacts',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'CampaignLog',
|
||||
'rhs_table' => 'campaign_log',
|
||||
'rhs_key' => 'target_id',
|
||||
'relationship_type' =>'one-to-many'
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
//This enables optimistic locking for Saves From EditView
|
||||
'optimistic_locking'=>true,
|
||||
);
|
||||
require_once('include/SugarObjects/VardefManager.php');
|
||||
VardefManager::createVardef('Contacts','Contact', array('default', 'assignable',
|
||||
|
||||
|
||||
|
||||
'person'));
|
||||
|
||||
?>
|
||||
50
modules/Contacts/views/view.closecontactaddresspopup.php
Executable file
50
modules/Contacts/views/view.closecontactaddresspopup.php
Executable file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
|
||||
class ContactsViewCloseContactAddressPopup extends ViewList {
|
||||
|
||||
function CloseContactAddressPopup(){
|
||||
parent::ViewList();
|
||||
}
|
||||
|
||||
function display() {
|
||||
if(isset($_REQUEST['close_window'])) echo "<script>window.close();</script>";
|
||||
parent::display();
|
||||
}
|
||||
}
|
||||
?>
|
||||
62
modules/Contacts/views/view.contactaddresspopup.php
Executable file
62
modules/Contacts/views/view.contactaddresspopup.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* ContactsViewContactAddressPopup
|
||||
*
|
||||
* */
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/Contacts/Popup_picker.php');
|
||||
|
||||
class ContactsViewContactAddressPopup extends SugarView {
|
||||
|
||||
function ContactAddressPopup(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function process() {
|
||||
$this->display();
|
||||
}
|
||||
|
||||
function display() {
|
||||
$this->displayJavascript();
|
||||
echo '<script type="text/javascript" src="' . getJSPath('themes/'.$GLOBALS['theme'].'/menu.js') . '"></script>';
|
||||
$popup = new Popup_Picker();
|
||||
echo $popup->process_page_for_address();
|
||||
}
|
||||
}
|
||||
?>
|
||||
71
modules/Contacts/views/view.detail.php
Executable file
71
modules/Contacts/views/view.detail.php
Executable file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/json_config.php');
|
||||
require_once('include/MVC/View/views/view.detail.php');
|
||||
|
||||
class ContactsViewDetail extends ViewDetail {
|
||||
|
||||
|
||||
function ContactsViewDetail(){
|
||||
parent::ViewDetail();
|
||||
}
|
||||
|
||||
/**
|
||||
* display
|
||||
*
|
||||
* We are overridding the display method to manipulate the portal information.
|
||||
* If portal is not enabled then don't show the portal fields.
|
||||
*/
|
||||
function display() {
|
||||
$admin = new Administration();
|
||||
$admin->retrieveSettings();
|
||||
if(isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
|
||||
$this->ss->assign("PORTAL_ENABLED", true);
|
||||
}
|
||||
$pl55 = $this->bean->showPositions55();
|
||||
|
||||
$this->ss->assign('POSITIONS55', $pl55);
|
||||
$c=new Contact();
|
||||
$c->retrieve($_REQUEST['record']);
|
||||
$this->ss->assign("CONTACT_IMAGE", '<img src="modules/Contacts/upload/images/'.$c->contact_picture.'">');
|
||||
parent::display();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
119
modules/Contacts/views/view.edit.php
Executable file
119
modules/Contacts/views/view.edit.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: This file is used to override the default Meta-data EditView behavior
|
||||
* to provide customization specific to the Contacts module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/json_config.php');
|
||||
require_once('include/MVC/View/views/view.edit.php');
|
||||
|
||||
class ContactsViewEdit extends ViewEdit {
|
||||
|
||||
function ContactsViewEdit(){
|
||||
parent::ViewEdit();
|
||||
$this->useForSubpanel = true;
|
||||
$this->useModuleQuickCreateTemplate = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* display
|
||||
*
|
||||
* We are overridding the display method to manipulate the sectionPanels.
|
||||
* If portal is not enabled then don't show the Portal Information panel.
|
||||
*/
|
||||
function display() {
|
||||
$this->ev->process();
|
||||
if ( !empty($_REQUEST['contact_name']) && !empty($_REQUEST['contact_id'])
|
||||
&& $this->ev->fieldDefs['report_to_name']['value'] == ''
|
||||
&& $this->ev->fieldDefs['reports_to_id']['value'] == '') {
|
||||
$this->ev->fieldDefs['report_to_name']['value'] = $_REQUEST['contact_name'];
|
||||
$this->ev->fieldDefs['reports_to_id']['value'] = $_REQUEST['contact_id'];
|
||||
$c=new Contact();
|
||||
$c->retrieve($_REQUEST['contact_id']);
|
||||
|
||||
}
|
||||
// echo $c->id.$_REQUEST['relate_id'];
|
||||
|
||||
//loading view
|
||||
// echo '<link rel="stylesheet" type="text/css" href="modules/EcmInvoiceOuts/javascript/helper.css" media="screen" /><div class="loading_panel"></div>';
|
||||
$c=new Contact();
|
||||
$c->retrieve($_REQUEST['record']);
|
||||
global $mod_strings;
|
||||
if($c->contact_picture!='')$this->ss->assign("CONTACT_PICTURE",$mod_strings['LBL_UPLOADED']);
|
||||
unset($c);
|
||||
$admin = new Administration();
|
||||
$admin->retrieveSettings();
|
||||
if(empty($admin->settings['portal_on']) || !$admin->settings['portal_on']) {
|
||||
unset($this->ev->sectionPanels[strtoupper('lbl_portal_information')]);
|
||||
} else {
|
||||
echo '<script src="modules/Contacts/Contact.js"></script>';
|
||||
echo '<script language="javascript">';
|
||||
echo 'addToValidateComparison(\'EditView\', \'portal_password\', \'varchar\', false, SUGAR.language.get(\'app_strings\', \'ERR_SQS_NO_MATCH_FIELD\') + SUGAR.language.get(\'Contacts\', \'LBL_PORTAL_PASSWORD\'), \'portal_password1\');';
|
||||
echo 'addToValidateVerified(\'EditView\', \'portal_name_verified\', \'bool\', false, SUGAR.language.get(\'app_strings\', \'ERR_EXISTING_PORTAL_USERNAME\'));';
|
||||
echo 'YAHOO.util.Event.on(\'portal_name\', \'blur\', validatePortalName);';
|
||||
echo 'YAHOO.util.Event.on(\'portal_name\', \'keydown\', handleKeyDown);';
|
||||
echo '</script>';
|
||||
}
|
||||
|
||||
$pl55 = $this->bean->getPositionList55();
|
||||
|
||||
$this->ss->assign('POSITION_LIST55', $pl55);
|
||||
$OPT = array();
|
||||
global $mod_strings;
|
||||
$json = getJSONobj();
|
||||
if ($_REQUEST['IamPopup'])
|
||||
$OPT['IamPopup'] = '1';
|
||||
|
||||
echo '
|
||||
<script language="javascript">
|
||||
var OPT = '.str_replace('"','\"',$json->encode($OPT)).';
|
||||
var MOD = '.str_replace('"','\"',$json->encode($mod_strings)).';
|
||||
|
||||
</script>';
|
||||
|
||||
echo $this->ev->display($this->showTitle);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
61
modules/Contacts/views/view.mailmergepopup.php
Executable file
61
modules/Contacts/views/view.mailmergepopup.php
Executable file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* ContactsViewContactAddressPopup
|
||||
*
|
||||
* */
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/Contacts/Popup_picker.php');
|
||||
|
||||
class ContactsViewMailMergePopup extends SugarView {
|
||||
|
||||
function ContactAddressPopup(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function process() {
|
||||
$this->display();
|
||||
}
|
||||
|
||||
function display() {
|
||||
|
||||
$popup = new Popup_Picker();
|
||||
echo $popup->process_page_for_merge();
|
||||
}
|
||||
}
|
||||
?>
|
||||
76
modules/Contacts/views/view.retrieveemail.php
Executable file
76
modules/Contacts/views/view.retrieveemail.php
Executable file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* ContactsViewRetrieveEmailUsername.php
|
||||
*
|
||||
* This class overrides SugarView and provides an implementation for the RetrieveEmailUsername
|
||||
* method used for returning the information about an email address
|
||||
*
|
||||
* @author Collin Lee
|
||||
* */
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once("include/JSON.php");
|
||||
|
||||
class ContactsViewRetrieveEmail extends SugarView {
|
||||
|
||||
function ContactsViewRetrieveEmail(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function process() {
|
||||
$this->display();
|
||||
}
|
||||
|
||||
function display(){
|
||||
$data = array();
|
||||
$data['target'] = $_REQUEST['target'];
|
||||
if(!empty($_REQUEST['email'])) {
|
||||
$db = DBManagerFactory::getInstance();
|
||||
$email = $GLOBALS['db']->quote(strtoupper(trim($_REQUEST['email'])));
|
||||
$result = $db->query("SELECT * FROM email_addresses WHERE email_address_caps = '$email' AND deleted = 0");
|
||||
if($row = $db->fetchByAssoc($result)) {
|
||||
$data['email'] = $row;
|
||||
} else {
|
||||
$data['email'] = '';
|
||||
}
|
||||
}
|
||||
$json = new JSON(JSON_LOOSE_TYPE);
|
||||
echo $json->encode($data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
75
modules/Contacts/views/view.validportalusername.php
Executable file
75
modules/Contacts/views/view.validportalusername.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* ContactsViewValidPortalUsername.php
|
||||
*
|
||||
* This class overrides SugarView and provides an implementation for the ValidPortalUsername
|
||||
* method used for checking whether or not an existing portal user_name has already been assigned.
|
||||
* We take advantage of the MVC framework to provide this action which is invoked from
|
||||
* a javascript AJAX request.
|
||||
*
|
||||
* @author Collin Lee
|
||||
* */
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
|
||||
class ContactsViewValidPortalUsername extends SugarView {
|
||||
|
||||
function ValidPortalUsername(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function process() {
|
||||
$this->display();
|
||||
}
|
||||
|
||||
function display(){
|
||||
if(!empty($_REQUEST['portal_name'])) {
|
||||
$db = DBManagerFactory::getInstance();
|
||||
$portalUsername = $_REQUEST['portal_name'];
|
||||
$result = $db->query("Select count(id) as total from contacts where portal_name = '$portalUsername'");
|
||||
$total = 0;
|
||||
while($row = $db->fetchByAssoc($result)) {
|
||||
$total = $row['total'];
|
||||
}
|
||||
echo $total;
|
||||
} else {
|
||||
echo '0';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user