init
This commit is contained in:
738
modules/Calls/Call.php
Executable file
738
modules/Calls/Call.php
Executable file
@@ -0,0 +1,738 @@
|
||||
<?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');
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
require_once('modules/Users/User.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
// Call is used to store customer information.
|
||||
class Call extends SugarBean {
|
||||
var $field_name_map;
|
||||
// Stored fields
|
||||
var $id;
|
||||
var $json_id;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $assigned_user_id;
|
||||
var $modified_user_id;
|
||||
|
||||
|
||||
|
||||
var $description;
|
||||
var $name;
|
||||
var $status;
|
||||
var $date_start;
|
||||
var $time_start;
|
||||
var $duration_hours;
|
||||
var $duration_minutes;
|
||||
var $date_end;
|
||||
var $parent_type;
|
||||
var $parent_type_options;
|
||||
var $parent_id;
|
||||
var $contact_id;
|
||||
var $user_id;
|
||||
var $lead_id;
|
||||
var $direction;
|
||||
var $reminder_time;
|
||||
var $reminder_time_options;
|
||||
var $reminder_checked;
|
||||
var $required;
|
||||
var $accept_status;
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $modified_by_name;
|
||||
var $parent_name;
|
||||
var $contact_name;
|
||||
var $contact_phone;
|
||||
var $contact_email;
|
||||
var $account_id;
|
||||
var $opportunity_id;
|
||||
var $case_id;
|
||||
var $assigned_user_name;
|
||||
var $note_id;
|
||||
var $outlook_id;
|
||||
|
||||
|
||||
|
||||
var $update_vcal = true;
|
||||
var $contacts_arr;
|
||||
var $users_arr;
|
||||
var $leads_arr;
|
||||
var $default_call_name_values = array('Assemble catalogs', 'Make travel arrangements', 'Send a letter', 'Send contract', 'Send fax', 'Send a follow-up letter', 'Send literature', 'Send proposal', 'Send quote');
|
||||
var $minutes_value_default = 15;
|
||||
var $minutes_values = array('0'=>'00','15'=>'15','30'=>'30','45'=>'45');
|
||||
var $table_name = "calls";
|
||||
var $rel_users_table = "calls_users";
|
||||
var $rel_contacts_table = "calls_contacts";
|
||||
var $rel_leads_table = "calls_leads";
|
||||
var $module_dir = 'Calls';
|
||||
var $object_name = "Call";
|
||||
var $new_schema = true;
|
||||
var $importable = true;
|
||||
|
||||
// This is used to retrieve related fields from form posts.
|
||||
var $additional_column_fields = array('assigned_user_name', 'assigned_user_id', 'contact_id', 'user_id', 'contact_name');
|
||||
var $relationship_fields = array( 'account_id' => 'accounts',
|
||||
'opportunity_id' => 'opportunities',
|
||||
'contact_id' => 'contacts',
|
||||
'case_id' => 'cases',
|
||||
'user_id' => 'users',
|
||||
'assigned_user_id' => 'users',
|
||||
'note_id' => 'notes',
|
||||
'lead_id' => 'leads',
|
||||
);
|
||||
|
||||
function Call() {
|
||||
parent::SugarBean();
|
||||
global $app_list_strings;
|
||||
|
||||
$this->setupCustomFields('Calls');
|
||||
|
||||
foreach ($this->field_defs as $field) {
|
||||
$this->field_name_map[$field['name']] = $field;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(!empty($GLOBALS['app_list_strings']['duration_intervals']))
|
||||
$this->minutes_values = $GLOBALS['app_list_strings']['duration_intervals'];
|
||||
}
|
||||
|
||||
// save date_end by calculating user input
|
||||
// this is for calendar
|
||||
function save($check_notify = FALSE) {
|
||||
global $timedate,$current_user;
|
||||
global $disable_date_format;
|
||||
|
||||
$this->date_start = $_POST['date_start'];
|
||||
|
||||
if( isset($this->date_start) &&
|
||||
isset($this->duration_hours) &&
|
||||
isset($this->duration_minutes) ) {
|
||||
|
||||
|
||||
$date_start_in_db_fmt=$timedate->swap_formats($this->date_start, $timedate->get_date_time_format(true, $current_user), $timedate->get_db_date_time_format());
|
||||
$date_start_array=split(" ",trim($date_start_in_db_fmt));
|
||||
$date_time_start =DateTimeUtil::get_time_start($date_start_array[0],$date_start_array[1]);
|
||||
|
||||
$date_start_timestamp=mktime($date_time_start->hour,$date_time_start->min,$date_time_start->sec,$date_time_start->month,$date_time_start->day);
|
||||
$date_start_timestamp+= (( $this->duration_hours * 3600 )+ ($this->duration_minutes * 60));
|
||||
|
||||
$this->date_end=date ($timedate->get_date_time_format(true, $current_user),$date_start_timestamp);
|
||||
// Need to convert it to the db date right here so that we don't miss the time calculation
|
||||
$this->date_end = $timedate->to_db_date($this->date_end);
|
||||
if(empty($disable_date_format)){
|
||||
$this->date_end = $timedate->swap_formats($this->date_end, $timedate->dbDayFormat, $timedate->get_date_format());
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['send_invites']) && $_REQUEST['send_invites'] == '1') {
|
||||
$check_notify = true;
|
||||
} else {
|
||||
$check_notify = false;
|
||||
}
|
||||
if (empty($this->status) ) {
|
||||
$mod_strings = return_module_language($GLOBALS['current_language'], $this->module_dir);
|
||||
$this->status = $mod_strings['LBL_DEFAULT_STATUS'];
|
||||
}
|
||||
/*nsingh 7/3/08 commenting out as bug #20814 is invalid
|
||||
if($current_user->getPreference('reminder_time')!= -1 && isset($_POST['reminder_checked']) && isset($_POST['reminder_time']) && $_POST['reminder_checked']==0 && $_POST['reminder_time']==-1){
|
||||
$this->reminder_checked = '1';
|
||||
$this->reminder_time = $current_user->getPreference('reminder_time');
|
||||
}*/
|
||||
parent::save($check_notify);
|
||||
global $current_user;
|
||||
require_once('modules/vCals/vCal.php');
|
||||
|
||||
if($this->update_vcal) {
|
||||
vCal::cache_sugar_vcal($current_user);
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns a list of the associated contacts
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc..
|
||||
* All Rights Reserved..
|
||||
* Contributor(s): ______________________________________..
|
||||
*/
|
||||
function get_contacts()
|
||||
{
|
||||
// First, get the list of IDs.
|
||||
$query = "SELECT contact_id as id from calls_contacts where call_id='$this->id' AND deleted=0";
|
||||
|
||||
return $this->build_related_list($query, new Contact());
|
||||
}
|
||||
|
||||
|
||||
function get_summary_text()
|
||||
{
|
||||
return "$this->name";
|
||||
}
|
||||
|
||||
function create_list_query($order_by, $where, $show_deleted=0)
|
||||
{
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
$query = "SELECT ";
|
||||
$query .= "
|
||||
calls.*,";
|
||||
if ( preg_match("/calls_users\.user_id/",$where))
|
||||
{
|
||||
$query .= "calls_users.required,
|
||||
calls_users.accept_status,";
|
||||
}
|
||||
|
||||
$query .= "
|
||||
users.user_name as assigned_user_name";
|
||||
|
||||
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
|
||||
// this line will help generate a GMT-metric to compare to a locale's timezone
|
||||
|
||||
if ( preg_match("/contacts/",$where)){
|
||||
$query .= ", contacts.first_name, contacts.last_name";
|
||||
$query .= ", contacts.assigned_user_id contact_name_owner";
|
||||
}
|
||||
$query .= " FROM calls ";
|
||||
|
||||
/*
|
||||
if ( $this->db->dbType == 'mssql' )
|
||||
{
|
||||
$query .= ", calls.date_start ";
|
||||
if ( preg_match("/contacts/",$where)){
|
||||
$query .= ", contacts.first_name, contacts.last_name";
|
||||
$query .= ", contacts.assigned_user_id contact_name_owner";
|
||||
}
|
||||
$query .= " FROM calls ";
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
if ( preg_match("/contacts/",$where)){
|
||||
$query .= "LEFT JOIN calls_contacts
|
||||
ON calls.id=calls_contacts.call_id
|
||||
LEFT JOIN contacts
|
||||
ON calls_contacts.contact_id=contacts.id ";
|
||||
}
|
||||
if ( preg_match("/calls_users\.user_id/",$where))
|
||||
{
|
||||
$query .= "LEFT JOIN calls_users
|
||||
ON calls.id=calls_users.call_id and calls_users.deleted=0 ";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$query .= "
|
||||
LEFT JOIN users
|
||||
ON calls.assigned_user_id=users.id ";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$where_auto = '1=1';
|
||||
if($show_deleted == 0){
|
||||
$where_auto = " $this->table_name.deleted=0 ";
|
||||
}else if($show_deleted == 1){
|
||||
$where_auto = " $this->table_name.deleted=1 ";
|
||||
}
|
||||
|
||||
//$where_auto .= " GROUP BY calls.id";
|
||||
|
||||
if($where != "")
|
||||
$query .= "where $where AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
if($order_by != "")
|
||||
$query .= " ORDER BY ". $this->process_order_by($order_by, null);
|
||||
else
|
||||
$query .= " ORDER BY calls.name";
|
||||
return $query;
|
||||
}
|
||||
|
||||
function create_export_query(&$order_by, &$where)
|
||||
{
|
||||
$contact_required = ereg("contacts", $where);
|
||||
$custom_join = $this->custom_fields->getJOIN(true, true);
|
||||
if($contact_required)
|
||||
{
|
||||
$query = "SELECT calls.*, contacts.first_name, contacts.last_name";
|
||||
|
||||
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM contacts, calls, calls_contacts ";
|
||||
$where_auto = "calls_contacts.contact_id = contacts.id AND calls_contacts.call_id = calls.id AND calls.deleted=0 AND contacts.deleted=0";
|
||||
}
|
||||
else
|
||||
{
|
||||
$query = 'SELECT calls.*';
|
||||
|
||||
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= ' FROM calls ';
|
||||
$where_auto = "calls.deleted=0";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
|
||||
if($where != "")
|
||||
$query .= "where $where AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
if($order_by != "")
|
||||
$query .= " ORDER BY ". $this->process_order_by($order_by, null);
|
||||
else
|
||||
$query .= " ORDER BY calls.name";
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function fill_in_additional_list_fields()
|
||||
{
|
||||
parent::fill_in_additional_list_fields();
|
||||
// $this->fill_in_additional_detail_fields();
|
||||
// $this->fill_in_additional_parent_fields();
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields()
|
||||
{
|
||||
|
||||
parent::fill_in_additional_detail_fields();
|
||||
$query = "SELECT c.first_name, c.last_name, c.phone_work, c.id FROM contacts c, calls_contacts c_c ";
|
||||
$query .= "WHERE c_c.contact_id=c.id AND c_c.call_id='$this->id' AND c_c.deleted=0 AND c.deleted=0";
|
||||
$result = $this->db->query($query,true," Error filling in additional detail fields: ");
|
||||
|
||||
// Get the id and the name.
|
||||
$row = Array();
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
|
||||
$GLOBALS['log']->info("additional call fields $query");
|
||||
|
||||
if($row != null)
|
||||
{
|
||||
$this->contact_name = return_name($row, 'first_name', 'last_name');
|
||||
$this->contact_phone = $row['phone_work'];
|
||||
$this->contact_id = $row['id'];
|
||||
$GLOBALS['log']->debug("Call($this->id): contact_name = $this->contact_name");
|
||||
$GLOBALS['log']->debug("Call($this->id): contact_phone = $this->contact_phone");
|
||||
$GLOBALS['log']->debug("Call($this->id): contact_id = $this->contact_id");
|
||||
}
|
||||
else {
|
||||
$this->contact_name = '';
|
||||
$this->contact_phone = '';
|
||||
$this->contact_id = '';
|
||||
$GLOBALS['log']->debug("Call($this->id): contact_name = $this->contact_name");
|
||||
$GLOBALS['log']->debug("Call($this->id): contact_phone = $this->contact_phone");
|
||||
$GLOBALS['log']->debug("Call($this->id): contact_id = $this->contact_id");
|
||||
}
|
||||
|
||||
if (!isset($this->duration_minutes)) {
|
||||
$this->duration_minutes = $this->minutes_value_default;
|
||||
}
|
||||
|
||||
global $timedate;
|
||||
//setting default date and time
|
||||
if (is_null($this->date_start)) {
|
||||
$this->date_start = $timedate->to_display_date_time(gmdate($GLOBALS['timedate']->get_db_date_time_format()));
|
||||
}
|
||||
|
||||
if (is_null($this->duration_hours))
|
||||
$this->duration_hours = "0";
|
||||
if (is_null($this->duration_minutes))
|
||||
$this->duration_minutes = "1";
|
||||
|
||||
$this->fill_in_additional_parent_fields();
|
||||
|
||||
global $app_list_strings;
|
||||
$parent_types = $app_list_strings['record_type_display'];
|
||||
$disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
|
||||
foreach($disabled_parent_types as $disabled_parent_type){
|
||||
if($disabled_parent_type != $this->parent_type){
|
||||
unset($parent_types[$disabled_parent_type]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->parent_type_options = get_select_options_with_id($parent_types, $this->parent_type);
|
||||
|
||||
if (empty($this->reminder_time)) {
|
||||
$this->reminder_time = -1;
|
||||
}
|
||||
|
||||
$this->reminder_checked = $this->reminder_time == -1 ? false : true;
|
||||
|
||||
if (isset ($_REQUEST['parent_type'])) {
|
||||
$this->parent_type = $_REQUEST['parent_type'];
|
||||
} elseif (is_null($this->parent_type)) {
|
||||
$this->parent_type = $app_list_strings['record_type_default_key'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function fill_in_additional_parent_fields()
|
||||
{
|
||||
|
||||
$this->parent_name = '';
|
||||
global $app_strings, $beanFiles, $beanList;
|
||||
if ( ! isset($beanList[$this->parent_type]))
|
||||
{
|
||||
$this->parent_name = '';
|
||||
return;
|
||||
}
|
||||
|
||||
$beanType = $beanList[$this->parent_type];
|
||||
require_once($beanFiles[$beanType]);
|
||||
$parent = new $beanType();
|
||||
|
||||
if (is_subclass_of($parent, 'Person')) {
|
||||
$query = "SELECT first_name, last_name, assigned_user_id parent_name_owner from $parent->table_name where id = '$this->parent_id'";
|
||||
}
|
||||
else {
|
||||
|
||||
$query = "SELECT name ";
|
||||
if(isset($parent->field_defs['assigned_user_id'])){
|
||||
$query .= " , assigned_user_id parent_name_owner ";
|
||||
}else{
|
||||
$query .= " , created_by parent_name_owner ";
|
||||
}
|
||||
$query .= " from $parent->table_name where id = '$this->parent_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 && !empty($row['parent_name_owner'])){
|
||||
$this->parent_name_owner = $row['parent_name_owner'];
|
||||
$this->parent_name_mod = $this->parent_type;
|
||||
}
|
||||
if (is_subclass_of($parent, 'Person') and $row != null)
|
||||
{
|
||||
$this->parent_name = '';
|
||||
if ($row['first_name'] != '') $this->parent_name .= stripslashes($row['first_name']). ' ';
|
||||
if ($row['last_name'] != '') $this->parent_name .= stripslashes($row['last_name']);
|
||||
}
|
||||
elseif($row != null)
|
||||
{
|
||||
$this->parent_name = stripslashes($row['name']);
|
||||
}
|
||||
else {
|
||||
$this->parent_name = '';
|
||||
}
|
||||
}
|
||||
|
||||
function get_list_view_data(){
|
||||
$call_fields = $this->get_list_view_array();
|
||||
global $app_list_strings, $focus, $action, $currentModule, $image_path;
|
||||
if (isset($focus->id)) $id = $focus->id;
|
||||
else $id = '';
|
||||
if (isset($this->parent_type) && $this->parent_type != null)
|
||||
{
|
||||
$call_fields['PARENT_MODULE'] = $this->parent_type;
|
||||
}
|
||||
if ($this->status == "Planned") {
|
||||
//cn: added this if() to deal with sequential Closes in Meetings. this is a hack to a hack (formbase.php->handleRedirect)
|
||||
if(empty($action)) { $action = "index"; }
|
||||
$call_fields['SET_COMPLETE'] = "<a href='index.php?return_module=$currentModule&return_action=$action&return_id=$id&action=EditView&status=Held&module=Calls&record=$this->id&status=Held'>".get_image($image_path."close_inline","title=".translate('LBL_LIST_CLOSE','Calls')." border='0'")."</a>";
|
||||
}
|
||||
global $timedate;
|
||||
$today = gmdate($GLOBALS['timedate']->get_db_date_time_format(), time());
|
||||
$nextday = gmdate($GLOBALS['timedate']->dbDayFormat, time() + 3600*24);
|
||||
$mergeTime = $call_fields['DATE_START']; //$timedate->merge_date_time($call_fields['DATE_START'], $call_fields['TIME_START']);
|
||||
$date_db = $timedate->to_db($mergeTime);
|
||||
if( $date_db < $today){
|
||||
$call_fields['DATE_START']= "<font class='overdueTask'>".$call_fields['DATE_START']."</font>";
|
||||
}else if($date_db < $nextday){
|
||||
$call_fields['DATE_START'] = "<font class='todaysTask'>".$call_fields['DATE_START']."</font>";
|
||||
}else{
|
||||
$call_fields['DATE_START'] = "<font class='futureTask'>".$call_fields['DATE_START']."</font>";
|
||||
}
|
||||
$this->fill_in_additional_detail_fields();
|
||||
$call_fields['CONTACT_ID'] = $this->contact_id;
|
||||
$call_fields['CONTACT_NAME'] = $this->contact_name;
|
||||
|
||||
$call_fields['PARENT_NAME'] = $this->parent_name;
|
||||
$call_fields['AD'] ='Rozmowa';
|
||||
return $call_fields;
|
||||
}
|
||||
|
||||
function set_notification_body($xtpl, $call) {
|
||||
global $sugar_config;
|
||||
global $app_list_strings;
|
||||
global $current_user;
|
||||
global $app_list_strings;
|
||||
global $timedate;
|
||||
|
||||
$prefDate = User::getUserDateTimePreferences($call->current_notify_user);
|
||||
$x = date($prefDate['date']." ".$prefDate['time'], strtotime(($call->date_start . " " . $call->time_start)));
|
||||
$xOffset = $timedate->handle_offset($x, $prefDate['date']." ".$prefDate['time'], true, $current_user);
|
||||
|
||||
if ( strtolower(get_class($call->current_notify_user)) == 'contact' ) {
|
||||
$xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
|
||||
'/index.php?entryPoint=acceptDecline&module=Calls&contact_id='.$call->current_notify_user->id.'&record='.$call->id);
|
||||
} elseif ( strtolower(get_class($call->current_notify_user)) == 'lead' ) {
|
||||
$xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
|
||||
'/index.php?entryPoint=acceptDecline&module=Calls&lead_id='.$call->current_notify_user->id.'&record='.$call->id);
|
||||
} else {
|
||||
$xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
|
||||
'/index.php?entryPoint=acceptDecline&module=Calls&user_id='.$call->current_notify_user->id.'&record='.$call->id);
|
||||
}
|
||||
|
||||
$xtpl->assign("CALL_TO", $call->current_notify_user->new_assigned_user_name);
|
||||
$xtpl->assign("CALL_SUBJECT", $call->name);
|
||||
$xtpl->assign("CALL_STARTDATE", $xOffset . " " . (!empty($app_list_strings['dom_timezones_extra'][$prefDate['userGmtOffset']]) ? $app_list_strings['dom_timezones_extra'][$prefDate['userGmtOffset']] : $prefDate['userGmt']));
|
||||
$xtpl->assign("CALL_HOURS", $call->duration_hours);
|
||||
$xtpl->assign("CALL_MINUTES", $call->duration_minutes);
|
||||
$xtpl->assign("CALL_STATUS", ((isset($call->status))?$app_list_strings['call_status_dom'][$call->status] : ""));
|
||||
$xtpl->assign("CALL_DESCRIPTION", $call->description);
|
||||
|
||||
return $xtpl;
|
||||
}
|
||||
|
||||
|
||||
function get_call_users() {
|
||||
$template = new User();
|
||||
// First, get the list of IDs.
|
||||
$query = "SELECT calls_users.required, calls_users.accept_status, calls_users.user_id from calls_users where calls_users.call_id='$this->id' AND calls_users.deleted=0";
|
||||
$GLOBALS['log']->debug("Finding linked records $this->object_name: ".$query);
|
||||
$result = $this->db->query($query, true);
|
||||
$list = Array();
|
||||
|
||||
while($row = $this->db->fetchByAssoc($result)) {
|
||||
$template = new User(); // PHP 5 will retrieve by reference, always over-writing the "old" one
|
||||
$record = $template->retrieve($row['user_id']);
|
||||
$template->required = $row['required'];
|
||||
$template->accept_status = $row['accept_status'];
|
||||
|
||||
if($record != null) {
|
||||
// this copies the object into the array
|
||||
$list[] = $template;
|
||||
}
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
function get_invite_calls(&$user)
|
||||
{
|
||||
$template = $this;
|
||||
// First, get the list of IDs.
|
||||
$query = "SELECT calls_users.required, calls_users.accept_status, calls_users.call_id from calls_users where calls_users.user_id='$user->id' AND ( calls_users.accept_status IS NULL OR calls_users.accept_status='none') AND calls_users.deleted=0";
|
||||
$GLOBALS['log']->debug("Finding linked records $this->object_name: ".$query);
|
||||
|
||||
|
||||
$result = $this->db->query($query, true);
|
||||
|
||||
|
||||
$list = Array();
|
||||
|
||||
|
||||
while($row = $this->db->fetchByAssoc($result))
|
||||
{
|
||||
$record = $template->retrieve($row['call_id']);
|
||||
$template->required = $row['required'];
|
||||
$template->accept_status = $row['accept_status'];
|
||||
|
||||
|
||||
if($record != null)
|
||||
{
|
||||
// this copies the object into the array
|
||||
$list[] = $template;
|
||||
}
|
||||
}
|
||||
return $list;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function set_accept_status(&$user,$status)
|
||||
{
|
||||
if ( $user->object_name == 'User')
|
||||
{
|
||||
$relate_values = array('user_id'=>$user->id,'call_id'=>$this->id);
|
||||
$data_values = array('accept_status'=>$status);
|
||||
$this->set_relationship($this->rel_users_table, $relate_values, true, true,$data_values);
|
||||
global $current_user;
|
||||
require_once('modules/vCals/vCal.php');
|
||||
if ( $this->update_vcal )
|
||||
{
|
||||
vCal::cache_sugar_vcal($user);
|
||||
}
|
||||
}
|
||||
else if ( $user->object_name == 'Contact')
|
||||
{
|
||||
$relate_values = array('contact_id'=>$user->id,'call_id'=>$this->id);
|
||||
$data_values = array('accept_status'=>$status);
|
||||
$this->set_relationship($this->rel_contacts_table, $relate_values, true, true,$data_values);
|
||||
}
|
||||
else if ( $user->object_name == 'Lead')
|
||||
{
|
||||
$relate_values = array('lead_id'=>$user->id,'call_id'=>$this->id);
|
||||
$data_values = array('accept_status'=>$status);
|
||||
$this->set_relationship($this->rel_leads_table, $relate_values, true, true,$data_values);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function get_notification_recipients() {
|
||||
// $GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($this,true));
|
||||
$list = array();
|
||||
|
||||
$notify_user = new User();
|
||||
$notify_user->retrieve($this->assigned_user_id);
|
||||
$notify_user->new_assigned_user_name = $notify_user->full_name;
|
||||
$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
|
||||
$list[] = $notify_user;
|
||||
|
||||
if(!is_array($this->contacts_arr)) {
|
||||
$this->contacts_arr = array();
|
||||
}
|
||||
|
||||
if(!is_array($this->users_arr)) {
|
||||
$this->users_arr = array();
|
||||
}
|
||||
|
||||
if(!is_array($this->leads_arr)) {
|
||||
$this->leads_arr = array();
|
||||
}
|
||||
|
||||
foreach($this->users_arr as $user_id) {
|
||||
$notify_user = new User();
|
||||
$notify_user->retrieve($user_id);
|
||||
$notify_user->new_assigned_user_name = $notify_user->full_name;
|
||||
$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
|
||||
$list[] = $notify_user;
|
||||
}
|
||||
|
||||
foreach($this->contacts_arr as $contact_id) {
|
||||
$notify_user = new Contact();
|
||||
$notify_user->retrieve($contact_id);
|
||||
$notify_user->new_assigned_user_name = $notify_user->full_name;
|
||||
$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
|
||||
$list[] = $notify_user;
|
||||
}
|
||||
|
||||
foreach($this->leads_arr as $lead_id) {
|
||||
$notify_user = new Lead();
|
||||
$notify_user->retrieve($lead_id);
|
||||
$notify_user->new_assigned_user_name = $notify_user->full_name;
|
||||
$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
|
||||
$list[] = $notify_user;
|
||||
}
|
||||
// $GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($list,true));
|
||||
return $list;
|
||||
}
|
||||
|
||||
function bean_implements($interface){
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function listviewACLHelper(){
|
||||
$array_assign = parent::listviewACLHelper();
|
||||
$is_owner = false;
|
||||
if(!empty($this->parent_name)){
|
||||
|
||||
if(!empty($this->parent_name_owner)){
|
||||
global $current_user;
|
||||
$is_owner = $current_user->id == $this->parent_name_owner;
|
||||
}
|
||||
}
|
||||
if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner)){
|
||||
$array_assign['PARENT'] = 'a';
|
||||
}else{
|
||||
$array_assign['PARENT'] = 'span';
|
||||
}
|
||||
$is_owner = false;
|
||||
if(!empty($this->contact_name)){
|
||||
|
||||
if(!empty($this->contact_name_owner)){
|
||||
global $current_user;
|
||||
$is_owner = $current_user->id == $this->contact_name_owner;
|
||||
}
|
||||
}
|
||||
if( ACLController::checkAccess('Contacts', 'view', $is_owner)){
|
||||
$array_assign['CONTACT'] = 'a';
|
||||
}else{
|
||||
$array_assign['CONTACT'] = 'span';
|
||||
}
|
||||
|
||||
return $array_assign;
|
||||
}
|
||||
|
||||
function save_relationship_changes($is_update) {
|
||||
parent::save_relationship_changes($is_update, array('lead_id', 'contact_id', 'user_id'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
583
modules/Calls/CallFormBase.php
Executable file
583
modules/Calls/CallFormBase.php
Executable file
@@ -0,0 +1,583 @@
|
||||
<?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: Call Form Base
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
class CallFormBase{
|
||||
|
||||
function getFormBody($prefix, $mod='', $formname='',$cal_date='',$cal_time=''){
|
||||
if(!ACLController::checkAccess('Calls', '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 $app_list_strings;
|
||||
global $current_user;
|
||||
global $theme;
|
||||
|
||||
|
||||
$lbl_subject = $mod_strings['LBL_SUBJECT'];
|
||||
// Unimplemented until jscalendar language files are fixed
|
||||
// global $current_language;
|
||||
// global $default_language;
|
||||
// global $cal_codes;
|
||||
// Unimplemented until jscalendar language files are fixed
|
||||
// $cal_lang = (empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language];
|
||||
|
||||
global $timedate;
|
||||
$cal_lang = "en";
|
||||
$cal_dateformat = $timedate->get_cal_date_format();
|
||||
|
||||
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
|
||||
$lbl_date = $mod_strings['LBL_DATE'];
|
||||
$lbl_time = $mod_strings['LBL_TIME'];
|
||||
$ntc_date_format = $timedate->get_user_date_format();
|
||||
$ntc_time_format = '('.$timedate->get_user_time_format().')';
|
||||
|
||||
$user_id = $current_user->id;
|
||||
$default_status = $app_list_strings['call_status_default'];
|
||||
$default_parent_type= $app_list_strings['record_type_default_key'];
|
||||
$date = gmdate($GLOBALS['timedate']->get_db_date_time_format());
|
||||
$default_date_start = $timedate->to_display_date($date,false);
|
||||
$default_time_start = $timedate->to_display_time($date);
|
||||
$time_ampm = $timedate->AMPMMenu($prefix,$default_time_start);
|
||||
$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'];
|
||||
$form = <<<EOQ
|
||||
<form name="${formname}" onSubmit="return check_form('${formname}') "method="POST" action="index.php">
|
||||
<input type="hidden" name="${prefix}module" value="Calls">
|
||||
<input type="hidden" name="${prefix}action" value="Save">
|
||||
<input type="hidden" name="${prefix}record" value="">
|
||||
<input type="hidden" name="${prefix}direction" value="Outbound">
|
||||
<input type="hidden" name="${prefix}status" value="${default_status}">
|
||||
<input type="hidden" name="${prefix}parent_type" value="${default_parent_type}">
|
||||
<input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
|
||||
<input type="hidden" name="${prefix}duration_hours" value="1">
|
||||
<input type="hidden" name="${prefix}duration_minutes" value="0">
|
||||
<input type="hidden" name="${prefix}user_id" value="${user_id}">
|
||||
|
||||
<table cellspacing="1" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td colspan="2"><input type='radio' name='appointment' value='Call' class='radio' onchange='document.${formname}.module.value="Calls";' style='vertical-align: middle;' checked> <span class="dataLabel">${mod_strings['LNK_NEW_CALL']}</span>
|
||||
|
||||
|
||||
<input type='radio' name='appointment' value='Meeting' class='radio' onchange='document.${formname}.module.value="Meetings";'><span class="dataLabel">${mod_strings['LNK_NEW_MEETING']}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><span class="dataLabel">$lbl_subject</span> <span class="required">$lbl_required_symbol</span></td>
|
||||
</tr>
|
||||
<tr><td valign=top><input name='${prefix}name' size='30' maxlength='255' type="text"></td>
|
||||
<input name='${prefix}date_start' id='${formname}jscal_field' maxlength='10' type="hidden" value="${cal_date}"></td>
|
||||
<input name='${prefix}time_start' type="hidden" maxlength='10' value="{$cal_time}"></td>
|
||||
|
||||
<script type="text/javascript">
|
||||
// Calendar.setup ({
|
||||
// inputField : "${formname}jscal_field", daFormat : "$cal_dateformat" ifFormat : "$cal_dateformat", showsTime : false, button : "${formname}jscal_trigger", singleClick : true, step : 1
|
||||
// });
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
EOQ;
|
||||
|
||||
require_once('include/javascript/javascript.php');
|
||||
require_once('modules/Calls/Call.php');
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new Call());
|
||||
$javascript->addRequiredFields($prefix);
|
||||
$form .=$javascript->getScript();
|
||||
$form .= "<td align=\"left\" valign=top><input title='$lbl_save_button_title' accessKey='$lbl_save_button_key' class='button' type='submit' name='button' value=' $lbl_save_button_label ' ></td></form></tr></table>";
|
||||
$mod_strings = $temp_strings;
|
||||
return $form;
|
||||
|
||||
}
|
||||
function getFormHeader($prefix, $mod='', $title=''){
|
||||
if(!ACLController::checkAccess('Calls', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}else global $mod_strings;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(!empty($title)){
|
||||
$the_form = get_left_form_header($title);
|
||||
}else{
|
||||
$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
|
||||
}
|
||||
$the_form .= <<<EOQ
|
||||
<form name="${prefix}CallSave" onSubmit="return check_form('${prefix}CallSave') "method="POST" action="index.php">
|
||||
<input type="hidden" name="${prefix}module" value="Calls">
|
||||
<input type="hidden" name="${prefix}action" value="Save">
|
||||
|
||||
EOQ;
|
||||
return $the_form;
|
||||
}
|
||||
function getFormFooter($prefic, $mod=''){
|
||||
if(!ACLController::checkAccess('Calls', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
global $app_strings;
|
||||
global $app_list_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 = " <p><input title='$lbl_save_button_title' accessKey='$lbl_save_button_key' class='button' type='submit' name='button' value=' $lbl_save_button_label ' ></p></form>";
|
||||
$the_form .= get_left_form_footer();
|
||||
$the_form .= get_validate_record_js();
|
||||
return $the_form;
|
||||
}
|
||||
|
||||
function getForm($prefix, $mod=''){
|
||||
if(!ACLController::checkAccess('Calls', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
$the_form = $this->getFormHeader($prefix, $mod);
|
||||
$the_form .= $this->getFormBody($prefix, $mod, "${prefix}CallSave");
|
||||
$the_form .= $this->getFormFooter($prefix, $mod);
|
||||
|
||||
return $the_form;
|
||||
}
|
||||
|
||||
|
||||
function handleSave($prefix,$redirect=true,$useRequired=false) {
|
||||
require_once('include/TimeDate.php');
|
||||
require_once('modules/Calls/Call.php');
|
||||
require_once('include/formbase.php');
|
||||
|
||||
global $current_user;
|
||||
global $timedate;
|
||||
|
||||
//BUG 17418 MFH
|
||||
if (isset($_POST['duration_hours'])){
|
||||
$_POST['duration_hours'] = trim($_POST['duration_hours']);
|
||||
}
|
||||
|
||||
$focus = new Call();
|
||||
|
||||
if($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))) {
|
||||
return null;
|
||||
}
|
||||
if( !isset($_POST['reminder_checked']) or ( isset($_POST['reminder_checked']) && $_POST['reminder_checked'] == '0')) {
|
||||
$_POST['reminder_time'] = null;
|
||||
}
|
||||
|
||||
if(!isset($_POST['reminder_time'])) {
|
||||
$_POST['reminder_time'] = $current_user->getPreference('reminder_time');
|
||||
$_POST['reminder_checked']=1;
|
||||
}
|
||||
|
||||
$time_format = $timedate->get_user_time_format();
|
||||
$time_separator = ":";
|
||||
if(preg_match('/\d+([^\d])\d+([^\d]*)/s', $time_format, $match)) {
|
||||
$time_separator = $match[1];
|
||||
}
|
||||
|
||||
if(!empty($_POST[$prefix.'time_hour_start']) && empty($_POST['time_start'])) {
|
||||
$_POST[$prefix.'time_start'] = $_POST[$prefix.'time_hour_start']. $time_separator .$_POST[$prefix.'time_minute_start'];
|
||||
}
|
||||
|
||||
if(isset($_POST[$prefix.'meridiem']) && !empty($_POST[$prefix.'meridiem'])) {
|
||||
$_POST[$prefix.'time_start'] = $timedate->merge_time_meridiem($_POST[$prefix.'time_start'],$timedate->get_time_format(true), $_POST[$prefix.'meridiem']);
|
||||
}
|
||||
|
||||
if(isset($_POST[$prefix.'time_start']) && strlen($_POST[$prefix.'date_start']) == 10) {
|
||||
$_POST[$prefix.'date_start'] = $_POST[$prefix.'date_start'] . ' ' . $_POST[$prefix.'time_start'];
|
||||
}
|
||||
|
||||
// retrieve happens here
|
||||
$focus = populateFromPost($prefix, $focus);
|
||||
if(!$focus->ACLAccess('Save')) {
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
if(isset($_POST['isSaveFromDetailView']) && $_POST['isSaveFromDetailView'] == 'true'){
|
||||
$focus->save(true);
|
||||
$return_id = $focus->id;
|
||||
}else{
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//// REMOVE INVITEE RELATIONSHIPS
|
||||
if(!empty($_POST['user_invitees'])) {
|
||||
$userInvitees = explode(',', trim($_POST['user_invitees'], ','));
|
||||
} else {
|
||||
$userInvitees = array();
|
||||
}
|
||||
|
||||
// Calculate which users to flag as deleted and which to add
|
||||
$deleteUsers = array();
|
||||
$focus->load_relationship('users');
|
||||
// Get all users for the call
|
||||
$q = 'SELECT mu.user_id, mu.accept_status FROM calls_users mu WHERE mu.call_id = \''.$focus->id.'\'';
|
||||
$r = $focus->db->query($q);
|
||||
$acceptStatusUsers = array();
|
||||
while($a = $focus->db->fetchByAssoc($r)) {
|
||||
if(!in_array($a['user_id'], $userInvitees)) {
|
||||
$deleteUsers[$a['user_id']] = $a['user_id'];
|
||||
} else {
|
||||
$acceptStatusUsers[$a['user_id']] = $a['accept_status'];
|
||||
}
|
||||
}
|
||||
|
||||
if(count($deleteUsers) > 0) {
|
||||
$sql = '';
|
||||
foreach($deleteUsers as $u) {
|
||||
// make sure we don't delete the assigned user
|
||||
if ( $u != $focus->assigned_user_id )
|
||||
$sql .= ",'" . $u . "'";
|
||||
}
|
||||
$sql = substr($sql, 1);
|
||||
// We could run a delete SQL statement here, but will just mark as deleted instead
|
||||
$sql = "UPDATE calls_users set deleted = 1 where user_id in ($sql) AND call_id = '". $focus->id . "'";
|
||||
$focus->db->query($sql);
|
||||
}
|
||||
|
||||
// Get all contacts for the call
|
||||
if(!empty($_POST['contact_invitees'])) {
|
||||
$contactInvitees = explode(',', trim($_POST['contact_invitees'], ','));
|
||||
} else {
|
||||
$contactInvitees = array();
|
||||
}
|
||||
|
||||
$deleteContacts = array();
|
||||
$focus->load_relationship('contacts');
|
||||
$q = 'SELECT mu.contact_id, mu.accept_status FROM calls_contacts mu WHERE mu.call_id = \''.$focus->id.'\'';
|
||||
$r = $focus->db->query($q);
|
||||
$acceptStatusContacts = array();
|
||||
while($a = $focus->db->fetchByAssoc($r)) {
|
||||
if(!in_array($a['contact_id'], $contactInvitees)) {
|
||||
$deleteContacts[$a['contact_id']] = $a['contact_id'];
|
||||
} else {
|
||||
$acceptStatusContacts[$a['contact_id']] = $a['accept_status'];
|
||||
}
|
||||
}
|
||||
|
||||
if(count($deleteContacts) > 0) {
|
||||
$sql = '';
|
||||
foreach($deleteContacts as $u) {
|
||||
$sql .= ",'" . $u . "'";
|
||||
}
|
||||
$sql = substr($sql, 1);
|
||||
// We could run a delete SQL statement here, but will just mark as deleted instead
|
||||
$sql = "UPDATE calls_contacts set deleted = 1 where contact_id in ($sql) AND call_id = '". $focus->id . "'";
|
||||
$focus->db->query($sql);
|
||||
}
|
||||
|
||||
if(!empty($_POST['lead_invitees'])) {
|
||||
$leadInvitees = explode(',', trim($_POST['lead_invitees'], ','));
|
||||
} else {
|
||||
$leadInvitees = array();
|
||||
}
|
||||
|
||||
// Calculate which leads to flag as deleted and which to add
|
||||
$deleteLeads = array();
|
||||
$focus->load_relationship('leads');
|
||||
// Get all leads for the call
|
||||
$q = 'SELECT mu.lead_id, mu.accept_status FROM calls_leads mu WHERE mu.call_id = \''.$focus->id.'\'';
|
||||
$r = $focus->db->query($q);
|
||||
$acceptStatusLeads = array();
|
||||
while($a = $focus->db->fetchByAssoc($r)) {
|
||||
if(!in_array($a['lead_id'], $leadInvitees)) {
|
||||
$deleteLeads[$a['lead_id']] = $a['lead_id'];
|
||||
} else {
|
||||
$acceptStatusLeads[$a['user_id']] = $a['accept_status'];
|
||||
}
|
||||
}
|
||||
|
||||
if(count($deleteLeads) > 0) {
|
||||
$sql = '';
|
||||
foreach($deleteLeads as $u) {
|
||||
// make sure we don't delete the assigned user
|
||||
if ( $u != $focus->assigned_user_id )
|
||||
$sql .= ",'" . $u . "'";
|
||||
}
|
||||
$sql = substr($sql, 1);
|
||||
// We could run a delete SQL statement here, but will just mark as deleted instead
|
||||
$sql = "UPDATE calls_leads set deleted = 1 where lead_id in ($sql) AND call_id = '". $focus->id . "'";
|
||||
$focus->db->query($sql);
|
||||
}
|
||||
//// END REMOVE
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//// REBUILD INVITEE RELATIONSHIPS
|
||||
$focus->users_arr = array();
|
||||
$focus->users_arr = $userInvitees;
|
||||
$focus->contacts_arr = array();
|
||||
$focus->contacts_arr = $contactInvitees;
|
||||
$focus->leads_arr = array();
|
||||
$focus->leads_arr = $leadInvitees;
|
||||
|
||||
if(!empty($_POST['parent_id']) && $_POST['parent_type'] == 'Contacts') {
|
||||
$focus->contacts_arr[] = $_POST['parent_id'];
|
||||
}
|
||||
|
||||
if(!empty($_POST['parent_id']) && $_POST['parent_type'] == 'Leads') {
|
||||
$focus->leads_arr[] = $_POST['parent_id'];
|
||||
}
|
||||
|
||||
// Call the Call module's save function to handle saving other fields besides
|
||||
// the users and contacts relationships
|
||||
$focus->save(true);
|
||||
$return_id = $focus->id;
|
||||
|
||||
// Process users
|
||||
$existing_users = array();
|
||||
if(!empty($_POST['existing_invitees'])) {
|
||||
$existing_users = explode(",", trim($_POST['existing_invitees'], ','));
|
||||
}
|
||||
|
||||
foreach($focus->users_arr as $user_id) {
|
||||
if(empty($user_id) || isset($existing_users[$user_id]) || isset($deleteUsers[$user_id])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!isset($acceptStatusUsers[$user_id])) {
|
||||
$focus->users->add($user_id);
|
||||
} else {
|
||||
// update query to preserve accept_status
|
||||
$qU = 'UPDATE calls_users SET deleted = 0, accept_status = \''.$acceptStatusUsers[$user_id].'\' ';
|
||||
$qU .= 'WHERE call_id = \''.$focus->id.'\' ';
|
||||
$qU .= 'AND user_id = \''.$user_id.'\'';
|
||||
$focus->db->query($qU);
|
||||
}
|
||||
}
|
||||
|
||||
// Process contacts
|
||||
$existing_contacts = array();
|
||||
if(!empty($_POST['existing_contact_invitees'])) {
|
||||
$existing_contacts = explode(",", trim($_POST['existing_contact_invitees'], ','));
|
||||
}
|
||||
|
||||
foreach($focus->contacts_arr as $contact_id) {
|
||||
if(empty($contact_id) || isset($exiting_contacts[$contact_id]) || isset($deleteContacts[$contact_id])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!isset($acceptStatusContacts[$contact_id])) {
|
||||
$focus->contacts->add($contact_id);
|
||||
} else {
|
||||
// update query to preserve accept_status
|
||||
$qU = 'UPDATE calls_contacts SET deleted = 0, accept_status = \''.$acceptStatusContacts[$contact_id].'\' ';
|
||||
$qU .= 'WHERE call_id = \''.$focus->id.'\' ';
|
||||
$qU .= 'AND contact_id = \''.$contact_id.'\'';
|
||||
$focus->db->query($qU);
|
||||
}
|
||||
}
|
||||
|
||||
// Process leads
|
||||
$existing_leads = array();
|
||||
if(!empty($_POST['existing_lead_invitees'])) {
|
||||
$existing_contacts = explode(",", trim($_POST['existing_lead_invitees'], ','));
|
||||
}
|
||||
|
||||
foreach($focus->leads_arr as $lead_id) {
|
||||
if(empty($lead_id) || isset($existing_leads[$lead_id]) || isset($deleteLeads[$lead_id])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!isset($acceptStatusLeads[$lead_id])) {
|
||||
$focus->leads->add($lead_id);
|
||||
} else {
|
||||
// update query to preserve accept_status
|
||||
$qU = 'UPDATE calls_leads SET deleted = 0, accept_status = \''.$acceptStatusLeads[$lead_id].'\' ';
|
||||
$qU .= 'WHERE call_id = \''.$focus->id.'\' ';
|
||||
$qU .= 'AND lead_id = \''.$lead_id.'\'';
|
||||
$focus->db->query($qU);
|
||||
}
|
||||
}
|
||||
|
||||
// set organizer to auto-accept
|
||||
$focus->set_accept_status($current_user, 'accept');
|
||||
//// END REBUILD INVITEE RELATIONSHIPS
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['return_module']) && $_REQUEST['return_module'] == 'Home'){
|
||||
header("Location: index.php?module=Home&action=index");
|
||||
}
|
||||
else if($redirect) {
|
||||
handleRedirect($return_id, 'Calls');
|
||||
} else {
|
||||
return $focus;
|
||||
}
|
||||
|
||||
} // end handleSave();
|
||||
|
||||
function getWideFormBody ($prefix, $mod='', $formname='', $wide =true){
|
||||
if(!ACLController::checkAccess('Calls', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
require_once('include/time.php');
|
||||
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 $app_list_strings;
|
||||
global $current_user;
|
||||
global $theme;
|
||||
|
||||
$lbl_subject = $mod_strings['LBL_SUBJECT'];
|
||||
// Unimplemented until jscalendar language files are fixed
|
||||
// global $current_language;
|
||||
// global $default_language;
|
||||
// global $cal_codes;
|
||||
// Unimplemented until jscalendar language files are fixed
|
||||
// $cal_lang = (empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language];
|
||||
$cal_lang = "en";
|
||||
|
||||
|
||||
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
|
||||
$lbl_date = $mod_strings['LBL_DATE'];
|
||||
$lbl_time = $mod_strings['LBL_TIME'];
|
||||
global $timedate;
|
||||
$ntc_date_format = '('.$timedate->get_user_date_format(). ')';
|
||||
$ntc_time_format = '('.$timedate->get_user_time_format(). ')';
|
||||
$cal_dateformat = $timedate->get_cal_date_format();
|
||||
|
||||
$user_id = $current_user->id;
|
||||
$default_status = $app_list_strings['call_status_default'];
|
||||
$default_parent_type= $app_list_strings['record_type_default_key'];
|
||||
$date = gmdate($GLOBALS['timedate']->get_db_date_time_format());
|
||||
$default_date_start = $timedate->to_display_date($date);
|
||||
$default_time_start = $timedate->to_display_time($date,true);
|
||||
$time_ampm = $timedate->AMPMMenu($prefix,$default_time_start);
|
||||
$form = <<<EOQ
|
||||
<input type="hidden" name="${prefix}direction" value="Outbound">
|
||||
<input type="hidden" name="${prefix}record" value="">
|
||||
<input type="hidden" name="${prefix}status" value="${default_status}">
|
||||
<input type="hidden" name="${prefix}parent_type" value="${default_parent_type}">
|
||||
<input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
|
||||
<input type="hidden" name="${prefix}duration_hours" value="1">
|
||||
<input type="hidden" name="${prefix}duration_minutes" value="0">
|
||||
<input type="hidden" name="${prefix}user_id" value="${user_id}">
|
||||
|
||||
<table cellspacing='0' cellpadding='0' border='0' width="100%">
|
||||
<tr>
|
||||
EOQ;
|
||||
|
||||
if($wide){
|
||||
$form .= <<<EOQ
|
||||
<td class='dataLabel' width="20%"><input type='radio' name='appointment' value='Call' class='radio' checked> ${mod_strings['LNK_NEW_CALL']}</td>
|
||||
<td class='dataLabel' width="80%">${mod_strings['LBL_DESCRIPTION']}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataLabel'><input type='radio' name='appointment' value='Meeting' class='radio'> ${mod_strings['LNK_NEW_MEETING']}</td>
|
||||
|
||||
<td rowspan='8' class='dataField'><textarea name='Appointmentsdescription' cols='50' rows='5'></textarea></td>
|
||||
</tr>
|
||||
EOQ;
|
||||
}else{
|
||||
$form .= <<<EOQ
|
||||
<td class='dataLabel' width="20%"><input type='radio' name='appointment' value='Call' class='radio' onchange='document.$formname.module.value="Calls";' checked> ${mod_strings['LNK_NEW_CALL']}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataLabel'><input type='radio' name='appointment' value='Meeting' class='radio' onchange='document.$formname.module.value="Meetings";'> ${mod_strings['LNK_NEW_MEETING']}</td>
|
||||
</tr>
|
||||
EOQ;
|
||||
}
|
||||
$form .= <<<EOQ
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='dataLabel'>$lbl_subject <span class="required">$lbl_required_symbol</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataField'><input name='${prefix}name' maxlength='255' type="text"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataLabel'>$lbl_date <span class="required">$lbl_required_symbol</span> <span class="dateFormat">$ntc_date_format</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='dataField'><input onblur="parseDate(this, '$cal_dateformat');" name='${prefix}date_start' size="12" id='${prefix}jscal_field' maxlength='10' type="text" value="${default_date_start}"> <img src="themes/default/images/jscalendar.gif" alt="{$app_strings['LBL_ENTER_DATE']}" id="${prefix}jscal_trigger" align="absmiddle"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='dataLabel'>$lbl_time <span class="required">$lbl_required_symbol</span> <span class="dateFormat">$ntc_time_format</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='dataField'><input name='${prefix}time_start' size="12" type="text" maxlength='5' value="{$default_time_start}">$time_ampm</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
Calendar.setup ({
|
||||
inputField : "${prefix}jscal_field", daFormat : "$cal_dateformat", ifFormat : "$cal_dateformat", showsTime : false, button : "${prefix}jscal_trigger", singleClick : true, step : 1
|
||||
});
|
||||
</script>
|
||||
EOQ;
|
||||
require_once('include/javascript/javascript.php');
|
||||
require_once('modules/Calls/Call.php');
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new Call());
|
||||
$javascript->addRequiredFields($prefix);
|
||||
$form .=$javascript->getScript();
|
||||
$mod_strings = $temp_strings;
|
||||
return $form;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
106
modules/Calls/CallHelper.php
Executable file
106
modules/Calls/CallHelper.php
Executable file
@@ -0,0 +1,106 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
function getDurationMinutesOptions($focus, $field, $value, $view) {
|
||||
|
||||
if (isset($_REQUEST['duration_minutes'])) {
|
||||
$focus->duration_minutes = $_REQUEST['duration_minutes'];
|
||||
}
|
||||
|
||||
if (!isset($focus->duration_minutes)) {
|
||||
$focus->duration_minutes = $focus->minutes_value_default;
|
||||
}
|
||||
|
||||
global $timedate;
|
||||
//setting default date and time
|
||||
if (is_null($focus->date_start))
|
||||
$focus->date_start = $timedate->to_display_date(gmdate($timedate->get_date_time_format()));
|
||||
if (is_null($focus->duration_hours))
|
||||
$focus->duration_hours = "0";
|
||||
if (is_null($focus->duration_minutes))
|
||||
$focus->duration_minutes = "1";
|
||||
|
||||
|
||||
if($view == 'EditView' || $view == 'MassUpdate'
|
||||
|
||||
|
||||
|
||||
) {
|
||||
$html = '<select ';
|
||||
if($view != 'MassUpdate'
|
||||
|
||||
|
||||
|
||||
)
|
||||
$html .= 'onchange="SugarWidgetScheduler.update_time();"';
|
||||
$html .= 'tabindex="1" name="duration_minutes">';
|
||||
$html .= get_select_options_with_id($focus->minutes_values, $focus->duration_minutes);
|
||||
$html .= '</select>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
return $focus->duration_minutes;
|
||||
}
|
||||
|
||||
function getReminderTime($focus, $field, $value, $view) {
|
||||
|
||||
global $current_user, $app_list_strings;
|
||||
$reminder_t = $current_user->getPreference('reminder_time');
|
||||
if (!empty($focus->reminder_time)) {
|
||||
$reminder_t = $focus->reminder_time;
|
||||
}
|
||||
|
||||
if($view == 'EditView' || $view == 'MassUpdate'
|
||||
|
||||
|
||||
|
||||
) {
|
||||
global $app_list_strings;
|
||||
$html = '<select name="reminder_time">';
|
||||
$html .= get_select_options_with_id($app_list_strings['reminder_time_options'], $reminder_t);
|
||||
$html .= '</select>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
if($reminder_t == -1) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return translate('reminder_time_options', '', $reminder_t);
|
||||
}
|
||||
|
||||
?>
|
||||
143
modules/Calls/CallsQuickCreate.php
Executable file
143
modules/Calls/CallsQuickCreate.php
Executable file
@@ -0,0 +1,143 @@
|
||||
<?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/Calls/Call.php');
|
||||
require_once('include/javascript/javascript.php');
|
||||
|
||||
class CallsQuickCreate extends QuickCreate {
|
||||
|
||||
var $javascript;
|
||||
|
||||
function process() {
|
||||
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
|
||||
$mod_strings = return_module_language($current_language, 'Calls');
|
||||
|
||||
parent::process();
|
||||
|
||||
$this->ss->assign("TIME_FORMAT", '('. $timedate->get_user_time_format().')');
|
||||
$this->ss->assign("USER_DATEFORMAT", '('. $timedate->get_user_date_format().')');
|
||||
$this->ss->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
|
||||
|
||||
|
||||
if($this->viaAJAX) { // override for ajax call
|
||||
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"callsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"activities\"); else return false;'");
|
||||
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_activities\")';");
|
||||
}
|
||||
|
||||
$this->ss->assign('viaAJAX', $this->viaAJAX);
|
||||
|
||||
$this->javascript = new javascript();
|
||||
$this->javascript->setFormName('callsQuickCreate');
|
||||
|
||||
$focus = new Call();
|
||||
$this->javascript->setSugarBean($focus);
|
||||
$this->javascript->addAllFields('');
|
||||
|
||||
if (is_null($focus->date_start))
|
||||
$focus->date_start = $timedate->to_display_date(gmdate($GLOBALS['timedate']->get_db_date_time_format()));
|
||||
if (is_null($focus->time_start))
|
||||
$focus->time_start = $timedate->to_display_time(gmdate($GLOBALS['timedate']->get_db_date_time_format()), true);
|
||||
if (!isset ($focus->duration_hours))
|
||||
$focus->duration_hours = "1";
|
||||
|
||||
$this->ss->assign("DATE_START", $focus->date_start);
|
||||
$this->ss->assign("TIME_START", substr($focus->time_start,0,5));
|
||||
$time_start_hour = intval(substr($focus->time_start, 0, 2));
|
||||
$time_start_minutes = substr($focus->time_start, 3, 5);
|
||||
|
||||
if ($time_start_minutes > 0 && $time_start_minutes < 15) {
|
||||
$time_start_minutes = "15";
|
||||
} else
|
||||
if ($time_start_minutes > 15 && $time_start_minutes < 30) {
|
||||
$time_start_minutes = "30";
|
||||
} else
|
||||
if ($time_start_minutes > 30 && $time_start_minutes < 45) {
|
||||
$time_start_minutes = "45";
|
||||
} else
|
||||
if ($time_start_minutes > 45) {
|
||||
$time_start_hour += 1;
|
||||
$time_start_minutes = "00";
|
||||
}
|
||||
|
||||
|
||||
// We default the to assume that the time preference is set to 11:00 (i.e. without meridiem)
|
||||
$hours_arr = array ();
|
||||
$num_of_hours = 24;
|
||||
$start_at = 0;
|
||||
|
||||
$time_pref = $timedate->get_time_format();
|
||||
if(strpos($time_pref, 'a') || strpos($time_pref, 'A')) {
|
||||
$num_of_hours = 13;
|
||||
$start_at = 1;
|
||||
|
||||
// It's important to do this block first before we recalculate $time_start_hour
|
||||
$options = strpos($time_pref, 'a') ? $app_list_strings['dom_meridiem_lowercase'] : $app_list_strings['dom_meridiem_uppercase'];
|
||||
if(strpos($time_pref, 'a')) {
|
||||
$this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($options, strpos($focus->time_start,'a') ? 'am' : 'pm'));
|
||||
} else {
|
||||
$this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($options, strpos($focus->time_start,'A') ? 'AM' : 'PM'));
|
||||
}
|
||||
|
||||
// the $num_of_hours array is keyed by values 01, 02, ... 12 for meridiem times
|
||||
$time_start_hour = $time_start_hour < 10 ? '0'.$time_start_hour : $time_start_hour;
|
||||
}
|
||||
|
||||
for ($i = $start_at; $i < $num_of_hours; $i ++) {
|
||||
$i = $i."";
|
||||
if (strlen($i) == 1) {
|
||||
$i = "0".$i;
|
||||
}
|
||||
$hours_arr[$i] = $i;
|
||||
}
|
||||
|
||||
$this->ss->assign("TIME_START_HOUR_OPTIONS", get_select_options_with_id($hours_arr, $time_start_hour));
|
||||
$this->ss->assign("TIME_START_MINUTE_OPTIONS", get_select_options_with_id($focus->minutes_values, $time_start_minutes));
|
||||
|
||||
$this->ss->assign("DURATION_HOURS", $focus->duration_hours);
|
||||
$this->ss->assign("DURATION_MINUTES_OPTIONS", get_select_options_with_id($focus->minutes_values, $focus->duration_minutes));
|
||||
|
||||
$focus->direction = (isset ($app_list_strings['call_direction_dom']['Outbound']) ? 'Outbound' : $focus->direction);
|
||||
$focus->status = (isset ($app_list_strings['call_status_dom']['Planned']) ? 'Outbound' : $focus->status);
|
||||
|
||||
$this->ss->assign("DIRECTION_OPTIONS", get_select_options_with_id($app_list_strings['call_direction_dom'], $focus->direction));
|
||||
$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['call_status_dom'], $focus->status));
|
||||
|
||||
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
|
||||
}
|
||||
}
|
||||
?>
|
||||
94
modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php
Executable file
94
modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php
Executable file
@@ -0,0 +1,94 @@
|
||||
<?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['MyCallsDashlet']['searchFields'] = array('date_start' => array('default' => ''),
|
||||
'direction' => array('default' => ''),
|
||||
'status' => array('default' => array('Planned')),
|
||||
'name' => array('default' => ''),
|
||||
|
||||
|
||||
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name));
|
||||
$dashletData['MyCallsDashlet']['columns'] = array('set_complete' => array('width' => '5',
|
||||
'label' => 'LBL_LIST_CLOSE',
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
'related_fields' => array('status')),
|
||||
'name' => array('width' => '40',
|
||||
'label' => 'LBL_SUBJECT',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'parent_name' => array('width' => '29',
|
||||
'label' => 'LBL_LIST_RELATED_TO',
|
||||
'sortable' => false,
|
||||
'dynamic_module' => 'PARENT_TYPE',
|
||||
'link' => true,
|
||||
'id' => 'PARENT_ID',
|
||||
'ACLTag' => 'PARENT',
|
||||
'related_fields' => array('parent_id', 'parent_type')),
|
||||
'duration' => array('width' => '10',
|
||||
'label' => 'LBL_DURATION',
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
'related_fields' => array('duration_hours', 'duration_minutes')),
|
||||
'direction' => array('width' => '10',
|
||||
'label' => 'LBL_DIRECTION'),
|
||||
'date_start' => array('width' => '15',
|
||||
'label' => 'LBL_DATE',
|
||||
'default' => true,
|
||||
'related_fields' => array('time_start')),
|
||||
'status' => array('width' => '8',
|
||||
'label' => 'LBL_STATUS'),
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
'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'),
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
47
modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.meta.php
Executable file
47
modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.meta.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can 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['MyCallsDashlet'] = array('module' => 'Calls',
|
||||
'title' => translate('LBL_LIST_MY_CALLS', 'Calls'),
|
||||
'description' => 'A customizable view into Calls',
|
||||
'category' => 'Module Views',
|
||||
'hidden' => true);
|
||||
?>
|
||||
157
modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php
Executable file
157
modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php
Executable file
@@ -0,0 +1,157 @@
|
||||
<?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/Calls/Call.php');
|
||||
|
||||
class MyCallsDashlet extends DashletGeneric {
|
||||
function MyCallsDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings;
|
||||
require('modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_LIST_MY_CALLS', 'Calls');
|
||||
$this->searchFields = $dashletData['MyCallsDashlet']['searchFields'];
|
||||
if(empty($def['filters'])){
|
||||
if(isset($this->searchFields['status'])){
|
||||
if(!empty($this->searchFields['status']['default'])){
|
||||
$this->filters['status'] = $this->searchFields['status']['default'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->columns = $dashletData['MyCallsDashlet']['columns'];
|
||||
$this->columns['set_accept_links']= array('width' => '10',
|
||||
'label' => translate('LBL_ACCEPT_THIS', 'Meetings'),
|
||||
'sortable' => false,
|
||||
'related_fields' => array('status'),
|
||||
'default' => 'true');
|
||||
$this->seedBean = new Call();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function process() {
|
||||
global $current_language, $app_list_strings, $image_path, $current_user;
|
||||
$mod_strings = return_module_language($current_language, 'Calls');
|
||||
|
||||
if($this->myItemsOnly) { // handle myitems only differently
|
||||
$lvsParams = array(
|
||||
'custom_from' => ' INNER JOIN calls_users ON calls.id = calls_users.call_id ',
|
||||
'custom_where' => ' AND calls_users.deleted = 0 AND (calls.assigned_user_id = \'' . $current_user->id . '\' OR calls_users.user_id = \'' . $current_user->id . '\') ',
|
||||
'distinct' => true
|
||||
);
|
||||
} else {
|
||||
$lvsParams = array();
|
||||
}
|
||||
$this->myItemsOnly = false;
|
||||
|
||||
parent::process($lvsParams);
|
||||
|
||||
$keys = array();
|
||||
foreach($this->lvs->data['data'] as $num => $row) {
|
||||
$keys[] = $row['ID'];
|
||||
}
|
||||
|
||||
|
||||
if(!empty($keys)){
|
||||
$query = "SELECT call_id, accept_status FROM calls_users WHERE user_id = '" . $current_user->id . "' AND call_id IN ('" . implode("','", $keys ). "')";
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
|
||||
while($row = $GLOBALS['db']->fetchByAssoc($result)) {
|
||||
$rowNums = $this->lvs->data['pageData']['idIndex'][$row['call_id']]; // figure out which rows have this guid
|
||||
foreach($rowNums as $rowNum) {
|
||||
$this->lvs->data['data'][$rowNum]['ACCEPT_STATUS'] = $row['accept_status'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach($this->lvs->data['data'] as $rowNum => $row) {
|
||||
if(empty($this->lvs->data['data'][$rowNum]['DURATION_HOURS'])) $this->lvs->data['data'][$rowNum]['DURATION'] = '0' . $mod_strings['LBL_HOURS_ABBREV'];
|
||||
else $this->lvs->data['data'][$rowNum]['DURATION'] = $this->lvs->data['data'][$rowNum]['DURATION_HOURS'] . $mod_strings['LBL_HOURS_ABBREV'];
|
||||
|
||||
if(empty($this->lvs->data['data'][$rowNum]['DURATION_MINUTES']) || empty($this->seedBean->minutes_values[$this->lvs->data['data'][$rowNum]['DURATION_MINUTES']])) {
|
||||
$this->lvs->data['data'][$rowNum]['DURATION'] .= '00';
|
||||
}
|
||||
else {
|
||||
$this->lvs->data['data'][$rowNum]['DURATION'] .= $this->seedBean->minutes_values[$this->lvs->data['data'][$rowNum]['DURATION_MINUTES']];
|
||||
}
|
||||
if ($this->lvs->data['data'][$rowNum]['STATUS'] == $app_list_strings['meeting_status_dom']['Planned'])
|
||||
{
|
||||
if ($this->lvs->data['data'][$rowNum]['ACCEPT_STATUS'] == '' ||
|
||||
$this->lvs->data['data'][$rowNum]['ACCEPT_STATUS'] == 'none')
|
||||
{
|
||||
$this->lvs->data['data'][$rowNum]['SET_ACCEPT_LINKS'] = "<div id=\"accept".$this->id."\"><a title=\"".
|
||||
"\" href=\"javascript:SUGAR.util.retrieveAndFill('index.php?module=Activities&to_pdf=1&action=SetAcceptStatus&id=".$this->id."&object_type=Call&object_id=".$this->lvs->data['data'][$rowNum]['ID'] . "&accept_status=accept', null, null, SUGAR.mySugar.retrieveDashlet, '{$this->id}');\">".
|
||||
get_image($image_path."accept_inline","alt='".$app_list_strings['dom_meeting_accept_options']['accept'].
|
||||
"' border='0'"). "</a> <a title=\"".$app_list_strings['dom_meeting_accept_options']['tentative'].
|
||||
"\" href=\"javascript:SUGAR.util.retrieveAndFill('index.php?module=Activities&to_pdf=1&action=SetAcceptStatus&id=".$this->id."&object_type=Call&object_id=".$this->lvs->data['data'][$rowNum]['ID'] . "&accept_status=tentative', null, null, SUGAR.mySugar.retrieveDashlet, '{$this->id}');\">".
|
||||
get_image($image_path."tentative_inline","alt='".$app_list_strings['dom_meeting_accept_options']['tentative']."' border='0'").
|
||||
"</a> <a title=\"".$app_list_strings['dom_meeting_accept_options']['decline'].
|
||||
"\" href=\"javascript:SUGAR.util.retrieveAndFill('index.php?module=Activities&to_pdf=1&action=SetAcceptStatus&id=".$this->id."&object_type=Call&object_id=".$this->lvs->data['data'][$rowNum]['ID'] . "&accept_status=decline', null, null, SUGAR.mySugar.retrieveDashlet, '{$this->id}');\">".
|
||||
get_image($image_path."decline_inline","alt='".$app_list_strings['dom_meeting_accept_options']['decline'].
|
||||
"' border='0'")."</a></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lvs->data['data'][$rowNum]['SET_ACCEPT_LINKS'] = $app_list_strings['dom_meeting_accept_status'][$this->lvs->data['data'][$rowNum]['ACCEPT_STATUS']];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$this->lvs->data['data'][$rowNum]['DURATION'] .= $mod_strings['LBL_MINSS_ABBREV'];
|
||||
}
|
||||
$this->displayColumns[]= "set_accept_links";
|
||||
}
|
||||
|
||||
function displayOptions() {
|
||||
$this->processDisplayOptions();
|
||||
$this->configureSS->assign('strings', array('general' => $GLOBALS['mod_strings']['LBL_DASHLET_CONFIGURE_GENERAL'],
|
||||
'filters' => $GLOBALS['mod_strings']['LBL_DASHLET_CONFIGURE_FILTERS'],
|
||||
'myItems' => translate('LBL_LIST_MY_CALLS', 'Calls'),
|
||||
'displayRows' => $GLOBALS['mod_strings']['LBL_DASHLET_CONFIGURE_DISPLAY_ROWS'],
|
||||
'title' => $GLOBALS['mod_strings']['LBL_DASHLET_CONFIGURE_TITLE'],
|
||||
'save' => $GLOBALS['app_strings']['LBL_SAVE_BUTTON_LABEL']));
|
||||
return $this->configureSS->fetch($this->configureTpl);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
37
modules/Calls/Forms.php
Executable file
37
modules/Calls/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');
|
||||
72
modules/Calls/Menu.php
Executable file
72
modules/Calls/Menu.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
//2008-10-08, Dawid Karlowicz, Section1
|
||||
|
||||
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;
|
||||
|
||||
//<Section1>
|
||||
//Before
|
||||
/*
|
||||
if(ACLController::checkAccess('Calls', 'edit', true))$module_menu[]=Array("index.php?module=Calls&action=EditView&return_module=Calls&return_action=DetailView", $mod_strings['LNK_NEW_CALL'],"CreateCalls");
|
||||
if(ACLController::checkAccess('Meetings', 'edit', true))$module_menu[]=Array("index.php?module=Meetings&action=EditView&return_module=Meetings&return_action=DetailView", $mod_strings['LNK_NEW_MEETING'],"CreateMeetings");
|
||||
if(ACLController::checkAccess('Tasks', 'edit', true))$module_menu[]=Array("index.php?module=Tasks&action=EditView&return_module=Tasks&return_action=DetailView", $mod_strings['LNK_NEW_TASK'],"CreateTasks");
|
||||
if(ACLController::checkAccess('Notes', 'edit', true))$module_menu[]=Array("index.php?module=Notes&action=EditView&return_module=Notes&return_action=DetailView", $mod_strings['LNK_NEW_NOTE'],"CreateNotes");
|
||||
if(ACLController::checkAccess('Emails', 'edit', true))$module_menu[]=Array("index.php?module=Emails&action=EditView&type=archived", $mod_strings['LNK_NEW_EMAIL'],"CreateEmails");
|
||||
if(ACLController::checkAccess('Calls', 'list', true))$module_menu[]=Array("index.php?module=Calls&action=index&return_module=Calls&return_action=DetailView", $mod_strings['LNK_CALL_LIST'],"Calls");
|
||||
if(ACLController::checkAccess('Meetings', 'list', true))$module_menu[]=Array("index.php?module=Meetings&action=index&return_module=Meetings&return_action=DetailView", $mod_strings['LNK_MEETING_LIST'],"Meetings");
|
||||
if(ACLController::checkAccess('Tasks', 'list', true))$module_menu[]=Array("index.php?module=Tasks&action=index&return_module=Tasks&return_action=DetailView", $mod_strings['LNK_TASK_LIST'],"Tasks");
|
||||
if(ACLController::checkAccess('Notes', 'list', true))$module_menu[]=Array("index.php?module=Notes&action=index&return_module=Notes&return_action=DetailView", $mod_strings['LNK_NOTE_LIST'],"Notes");
|
||||
if(ACLController::checkAccess('Emails', 'list', true))$module_menu[]=Array("index.php?module=Emails&action=index&return_module=Emails&return_action=DetailView", $mod_strings['LNK_EMAIL_LIST'],"Emails");
|
||||
if(ACLController::checkAccess('Calendar', 'list', true))$module_menu[]=Array("index.php?module=Calendar&action=index&view=day", $mod_strings['LNK_VIEW_CALENDAR'],"Calendar");
|
||||
if(ACLController::checkAccess('Calls','list', true)) $module_menu[] = Array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
|
||||
*/
|
||||
//After
|
||||
if(ACLController::checkAccess('Calls', 'edit', true))$module_menu[]=Array("index.php?module=Calls&action=EditView&return_module=Calls&return_action=DetailView", $mod_strings['LNK_NEW_CALL'],"CreateCalls");
|
||||
if(ACLController::checkAccess('Calls', 'list', true))$module_menu[]=Array("index.php?module=Calls&action=index&return_module=Calls&return_action=DetailView", $mod_strings['LNK_CALL_LIST'],"Calls");
|
||||
if(ACLController::checkAccess('Calls','list', true)) $module_menu[] = Array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
|
||||
//</Section1>
|
||||
|
||||
?>
|
||||
48
modules/Calls/Save.php
Executable file
48
modules/Calls/Save.php
Executable file
@@ -0,0 +1,48 @@
|
||||
<?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: Saves an Account record and then redirects the browser to the
|
||||
* defined return URL.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
require_once('modules/Calls/CallFormBase.php');
|
||||
$formBase = new CallFormBase();
|
||||
$formBase->handleSave('', true, false);
|
||||
?>
|
||||
88
modules/Calls/SubPanelViewInvitees.html
Executable file
88
modules/Calls/SubPanelViewInvitees.html
Executable file
@@ -0,0 +1,88 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* 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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* Header: /cvsroot/sugarcrm/sugarcrm/modules/Calls/SubPanelViewInvitees.html,v 1.2 2004/06/29 07:22:13 sugarclint Exp {APP.LBL_CURRENCY_SYM}
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: users -->
|
||||
<p><h5 class="listViewSubHeadS1">{APP.LBL_USER_LIST}</h5>
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="listView">
|
||||
<tr height="20">
|
||||
|
||||
<td scope="col" width="25%" class="listViewThS1"><slot>{APP.LBL_LIST_NAME}</slot></td>
|
||||
<td scope="col" width="20%" class="listViewThS1"><slot>{APP.LBL_LIST_USER_NAME}</slot></td>
|
||||
<td scope="col" width="30%" class="listViewThS1"><slot>{APP.LBL_LIST_EMAIL}</slot></td>
|
||||
<td scope="col" width="15%" class="listViewThS1"><slot>{APP.LBL_LIST_PHONE}</slot></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" onmouseover="setPointer(this, '{USER.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');" onmouseout="setPointer(this, '{USER.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');" onmousedown="setPointer(this, '{USER.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
|
||||
<td scope='row' valign=TOP class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><slot><a href="{URL_PREFIX}index.php?action=DetailView&module=Users&record={USER.ID}" class="listViewTdLinkS1">{USER.FIRST_NAME} {USER.LAST_NAME}</a></slot></td>
|
||||
<td valign=TOP class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><slot>{USER.USER_NAME}</slot></td>
|
||||
<td valign=TOP class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><slot><A HREF="mailto:{USER.EMAIL1}" class="listViewTdLinkS1">{USER.EMAIL1}</A></slot></td>
|
||||
<td valign=TOP class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" nowrap><slot>{USER.PHONE_WORK}</slot></td>
|
||||
|
||||
</tr>
|
||||
<tr><td colspan="20" class="listViewHRS1"></td></tr>
|
||||
<!-- END: row -->
|
||||
|
||||
</table></p>
|
||||
<!-- END: users -->
|
||||
<!-- BEGIN: contacts -->
|
||||
<p><h5 class="listViewSubHeadS1">{APP.LBL_CONTACT_LIST}</h5>
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="listView">
|
||||
<tr height="20">
|
||||
<td width="20%" class="listViewThS1"><slot>{APP.LBL_LIST_CONTACT_NAME}</slot></td>
|
||||
<td width="25%" class="listViewThS1"><slot>{APP.LBL_LIST_ACCOUNT_NAME}</slot></td>
|
||||
<td width="30%" class="listViewThS1"><slot>{APP.LBL_LIST_EMAIL}</slot></td>
|
||||
<td width="15%" class="listViewThS1"><slot>{APP.LBL_LIST_PHONE}</slot></td>
|
||||
</tr>
|
||||
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" onmouseover="setPointer(this, '{CONTACT.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');" onmouseout="setPointer(this, '{CONTACT.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');" onmousedown="setPointer(this, '{CONTACT.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
|
||||
<td valign=TOP class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><slot><a href="{URL_PREFIX}index.php?action=DetailView&module=Contacts&record={CONTACT.ID}" class="listViewTdLinkS1">{CONTACT.FIRST_NAME} {CONTACT.LAST_NAME}</a></slot></td>
|
||||
<td valign=TOP class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><slot>{CONTACT.ACCOUNT_NAME}</slot></td>
|
||||
<td valign=TOP class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><slot><A HREF="mailto:{CONTACT.EMAIL1}" class="listViewTdLinkS1">{CONTACT.EMAIL1}</A></slot></td>
|
||||
<td valign=TOP class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" nowrap><slot>{CONTACT.PHONE_WORK}</slot></td>
|
||||
|
||||
</tr>
|
||||
<tr><td colspan="20" class="listViewHRS1"></td></tr>
|
||||
<!-- END: row -->
|
||||
|
||||
</table></p>
|
||||
<!-- END: contacts -->
|
||||
151
modules/Calls/SubPanelViewInvitees.php
Executable file
151
modules/Calls/SubPanelViewInvitees.php
Executable file
@@ -0,0 +1,151 @@
|
||||
<?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');
|
||||
|
||||
|
||||
global $currentModule;
|
||||
global $theme;
|
||||
global $focus;
|
||||
global $action;
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
|
||||
// focus_list is the means of passing data to a SubPanelView.
|
||||
global $focus_users_list;
|
||||
global $focus_contacts_list;
|
||||
|
||||
$button = "<table cellspacing='0' cellpadding='1' border='0'><form border='0' action='index.php' method='post' name='form' id='form'>\n";
|
||||
$button .= "<input type='hidden' name='module' value='Contacts'>\n";
|
||||
if ($currentModule == 'Accounts') $button .= "<input type='hidden' name='account_id' value='$focus->id'>\n<input type='hidden' name='account_name' value='$focus->name'>\n";
|
||||
$button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
|
||||
$button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
|
||||
$button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
|
||||
$button .= "<input type='hidden' name='action'>\n";
|
||||
$button .= "<tr><td> </td>";
|
||||
if ($focus->parent_type == "Accounts") $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' accessKey='".$app_strings['LBL_SELECT_CONTACT_BUTTON_KEY']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)."\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
|
||||
else $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' accessKey='".$app_strings['LBL_SELECT_CONTACT_BUTTON_KEY']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
|
||||
$button .= "<td><input title='".$app_strings['LBL_SELECT_USER_BUTTON_TITLE']."' accessKey='".$app_strings['LBL_SELECT_USER_BUTTON_KEY']."' type='button' class='button' value='".$app_strings['LBL_SELECT_USER_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Users&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
|
||||
$button .= "</tr></form></table>\n";
|
||||
|
||||
// Stick the form header out there.
|
||||
echo get_form_header($mod_strings['LBL_INVITEES'], $button, false);
|
||||
$xtpl=new XTemplate ('modules/Calls/SubPanelViewInvitees.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
|
||||
$xtpl->assign("IMAGE_PATH", $image_path);
|
||||
$xtpl->assign("RETURN_URL", "&return_module=$currentModule&return_action=DetailView&return_id=$focus->id");
|
||||
$xtpl->assign("CALL_ID", $focus->id);
|
||||
|
||||
$oddRow = true;
|
||||
foreach($focus_users_list as $user)
|
||||
{
|
||||
$user_fields = array(
|
||||
'USER_NAME' => $user->user_name,
|
||||
'FULL_NAME' => $user->first_name." ".$user->last_name,
|
||||
'ID' => $user->id,
|
||||
'EMAIL' => $user->email1,
|
||||
'PHONE_WORK' => $user->phone_work
|
||||
);
|
||||
|
||||
$xtpl->assign("USER", $user_fields);
|
||||
|
||||
if($oddRow)
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'oddListRow');
|
||||
}
|
||||
else
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'evenListRow');
|
||||
}
|
||||
$oddRow = !$oddRow;
|
||||
|
||||
$xtpl->parse("users.row");
|
||||
// Put the rows in.
|
||||
}
|
||||
|
||||
$xtpl->parse("users");
|
||||
$xtpl->out("users");
|
||||
|
||||
$oddRow = true;
|
||||
foreach($focus_contacts_list as $contact)
|
||||
{
|
||||
$contact_fields = array(
|
||||
'FIRST_NAME' => $contact->first_name,
|
||||
'LAST_NAME' => $contact->last_name,
|
||||
'ACCOUNT_NAME' => $contact->account_name,
|
||||
'ID' => $contact->id,
|
||||
'EMAIL' => $contact->email1,
|
||||
'PHONE_WORK' => $contact->phone_work
|
||||
);
|
||||
|
||||
$xtpl->assign("CONTACT", $contact_fields);
|
||||
|
||||
if($oddRow)
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'oddListRow');
|
||||
}
|
||||
else
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'evenListRow');
|
||||
}
|
||||
$oddRow = !$oddRow;
|
||||
|
||||
$xtpl->parse("contacts.row");
|
||||
// Put the rows in.
|
||||
}
|
||||
|
||||
$xtpl->parse("contacts");
|
||||
$xtpl->out("contacts");
|
||||
?>
|
||||
75
modules/Calls/field_arrays.php
Executable file
75
modules/Calls/field_arrays.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?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['Call'] = array ('column_fields' => Array("id"
|
||||
, "date_entered"
|
||||
, "date_modified"
|
||||
, "assigned_user_id"
|
||||
, "modified_user_id"
|
||||
, "created_by"
|
||||
|
||||
|
||||
|
||||
, "description"
|
||||
, "status"
|
||||
, "direction"
|
||||
, "name"
|
||||
, "date_start"
|
||||
, "time_start"
|
||||
, "duration_hours"
|
||||
, "duration_minutes"
|
||||
, "date_end"
|
||||
, "parent_type"
|
||||
, "parent_id"
|
||||
,'reminder_time'
|
||||
,'outlook_id'
|
||||
),
|
||||
'list_fields' => Array('id', 'duration_hours', 'direction', 'status', 'name', 'parent_type', 'parent_name', 'parent_id', 'date_start', 'time_start', 'assigned_user_name', 'assigned_user_id', 'contact_name', 'contact_id','first_name','last_name','required','outlook_id','accept_status'
|
||||
|
||||
|
||||
|
||||
|
||||
),
|
||||
'required_fields' => array("name"=>1, "date_start"=>2, "time_start"=>3,),
|
||||
);
|
||||
?>
|
||||
58
modules/Calls/language/en_us.help.DetailView.html
Executable file
58
modules/Calls/language/en_us.help.DetailView.html
Executable file
@@ -0,0 +1,58 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Calls</h1>
|
||||
|
||||
<p>
|
||||
<p>View the call details such as contacts, notes, and attachments.</p>
|
||||
<ul>
|
||||
<li>To edit the call details, click <span class="helpButton">Edit</span>, make the necessary revisions, and click <span class="helpButton">Save</span>.
|
||||
<li>To duplicate the information, click <span class="helpButton">Duplicate</span>. You can then make modifications to the record and save it as a different call. The system displays the new record in the Calls list.
|
||||
<li>To delete a call, click <span class="helpButton">Delete</span>.
|
||||
<li>To close the call after changing its status to "held", and create a new call, click <span class="helpButton">Close and Create New</span>.
|
||||
<li>To create a note or an attachment related to the call, click <span class="helpButton">Create Note or Attachment</span>.
|
||||
</ul>
|
||||
71
modules/Calls/language/en_us.help.EditView.html
Executable file
71
modules/Calls/language/en_us.help.EditView.html
Executable file
@@ -0,0 +1,71 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Calls</h1>
|
||||
|
||||
<p>
|
||||
Use the Calls page to create a call. Use the Search fields in the Add Invitees sub-panel to find and invite users to participate in the call. The schedules of all the participants display in the Scheduling sub-panel.
|
||||
<p>The Call List on the Calls Home page displays information such as the subject, contact, related item, due date, and user for each call. To view the details of a call, contact, or related item, click the appropriate Subject, Contact, and Related To link respectively. From the detail page, you can edit, duplicate, and delete information. </p>
|
||||
|
||||
<ul>
|
||||
<li>To create the call, enter required information such as the subject, start time and date, call type, and status.
|
||||
<li>To indicate the item record to which the call is related select the item, such as an Account or Opportunity, from the drop-down list and enter the record name in the adjoining field. You can also click <span class="helpButton">Select</span> to select the record from the Item list.
|
||||
<li>To set a default time for a reminder to alert users when the call is due, select the <span class="helpButton">Reminder</span> box. The system displays a pop-up reminder in the users' browser when the call is due.
|
||||
<li>To save the call information without sending out the invitation, click <span class="helpButton">Save</span>.
|
||||
<li>To send out invitations, click <span class="helpButton">Send Invites</span>.
|
||||
<li>To close the call and create a copy of it, click <span class="helpButton">Close and Create New</span>. The status of the closed call changes to Held; the status of the newly created call is, by default, set to Planned.
|
||||
<li>To exit the page without saving the information, click <span class="helpButton">Cancel</span>.
|
||||
<li>To view a list of calls or to search for a specific call, click <span class="helpButton">Calls</span> in the Shortcuts section.
|
||||
</ul>
|
||||
<h2>Notes and Attachments</h2>
|
||||
<p>When you save the call, the Detail page displays the Notes sub-panel.
|
||||
<ul>
|
||||
<li>To create a note or attach a document to the call, click <span class="helpButton">Create Note or Attachment</span>. On the Notes page, enter the text in the Note field and specify the team that is allowed to view it.
|
||||
<li>To add an attachment, click <span class="helpButton">Browse</span> to locate the file. When you save the note, it is associated with the call and sent out along with the invitation.
|
||||
<li>To view a list of notes, click <span class="helpButton">Notes</span> in the Shortcuts panel of the Activities module.</p>
|
||||
|
||||
|
||||
75
modules/Calls/language/en_us.help.index.html
Executable file
75
modules/Calls/language/en_us.help.index.html
Executable file
@@ -0,0 +1,75 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Calls</h1>
|
||||
|
||||
<p>Use the Calls page to view existing calls. The Call List displays information such as the subject, contact, and the related account for each call. </p>
|
||||
<ul>
|
||||
<p>The Calls Home page displays the following information:</p>
|
||||
<ul>
|
||||
<li>A Search sub-panel where you can enter the subject or the contact to search for a specific call. To perform an advanced search using additional fields, click the <span class="helpButton">Advanced Search</span> tab. To customize and save the search layout and results, click the <span class="helpButton">Saved Search & Layout</span> tab.
|
||||
<li>A list of existing calls along with related information such as names and phone numbers.</li>
|
||||
<ul>
|
||||
<li>To view details of a call, click its subject or the <span class="helpButton">View</span> icon adjacent to the user name.</li>
|
||||
<li>To update or delete multiple calls, select them from the list, and use the Mass Update sub-panel.</li>
|
||||
<li>To export one or more call records, select them from the list, click <span class="helpButton">Export</span>, and choose Selected Records. To export all the calls listed on the page or in the entire list, select Current Page and Entire List respectively.
|
||||
</ul>
|
||||
<li>A Shortcuts section that displays the following options:
|
||||
<ul>
|
||||
<li><span class="helpShortcut">Schedule Call</span>. Click this option to schedule a new call.
|
||||
<li><span class="helpShortcut">Schedule Meeting</span>. Click this option to schedule a new meeting.
|
||||
<li><span class="helpShortcut">Create Task</span>. Click this option to create a new task.
|
||||
<li><span class="helpShortcut">Create Note or Attachment</span>. Click this option to create a note or an attachment for a call, a meeting, or a task.
|
||||
<li><span class="helpShortcut">Create Archived Email</span>. Click this option to copy inbound and outbound emails for archival.
|
||||
<li><span class="helpShortcut">Calls</span>. Click this option to view and manage calls.
|
||||
<li><span class="helpShortcut">Meetings</span>. Click this option to view and manage meetings.
|
||||
<li><span class="helpShortcut">Tasks</span>. Click this option to view and manage tasks.
|
||||
<li><span class="helpShortcut">Notes</span>. Click this option to create or view notes.
|
||||
<li><span class="helpShortcut">Emails</span>. Click this option to view and manage your inbound and outbound emails.
|
||||
<li><span class="helpShortcut">Today</span>. Click this option to view your daily appointments in the calendar.
|
||||
</ul>
|
||||
<li> A Create Appointment quick form that you can use to enter the required information to create a meeting or a call. You can enter additional information after you save the record.
|
||||
134
modules/Calls/language/en_us.lang.php
Executable file
134
modules/Calls/language/en_us.lang.php
Executable file
@@ -0,0 +1,134 @@
|
||||
<?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_BLANK' => ' ',
|
||||
|
||||
'LBL_MODULE_NAME' => 'Calls',
|
||||
'LBL_MODULE_TITLE' => 'Calls: Home',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Call Search',
|
||||
'LBL_LIST_FORM_TITLE' => 'Call List',
|
||||
'LBL_NEW_FORM_TITLE' => 'Create Appointment',
|
||||
'LBL_LIST_CLOSE' => 'Close',
|
||||
'LBL_LIST_SUBJECT' => 'Subject',
|
||||
'LBL_LIST_CONTACT' => 'Contact',
|
||||
'LBL_LIST_RELATED_TO' => 'Related to',
|
||||
'LBL_LIST_RELATED_TO_ID' => 'Related to ID',
|
||||
'LBL_LIST_DATE' => 'Start Date',
|
||||
'LBL_LIST_TIME' => 'Start Time',
|
||||
'LBL_LIST_DURATION' => 'Duration',
|
||||
'LBL_LIST_DIRECTION' => 'Direction',
|
||||
'LBL_SUBJECT' => 'Subject:',
|
||||
'LBL_REMINDER' => 'Reminder:',
|
||||
'LBL_CONTACT_NAME' => 'Contact:',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Description Information',
|
||||
'LBL_DESCRIPTION' => 'Description:',
|
||||
'LBL_STATUS' => 'Status:',
|
||||
'LBL_DIRECTION' => 'Direction:',
|
||||
'LBL_DATE' => 'Start Date:',
|
||||
'LBL_DURATION' => 'Duration:',
|
||||
'LBL_DURATION_HOURS' => 'Duration Hours:',
|
||||
'LBL_DURATION_MINUTES' => 'Duration Minutes:',
|
||||
'LBL_HOURS_MINUTES' => '(hours/minutes)',
|
||||
'LBL_CALL' => 'Call:',
|
||||
'LBL_DATE_TIME' => 'Start Date & Time:',
|
||||
'LBL_TIME' => 'Start Time:',
|
||||
'LBL_HOURS_ABBREV' => 'h',
|
||||
'LBL_MINSS_ABBREV' => 'm',
|
||||
'LBL_COLON' => ':',
|
||||
'LBL_DEFAULT_STATUS' => 'Planned',
|
||||
'LNK_NEW_CALL' => 'Schedule Call',
|
||||
'LNK_NEW_MEETING' => 'Schedule Meeting',
|
||||
'LNK_NEW_TASK' => 'Create Task',
|
||||
'LNK_NEW_NOTE' => 'Create Note or Attachment',
|
||||
'LNK_NEW_EMAIL' => 'Archive Email',
|
||||
'LNK_CALL_LIST' => 'Calls',
|
||||
'LNK_MEETING_LIST' => 'Meetings',
|
||||
'LNK_TASK_LIST' => 'Tasks',
|
||||
'LNK_NOTE_LIST' => 'Notes',
|
||||
'LNK_EMAIL_LIST' => 'Emails',
|
||||
'LNK_VIEW_CALENDAR' => 'Today',
|
||||
'ERR_DELETE_RECORD' => 'A record number must be specified to delete the account.',
|
||||
'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this invitee from the call?',
|
||||
'LBL_INVITEE' => 'Invitees',
|
||||
'LBL_RELATED_TO' => 'Related To:',
|
||||
'LNK_NEW_APPOINTMENT' => 'Create Appointment',
|
||||
'LBL_SCHEDULING_FORM_TITLE' => 'Scheduling',
|
||||
'LBL_ADD_INVITEE' => 'Add Invitees',
|
||||
'LBL_NAME' => 'Name',
|
||||
'LBL_FIRST_NAME' => 'First Name',
|
||||
'LBL_LAST_NAME' => 'Last Name',
|
||||
'LBL_EMAIL' => 'Email',
|
||||
'LBL_PHONE' => 'Phone',
|
||||
'LBL_REMINDER' => 'Reminder:',
|
||||
'LBL_SEND_BUTTON_TITLE'=>'Send Invites [Alt+I]',
|
||||
'LBL_SEND_BUTTON_KEY'=>'I',
|
||||
'LBL_SEND_BUTTON_LABEL'=>'Send Invites',
|
||||
'LBL_DATE_END'=>'Date End',
|
||||
'LBL_TIME_END'=>'Time End',
|
||||
'LBL_REMINDER_TIME'=>'Reminder Time',
|
||||
'LBL_SEARCH_BUTTON'=> 'Search',
|
||||
'LBL_ADD_BUTTON'=> 'Add',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Calls',
|
||||
'LBL_LOG_CALL'=> 'Log Call',
|
||||
'LNK_SELECT_ACCOUNT'=> 'Select Account',
|
||||
'LNK_NEW_ACCOUNT'=> 'New Account',
|
||||
'LNK_NEW_OPPORTUNITY'=> 'New Opportunity',
|
||||
'LBL_DEL' => 'Del',
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Leads',
|
||||
'LBL_CONTACTS_SUBPANEL_TITLE' => 'Contacts',
|
||||
'LBL_USERS_SUBPANEL_TITLE' => 'Users',
|
||||
'LBL_OUTLOOK_ID' => 'Outlook ID',
|
||||
'LBL_MEMBER_OF' => 'Member Of',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE' => 'Notes',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned to',
|
||||
'LBL_LIST_MY_CALLS' => 'My Calls',
|
||||
'LBL_SELECT_FROM_DROPDOWN' => 'Please make a selection from the Related To dropdown list first.',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Assigned to',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned User',
|
||||
'NOTICE_DURATION_TIME' => 'Duration time must be greater than 0',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
134
modules/Calls/language/ge_ge.lang.php
Executable file
134
modules/Calls/language/ge_ge.lang.php
Executable file
@@ -0,0 +1,134 @@
|
||||
<?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_BLANK' => ' ',
|
||||
|
||||
'LBL_MODULE_NAME' => 'Anrufe',
|
||||
'LBL_MODULE_TITLE' => 'Anrufe: Home',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Anrufe Suche',
|
||||
'LBL_LIST_FORM_TITLE' => 'Anrufliste',
|
||||
'LBL_NEW_FORM_TITLE' => 'Neuer Termin',
|
||||
'LBL_LIST_CLOSE' => 'Schließen',
|
||||
'LBL_LIST_SUBJECT' => 'Betreff',
|
||||
'LBL_LIST_CONTACT' => 'Kontakt',
|
||||
'LBL_LIST_RELATED_TO' => 'Gehört zu',
|
||||
'LBL_LIST_RELATED_TO_ID' => 'Verknüpft mit ID',
|
||||
'LBL_LIST_DATE' => 'Startdatum',
|
||||
'LBL_LIST_TIME' => 'Startzeit',
|
||||
'LBL_LIST_DURATION' => 'Dauer',
|
||||
'LBL_LIST_DIRECTION' => 'Richtung',
|
||||
'LBL_SUBJECT' => 'Betreff:',
|
||||
'LBL_REMINDER' => 'Erinnerung:',
|
||||
'LBL_CONTACT_NAME' => 'Kontakt:',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Beschreibungsinformation',
|
||||
'LBL_DESCRIPTION' => 'Beschreibung:',
|
||||
'LBL_STATUS' => 'Status:',
|
||||
'LBL_DIRECTION' => 'Richtung:',
|
||||
'LBL_DATE' => 'Startdatum:',
|
||||
'LBL_DURATION' => 'Dauer:',
|
||||
'LBL_DURATION_HOURS' => 'Stunden:',
|
||||
'LBL_DURATION_MINUTES' => 'Minuten:',
|
||||
'LBL_HOURS_MINUTES' => '(Stunden/Minuten)',
|
||||
'LBL_CALL' => 'Anruf:',
|
||||
'LBL_DATE_TIME' => 'Startdatum und -zeit:',
|
||||
'LBL_TIME' => 'Beginn:',
|
||||
'LBL_HOURS_ABBREV' => 'St.',
|
||||
'LBL_MINSS_ABBREV' => 'min',
|
||||
'LBL_COLON' => ':',
|
||||
'LBL_DEFAULT_STATUS' => 'Geplant',
|
||||
'LNK_NEW_CALL' => 'Neuer Anruf',
|
||||
'LNK_NEW_MEETING' => 'Neues Meeting',
|
||||
'LNK_NEW_TASK' => 'Neue Aufgabe',
|
||||
'LNK_NEW_NOTE' => 'Neue Notiz oder Anlage',
|
||||
'LNK_NEW_EMAIL' => 'E-Mail archivieren',
|
||||
'LNK_CALL_LIST' => 'Anrufe',
|
||||
'LNK_MEETING_LIST' => 'Meetings',
|
||||
'LNK_TASK_LIST' => 'Aufgaben',
|
||||
'LNK_NOTE_LIST' => 'Notizen',
|
||||
'LNK_EMAIL_LIST' => 'E-Mails',
|
||||
'LNK_VIEW_CALENDAR' => 'Heute',
|
||||
'ERR_DELETE_RECORD' => 'Um diese Firma zu löschen, muss eine Datensatznummer angegeben werden.',
|
||||
'NTC_REMOVE_INVITEE' => 'Möchten Sie diesen Teilnehmer wirklich aus diesem Anruf löschen?',
|
||||
'LBL_INVITEE' => 'Teilnehmer',
|
||||
'LBL_RELATED_TO' => 'Bezieht sich auf:',
|
||||
'LNK_NEW_APPOINTMENT' => 'Neuer Termin',
|
||||
'LBL_SCHEDULING_FORM_TITLE' => 'Planung',
|
||||
'LBL_ADD_INVITEE' => 'Teilnehmer hinzufügen',
|
||||
'LBL_NAME' => 'Name',
|
||||
'LBL_FIRST_NAME' => 'Vorname',
|
||||
'LBL_LAST_NAME' => 'Nachname',
|
||||
'LBL_EMAIL' => 'E-Mail',
|
||||
'LBL_PHONE' => 'Telefon',
|
||||
'LBL_REMINDER' => 'Erinnerung:',
|
||||
'LBL_SEND_BUTTON_TITLE'=>'Einladungen senden [Alt-I]',
|
||||
'LBL_SEND_BUTTON_KEY'=>'I',
|
||||
'LBL_SEND_BUTTON_LABEL'=>'Einladungen senden',
|
||||
'LBL_DATE_END'=>'Enddatum',
|
||||
'LBL_TIME_END'=>'Endezeit',
|
||||
'LBL_REMINDER_TIME'=>'Erinnerungs Zeitpunkt',
|
||||
'LBL_SEARCH_BUTTON'=> 'Suchen',
|
||||
'LBL_ADD_BUTTON'=> 'Hinzufügen',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Anrufe',
|
||||
'LBL_LOG_CALL'=> 'Anruf aufzeichnen',
|
||||
'LNK_SELECT_ACCOUNT'=> 'Firma auswählen',
|
||||
'LNK_NEW_ACCOUNT'=> 'Neue Firma',
|
||||
'LNK_NEW_OPPORTUNITY'=> 'Neue Verkaufschance',
|
||||
'LBL_DEL' => 'Löschen',
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Interessenten',
|
||||
'LBL_CONTACTS_SUBPANEL_TITLE' => 'Kontakte',
|
||||
'LBL_USERS_SUBPANEL_TITLE' => 'Benutzer',
|
||||
'LBL_OUTLOOK_ID' => 'Outlook ID',
|
||||
'LBL_MEMBER_OF' => 'Mitglied von',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE' => 'Notizen',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Zugewiesen an',
|
||||
'LBL_LIST_MY_CALLS' => 'Meine Anrufe',
|
||||
'LBL_SELECT_FROM_DROPDOWN' => 'Bitte wählen Sie zuerst einen Eintrag aus der \'Zugewiesen an\' Auswahlliste.',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Zugewiesen an',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Zugew. Benutzer',
|
||||
'NOTICE_DURATION_TIME' => 'Zeitdauer muss größer als 0 sein',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
120
modules/Calls/language/pl_pl.lang.php
Executable file
120
modules/Calls/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<?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 (
|
||||
'LBL_BLANK' => ' ',
|
||||
|
||||
'LBL_MODULE_NAME' => 'Rozmowy Telefoniczne',
|
||||
'LBL_MODULE_TITLE' => 'Rozmowy Telefoniczne: Strona Główna',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukaj',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista Rozmów',
|
||||
'LBL_NEW_FORM_TITLE' => 'Kalendarz Rozmów',
|
||||
'LBL_LIST_CLOSE' => 'Zamknij',
|
||||
'LBL_LIST_SUBJECT' => 'Temat',
|
||||
'LBL_LIST_CONTACT' => 'Osoba Kontaktowa',
|
||||
'LBL_LIST_RELATED_TO' => 'Związane z',
|
||||
'LBL_LIST_DATE' => 'Data rozp.',
|
||||
'LBL_LIST_TIME' => 'Czas rozp.',
|
||||
'LBL_LIST_DURATION' => 'Czas trwania',
|
||||
'LBL_LIST_DIRECTION' => 'Kierunek',
|
||||
'LBL_SUBJECT' => 'Temat:',
|
||||
'LBL_REMINDER' => 'Przypominacz:',
|
||||
'LBL_CONTACT_NAME' => 'Osoba kont.:',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Informacje',
|
||||
'LBL_DESCRIPTION' => 'Opis:',
|
||||
'LBL_STATUS' => 'Status:',
|
||||
'LBL_LIST_DATE_MODIFIED' => 'Data Modyfikacji',
|
||||
'LBL_DIRECTION' => 'Kierunek:',
|
||||
'LBL_DATE' => 'Data rozpoczęcia:',
|
||||
'LBL_DURATION' => 'Czas trwania:',
|
||||
'LBL_DURATION_HOURS' => 'Czas trwania (godzin):',
|
||||
'LBL_DURATION_MINUTES' => 'Czas trwania (minut):',
|
||||
'LBL_HOURS_MINUTES' => '(godz./min.)',
|
||||
'LBL_CALL' => 'Rozmowa:',
|
||||
'LBL_DATE_TIME' => 'Data i czas rozp.:',
|
||||
'LBL_TIME' => 'Czas rozp.:',
|
||||
'LBL_HOURS_ABBREV' => 'h',
|
||||
'LBL_MINSS_ABBREV' => 'm',
|
||||
'LBL_COLON' => ':',
|
||||
'LBL_DEFAULT_STATUS' => 'Planowane',
|
||||
'LNK_NEW_CALL' => 'Dodaj rozmowę',
|
||||
'LNK_NEW_MEETING' => 'Dodaj spotkanie',
|
||||
'LNK_NEW_TASK' => 'Dodaj zadanie',
|
||||
'LNK_NEW_NOTE' => 'Dodaj notatkę',
|
||||
'LNK_NEW_EMAIL' => 'Dodaj e-mail',
|
||||
'LNK_CALL_LIST' => 'Rozmowy',
|
||||
'LNK_MEETING_LIST' => 'Spotkania',
|
||||
'LNK_TASK_LIST' => 'Zadania',
|
||||
'LNK_NOTE_LIST' => 'Notatki',
|
||||
'LNK_EMAIL_LIST' => 'E-mail',
|
||||
'LNK_VIEW_CALENDAR' => 'Dziś',
|
||||
'ERR_DELETE_RECORD' => 'Wskaż Klienta, którego chcesz usunąć.',
|
||||
'NTC_REMOVE_INVITEE' => 'Czy na pewno chcesz usunąć uczestnika rozmowy?',
|
||||
'LBL_INVITEE' => 'Uczestnicy',
|
||||
'LBL_RELATED_TO' => 'Powiązany z:',
|
||||
'LNK_NEW_APPOINTMENT' => 'Utwórz Spotkanie',
|
||||
'LBL_SCHEDULING_FORM_TITLE' => 'Harmonogram',
|
||||
'LBL_ADD_INVITEE' => 'Dodaj Uczestnika',
|
||||
'LBL_NAME' => 'Dane',
|
||||
'LBL_FIRST_NAME' => 'Imię',
|
||||
'LBL_LAST_NAME' => 'Nazwisko',
|
||||
'LBL_EMAIL' => 'Email',
|
||||
'LBL_PHONE' => 'Telefon',
|
||||
'LBL_SEND_BUTTON_TITLE'=>'Wyślij zaproszenie [Alt+I]',
|
||||
'LBL_SEND_BUTTON_KEY'=>'I',
|
||||
'LBL_SEND_BUTTON_LABEL'=>'Wyślij zaproszenia',
|
||||
'LBL_DATE_END'=>'Data zakończenia',
|
||||
'LBL_TIME_END'=>'Czas zakończenia',
|
||||
'LBL_REMINDER_TIME'=>'Czas przypomnienia',
|
||||
'LBL_SEARCH_BUTTON'=> 'Szukaj',
|
||||
'LBL_ADD_BUTTON'=> 'Dodaj',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Rozmowy tel.',
|
||||
'LBL_LOG_CALL'=> 'Zapis Rozmów tel.',
|
||||
'LNK_SELECT_ACCOUNT'=> 'Wybierz Klienta',
|
||||
'LNK_NEW_ACCOUNT'=> 'Nowy Klient',
|
||||
'LNK_NEW_OPPORTUNITY'=> 'Nowy Temat',
|
||||
'LBL_DEL' => 'Del',
|
||||
|
||||
'LBL_CONTACTS_SUBPANEL_TITLE' => 'Kontakty',
|
||||
'LBL_USERS_SUBPANEL_TITLE' => 'Użytkownicy',
|
||||
'LBL_OUTLOOK_ID' => 'Outlook ID',
|
||||
'LBL_MEMBER_OF' => 'Jest Członkiem',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE' => 'Notatki',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Przydzielony Użytkownik',
|
||||
'LBL_LIST_MY_CALLS' => 'Moje Rozmowy Tel.',
|
||||
'LBL_SELECT_FROM_DROPDOWN' => 'Najpierw dokonaj wyboru z Listy Rozwijalnej "Połączonych z".',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Przydzielone do',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Przydzielone do Użytkownika',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
47
modules/Calls/metadata/SearchFields.php
Executable file
47
modules/Calls/metadata/SearchFields.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can 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['Calls'] =
|
||||
array (
|
||||
'name' => array( 'query_type'=>'default'),
|
||||
'contact_name' => array( 'query_type'=>'default','db_field'=>array('contacts.first_name','contacts.last_name')),
|
||||
'date_start' => array( 'query_type'=>'default'),
|
||||
'location' => array( 'query_type'=>'default'),
|
||||
'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true),
|
||||
'assigned_user_id'=> array('query_type'=>'default'),
|
||||
'status'=> array('query_type'=>'default', 'options' => 'call_status_dom', 'template_var' => 'STATUS_FILTER')
|
||||
);
|
||||
?>
|
||||
86
modules/Calls/metadata/additionalDetails.php
Executable file
86
modules/Calls/metadata/additionalDetails.php
Executable file
@@ -0,0 +1,86 @@
|
||||
<?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 additionalDetailsCall($fields) {
|
||||
static $mod_strings;
|
||||
if(empty($mod_strings)) {
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'Calls');
|
||||
}
|
||||
|
||||
$overlib_string = '<div style="overflow:auto; height:100px; max-height:100px;">';
|
||||
|
||||
//Modify by jchi 6/27/2008 1515pm china time , bug 20626.
|
||||
if(!empty($fields['DATE_START']))
|
||||
$overlib_string .= '<b>'. $mod_strings['LBL_DATE_TIME'] . '</b> ' . $fields['DATE_START'] . ' <br>';
|
||||
if(isset($fields['DURATION_HOURS']) || isset($fields['DURATION_MINUTES'])) {
|
||||
$overlib_string .= '<b>'. $mod_strings['LBL_DURATION'] . '</b> ';
|
||||
if(isset($fields['DURATION_HOURS'])) {
|
||||
$overlib_string .= $fields['DURATION_HOURS'] . $mod_strings['LBL_HOURS_ABBREV'] . ' ';
|
||||
}
|
||||
if(isset($fields['DURATION_MINUTES'])) {
|
||||
$overlib_string .= $fields['DURATION_MINUTES'] . $mod_strings['LBL_MINSS_ABBREV'];
|
||||
}
|
||||
$overlib_string .= '<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 .= '...';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$editLink = "index.php?action=EditView&module=Calls&record={$fields['ID']}";
|
||||
$viewLink = "index.php?action=DetailView&module=Calls&record={$fields['ID']}";
|
||||
|
||||
$return_module = empty($_REQUEST['module']) ? 'Calls' : $_REQUEST['module'];
|
||||
$return_action = empty($_REQUEST['action']) ? 'ListView' : $_REQUEST['action'];
|
||||
|
||||
$editLink .= "&return_module=$return_module&return_action=$return_action";
|
||||
$viewLink .= "&return_module=$return_module&return_action=$return_action";
|
||||
|
||||
$overlib_string .= "</div>";
|
||||
return array('fieldToAddTo' => 'NAME',
|
||||
'string' => $overlib_string,
|
||||
'editLink' => $editLink,
|
||||
'viewLink' => $viewLink);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
139
modules/Calls/metadata/detailviewdefs.php
Executable file
139
modules/Calls/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,139 @@
|
||||
<?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['Calls']['DetailView'] = array(
|
||||
'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE',
|
||||
array('customCode'=>'{if $fields.status.value != "canceled"}' .
|
||||
' <input type="hidden" name="isSaveAndNew" value="false"> ' .
|
||||
' <input type="hidden" name="status" value=""> ' .
|
||||
' <input type="hidden" name="isSaveFromDetailView" value="true"> ' .
|
||||
' <input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" ' .
|
||||
' accesskey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" ' .
|
||||
' class="button" ' .
|
||||
' onclick="this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'" ' .
|
||||
' name="button" ' .
|
||||
' value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" ' .
|
||||
' type="submit">{/if}'),
|
||||
array('customCode'=>'{if $fields.status.value != "canceled"}' .
|
||||
' <input type="hidden" name="isSave" value="false"> ' .
|
||||
' <input title="{$APP.LBL_CLOSE_BUTTON_TITLE}" ' .
|
||||
' accesskey="{$APP.LBL_CLOSE_BUTTON_KEY}" ' .
|
||||
' class="button" ' .
|
||||
' onclick="this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'" ' .
|
||||
' name="button1" ' .
|
||||
' value="{$APP.LBL_CLOSE_BUTTON_TITLE}" ' .
|
||||
' type="submit">{/if}'),)),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
),
|
||||
'panels' =>array (
|
||||
'default' => array(
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'name',
|
||||
'label' => 'LBL_SUBJECT',
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'status',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'date_start',
|
||||
'customCode' => '{$fields.date_start.value} {$fields.time_start.value} ',
|
||||
'label' => 'LBL_DATE_TIME',
|
||||
),
|
||||
|
||||
'parent_name',
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'duration_hours',
|
||||
'customCode' => '{$fields.duration_hours.value}{$MOD.LBL_HOURS_ABBREV} {$fields.duration_minutes.value}{$MOD.LBL_MINSS_ABBREV} ',
|
||||
'label' => 'LBL_DURATION',
|
||||
),
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'date_modified',
|
||||
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value} ',
|
||||
'label' => 'LBL_DATE_MODIFIED',
|
||||
),
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'customCode' => '{$fields.assigned_user_name.value}',
|
||||
'label' => 'LBL_ASSIGNED_TO',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'date_entered',
|
||||
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value} ',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'reminder_checked',
|
||||
'fields'=>array('reminder_checked', 'reminder_time')),
|
||||
),
|
||||
|
||||
array (
|
||||
'description',
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
130
modules/Calls/metadata/editviewdefs.php
Executable file
130
modules/Calls/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,130 @@
|
||||
<?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['Calls']['EditView'] = array(
|
||||
'templateMeta' => array('maxColumns' => '2',
|
||||
'form' => array('hidden'=>array('<input type="hidden" name="isSaveAndNew" value="false">',
|
||||
'<input type="hidden" name="send_invites">',
|
||||
'<input type="hidden" name="user_invitees">',
|
||||
'<input type="hidden" name="lead_invitees">',
|
||||
'<input type="hidden" name="contact_invitees">'),
|
||||
'buttons' => array(
|
||||
array('customCode'=>'<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="fill_invitees();this.form.action.value=\'Save\'; this.form.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}this.form.return_id.value=\'\'; {/if}return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">'),
|
||||
'CANCEL',
|
||||
// array('customCode'=>'<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" class="button" onclick="this.form.send_invites.value=\'1\';fill_invitees();this.form.action.value=\'Save\';this.form.return_action.value=\'EditView\';this.form.return_module.value=\'{$smarty.request.return_module}\';return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">'),
|
||||
array('customCode'=>'{if $fields.status.value != "canceled"}' .
|
||||
'<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" ' .
|
||||
'accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" ' .
|
||||
'class="button" ' .
|
||||
'onclick="fill_invitees(); this.form.status.value=\'Held\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Calls\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; return check_form(\'EditView\') && isValidDuration();" ' .
|
||||
'type="submit" name="button" ' .
|
||||
'value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}'),
|
||||
),
|
||||
'footerTpl'=>'modules/Calls/tpls/footer.tpl'),
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
'javascript' => '<script type="text/javascript" src="' . getJSPath('include/JSON.js') . '"></script>
|
||||
<script type="text/javascript" src="' . getJSPath('include/jsolait/init.js') . '"></script>
|
||||
<script type="text/javascript" src="' . getJSPath('include/jsolait/lib/urllib.js') . '"></script>
|
||||
<script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>
|
||||
<script type="text/javascript" src="' . getJSPath('include/javascript/jsclass_base.js') . '"></script>
|
||||
<script type="text/javascript" src="' . getJSPath('include/javascript/jsclass_async.js') . '"></script>
|
||||
<script type="text/javascript" src="' . getJSPath('modules/Meetings/jsclass_scheduler.js') . '"></script>
|
||||
<script>toggle_portal_flag();function toggle_portal_flag() {ldelim} {$TOGGLE_JS} {rdelim} </script>',
|
||||
),
|
||||
'panels' =>array (
|
||||
'default' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
array('name'=>'name', 'displayParams'=>array('required'=>true)),
|
||||
|
||||
array (
|
||||
'name' => 'status',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'date_start',
|
||||
'type'=>'datetimecombo',
|
||||
'displayParams'=>array('required' => true, 'updateCallback'=>'SugarWidgetScheduler.update_time();'),
|
||||
'label'=>'LBL_DATE_TIME'),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
'assigned_user_name',
|
||||
NULL,
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'duration_hours',
|
||||
'label' => 'LBL_DURATION',
|
||||
'customCode' => '{literal}<script type="text/javascript">function isValidDuration() { form = document.getElementById(\'EditView\'); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { alert(\'{/literal}{$MOD.NOTICE_DURATION_TIME}{literal}\'); return false; } return true; }</script>{/literal}<input name="duration_hours" tabindex="1" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value} <span class="dateFormat">{$MOD.LBL_HOURS_MINUTES}',
|
||||
'displayParams' => array('required'=>true),
|
||||
),
|
||||
|
||||
'parent_name',
|
||||
),
|
||||
|
||||
array (
|
||||
array('name' => 'reminder_time',
|
||||
'customCode' => '{if $fields.reminder_checked.value == "1"}' .
|
||||
'{assign var="REMINDER_TIME_DISPLAY" value="inline"}' .
|
||||
'{assign var="REMINDER_CHECKED" value="checked"}' .
|
||||
'{else}' .
|
||||
'{assign var="REMINDER_TIME_DISPLAY" value="none"}' .
|
||||
'{assign var="REMINDER_CHECKED" value=""}' .
|
||||
'{/if}' .
|
||||
'<input name="reminder_checked" type="hidden" value="0"><input name="reminder_checked" onclick=\'toggleDisplay("should_remind_list");\' type="checkbox" class="checkbox" value="1" {$REMINDER_CHECKED}><div id="should_remind_list" style="display:{$REMINDER_TIME_DISPLAY}">{$fields.reminder_time.value}</div>',
|
||||
'label' => 'LBL_REMINDER'),
|
||||
),
|
||||
|
||||
array (
|
||||
'description',
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
102
modules/Calls/metadata/listviewdefs.php
Executable file
102
modules/Calls/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can 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['Calls'] = array(
|
||||
'SET_COMPLETE' => array(
|
||||
'width' => '1',
|
||||
'label' => 'LBL_LIST_CLOSE',
|
||||
'link' => true,
|
||||
'sortable' => false,
|
||||
'default' => true,
|
||||
'related_fields' => array('status')),
|
||||
'DIRECTION' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_DIRECTION',
|
||||
'link' => false,
|
||||
'default' => true),
|
||||
'NAME' => array(
|
||||
'width' => '40',
|
||||
'label' => 'LBL_LIST_SUBJECT',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'CONTACT_NAME' => array(
|
||||
'width' => '20',
|
||||
'label' => 'LBL_LIST_CONTACT',
|
||||
'link' => true,
|
||||
'id' => 'CONTACT_ID',
|
||||
'module' => 'Contacts',
|
||||
'default' => true,
|
||||
'ACLTag' => 'CONTACT'),
|
||||
'PARENT_NAME' => array(
|
||||
'width' => '20',
|
||||
'label' => 'LBL_LIST_RELATED_TO',
|
||||
'dynamic_module' => 'PARENT_TYPE',
|
||||
'id' => 'PARENT_ID',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
'ACLTag' => 'PARENT',
|
||||
'related_fields' => array('parent_id', 'parent_type')),
|
||||
'DATE_START' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_LIST_DATE',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'related_fields' => array('time_start'),
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '2',
|
||||
'label' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
'default' => true),
|
||||
'STATUS' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_STATUS',
|
||||
'link' => false,
|
||||
'default' => false),
|
||||
);
|
||||
?>
|
||||
176
modules/Calls/metadata/quickcreatedefs.php
Executable file
176
modules/Calls/metadata/quickcreatedefs.php
Executable file
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs ['Calls'] =
|
||||
array (
|
||||
'QuickCreate' =>
|
||||
array (
|
||||
'templateMeta' =>
|
||||
array (
|
||||
'maxColumns' => '2',
|
||||
'form' =>
|
||||
array (
|
||||
'hidden' =>
|
||||
array (
|
||||
0 => '<input type="hidden" name="isSaveAndNew" value="false">',
|
||||
1 => '<input type="hidden" name="send_invites">',
|
||||
2 => '<input type="hidden" name="user_invitees">',
|
||||
3 => '<input type="hidden" name="lead_invitees">',
|
||||
4 => '<input type="hidden" name="contact_invitees">',
|
||||
),
|
||||
'buttons' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="fill_invitees();this.form.action.value=\'Save\'; this.form.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}this.form.return_id.value=\'\'; {/if}return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
|
||||
),
|
||||
1 => 'CANCEL',
|
||||
2 =>
|
||||
array (
|
||||
'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" class="button" onclick="this.form.send_invites.value=\'1\';fill_invitees();this.form.action.value=\'Save\';this.form.return_action.value=\'EditView\';this.form.return_module.value=\'{$smarty.request.return_module}\';return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="fill_invitees(); this.form.status.value=\'Held\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Calls\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
|
||||
),
|
||||
),
|
||||
'footerTpl' => 'modules/Calls/tpls/footer.tpl',
|
||||
),
|
||||
'widths' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
),
|
||||
'javascript' => '<script type="text/javascript" src="include/JSON.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>
|
||||
<script type="text/javascript" src="include/javascript/jsclass_base.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/javascript/jsclass_async.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="modules/Meetings/jsclass_scheduler.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script>toggle_portal_flag();function toggle_portal_flag() {literal} { {/literal} {$TOGGLE_JS} {literal} } {/literal} </script>',
|
||||
|
||||
'useTabs' => false,
|
||||
),
|
||||
'panels' =>
|
||||
array (
|
||||
'default' =>
|
||||
array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'name',
|
||||
'displayParams' =>
|
||||
array (
|
||||
'required' => true,
|
||||
),
|
||||
),
|
||||
array (
|
||||
'name' => 'status',
|
||||
'displayParams' =>
|
||||
array (
|
||||
'required' => true,
|
||||
),
|
||||
'fields' =>
|
||||
array (
|
||||
array (
|
||||
'name' => 'direction',
|
||||
),
|
||||
array (
|
||||
'name' => 'status',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'date_start',
|
||||
'type' => 'datetimecombo',
|
||||
'displayParams' =>
|
||||
array (
|
||||
'required' => true,
|
||||
'updateCallback' => 'SugarWidgetScheduler.update_time();',
|
||||
),
|
||||
'label' => 'LBL_DATE_TIME',
|
||||
),
|
||||
array (
|
||||
'name' => 'parent_name',
|
||||
'label' => 'LBL_LIST_RELATED_TO',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'duration_hours',
|
||||
'label' => 'LBL_DURATION',
|
||||
'customCode' => '{literal}<script type="text/javascript">function isValidDuration() { form = document.getElementById(\'EditView\'); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { alert(\'{/literal}{$MOD.NOTICE_DURATION_TIME}{literal}\'); return false; } return true; }</script>{/literal}<input name="duration_hours" tabindex="1" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value} <span class="dateFormat">{$MOD.LBL_HOURS_MINUTES}',
|
||||
'displayParams' =>
|
||||
array (
|
||||
'required' => true,
|
||||
),
|
||||
),
|
||||
array (
|
||||
'name' => 'reminder_time',
|
||||
'customCode' => '{if $fields.reminder_checked.value == "1"}{assign var="REMINDER_TIME_DISPLAY" value="inline"}{assign var="REMINDER_CHECKED" value="checked"}{else}{assign var="REMINDER_TIME_DISPLAY" value="none"}{assign var="REMINDER_CHECKED" value=""}{/if}<input name="reminder_checked" type="hidden" value="0"><input name="reminder_checked" onclick=\'toggleDisplay("should_remind_list");\' type="checkbox" class="checkbox" value="1" {$REMINDER_CHECKED}><div id="should_remind_list" style="display:{$REMINDER_TIME_DISPLAY}">{$fields.reminder_time.value}</div>',
|
||||
'label' => 'LBL_REMINDER',
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'label' => 'LBL_ASSIGNED_TO_NAME',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'description',
|
||||
'comment' => 'Full text of the note',
|
||||
'label' => 'LBL_DESCRIPTION',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
56
modules/Calls/metadata/searchdefs.php
Executable file
56
modules/Calls/metadata/searchdefs.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?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['Calls'] = array(
|
||||
'templateMeta' => array(
|
||||
'maxColumns' => '3',
|
||||
'widths' => array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
'name',
|
||||
array('name' => 'contact_name', 'label' =>'LBL_CONTACT_NAME', 'type' => 'name'),
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
),
|
||||
'advanced_search' => array(
|
||||
'name',
|
||||
array('name' => 'contact_name', 'label' =>'LBL_CONTACT_NAME', 'type' => 'name'),
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
|
||||
'status',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
95
modules/Calls/metadata/sidecreateviewdefs.php
Executable file
95
modules/Calls/metadata/sidecreateviewdefs.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 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['Calls']['SideQuickCreate'] = array(
|
||||
'templateMeta' => array('form'=>array('hidden'=>array('<input type="hidden" name="isSaveAndNew" value="false">',
|
||||
'<input type="hidden" name="send_invites">',
|
||||
'<input type="hidden" name="user_invitees">',
|
||||
'<input type="hidden" name="contact_invitees">',
|
||||
'<input type="hidden" name="duration_hours" value="0">',
|
||||
'<input type="hidden" name="duration_minutes" value="15">',
|
||||
'<input type="hidden" name="status" id="status" value="Planned">',
|
||||
),
|
||||
'headerTpl'=>'include/EditView/header.tpl',
|
||||
'footerTpl'=>'include/EditView/footer.tpl',
|
||||
'buttons'=>array('SAVE'),
|
||||
'button_location'=>'bottom'
|
||||
),
|
||||
'maxColumns' => '1',
|
||||
'panelClass'=>'none',
|
||||
'labelsOnTop'=>true,
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
),
|
||||
'panels' =>array (
|
||||
'DEFAULT' =>
|
||||
array (
|
||||
array(
|
||||
array('name'=>'name', 'label'=>'', 'customCode'=>'<div valign="top">{literal}<input type="radio" name="appttype" checked=true onchange="if(this.checked){this.form.module.value=\'Calls\'; this.form.return_module.value=\'Calls\'; this.form.direction.style.display = \'inline\';}">{/literal}{sugar_translate label="LBL_CALL"}{literal}<input type="radio" name="appttype" onchange="if(this.checked){this.form.module.value=\'Meetings\'; this.form.return_module.value=\'Meetings\'; this.form.direction.style.display=\'none\'}">{/literal}{sugar_translate label="LBL_MEETING"}</div>'),
|
||||
),
|
||||
array (
|
||||
array('name'=>'name', 'displayParams'=>array('size'=>20, 'required'=>true)),
|
||||
),
|
||||
array (
|
||||
array('name'=>'date_start',
|
||||
'type'=>'datetimecombo',
|
||||
'displayParams'=>array('required' => true, 'splitDateTime'=>true),
|
||||
'label'=>'LBL_DATE_TIME'),
|
||||
),
|
||||
array (
|
||||
array('name'=>'parent_name', 'displayParams'=>array('size'=>11, 'selectOnly'=>true, 'split'=>true)),
|
||||
),
|
||||
array (
|
||||
array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'status',
|
||||
'displayParams' => array('required'=>true),
|
||||
'fields' =>
|
||||
array (
|
||||
array('name'=>'status'),
|
||||
array('name'=>'direction'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
65
modules/Calls/metadata/studio.php
Executable file
65
modules/Calls/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']['Calls'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Calls/DetailView.html',
|
||||
'php_file'=>'modules/Calls/DetailView.php',
|
||||
'type'=>'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Calls/EditView.html',
|
||||
'php_file'=>'modules/Calls/EditView.php',
|
||||
'type'=>'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template'=>'listview',
|
||||
'meta_file'=>'modules/Calls/listviewdefs.php',
|
||||
'type'=>'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Calls/SearchForm.html',
|
||||
'php_file'=>'modules/Calls/ListView.php',
|
||||
'type'=>'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
97
modules/Calls/metadata/subpaneldefs.php
Executable file
97
modules/Calls/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,97 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$layout_defs['Calls'] = array(
|
||||
// sets up which panels to show, in which order, and with what linked_fields
|
||||
'subpanel_setup' => array(
|
||||
'contacts' => array(
|
||||
'top_buttons' => array(),
|
||||
'order' => 10,
|
||||
'module' => 'Contacts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'last_name, first_name',
|
||||
'subpanel_name' => 'ForCalls',
|
||||
'get_subpanel_data' => 'contacts',
|
||||
'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',
|
||||
),
|
||||
'users' => array(
|
||||
'top_buttons' => array(),
|
||||
'order' => 20,
|
||||
'module' => 'Users',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'full_name',
|
||||
'subpanel_name' => 'ForCalls',
|
||||
'get_subpanel_data' => 'users',
|
||||
'title_key' => 'LBL_USERS_SUBPANEL_TITLE',
|
||||
),
|
||||
|
||||
'leads' => array(
|
||||
'order' => 30,
|
||||
'module' => 'Leads',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'last_name, first_name',
|
||||
'subpanel_name' => 'ForCalls',
|
||||
'get_subpanel_data' => 'leads',
|
||||
'title_key' => 'LBL_LEADS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(),
|
||||
),
|
||||
|
||||
'history' => array(
|
||||
'order' => 40,
|
||||
'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE',
|
||||
'type' => 'collection',
|
||||
'subpanel_name' => 'history', //this values is not associated with a physical file.
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'date_modified',
|
||||
'header_definition_from_subpanel'=> 'calls',
|
||||
'module'=>'History',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateNoteButton'),
|
||||
),
|
||||
'collection_list' => array(
|
||||
'notes' => array(
|
||||
'module' => 'Notes',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'notes',
|
||||
),
|
||||
),
|
||||
), /* end history subpanel def */
|
||||
),
|
||||
);
|
||||
?>
|
||||
117
modules/Calls/metadata/subpanels/ForActivities.php
Executable file
117
modules/Calls/metadata/subpanels/ForActivities.php
Executable file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Accounts
|
||||
*
|
||||
* 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(
|
||||
//Removed button because this layout def is a component of
|
||||
//the activities sub-panel.
|
||||
'where' => "(calls.status='planned')",
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'AD' => array (
|
||||
'vname' => 'Typ',
|
||||
'sortable' => false,
|
||||
'width' => 0,
|
||||
),
|
||||
'close_button'=>array(
|
||||
'widget_class' => 'SubPanelCloseButton',
|
||||
'vname' => 'LBL_LIST_CLOSE',
|
||||
'width' => '6%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'name'=>array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
'status'=>array(
|
||||
'widget_class' => 'SubPanelActivitiesStatusField',
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
|
||||
),
|
||||
'contact_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'contact_name_owner'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_mod'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
'date_start'=>array(
|
||||
'vname' => 'LBL_LIST_DUE_DATE',
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'time_start'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
114
modules/Calls/metadata/subpanels/ForHistory.php
Executable file
114
modules/Calls/metadata/subpanels/ForHistory.php
Executable file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Accounts
|
||||
*
|
||||
* 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(
|
||||
|
||||
'where' => "(calls.status='made' OR calls.status='canceled')",
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'AD' => array (
|
||||
'widget_class' => 'SubPanelAdditionalDetailsLink',
|
||||
'vname' => ' ',
|
||||
'sortable' => false,
|
||||
'width' => 0,
|
||||
),
|
||||
'object_image'=>array(
|
||||
'vname' => 'LBL_OBJECT_IMAGE',
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name'=>array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
'status'=>array(
|
||||
'widget_class' => 'SubPanelActivitiesStatusField',
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
'force_exists'=>true //this will create a fake field in the case a field is not defined
|
||||
),
|
||||
'contact_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
'contact_name_owner'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'contact_name_mod'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
'date_modified'=>array(
|
||||
'vname' => 'LBL_LIST_DATE_MODIFIED',
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'filename'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
112
modules/Calls/metadata/subpanels/default.php
Executable file
112
modules/Calls/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Bugs
|
||||
*
|
||||
* 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(
|
||||
//Removed button because this layout def is a component of
|
||||
//the activities sub-panel.
|
||||
|
||||
'top_buttons' => array(
|
||||
array (
|
||||
'widget_class'=>'SubPanelTopCreateButton',
|
||||
),
|
||||
array (
|
||||
'widget_class'=>'SubPanelTopSelectButton', 'popup_module' => 'Calls'
|
||||
),
|
||||
),
|
||||
|
||||
'list_fields' => array(
|
||||
'object_image'=>array(
|
||||
'vname' => 'LBL_OBJECT_IMAGE',
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'close_button'=>array(
|
||||
'widget_class' => 'SubPanelCloseButton',
|
||||
'vname' => 'LBL_LIST_CLOSE',
|
||||
'width' => '6%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
'name'=>array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
'status'=>array(
|
||||
'widget_class' => 'SubPanelActivitiesStatusField',
|
||||
'vname' => 'LBL_STATUS',
|
||||
'width' => '15%',
|
||||
|
||||
),
|
||||
'contact_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable'=>false,
|
||||
),
|
||||
|
||||
'date_start'=>array(
|
||||
'vname' => 'LBL_DATE_TIME',
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'time_start'=>array(
|
||||
'usage'=>'query_only',
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
140
modules/Calls/tpls/QuickCreate.tpl
Executable file
140
modules/Calls/tpls/QuickCreate.tpl
Executable file
@@ -0,0 +1,140 @@
|
||||
{*
|
||||
|
||||
/**
|
||||
* 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$
|
||||
|
||||
*}
|
||||
|
||||
|
||||
<form name="callsQuickCreate" id="callsQuickCreate" method="POST" action="index.php">
|
||||
<input type="hidden" name="module" value="Calls">
|
||||
<input type="hidden" name="record" value="">
|
||||
<input type="hidden" name="lead_id" value="{$REQUEST.lead_id}">
|
||||
<input type="hidden" name="contact_id" value="{$REQUEST.contact_id}">
|
||||
<input type="hidden" name="contact_name" value="{$REQUEST.contact_name}">
|
||||
<input type="hidden" name="email_id" value="{$REQUEST.email_id}">
|
||||
<input type="hidden" name="contact_invitees" value="{$REQUEST.contact_id}">
|
||||
<input type="hidden" name="account_id" value="{$REQUEST.account_id}">
|
||||
<input type="hidden" name="opportunity_id" value="{$REQUEST.opportunity_id}">
|
||||
<input type="hidden" name="acase_id" value="{$REQUEST.acase_id}">
|
||||
<input type="hidden" name="return_action" value="{$REQUEST.return_action}">
|
||||
<input type="hidden" name="return_module" value="{$REQUEST.return_module}">
|
||||
<input type="hidden" name="return_id" value="{$REQUEST.return_id}">
|
||||
<input type="hidden" name="action" value='Save'>
|
||||
<input type="hidden" name="duplicate_parent_id" value="{$REQUEST.duplicate_parent_id}">
|
||||
<!--
|
||||
CL: Bug fix for 9291 and 9427 - parent_id should be parent_type, not the module type (if set)
|
||||
-->
|
||||
|
||||
{if $REQUEST.parent_id}
|
||||
<input type="hidden" name="parent_id" value="{$REQUEST.parent_id}">
|
||||
{else}
|
||||
<input type="hidden" name="parent_id" value="{$REQUEST.return_id}">
|
||||
{/if}
|
||||
{if $REQUEST.parent_type}
|
||||
<input type="hidden" name="parent_type" value="{$REQUEST.parent_type}">
|
||||
{else}
|
||||
<input type="hidden" name="parent_type" value="{$REQUEST.return_module}">
|
||||
{/if}
|
||||
<input type="hidden" name="parent_name" value="{$REQUEST.parent_name}">
|
||||
<input type="hidden" name="to_pdf" value='1'>
|
||||
<input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{$ASSIGNED_USER_ID}" />
|
||||
|
||||
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td align="left" style="padding-bottom: 2px;">
|
||||
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" type="submit" name="button" {$saveOnclick|default:"onclick=\"return check_form('CallsQuickCreate');\""} value=" {$APP.LBL_SAVE_BUTTON_LABEL} " >
|
||||
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" type="submit" name="button" {$cancelOnclick|default:"onclick=\"this.form.action.value='$RETURN_ACTION'; this.form.module.value='$RETURN_MODULE'; this.form.record.value='$RETURN_ID'\""} value=" {$APP.LBL_CANCEL_BUTTON_LABEL} ">
|
||||
<input title="{$APP.LBL_FULL_FORM_BUTTON_TITLE}" accessKey="{$APP.LBL_FULL_FORM_BUTTON_KEY}" class="button" type="submit" name="button" onclick="this.form.to_pdf.value='0';this.form.action.value='EditView'; this.form.module.value='Calls';" value=" {$APP.LBL_FULL_FORM_BUTTON_LABEL} "></td>
|
||||
<td align="right" nowrap><span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span> {$APP.NTC_REQUIRED}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabForm">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<th align="left" class="dataLabel" colspan="4"><h4 class="dataLabel"><slot>{$MOD.LBL_NEW_FORM_TITLE}</slot></h4></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel"><slot>{$MOD.LBL_SUBJECT} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td><slot><textarea name='name' cols="50" tabindex='1' rows="1">{$NAME}</textarea></slot></td>
|
||||
<td class="dataLabel" width="15%"><slot>{$MOD.LBL_STATUS} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td><slot><select tabindex="2" name='direction'>{$DIRECTION_OPTIONS}</select> <select tabindex="2" name='status'>{$STATUS_OPTIONS}</select></slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel" rowspan="2"><slot>{$MOD.LBL_DESCRIPTION}</slot></td>
|
||||
<td rowspan="2"><slot><textarea name='description' tabindex='1' cols="50" rows="4">{$DESCRIPTION}</textarea></slot></td>
|
||||
<td class="dataLabel"><slot>{$MOD.LBL_DATE_TIME}</slot></td>
|
||||
<td class="dataField"><slot>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td nowrap>
|
||||
<input name='date_start' id='jscal_field' onblur="parseDate(this, '{$USER_DATEFORMAT}');" tabindex='2' size='11' maxlength='10' type="text" value="{$DATE_START}">
|
||||
<img src="themes/default/images//jscalendar.gif" alt="{$USER_DATEFORMAT}" id="jscal_trigger" align="absmiddle"> </td>
|
||||
<td nowrap>
|
||||
<select name='time_hour_start' tabindex="2">{$TIME_START_HOUR_OPTIONS}</select>{$TIME_SEPARATOR}
|
||||
<select name='time_minute_start' tabindex="2">{$TIME_START_MINUTE_OPTIONS}</select>
|
||||
{if $TIME_MERIDIEM}
|
||||
<select name='meridiem' tabindex="2">{$TIME_MERIDIEM}</select>
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap><span class="dateFormat">{$USER_DATEFORMAT}</span></td>
|
||||
<td nowrap><span class="dateFormat">{$TIME_FORMAT}</span></td>
|
||||
</tr>
|
||||
</table></slot>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="dataLabel" valign="top"><slot>{$MOD.LBL_DURATION} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td valign="top" class="dataField"><slot><input name='duration_hours' tabindex="2" size='2' maxlength='2' type="text" value='{$DURATION_HOURS}'> <select tabindex="2" name='duration_minutes'>{$DURATION_MINUTES_OPTIONS}</select> {$MOD.LBL_HOURS_MINS}</slot></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
Calendar.setup ({
|
||||
inputField : "jscal_field", daFormat : "{/literal}{$CALENDAR_FORMAT}{literal}", onClose: function(cal) { cal.hide(); }, showsTime : false, button : "jscal_trigger", singleClick : true, step : 1
|
||||
});
|
||||
{/literal}
|
||||
{$additionalScripts}
|
||||
</script>
|
||||
68
modules/Calls/tpls/footer.tpl
Executable file
68
modules/Calls/tpls/footer.tpl
Executable file
@@ -0,0 +1,68 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* 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".
|
||||
********************************************************************************/
|
||||
*}
|
||||
{{include file='include/EditView/footer.tpl'}}
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="h3Row">
|
||||
<tr>
|
||||
<td nowrap><h3>{$MOD.LBL_SCHEDULING_FORM_TITLE}</h3></td><td width='100%'><img height='1' width='1' src='include/images/blank.gif' alt=''></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div width="100%" id="scheduler" name="scheduler"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
function fill_invitees() {
|
||||
if (typeof(GLOBAL_REGISTRY) != 'undefined') {
|
||||
SugarWidgetScheduler.fill_invitees(document.EditView);
|
||||
}
|
||||
}
|
||||
{/literal}
|
||||
|
||||
var root_div = document.getElementById('scheduler');
|
||||
var sugarContainer_instance = new SugarContainer(document.getElementById('scheduler'));
|
||||
sugarContainer_instance.start(SugarWidgetScheduler);
|
||||
{literal}
|
||||
if ( document.getElementById('save_and_continue') ) {
|
||||
var oldclick = document.getElementById('save_and_continue').attributes['onclick'].nodeValue;
|
||||
document.getElementById('save_and_continue').onclick = function(){
|
||||
fill_invitees();
|
||||
eval(oldclick);
|
||||
}
|
||||
}
|
||||
{/literal}
|
||||
</script>
|
||||
</form>
|
||||
407
modules/Calls/vardefs.php
Executable file
407
modules/Calls/vardefs.php
Executable file
@@ -0,0 +1,407 @@
|
||||
<?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['Call'] = array('table' => 'calls', 'comment' => 'A Call is an activity representing a phone call',
|
||||
'unified_search' => true,'fields' => array (
|
||||
|
||||
'name' =>
|
||||
array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_SUBJECT',
|
||||
'dbType' => 'varchar',
|
||||
'type' => 'name',
|
||||
'len' => '50',
|
||||
'comment' => 'Brief description of the call',
|
||||
'unified_search' => true,
|
||||
'importable' => 'required',
|
||||
'required' => true,
|
||||
),
|
||||
|
||||
'duration_hours' =>
|
||||
array (
|
||||
'name' => 'duration_hours',
|
||||
'vname' => 'LBL_DURATION_HOURS',
|
||||
'type' => 'int',
|
||||
'len' => '2',
|
||||
'comment' => 'Call duration, hours portion'
|
||||
),
|
||||
'duration_minutes' =>
|
||||
array (
|
||||
'name' => 'duration_minutes',
|
||||
'vname' => 'LBL_DURATION_MINUTES',
|
||||
'type' => 'int',
|
||||
'function' => array('name'=>'getDurationMinutesOptions', 'returns'=>'html', 'include'=>'modules/Calls/CallHelper.php'),
|
||||
'len' => '2',
|
||||
'group'=>'duration_hours',
|
||||
'comment' => 'Call duration, minutes portion'
|
||||
),
|
||||
|
||||
'date_start' =>
|
||||
array (
|
||||
'name' => 'date_start',
|
||||
'vname' => 'LBL_DATE',
|
||||
'type' => 'datetime',
|
||||
'comment' => 'Date in which call is schedule to (or did) start',
|
||||
'importable' => 'required',
|
||||
),
|
||||
|
||||
'date_end' =>
|
||||
array (
|
||||
'name' => 'date_end',
|
||||
'vname' => 'LBL_DATE_END',
|
||||
'type' => 'date',
|
||||
'massupdate'=>false,
|
||||
'comment' => 'Date is which call is scheduled to (or did) end'
|
||||
),
|
||||
|
||||
'parent_type'=>
|
||||
array(
|
||||
'name'=>'parent_type',
|
||||
'vname'=>'LBL_PARENT_TYPE',
|
||||
'type'=>'varchar',
|
||||
'required'=>false,
|
||||
'group'=>'parent_name',
|
||||
'reportable'=>false,
|
||||
'len'=>25,
|
||||
'comment' => 'The Sugar object to which the call is related'
|
||||
),
|
||||
|
||||
'parent_name'=>
|
||||
array(
|
||||
'name'=> 'parent_name',
|
||||
'parent_type'=>'record_type_display' ,
|
||||
'type_name'=>'parent_type',
|
||||
'id_name'=>'parent_id',
|
||||
'vname'=>'LBL_LIST_RELATED_TO',
|
||||
'type'=>'parent',
|
||||
'group'=>'parent_name',
|
||||
'source'=>'non-db',
|
||||
'options'=> 'parent_type_display',
|
||||
),
|
||||
'status' =>
|
||||
array (
|
||||
'name' => 'status',
|
||||
'vname' => 'LBL_STATUS',
|
||||
'type' => 'enum',
|
||||
'len' => '25',
|
||||
'options' => 'activity_status_dom',
|
||||
'comment' => 'The status of the call (Held, Not Held, etc.)'
|
||||
),
|
||||
'direction' =>
|
||||
array (
|
||||
'name' => 'direction',
|
||||
'vname' => 'LBL_DIRECTION',
|
||||
'type' => 'enum',
|
||||
'len' => '25',
|
||||
'options' => 'call_direction_dom',
|
||||
'comment' => 'Indicates whether call is inbound or outbound'
|
||||
),
|
||||
'parent_id'=>
|
||||
array(
|
||||
'name'=>'parent_id',
|
||||
'vname'=>'LBL_LIST_RELATED_TO_ID',
|
||||
'type'=>'id',
|
||||
'group'=>'parent_name',
|
||||
'reportable'=>false,
|
||||
'comment' => 'The ID of the parent Sugar object identified by parent_type'
|
||||
),
|
||||
'reminder_checked'=>array(
|
||||
'name' => 'reminder_checked',
|
||||
'vname' => 'LBL_REMINDER',
|
||||
'type' => 'bool',
|
||||
'source' => 'non-db',
|
||||
'comment' => 'checkbox indicating whether or not the reminder value is set (Meta-data only)',
|
||||
'massupdate'=>false,
|
||||
),
|
||||
|
||||
'reminder_time'=>array (
|
||||
'name' => 'reminder_time',
|
||||
'vname' => 'LBL_REMINDER_TIME',
|
||||
'type' => 'int',
|
||||
'function' => array('name'=>'getReminderTime', 'returns'=>'html', 'include'=>'modules/Calls/CallHelper.php'),
|
||||
'required' => false,
|
||||
'reportable' => false,
|
||||
'default' => -1,
|
||||
'len' => '4',
|
||||
'comment' => 'Specifies when a reminder alert should be issued; -1 means no alert; otherwise the number of seconds prior to the start'
|
||||
),
|
||||
|
||||
'outlook_id' =>
|
||||
array (
|
||||
'name' => 'outlook_id',
|
||||
'vname' => 'LBL_OUTLOOK_ID',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'reportable' => false,
|
||||
'comment' => 'When the Sugar Plug-in for Microsoft Outlook syncs an Outlook appointment, this is the Outlook appointment item ID'
|
||||
),
|
||||
'accept_status' => array (
|
||||
'name' => 'accept_status',
|
||||
'vname' => 'LBL_SUBJECT',
|
||||
'dbType' => 'varchar',
|
||||
'type' => 'varchar',
|
||||
'len' => '20',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'contact_name' =>
|
||||
array (
|
||||
'name' => 'contact_name',
|
||||
'rname' => 'last_name',
|
||||
'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
|
||||
'id_name' => 'contact_id',
|
||||
'massupdate' => false,
|
||||
'vname' => 'LBL_CONTACT_NAME',
|
||||
'type' => 'relate',
|
||||
'link'=>'contacts',
|
||||
'table' => 'contacts',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Contacts',
|
||||
'join_name' => 'contacts',
|
||||
'dbType' => 'varchar',
|
||||
'source'=>'non-db',
|
||||
'len' => 36,
|
||||
'importable' => 'false',
|
||||
),
|
||||
|
||||
'account' =>
|
||||
array (
|
||||
'name' => 'account',
|
||||
'type' => 'link',
|
||||
'relationship' => 'account_calls',
|
||||
'link_type'=>'one',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_OLD_ACCOUNT_LINK',
|
||||
),
|
||||
'opportunity' =>
|
||||
array (
|
||||
'name' => 'opportunity',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunity_calls',
|
||||
'source'=>'non-db',
|
||||
'link_type'=>'one',
|
||||
'vname'=>'LBL_OPPORTUNITY',
|
||||
),
|
||||
'leads' =>
|
||||
array (
|
||||
'name' => 'leads',
|
||||
'type' => 'link',
|
||||
'relationship' => 'calls_leads',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_LEADS',
|
||||
),
|
||||
'case' =>
|
||||
array (
|
||||
'name' => 'case',
|
||||
'type' => 'link',
|
||||
'relationship' => 'case_calls',
|
||||
'source'=>'non-db',
|
||||
'link_type'=>'one',
|
||||
'vname'=>'LBL_CASE',
|
||||
),
|
||||
'accounts' =>
|
||||
array (
|
||||
'name' => 'accounts',
|
||||
'type' => 'link',
|
||||
'relationship' => 'account_calls',
|
||||
'module'=>'Accounts',
|
||||
'bean_name'=>'Account',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_ACCOUNT',
|
||||
),
|
||||
'contacts' =>
|
||||
array (
|
||||
'name' => 'contacts',
|
||||
'type' => 'link',
|
||||
'relationship' => 'calls_contacts',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_CONTACTS',
|
||||
),
|
||||
'users' =>
|
||||
array (
|
||||
'name' => 'users',
|
||||
'type' => 'link',
|
||||
'relationship' => 'calls_users',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_USERS',
|
||||
),
|
||||
'notes' =>
|
||||
array (
|
||||
'name' => 'notes',
|
||||
'type' => 'link',
|
||||
'relationship' => 'calls_notes',
|
||||
'module'=>'Notes',
|
||||
'bean_name'=>'Note',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_NOTES',
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'created_by_link' =>
|
||||
array (
|
||||
'name' => 'created_by_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'calls_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' => 'calls_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' => 'calls_assigned_user',
|
||||
'vname' => 'LBL_ASSIGNED_TO_USER',
|
||||
'link_type' => 'one',
|
||||
'module'=>'Users',
|
||||
'bean_name'=>'User',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
|
||||
|
||||
|
||||
),
|
||||
'indices' => array (
|
||||
array(
|
||||
'name' => 'idx_call_name',
|
||||
'type' => 'index',
|
||||
'fields'=> array('name'),
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
array(
|
||||
'name' => 'idx_status',
|
||||
'type' => 'index',
|
||||
'fields'=> array('status'),
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_calls_date_start',
|
||||
'type' => 'index',
|
||||
'fields' => array('date_start'),
|
||||
),
|
||||
),
|
||||
'relationships' => array (
|
||||
'calls_assigned_user' => array(
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Calls',
|
||||
'rhs_table' => 'calls',
|
||||
'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'calls_modified_user' => array(
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Calls',
|
||||
'rhs_table' => 'calls',
|
||||
'rhs_key' => 'modified_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'calls_created_by' => array(
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Calls',
|
||||
'rhs_table' => 'calls',
|
||||
'rhs_key' => 'created_by',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'calls_notes' => array(
|
||||
'lhs_module' => 'Calls',
|
||||
'lhs_table' => 'calls',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Notes',
|
||||
'rhs_table' => 'notes',
|
||||
'rhs_key' => 'parent_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('Calls','Call', array('default', 'assignable',
|
||||
|
||||
|
||||
|
||||
));
|
||||
?>
|
||||
91
modules/Calls/views/view.edit.php
Executable file
91
modules/Calls/views/view.edit.php
Executable file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can 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 Calls 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 CallsViewEdit extends ViewEdit {
|
||||
|
||||
function CallsViewEdit(){
|
||||
parent::ViewEdit();
|
||||
}
|
||||
|
||||
/**
|
||||
* preDisplay
|
||||
* Override preDisplay to check for presence of 'status' in $_REQUEST
|
||||
* This is to support the "Close And Create New" operation.
|
||||
*/
|
||||
function preDisplay() {
|
||||
if($_REQUEST['module'] != 'Calls' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) {
|
||||
$this->bean->status = '';
|
||||
} //if
|
||||
if(!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'made')) {
|
||||
$this->bean->status = 'made';
|
||||
}
|
||||
parent::preDisplay();
|
||||
}
|
||||
|
||||
function display() {
|
||||
global $json;
|
||||
$json = getJSONobj();
|
||||
$json_config = new json_config();
|
||||
if (isset($this->bean->json_id) && !empty ($this->bean->json_id)) {
|
||||
$javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->json_id);
|
||||
|
||||
} else {
|
||||
$this->bean->json_id = $this->bean->id;
|
||||
$javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->id);
|
||||
|
||||
}
|
||||
$this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript);
|
||||
|
||||
if($this->ev->isDuplicate){
|
||||
$this->bean->status = $GLOBALS['mod_strings']['LBL_DEFAULT_STATUS'];
|
||||
} //if
|
||||
parent::display();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user