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

View 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".
*/
global $current_user;
$dashletData['MyEcmTasksDashlet']['searchFields'] = array('priority' => array('default' => ''),
'status' => array('default' => array('Not Started', 'In Progress', 'Pending Input')),
'date_entered' => array('default' => ''),
'date_start' => array('default' => ''),
'date_due' => array('default' => ''),
'assigned_user_id' => array('type' => 'assigned_user_name',
'default' => $current_user->name));
$dashletData['MyEcmTasksDashlet']['columns'] = array('set_complete' => array('width' => '1',
'label' => 'LBL_LIST_CLOSE',
'default' => true,
'sortable' => false),
'name' => array('width' => '40',
'label' => 'LBL_SUBJECT',
'link' => true,
'default' => true),
'priority' => array('width' => '10',
'label' => 'LBL_PRIORITY',
'default' => true),
'date_start' => array('width' => '15',
'label' => 'LBL_START_DATE',
'default' => true),
'time_start' => array('width' => '15',
'label' => 'LBL_START_TIME',
'default' => false),
'status' => array('width' => '8',
'label' => 'LBL_STATUS'),
'date_due' => array('width' => '15',
'label' => 'LBL_DUE_DATE',
'default' => true),
'date_entered' => array('width' => '15',
'label' => 'LBL_DATE_ENTERED'),
'date_modified' => array('width' => '15',
'label' => 'LBL_DATE_MODIFIED'),
'created_by' => array('width' => '8',
'label' => $app_strings['LBL_CREATED'],
'sortable' => false),
'assigned_user_name' => array('width' => '8',
'label' => 'LBL_LIST_ASSIGNED_USER'),
'contact_name' => array('width' => '8',
'label' => 'LBL_LIST_CONTACT'),
);
?>

View 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['MyEcmTasksDashlet'] = array('module' => 'EcmTasks',
'title' => translate('LBL_LIST_MY_TASKS', 'EcmTasks'),
'description' => 'A customizable view into EcmTasks',
'category' => 'Module Views',
'hidden' > true);
?>

View File

@@ -0,0 +1,60 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
require_once('include/Dashlets/DashletGeneric.php');
require_once('modules/EcmTasks/EcmTask.php');
class MyEcmTasksDashlet extends DashletGeneric {
function MyEcmTasksDashlet($id, $def = null) {
global $current_user, $app_strings;
require('modules/EcmTasks/Dashlets/MyEcmTasksDashlet/MyEcmTasksDashlet.data.php');
parent::DashletGeneric($id, $def);
if(empty($def['title'])) $this->title = translate('LBL_LIST_MY_TASKS', 'EcmTasks');
$this->searchFields = $dashletData['MyEcmTasksDashlet']['searchFields'];
$this->columns = $dashletData['MyEcmTasksDashlet']['columns'];
$this->seedBean = new EcmTask();
}
}
?>

View 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".
*/
global $current_user;
$dashletData['MyEcmTasksDashlet2']['searchFields'] = array('priority' => array('default' => ''),
'status' => array('default' => array('Not Started', 'In Progress', 'Pending Input')),
'date_entered' => array('default' => ''),
'date_start' => array('default' => ''),
'date_due' => array('default' => ''),
'assigned_user_id' => array('type' => 'assigned_user_name',
'default' => $current_user->name));
$dashletData['MyEcmTasksDashlet2']['columns'] = array('set_complete' => array('width' => '1',
'label' => 'LBL_LIST_CLOSE',
'default' => true,
'sortable' => false),
'name' => array('width' => '40',
'label' => 'LBL_SUBJECT',
'link' => true,
'default' => true),
'priority' => array('width' => '10',
'label' => 'LBL_PRIORITY',
'default' => true),
'date_start' => array('width' => '15',
'label' => 'LBL_START_DATE',
'default' => true),
'time_start' => array('width' => '15',
'label' => 'LBL_START_TIME',
'default' => false),
'status' => array('width' => '8',
'label' => 'LBL_STATUS'),
'date_due' => array('width' => '15',
'label' => 'LBL_DUE_DATE',
'default' => true),
'date_entered' => array('width' => '15',
'label' => 'LBL_DATE_ENTERED'),
'date_modified' => array('width' => '15',
'label' => 'LBL_DATE_MODIFIED'),
'created_by' => array('width' => '8',
'label' => $app_strings['LBL_CREATED'],
'sortable' => false),
'assigned_user_name' => array('width' => '8',
'label' => 'LBL_LIST_ASSIGNED_USER'),
'contact_name' => array('width' => '8',
'label' => 'LBL_LIST_CONTACT'),
);
?>

View 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['MyEcmTasksDashlet2'] = array('module' => 'EcmTasks',
'title' => 'test2',
'description' => 'A customizable view into EcmTasks',
'category' => 'Module Views',
'hidden' => true);
?>

View File

@@ -0,0 +1,60 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
require_once('include/Dashlets/DashletGeneric.php');
require_once('modules/EcmTasks/EcmTask.php');
class MyEcmTasksDashlet2 extends DashletGeneric {
function MyEcmTasksDashlet2($id, $def = null) {
global $current_user, $app_strings;
require('modules/EcmTasks/Dashlets/MyEcmTasksDashlet/MyEcmTasksDashlet.data.php');
parent::DashletGeneric($id, $def);
if(empty($def['title'])) $this->title = 'test2';
$this->searchFields = $dashletData['MyEcmTasksDashlet2']['searchFields'];
$this->columns = $dashletData['MyEcmTasksDashlet2']['columns'];
$this->seedBean = new EcmTask();
}
}
?>

View File

@@ -0,0 +1,733 @@
<?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('include/utils.php');
// EcmTask is used to store customer information.
class EcmTask extends SugarBean {
var $field_name_map;
// Stored fields
var $id;
var $date_entered;
var $date_modified;
var $assigned_user_id;
//var $assigned_user_id2;
var $modified_user_id;
var $created_by;
var $created_by_name;
var $modified_by_name;
var $description;
var $name;
var $status;
var $date_due_flag;
var $date_due;
var $time_due;
var $date_start_flag;
var $date_start;
var $time_start;
var $priority;
var $parent_type;
var $parent_id;
var $contact_id;
var $google_calendar_ecmtask;
var $parent_name;
var $contact_name;
var $contact_phone;
var $contact_email;
var $assigned_user_name;
//var $assigned_user_name2;
var $default_ecmtask_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', 'Call to schedule meeting', 'Setup evaluation', 'Get demo feedback', 'Arrange introduction', 'Escalate support request', 'Close out support request', 'Ship product', 'Arrange reference call', 'Schedule training', 'Send local user group information', 'Add to mailing list');
var $table_name = "ecmtasks";
var $object_name = "EcmTask";
var $module_dir = 'EcmTasks';
var $importable = true;
// This is used to retrieve related fields from form posts.
var $additional_column_fields = Array('assigned_user_name', 'assigned_user_id','assigned_user_name2', 'assigned_user_id2', 'contact_name', 'contact_phone', 'contact_email', 'parent_name');
function EcmTask() {
parent::SugarBean();
}
var $new_schema = true;
function get_summary_text()
{
return "$this->name";
}
function create_list_query($order_by, $where, $show_deleted = 0)
{
$custom_join = $this->custom_fields->getJOIN();
$query = "SELECT ";
$query .= "
$this->table_name.*,
contacts.first_name,
contacts.last_name,
contacts.assigned_user_id contact_name_owner,
users.user_name as assigned_user_name";
if($custom_join){
$query .= $custom_join['select'];
}
$query .= " FROM ecmtasks ";
$query .= "LEFT JOIN contacts
ON ecmtasks.contact_id=contacts.id";
$query .= " LEFT JOIN users
ON ecmtasks.assigned_user_id=users.id ";
if($custom_join){
$query .= $custom_join['join'];
}
$where_auto = '1=1';
if($show_deleted == 0){
$where_auto = " ecmtasks.deleted=0
AND ( contacts.deleted IS NULL OR contacts.deleted=0) ";
}else if($show_deleted == 1){
$where_auto = "$this->table_name.deleted=1";
}
//GROUP BY ecmtasks.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 ecmtasks.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 ecmtasks.*, contacts.first_name, contacts.last_name";
if($custom_join){
$query .= $custom_join['select'];
}
$query .= " FROM contacts, ecmtasks ";
$where_auto = "ecmtasks.contact_id = contacts.id AND ecmtasks.deleted=0 AND contacts.deleted=0";
}
else
{
$query = 'SELECT ecmtasks.*';
if($custom_join){
$query .= $custom_join['select'];
}
$query .= ' FROM ecmtasks ';
$where_auto = "ecmtasks.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 ecmtasks.name";
return $query;
}
function fill_in_additional_list_fields()
{
//echo $this->assigned_user_id2.'lol';
//global $app_strings, $focus;
//if(!empty($this->field_defs['created_by'])) {
//$this->created_by_name = get_assigned_user_name($this->field_defs['created_by']);
//print_r($this);
//echo $focus->created_by;
//$this->created_by_name = $this->field_defs['created_by'];
//}/*
$query="SELECT assigned_user_id2 FROM ecmtasks WHERE id='$this->id'";
$result = $this->db->query($query,true," Error filling in additional detail fields: ");
$row = $this->db->fetchByAssoc($result);
if(!empty($row['assigned_user_id2']))
{
$this->assigned_user_id2= $row['assigned_user_id2'];
$query2="SELECT first_name,last_name FROM users WHERE id='$this->assigned_user_id2'";
$result2 = $this->db->query($query2,true," Error filling in additional detail fields: ");
$row2 = $this->db->fetchByAssoc($result2);
if(!empty($row2['last_name'])){
$this->assigned_user_name2=$row2['first_name'].' '.$row2['last_name'];
}
} else {
$this->assigned_user_name2= null;
}
}
function fill_in_additional_detail_fields()
{
parent::fill_in_additional_detail_fields();
global $app_strings;
if (isset($this->contact_id)) {
require_once("modules/Contacts/Contact.php");
$contact = new Contact();
$contact->retrieve($this->contact_id);
if($contact->id != "") {
$this->contact_name = $contact->full_name;
$this->contact_name_owner = $contact->assigned_user_id;
$this->contact_name_mod = 'Contacts';
$this->contact_phone = $contact->phone_work;
$this->contact_email = $contact->emailAddress->getPrimaryAddress($contact);
} else {
$this->contact_name_mod = '';
$this->contact_name_owner = '';
$this->contact_name='';
$this->contact_email = '';
$this->contact_id='';
}
}
$this->fill_in_additional_parent_fields();
}
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(){
global $action, $currentModule, $focus, $current_module_strings, $app_list_strings, $image_path, $timedate;
$today = $timedate->handle_offset(date($GLOBALS['timedate']->get_db_date_time_format(), time()), $timedate->dbDayFormat, true);
$ecmtask_fields = $this->get_list_view_array();
$ecmtask_fields['TIME_DUE'] = $timedate->to_display_time($timedate->to_db_time($ecmtask_fields['DATE_DUE']));
$ecmtask_fields['DATE_DUE'] = $timedate->to_display_date($timedate->to_db($ecmtask_fields['DATE_DUE']));
$date_due = $ecmtask_fields['DATE_DUE'];
if (!empty($this->priority))
$ecmtask_fields['PRIORITY'] = $app_list_strings['ecmtask_priority_dom'][$this->priority];
if (isset($this->parent_type))
$ecmtask_fields['PARENT_MODULE'] = $this->parent_type;
if ($this->status != "Completed" && $this->status != "Deferred" ) {
$ecmtask_fields['SET_COMPLETE'] = "<a href='index.php?return_module=$currentModule&return_action=".(($action=="DynamicAction")?"index":$action)."&return_id=" . ((!empty($focus->id)) ? $focus->id : "") . "&action=EditView&module=EcmTasks&record={$this->id}&status=made'>".get_image($image_path."close_inline","alt='Close' border='0'")."</a>";
}
$dd = $timedate->to_db_date($date_due, false);
if ($dd < $today){
$ecmtask_fields['DATE_DUE']= "<font class='overdueEcmTask'>".$date_due."</font>";
}else if( $dd == $today ){
$ecmtask_fields['DATE_DUE'] = "<font class='todaysEcmTask'>".$date_due."</font>";
}else{
$ecmtask_fields['DATE_DUE'] = "<font class='futureEcmTask'>".$date_due."</font>";
}
require_once('include/generic/SugarWidgets/SugarWidgetSubPanelAdditionalDetailsLink.php');
$arr = array();
$swspadl = new SugarWidgetSubPanelAdditionalDetailsLink($arr);
$arr = array( 'module' => 'EcmTasks', 'fields' => array ( 'ID' => $this->id ) );
$ecmtask_fields['AD'] = $swspadl->displayList($arr);
$ecmtask_fields['AD2']='Zadanie';
$ecmtask_fields['CONTACT_NAME']= $this->contact_name; //return_name($ecmtask_fields,"FIRST_NAME","LAST_NAME");
$ecmtask_fields['TITLE'] = '';
if (!empty($ecmtask_fields['CONTACT_NAME'])) {
$ecmtask_fields['TITLE'] .= $current_module_strings['LBL_LIST_CONTACT'].": ".$ecmtask_fields['CONTACT_NAME'];
}
if (!empty($this->parent_name)) {
$ecmtask_fields['TITLE'] .= "\n".$app_list_strings['record_type_display_notes'][$this->parent_type].": ".$this->parent_name;
$ecmtask_fields['PARENT_NAME']=$this->parent_name;
}
$user = new User();
$this->retrieve($this->id);
$user->retrieve($this->created_by);
$ecmtask_fields['CREATED_BY_NAME'] = $user->full_name;
unset($user);
$ecmtask_fields['ASSIGNED_USER_NAME'] = '<a href="index.php?module=Employees&offset=3&stamp=1384944281033836900&return_module=Employees&action=DetailView&record='.$ecmtask_fields['ASSIGNED_USER_ID'].'">'.$ecmtask_fields['ASSIGNED_USER_NAME'].'</a><br><a href="index.php?module=Employees&offset=3&stamp=1384944281033836900&return_module=Employees&action=DetailView&record='.$ecmtask_fields['ASSIGNED_USER_ID2'].'">'.$ecmtask_fields['ASSIGNED_USER_NAME2'].'</a>';
return $ecmtask_fields;
}
function set_notification_body($xtpl, $ecmtask)
{
global $app_list_strings;
global $timedate;
$notifyUser = $ecmtask->current_notify_user;
$prefDate = User::getUserDateTimePreferences($notifyUser);
$xtpl->assign("TASK_SUBJECT", $ecmtask->name);
//MFH #13507
$xtpl->assign("TASK_PRIORITY", (isset($ecmtask->priority)?$app_list_strings['ecmtask_priority_dom'][$ecmtask->priority]:""));
$xtpl->assign("TASK_DUEDATE", $timedate->to_display_date_time($ecmtask->date_due . " " . $ecmtask->time_due,true,true,$notifyUser)." ".$prefDate['userGmt']);
$xtpl->assign("TASK_STATUS", (isset($ecmtask->status)?$app_list_strings['ecmtask_status_dom'][$ecmtask->status]:""));
$xtpl->assign("TASK_DESCRIPTION", $ecmtask->description);
return $xtpl;
}
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;
}
//<Section1>
//Before
/*
function save($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'];
}
return parent::save($check_notify);
}
*/
//After
function save($check_notify = FALSE){
global $current_user;
if (empty($this->status) ) {
$mod_strings = return_module_language($GLOBALS['current_language'], $this->module_dir);
$this->status = $mod_strings['LBL_DEFAULT_STATUS'];
}
if(is_array($this->fetched_row)) {
if($this->fetched_row['status'] != $this->status) {
if($this->fetched_row['status'] == "In Progress" && $this->status == "In Review") {
require_once('modules/Users/User.php');
$user = new User();
$user->retrieve($this->created_by);
$this->send_to_user($user);
}
if($this->fetched_row['status'] == "In Review" && $this->status == "Completed" && $current_user->id != $this->assigned_user_id) {
require_once('modules/Users/User.php');
$user = new User();
$user->retrieve($this->assigned_user_id);
$this->send_to_user($user);
}
}
}
// echo 'ds: '.$this->date_start.'<br><br>';
//die("nie zapisuj");
// if ($this->assigned_user_id == '2e72f487-d92b-954e-f50c-528b10ce81c9' ) {
if($this->google_calendar_ecmtask==null){
$this->google_calendar_ecmtask = $this->addGoogleCalendarEcmTask();}
// }
$return_id = parent::save($check_notify);
//add event to google calendar
return $return_id;
}
function send_to_user($notify_user) {
require_once("modules/Administration/Administration.php");
$admin = new Administration();
$admin->retrieveSettings();
$sendNotifications = false;
if ($admin->settings['notify_on'])
{
$GLOBALS['log']->info("Notifications: user assignment has changed, checking if user receives notifications");
$sendNotifications = true;
}
elseif(isset($_REQUEST['send_invites']) && $_REQUEST['send_invites'] == 1)
{
// cn: bug 5795 Send Invites failing for Contacts
$sendNotifications = true;
}
else
{
$GLOBALS['log']->info("Notifications: not sending e-mail, notify_on is set to OFF");
}
if($sendNotifications == true) $this->send_assignment_notifications__($notify_user, $admin);
}
function send_assignment_notifications__($notify_user, $admin)
{
global $current_user;
if(($this->object_name == 'Meeting' || $this->object_name == 'Call') || $notify_user->receive_notifications) {
$sendToEmail = $notify_user->emailAddress->getPrimaryAddress($notify_user);
if(empty($sendToEmail)) {
$GLOBALS['log']->warn("Notifications: no e-mail address set for user {$notify_user->user_name}, cancelling send");
} else {
$notify_mail = $this->create_notification_email__($notify_user);
$notify_mail->setMailerForSystem();
if(empty($admin->settings['notify_send_from_assigning_user'])) {
$notify_mail->From = $admin->settings['notify_fromaddress'];
$notify_mail->FromName = (empty($admin->settings['notify_fromname'])) ? "" : $admin->settings['notify_fromname'];
} else {
// Send notifications from the current user's e-mail (ifset)
$fromAddress = $current_user->emailAddress->getReplyToAddress($current_user);
$fromAddress = !empty($fromAddress) ? $fromAddress : $admin->settings['notify_fromaddress'];
$notify_mail->From = $fromAddress;
$from_name = !empty($admin->settings['notify_fromname']) ? $admin->settings['notify_fromname'] : "";
if($current_user->getPreference('mail_fromname') != '') {
$from_name = $current_user->getPreference('mail_fromname');
}
$notify_mail->FromName = $from_name;
}
if(!$notify_mail->Send()) {
$GLOBALS['log']->warn("Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})");
} else {
$GLOBALS['log']->info("Notifications: e-mail successfully sent");
}
}
}
}
function create_notification_email__($notify_user) {
global $sugar_version;
global $sugar_config;
global $app_list_strings;
global $current_user;
global $locale;
require_once("XTemplate/xtpl.php");
require_once("include/SugarPHPMailer.php");
$notify_address = $notify_user->emailAddress->getPrimaryAddress($notify_user);
$notify_name = $notify_user->full_name;
$GLOBALS['log']->debug("Notifications: user has e-mail defined");
$notify_mail = new SugarPHPMailer();
$notify_mail->AddAddress($notify_address, $notify_name);
if(empty($_SESSION['authenticated_user_language'])) {
$current_language = $sugar_config['default_language'];
} else {
$current_language = $_SESSION['authenticated_user_language'];
}
$xtpl = new XTemplate("include/language/{$current_language}.notify_template.html");
$template_name = 'EcmTask';
$this->current_notify_user = $notify_user;
if(in_array('set_notification_body', get_class_methods($this))) {
$xtpl = $this->set_notification_body($xtpl, $this);
} else {
$xtpl->assign("OBJECT", $this->object_name);
$template_name = "Default";
}
$xtpl->assign("ASSIGNED_USER", $this->new_assigned_user_name);
$xtpl->assign("ASSIGNER", $current_user->name);
$port = '';
if(isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
$port = $_SERVER['SERVER_PORT'];
}
$httpHost = $_SERVER['HTTP_HOST'];
if($colon = strpos($httpHost, ':')) {
$httpHost = substr($httpHost, 0, $colon);
}
$parsedSiteUrl = parse_url($sugar_config['site_url']);
$host = ($parsedSiteUrl['host'] != $httpHost) ? $httpHost : $parsedSiteUrl['host'];
if(!isset($parsedSiteUrl['port'])) {
$parsedSiteUrl['port'] = 80;
}
$port = ($parsedSiteUrl['port'] != 80) ? ":".$parsedSiteUrl['port'] : '';
$path = !empty($parsedSiteUrl['path']) ? $parsedSiteUrl['path'] : "";
$cleanUrl = "{$parsedSiteUrl['scheme']}://{$host}{$port}{$path}";
if(eregi("localhost",$cleanUrl))$cleanUrl=str_replace("localhost","localhost:8080/vserver/e5crm.more7.com/www",$cleanUrl);
$xtpl->assign("URL", $cleanUrl."/index.php?module={$this->module_dir}&action=DetailView&record={$this->id}");
$xtpl->assign("SUGAR", "Sugar v{$sugar_version}");
$xtpl->assign("WHO_CHANGE", $current_user->full_name);
$xtpl->parse($template_name);
$xtpl->parse($template_name . "_Subject");
$notify_mail->Body = from_html(trim($xtpl->text($template_name)));
$notify_mail->Subject = from_html($xtpl->text($template_name . "_Subject"));
// cn: bug 8568 encode notify email in User's outbound email encoding
$notify_mail->prepForOutbound();
return $notify_mail;
}
function addGoogleCalendarEcmTask() {
//die('test');
global $current_user;
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
Zend_Loader::loadClass('Zend_Http_Client');
// connect to service
$p = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT google_login,CAST(AES_DECRYPT(google_password, 'jakistamhash123') as CHAR) AS google_password,google_calendar_name FROM users WHERE id='".$this->assigned_user_id."'"));
if($p['google_login']!='' && $p['google_password']!=''){
$gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
$user = $p['google_login'];
$pass = $p['google_password'];
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $gcal);
$gcal = new Zend_Gdata_Calendar($client);
//date
$start_time = array();
$start_time[] = intval(substr($this->date_start, 11,2));
$start_time[] = intval(substr($this->date_start, 14,2));
$start_time[] = intval(substr($this->date_start, 0,2));
$start_time[] = intval(substr($this->date_start, 3,2));
$start_time[] = intval(substr($this->date_start, 6,4));
$start = date(DATE_ATOM, mktime($start_time[0],$start_time[1],0,$start_time[2],$start_time[3],$start_time[4]));
$date = new DateTime($this->date_start);
$a='T';
$rok=$date->format('Y-m-d');
$czas=$date->format('H:i:s');
echo $start=$rok.'T'.$czas.'+01:00';
$end_time = array();
$end_time[] = intval(substr($this->date_due, 11,2));
$end_time[] = intval(substr($this->date_due, 14,2));
$end_time[] = intval(substr($this->date_due, 0,2));
$end_time[] = intval(substr($this->date_due, 3,2));
$end_time[] = intval(substr($this->date_due, 6,4));
$end = date(DATE_ATOM, mktime($end_time[0],$end_time[1],0,$end_time[2],$end_time[3],$end_time[4]));
$date = new DateTime($this->date_due);
$a='T';
$rok=$date->format('Y-m-d');
$czas=$date->format('H:i:s');
echo $end=$rok.'T'.$czas.'+01:00';
//create description
$description = $this->description;
if ($this->parent_id && $this->parent_id!='') {
//get parent informations
$p = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT * FROM ".strtolower($this->parent_type)." WHERE id='".$this->parent_id."'"));
global $app_strings;
$description.=" ".$app_strings['LBL_'.strtoupper($this->parent_type)].': '.$p['name'];
//create where
$where = $p['billing_address_city'].', '.$p['billing_address_street'];
}
// die('test');
// save to server
try {
$event = $gcal->newEventEntry();
$event->content =$gcal->newContent($description);
$event->title = $gcal->newTitle($this->name);
$when = $gcal->newWhen();
$when->startTime = $start;
$when->endTime = $end;
//$query->setVisibility('private');
$event->when = array($when);
$event->where = array($gcal->newWhere($where));
$new_ecmtask = $gcal->insertEvent($event);
$google_calendar_ecmtask = $new_ecmtask->getEditLink()->href;
//save gct_id
//$GLOBALS['db'] -> query("UPDATE ecmtasks SET google_calendar_ecmtask='".$google_calendar_ecmtask."' WHERE id='".$this->id."'");
} catch (Zend_Gdata_App_Exception $e) {
echo "Error: " . $e->getResponse();
} catch (Exception $e) {
echo "Error:" . $e->getResponse();
}
//die($new_ecmtask.' '.$google_calendar_ecmtask);
return $google_calendar_ecmtask;
}
}
//</Section1>
}
?>

View 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".
********************************************************************************/
require_once('include/EditView/QuickCreate.php');
require_once('modules/EcmTasks/EcmTask.php');
require_once('include/javascript/javascript.php');
class EcmTasksQuickCreate extends QuickCreate {
var $javascript;
function process() {
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
$mod_strings = return_module_language($current_language, 'EcmTasks');
parent::process();
$this->ss->assign("PRIORITY_OPTIONS", get_select_options_with_id($app_list_strings['ecmtask_priority_dom'], $app_list_strings['ecmtask_priority_default']));
$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['ecmtask_status_dom'], $app_list_strings['ecmtask_status_default']));
$this->ss->assign("TIME_FORMAT", '('. $timedate->get_user_time_format().')');
$focus = new EcmTask();
$time_start_hour = intval(substr($focus->time_start, 0, 2));
$time_start_minutes = substr($focus->time_start, 3, 5);
if($time_start_minutes > 45) {
$time_start_hour += 1;
}
$time_pref = $timedate->get_time_format();
if (strpos($time_pref, 'a')) {
if(!isset($focus->meridiem_am_values)) {
$focus->meridiem_am_values = array('am'=>'am', 'pm'=>'pm');
}
$this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($focus->meridiem_am_values, $time_start_hour < 12 ? 'am' : 'pm'));
} else if(strpos($time_pref, 'A')) {
if(!isset($focus->meridiem_AM_values)) {
$focus->meridiem_AM_values = array('AM'=>'AM', 'PM'=>'PM');
}
$this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($focus->meridiem_AM_values, $time_start_hour < 12 ? 'AM' : 'PM'));
} //if-else
$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(\"ecmtasksQuickCreate\")) 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('ecmtasksQuickCreate');
$focus = new EcmTask();
$this->javascript->setSugarBean($focus);
$this->javascript->addAllFields('');
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
}
}
?>

View 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');

View File

@@ -0,0 +1,38 @@
<?php
mb_internal_encoding("UTF-8");
include_once("../../config.php");
global $sugar_config;
$sql=mysql_connect($sugar_config['dbconfig']['db_host_name'],$sugar_config['dbconfig']['db_user_name'],$sugar_config['dbconfig']['db_password']);
mysql_select_db($sugar_config['dbconfig']['db_name']);
mysql_query ('SET NAMES utf-8');
//die('test');
require_once("/var/www/html/crm/Zend/Loader.php");
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
Zend_Loader::loadClass('Zend_Http_Client');
// connect to service
$p = mysql_fetch_assoc(mysql_query("SELECT google_login,CAST(AES_DECRYPT(google_password, 'jakistamhash123') as CHAR) AS google_password,google_calendar_name FROM users WHERE id='2e72f487-d92b-954e-f50c-528b10ce81c9'"));
if($p['google_login']!='' && $p['google_password']!=''){
$gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
$user = $p['google_login'];
$pass = $p['google_password'];
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $gcal);
$listFeed = new Zend_Gdata_Calendar($client);
try {
$listFeed= $service->getCalendarListFeed();
} catch (Zend_Gdata_App_Exception $e) {
echo "Error: " . $e->getMessage();
}
echo "<h1>Calendar List Feed</h1>";
echo "<ul>";
foreach ($listFeed as $calendar) {
echo "<li>" . $calendar->title .
" (Event Feed: " . $calendar->id . ")</li>";
}
echo "</ul>";
}

75
modules/EcmTasks/Menu.php Normal file
View File

@@ -0,0 +1,75 @@
<?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('EcmTasks', 'edit', true))$module_menu[]=Array("index.php?module=EcmTasks&action=EditView&return_module=EcmTasks&return_action=DetailView", $mod_strings['LNK_NEW_TASK'],"CreateEcmTasks");
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=Compose", $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('EcmTasks', 'list', true))$module_menu[]=Array("index.php?module=EcmTasks&action=index&return_module=EcmTasks&return_action=DetailView", $mod_strings['LNK_TASK_LIST'],"EcmTasks");
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('EcmTasks','list', true)) $module_menu[] = Array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
*/
//After
//if(ACLController::checkAccess('EcmTasks', 'edit', true))
$module_menu[]=Array("index.php?module=EcmTasks&action=EditView&return_module=EcmTasks&return_action=DetailView", $mod_strings['LNK_NEW_TASK'],"CreateEcmTasks");
//if(ACLController::checkAccess('EcmTasks', 'list', true)
$module_menu[]=Array("index.php?module=EcmTasks&action=index&return_module=EcmTasks&return_action=DetailView", $mod_strings['LNK_TASK_LIST'],"EcmTasks");
//if(ACLController::checkAccess('EcmTasks','list', true))
$module_menu[] = Array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
//</Section1>
?>

View File

@@ -0,0 +1,64 @@
<!--
/*********************************************************************************
* 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".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
-->
<!-- BEGIN: main -->
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="listView">
<!-- BEGIN: list_nav_row -->
{PAGINATION}
<!-- END: list_nav_row -->
<tr height="20">
<td scope="col" class="listViewThS1" align="left" NOWRAP>{CHECKALL}</td>
<td scope="col" width="3%" class="listViewThS1" align="center" NOWRAP><slot><a href="{ORDER_BY}status" class="listViewThLinkS1">{MOD.LBL_LIST_CLOSE}{arrow_start}{status_arrow}{arrow_end}</a></slot></td>
<td scope="col" width="57%" class="listViewThS1" align="left" NOWRAP><slot><a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_LIST_SUBJECT}{arrow_start}{name_arrow}{arrow_end}</a></slot></td>
<td scope="col" width="20%" class="listViewThS1" NOWRAP><slot><a href="{ORDER_BY}priority" class="listViewThLinkS1">{MOD.LBL_LIST_PRIORITY}{arrow_start}{priority_arrow}{arrow_end}</a></slot></td>
<td scope="col" width="20%" class="listViewThS1" NOWRAP><slot><a href="{ORDER_BY}date_due" class="listViewThLinkS1">{MOD.LBL_LIST_DUE_DATE}{arrow_start}{date_due_arrow}{arrow_end}</a></slot></td>
</tr>
<!-- BEGIN: row -->
<tr height="20" onmouseover="setPointer(this, '{TASK.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');" onmouseout="setPointer(this, '{TASK.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');" onmousedown="setPointer(this, '{TASK.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>{PREROW}</td>
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" nowrap align=CENTER valign=TOP><slot>{TASK.SET_COMPLETE}</slot></td>
<td scope="row" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign=TOP><slot><{TAG.MAIN} title='{TASK.TITLE}' href="{URL_PREFIX}index.php?action=DetailView&module=EcmTasks&record={TASK.ID}" class="listViewTdLinkS1">{TASK.NAME}</{TAG.MAIN}></slot></td>
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" nowrap valign=TOP><slot>{TASK.PRIORITY}</slot></td>
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" nowrap valign=TOP><slot>{TASK.DATE_DUE}</slot></td>
</tr>
<tr><td colspan="20" class="listViewHRS1"></td></tr>
<!-- END: row -->
</table>
<!-- END: main -->

View File

@@ -0,0 +1,88 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
require_once('XTemplate/xtpl.php');
require_once('modules/EcmTasks/EcmTask.php');
require_once('include/ListView/ListView.php');
global $app_strings;
global $app_list_strings;
global $current_language, $current_user;
$current_module_strings = return_module_language($current_language, 'EcmTasks');
$today = gmdate($GLOBALS['timedate']->get_db_date_time_format());
// Break down the date, add a day, and print it back out again
list($date_tmp,$time_tmp) = explode(' ',$today);
$date = explode('-',$date_tmp);
$time = explode(':',$time_tmp);
$tomorrow = gmdate($GLOBALS['timedate']->get_db_date_time_format(),gmmktime($time[0],$time[1],$time[2],$date[1],($date[2]+1),$date[0]));
$ListView = new ListView();
$seedEcmTasks = new EcmTask();
if ($seedEcmTasks->db->dbType=='mysql') {
$format=array("'%Y-%m-%d'");
$where = "ecmtasks.assigned_user_id='". $current_user->id ."' and (ecmtasks.status is NULL or (ecmtasks.status!='Completed' and ecmtasks.status!='Deferred')) ";
$where .= "and (ecmtasks.date_start is NULL or ";
$where .= " CONCAT(".db_convert("ecmtasks.date_start","date_format",$format).", CONCAT(' ',". db_convert("ecmtasks.time_start","time_format",$format)." )) <=". "'".$tomorrow."')";
}
else if ($seedEcmTasks->db->dbType=='mssql')
{
$where = "ecmtasks.assigned_user_id='". $current_user->id ."' and (ecmtasks.status is NULL or (ecmtasks.status!='Completed' and ecmtasks.status!='Deferred')) ";
$where .= "and (ecmtasks.date_start is NULL or ";
$where .= db_convert("ecmtasks.date_start","date_format") . ' + ' . db_convert("ecmtasks.time_start","time_format") . " <=". "'".$tomorrow."')";
}
else if ($seedEcmTasks->db->dbType=='oci8')
{
$format=array("'YYYY-MM-DD'");
$where = "ecmtasks.assigned_user_id='". $current_user->id ."' and (ecmtasks.status is NULL or (ecmtasks.status!='Completed' and ecmtasks.status!='Deferred')) ";
$where .= "and (ecmtasks.date_start is NULL or ";
$where .= " CONCAT(".db_convert("ecmtasks.date_start","date_format",$format).", CONCAT(' ',". db_convert("ecmtasks.time_start","time_format",$format)." )) <=". "'".$tomorrow."')";
}
$ListView->initNewXTemplate( 'modules/EcmTasks/MyEcmTasks.html',$current_module_strings);
$header_text = '';
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
$header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action=MyEcmTasks&from_module=EcmTasks'>".get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>";
}
$ListView->setHeaderTitle($current_module_strings['LBL_LIST_MY_TASKS'].$header_text);
$ListView->setQuery($where, "", "date_due,priority desc", "TASK");
$ListView->processListView($seedEcmTasks, "main", "TASK");
?>

152
modules/EcmTasks/Save.php Normal file
View File

@@ -0,0 +1,152 @@
<?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/EcmTasks/EcmTask.php');
$focus = new EcmTask();
if (!isset($prefix)) $prefix='';
global $timedate;
$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.'due_meridiem'])) {
$_POST[$prefix.'time_due'] = $timedate->merge_time_meridiem($_POST[$prefix.'time_due'],$timedate->get_time_format(true), $_POST[$prefix.'due_meridiem']);
}
if(!empty($_POST[$prefix.'start_meridiem'])) {
$_POST[$prefix.'time_start'] = $timedate->merge_time_meridiem($_POST[$prefix.'time_start'],$timedate->get_time_format(true), $_POST[$prefix.'start_meridiem']);
}
if(isset($_POST[$prefix.'time_due']) && !empty($_POST[$prefix.'time_due'])) {
$_POST[$prefix.'date_due'] = $_POST[$prefix.'date_due'] . ' ' . $_POST[$prefix.'time_due'];
}
if(isset($_POST[$prefix.'time_start']) && !empty($_POST[$prefix.'time_start'])) {
$_POST[$prefix.'date_start'] = $_POST[$prefix.'date_start'] . ' ' . $_POST[$prefix.'time_start'];
}
require_once('include/formbase.php');
$focus = populateFromPost('', $focus);
//echo '<br><br>'; die('koniec');
if(!$focus->ACLAccess('Save')){
ACLController::displayNoAccess(true);
sugar_cleanup(true);
}
if (isCloseAndCreateNewPressed()) $focus->status = 'Completed';
if (!isset($_POST['date_due_flag'])) $focus->date_due_flag = 0;
if (!isset($_POST['date_start_flag'])) $focus->date_start_flag = 0;
//if only the time is passed in, without a date, then string length will be 7
if (isset($_REQUEST['date_due']) && strlen(trim($_REQUEST['date_due']))<8 ){
//no date set, so clear out field, and set the rest flag to true
$focus->date_due_flag = 1;
$focus->date_due = '';
}
//if only the time is passed in, without a date, then string length will be 7
if (isset($_REQUEST['date_start']) && strlen(trim($_REQUEST['date_start']))<8){
//no date set, so clear out field, and set the rest flag to true
$focus->date_start_flag = 1;
$focus->date_start = '';
}
///////////////////////////////////////////////////////////////////////////////
//// INBOUND EMAIL HANDLING
///////////////////////////////////////////////////////////////////////////////
if(isset($_REQUEST['inbound_email_id']) && !empty($_REQUEST['inbound_email_id'])) {
// fake this case like it's already saved.
$focus->save();
require_once('modules/Emails/Email.php');
$email = new Email();
$email->retrieve($_REQUEST['inbound_email_id']);
$email->parent_type = 'EcmTasks';
$email->parent_id = $focus->id;
$email->assigned_user_id = $current_user->id;
$email->status = 'read';
$email->save();
$email->load_relationship('ecmtasks');
$email->ecmtasks->add($focus->id);
header("Location: index.php?&module=Emails&action=EditView&type=out&inbound_email_id=".$_REQUEST['inbound_email_id']."&parent_id=".$email->parent_id."&parent_type=".$email->parent_type.'&start='.$_REQUEST['start'].'&assigned_user_id='.$current_user->id);
exit();
}
//// END INBOUND EMAIL HANDLING
///////////////////////////////////////////////////////////////////////////////
// avoid undefined index
if (!isset($GLOBALS['check_notify'])) {
$GLOBALS['check_notify'] = false;
}
$focus->date_start = $_POST['date_start'];
$focus->date_due = $_POST['date_due'];
$focus->save($GLOBALS['check_notify']);
$return_id = $focus->id;
//<Section1>
//Before
/*
handleRedirect($return_id,'EcmTasks');
*/
//After
if(isset($_REQUEST['save_and_create_work_item']))
header("Location: index.php?module=EcmWorkItems&action=EditView&out_module=EcmTasks&out_id=".$return_id);
else
handleRedirect($return_id,'EcmTasks');
//</Section1>
?>

View File

@@ -0,0 +1,5 @@
<?php
global $app_strings;
var_dump($app_strings);
return;
?>

View File

@@ -0,0 +1,76 @@
<?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['EcmTask'] = array ('column_fields' =>Array("id"
, "date_entered"
, "date_modified"
, "assigned_user_id"
, "assigned_user_id2"
, "modified_user_id"
, "created_by"
, "description"
, "name"
, "status"
, "date_due"
, "time_due"
, "date_start_flag"
, "date_start"
, "time_start"
, "priority"
, "date_due_flag"
, "parent_type"
, "parent_id"
, "contact_id"
),
'list_fields' => Array('id', 'status', 'name', 'parent_type', 'parent_name', 'parent_id', 'date_due', 'contact_id', 'contact_name', 'assigned_user_name', 'assigned_user_id','assigned_user_name2', 'assigned_user_id2','first_name','last_name','time_due', 'priority'
),
'required_fields' => array('name'=>1),
);
?>

View 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>EcmTasks Detail Page</h1>
<p>
<p>View ecmtask details such as status and the related account.</p>
<ul>
<li>To edit ecmtask 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 ecmtask. The system displays the new record in the EcmTasks list.
<li>To delete a ecmtask, click <span class="helpButton">Delete</span>.
<li>To close the ecmtask after changing its status to "Completed", and to create a new ecmtask, click <span class="helpButton">Close and Create New</span>.
<li>To create a note or an attachment related to the ecmtask, click <span class="helpButton">Create Note or Attachment</span>.
</ul>

View File

@@ -0,0 +1,72 @@
<!--
/*********************************************************************************
* 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>EcmTasks</h1>
<p>
Use the EcmTasks page to create a ecmtask for youself or for other users. </p>
<p>
<li>To create a ecmtask, enter the following information:</p>
<ul>
<li><span class="helpButton">Subject</span>. Enter the subject of the ecmtask.
<li><span class="helpButton">Due Date and Time</span>. Optionally, click the Calendar icon and select the completion date for the ecmtask; enter the time in the adjoining box. If there is no specific deadline for the ecmtask, select the None box.
Enter the due date information if you want to add the ecmtask on your calendar to receive a reminder when it is due.
<li><span class="helpButton">Start Date and Time</span>. Optionally, click the Calendar icon and select the start date for the ecmtask; enter the time in the adjoining box.
If there is no specific start date for the ecmtask, select the None box.
<li><span class="helpButton">Priority</span>. From the drop-down list, select a priority that reflects the importance of completing the ecmtask.
<li><span class="helpButton">Assigned to</span>. Click <span class="helpButton">Select</span> to select the individual who is the lead. By default, it is assigned to you.
<li><span class="helpButton">Status</span>. From the drop-down list, select the current status of the ecmtask, such as Not Started, In Progress, and Completed.
<li><span class="helpButton">Account</span>. Enter the name of the related account or click <span class="helpButton">Select</span> to search for one. Instead of an account, you can choose another related record such as an opportunity or contact from the drop-down list.
<li><span class="helpButton">Contact Name</span>. Click <span class="helpButton">Select</span> to select a specific individual who is the contact for the ecmtask. By default, it is assigned to you.
<li><span class="helpButton">Description</span>. Enter a brief description of the ecmtask.
</ul>
<li>Click <span class="helpButton">Save</span> to create the ecmtask; click <span class="helpButton">Cancel</span> to exit the page without creating the ecmtask.
<li>To close the ecmtask and create a copy of it, click <span class="helpButton">Close and Create New</span>. The status of the closed ecmtask changes to Completed; the status of the newly created ecmtask is, by default, set to Not Started.
<li>To view a list of existing ecmtasks on the EcmTasks Home page or to search for a specific ecmtask, click <span class="helpButton">EcmTasks</span> in the Shortcuts section. </li>

View File

@@ -0,0 +1,61 @@
<!--
/*********************************************************************************
* 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>EcmTasks</h1>
<p>
Use the EcmTasks page to create a ecmtask for youself or for other users. </p>
<p>
When you create a ecmtask, you must enter required information such as the subject, priority, status, and the team that is allowed to view the meeting information.</p>
<ul>
<li>To indicate the item record to which the ecmtask 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. To select the record from the Item list, click <span class="helpButton">Select</span>.</li>
<li>By default, the ecmtask is assigned to you. To assign it to a different user, click <span class="helpButton">Select</span> and choose the user from the Users List.</li>
<li>To save the ecmtask information, click <span class="helpButton">Save</span>.</li>
<li>To exit the page without creating the ecmtask, click <span class="helpButton">Cancel</span>.</li>
<li>To view a list of existing ecmtasks on the EcmTasks Home page or to search for a specific ecmtask, click <span class="helpButton">EcmTasks</span> in the Shortcuts section. </li>
<li>The EcmTask List displays information such as the subject, contact, the related item, due date, team and user for each ecmtask. To view the details of a ecmtask, contact, or related item, click the appropriate Subject, Contact, and Related To link. From the detail page, you can edit, duplicate, or delete the information.</li>

View File

@@ -0,0 +1,119 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: Defines the English language pack for the base application.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
$mod_strings = array (
'LBL_MODULE_NAME' => 'EcmTasks',
'LBL_TASK' => 'EcmTasks: ',
'LBL_MODULE_TITLE' => ' EcmTasks: Home',
'LBL_SEARCH_FORM_TITLE' => ' EcmTask Search',
'LBL_LIST_FORM_TITLE' => ' EcmTask List',
'LBL_NEW_FORM_TITLE' => ' Create EcmTask',
'LBL_NEW_FORM_SUBJECT' => 'Subject:',
'LBL_NEW_FORM_DUE_DATE' => 'Due Date:',
'LBL_NEW_FORM_DUE_TIME' => 'Due Time:',
'LBL_NEW_TIME_FORMAT' => '(24:00)',
'LBL_LIST_CLOSE' => 'Close',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_CONTACT' => 'Contact',
'LBL_LIST_PRIORITY' => 'Priority',
'LBL_LIST_RELATED_TO' => 'Related to',
'LBL_LIST_DUE_DATE' => 'Due Date',
'LBL_LIST_DUE_TIME' => 'Due Time',
'LBL_SUBJECT' => 'Subject:',
'LBL_STATUS' => 'Status:',
'LBL_DUE_DATE' => 'Due Date:',
'LBL_DUE_TIME' => 'Due Time:',
'LBL_PRIORITY' => 'Priority:',
'LBL_COLON' => ':',
'LBL_DUE_DATE_AND_TIME' => 'Due Date & Time:',
'LBL_START_DATE_AND_TIME' => 'Start Date & Time:',
'LBL_START_DATE' => 'Start Date:',
'LBL_LIST_START_DATE' => 'Start Date',
'LBL_START_TIME' => 'Start Time:',
'LBL_LIST_START_TIME' => 'Start Time',
'DATE_FORMAT' => '(yyyy-mm-dd)',
'LBL_NONE' => 'None',
'LBL_CONTACT' => 'Contact:',
'LBL_EMAIL_ADDRESS' => 'Email Address:',
'LBL_PHONE' => 'Phone:',
'LBL_EMAIL' => 'Email:',
'LBL_DESCRIPTION_INFORMATION' => 'Description Information',
'LBL_DESCRIPTION' => 'Description:',
'LBL_NAME' => 'Name:',
'LBL_CONTACT_NAME' => 'Contact Name ',
'LBL_LIST_COMPLETE' => 'Complete:',
'LBL_LIST_STATUS' => 'Status',
'LBL_DATE_DUE_FLAG' => 'No Due Date',
'LBL_DATE_START_FLAG' => 'No Start Date',
'ERR_DELETE_RECORD' => 'You must specify a record number to delete the contact.',
'ERR_INVALID_HOUR' => 'Please enter an hour between 0 and 24',
'LBL_DEFAULT_STATUS' => 'Not Started',
'LBL_DEFAULT_PRIORITY' => 'Medium',
'LBL_LIST_MY_TASKS' => 'My Open EcmTasks',
'LNK_NEW_CALL' => 'Schedule Call',
'LNK_NEW_MEETING' => 'Schedule Meeting',
'LNK_NEW_TASK' => 'Create EcmTask',
'LNK_NEW_NOTE' => 'Create Note or Attachment',
'LNK_NEW_EMAIL' => 'Archive Email',
'LNK_CALL_LIST' => 'Calls',
'LNK_MEETING_LIST' => 'Meetings',
'LNK_TASK_LIST' => 'EcmTasks',
'LNK_NOTE_LIST' => 'Notes',
'LNK_EMAIL_LIST' => 'Emails',
'LNK_VIEW_CALENDAR' => 'Today',
'LBL_CONTACT_FIRST_NAME'=>'Contact First Name',
'LBL_CONTACT_LAST_NAME'=>'Contact Last Name',
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
'LBL_ASSIGNED_TO_NAME'=>'Assigned to:',
'LBL_LIST_DATE_MODIFIED' => 'Date Modified',
'LBL_CONTACT_ID' => 'Contact ID:',
'LBL_PARENT_ID' => 'Parent ID:',
'LBL_CONTACT_PHONE' => 'Contact Phone:',
'LBL_PARENT_NAME' => 'Parent Type:',
'LBL_CREATED_BY_NAME' => 'Created by',
);
?>

View File

@@ -0,0 +1,119 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: Defines the English language pack for the base application.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
$mod_strings = array (
'LBL_MODULE_NAME' => 'Aufgaben',
'LBL_TASK' => 'Aufgaben:',
'LBL_MODULE_TITLE' => 'Aufgaben: Home',
'LBL_SEARCH_FORM_TITLE' => 'Aufgaben Suche',
'LBL_LIST_FORM_TITLE' => 'Aufgaben Liste',
'LBL_NEW_FORM_TITLE' => 'Neue Aufgabe',
'LBL_NEW_FORM_SUBJECT' => 'Betreff:',
'LBL_NEW_FORM_DUE_DATE' => 'Fällig am:',
'LBL_NEW_FORM_DUE_TIME' => 'Fällig um:',
'LBL_NEW_TIME_FORMAT' => '(24:00)',
'LBL_LIST_CLOSE' => 'Schließen',
'LBL_LIST_SUBJECT' => 'Betreff',
'LBL_LIST_CONTACT' => 'Kontakt',
'LBL_LIST_PRIORITY' => 'Priorität',
'LBL_LIST_RELATED_TO' => 'Gehört zu',
'LBL_LIST_DUE_DATE' => 'Fällig am',
'LBL_LIST_DUE_TIME' => 'Fällig um:',
'LBL_SUBJECT' => 'Betreff:',
'LBL_STATUS' => 'Status:',
'LBL_DUE_DATE' => 'Fällig am:',
'LBL_DUE_TIME' => 'Fällig um:',
'LBL_PRIORITY' => 'Priorität:',
'LBL_COLON' => ':',
'LBL_DUE_DATE_AND_TIME' => 'Erledigen bis:',
'LBL_START_DATE_AND_TIME' => 'Startdatum und -zeit:',
'LBL_START_DATE' => 'Startdatum:',
'LBL_LIST_START_DATE' => 'Startdatum',
'LBL_START_TIME' => 'Beginn:',
'LBL_LIST_START_TIME' => 'Startzeit',
'DATE_FORMAT' => '(jjjj-mm-tt)',
'LBL_NONE' => 'Kein(e)',
'LBL_CONTACT' => 'Kontakt:',
'LBL_EMAIL_ADDRESS' => 'E-Mail Adresse:',
'LBL_PHONE' => 'Telefon:',
'LBL_EMAIL' => 'E-Mail:',
'LBL_DESCRIPTION_INFORMATION' => 'Beschreibungsinformation',
'LBL_DESCRIPTION' => 'Beschreibung:',
'LBL_NAME' => 'Name:',
'LBL_CONTACT_NAME' => 'Kontakt:',
'LBL_LIST_COMPLETE' => 'Abgeschlossen:',
'LBL_LIST_STATUS' => 'Status',
'LBL_DATE_DUE_FLAG' => 'Kein Fälligkeitsdatum',
'LBL_DATE_START_FLAG' => 'Kein Startdatum',
'ERR_DELETE_RECORD' => 'Die Nummer eines Eintrages muss angegeben werden um einen Kontakt zu löschen!',
'ERR_INVALID_HOUR' => 'Bitte geben Sie eine Stunde zwischen 0 Uhr und 24 Uhr ein',
'LBL_DEFAULT_STATUS' => 'Nicht begonnen',
'LBL_DEFAULT_PRIORITY' => 'Mittel',
'LBL_LIST_MY_TASKS' => 'Meine offenen Aufgaben',
'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',
'LBL_CONTACT_FIRST_NAME'=>'Kontakt Vorname',
'LBL_CONTACT_LAST_NAME'=>'Kontakt Nachname',
'LBL_LIST_ASSIGNED_TO_NAME' => 'Zugew. Benutzer',
'LBL_ASSIGNED_TO_NAME'=>'Zugewiesen an:',
'LBL_LIST_DATE_MODIFIED' => 'Geändert am',
'LBL_CONTACT_ID' => 'Kontakt ID:',
'LBL_PARENT_ID' => 'Eltern ID:',
'LBL_CONTACT_PHONE' => 'Telefon Kontaktperson:',
'LBL_PARENT_NAME' => 'Eltern-Typ:',
'LBL_CREATED_BY_NAME' => 'Created by',
);
?>

View File

@@ -0,0 +1,104 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version
* 1.1.3 ("License"); You may not use this file except in compliance with the
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* All copies of the Covered Code must include on each user interface screen:
* (i) the "Powered by SugarCRM" logo and
* (ii) the SugarCRM copyright notice
* in the same form as they appear in the distribution. See full license for
* requirements.
*
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) 2004-2005 SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* pl_pl.lang.php,v for SugarCRM 4.5.1-->>
* Translator: Krzysztof Morawski
* All Rights Reserved.
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
* Contributor(s): ______________________________________..
********************************************************************************/
$mod_strings = array (
'LBL_MODULE_NAME' => 'Zadania',
'LBL_TASK' => 'Zadania: ',
'LBL_MODULE_TITLE' => ' Zadania: Strona główna',
'LBL_SEARCH_FORM_TITLE' => ' Wyszukaj',
'LBL_LIST_FORM_TITLE' => ' Lista zadań',
'LBL_NEW_FORM_TITLE' => ' Dodaj zadanie',
'LBL_NEW_FORM_SUBJECT' => 'Temat:',
'LBL_NEW_FORM_DUE_DATE' => 'Data zakończenia:',
'LBL_NEW_FORM_DUE_TIME' => 'Data zakończenia',
'LBL_NEW_TIME_FORMAT' => '(24:00)',
'LBL_LIST_CLOSE' => 'Zamknij',
'LBL_LIST_SUBJECT' => 'Temat',
'LBL_LIST_CONTACT' => 'Osoba Kontaktowa',
'LBL_LIST_PRIORITY' => 'Priorytet',
'LBL_LIST_RELATED_TO' => 'Związane z',
'LBL_LIST_DUE_DATE' => 'Data zakończenia',
'LBL_LIST_DUE_TIME' => 'Data zakończenia',
'LBL_SUBJECT' => 'Temat:',
'LBL_STATUS' => 'Status:',
'LBL_DUE_DATE' => 'Data zakończenia:',
'LBL_DUE_TIME' => 'Data zakończenia:',
'LBL_PRIORITY' => 'Priorytet:',
'LBL_COLON' => ':',
'LBL_DUE_DATE_AND_TIME' => 'Data i czas zakończenia:',
'LBL_START_DATE_AND_TIME' => 'Data i czas rozpoczęcia:',
'LBL_START_DATE' => 'Data rozpoczęcia:',
'LBL_LIST_START_DATE' => 'Data Rozpoczęcia',
'LBL_START_TIME' => 'Czas rozpoczęcia:',
'LBL_LIST_START_TIME' => 'Czas Rozpoczęcia',
'DATE_FORMAT' => '(rrrr-mm-dd)',
'LBL_NONE' => 'brak',
'LBL_CONTACT' => 'Osoba kont.:',
'LBL_EMAIL_ADDRESS' => 'Adres email:',
'LBL_PHONE' => 'Tel.:',
'LBL_EMAIL' => 'E-mail:',
'LBL_DESCRIPTION_INFORMATION' => 'Informacje o Zadaniu',
'LBL_DESCRIPTION' => 'Opis:',
'LBL_NAME' => 'Nazwa:',
'LBL_CONTACT_NAME' => 'Osoba Kontaktowa: ',
'LBL_LIST_COMPLETE' => 'Zakończ:',
'LBL_LIST_STATUS' => 'Status:',
'LBL_DATE_DUE_FLAG' => 'Brak terminu zakończenia',
'LBL_LIST_DATE_MODIFIED' => 'Data Modyfikacji',
'LBL_DATE_START_FLAG' => 'Brak daty rozpoczęcia',
'ERR_DELETE_RECORD' => 'Wskaż rekord, który chcesz usunąć.',
'ERR_INVALID_HOUR' => 'Wpisz proszę godzinę pomiędzy 0 a 24',
'LBL_DEFAULT_STATUS' => 'Nie rozpoczęte',
'LBL_DEFAULT_PRIORITY' => 'Średni',
'LBL_LIST_MY_TASKS' => 'Moje rozpoczęte zadania',
'LNK_NEW_CALL' => 'Dodaj Rozmowę tel.',
'LNK_NEW_MEETING' => 'Dodaj Spotkanie',
'LNK_NEW_TASK' => 'Dodaj Zadanie',
'LNK_NEW_NOTE' => 'Dodaj Notatkę',
'LNK_NEW_EMAIL' => 'Dodaj Email',
'LNK_CALL_LIST' => 'Lista Rozmów tel.',
'LNK_MEETING_LIST' => 'Lista Spotkań',
'LNK_TASK_LIST' => 'Lista Zadań',
'LNK_NOTE_LIST' => 'Lista Notatek',
'LNK_EMAIL_LIST' => 'Lista E-maili',
'LNK_VIEW_CALENDAR' => 'Dziś:',
'LBL_CONTACT_FIRST_NAME'=>'Nazwisko Osoby Kontaktowej',
'LBL_CONTACT_LAST_NAME'=>'Imię Osoby Kontaktowej', 'LBL_LIST_ASSIGNED_TO_NAME' => 'Przydzielony Użytkownik',
'LBL_ASSIGNED_TO_NAME'=>'Przydzielone do:',
'LBL_CREATED_BY_NAME' => 'Utworzony przez',
);
?>

View File

@@ -0,0 +1,45 @@
<?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['EcmTasks'] =
array (
'name' => array( 'query_type'=>'default'),
'contact_name' => array( 'query_type'=>'default','db_field'=>array('contacts.first_name','contacts.last_name')),
'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' => 'ecmtask_status_dom', 'template_var' => 'STATUS_FILTER')
);
?>

View File

@@ -0,0 +1,73 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*********************************************************************************/
function additionalDetailsEcmTask($fields) {
static $mod_strings;
global $app_list_strings;
if(empty($mod_strings)) {
global $current_language;
$mod_strings = return_module_language($current_language, 'EcmTasks');
}
$overlib_string = '<div style="overflow:auto; height:100px; max-height:100px;">';
if(!empty($fields['DATE_START'])) $overlib_string .= '<b>'. $mod_strings['LBL_START_DATE_AND_TIME'] . '</b> ' . $fields['DATE_START'] . '<br>';
if(!empty($fields['PRIORITY'])) $overlib_string .= '<b>'. $mod_strings['LBL_PRIORITY'] . '</b> ' . $fields['PRIORITY'] . '<br>';
if(!empty($fields['STATUS'])) $overlib_string .= '<b>'. $mod_strings['LBL_STATUS'] . '</b> ' . $fields['STATUS'] . '<br>';
if(!empty($fields['DESCRIPTION'])) {
$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . $fields['DESCRIPTION'];
if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
}
$overlib_string .= '</div>';
$editLink = "index.php?action=EditView&module=EcmTasks&record={$fields['ID']}";
$viewLink = "index.php?action=DetailView&module=EcmTasks&record={$fields['ID']}";
$return_module = empty($_REQUEST['module']) ? 'EcmTasks' : $_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";
return array('fieldToAddTo' => 'NAME',
'string' => $overlib_string,
'editLink' => $editLink,
'viewLink' => $viewLink);
}
?>

View File

@@ -0,0 +1,141 @@
<?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['EcmTasks']['DetailView'] = array(
'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE',
array('customCode'=>'{if $fields.status.value != "Completed"}' .
' <input type="hidden" name="isSaveAndNew" value="false"> ' .
' <input type="hidden" name="status" value=""> ' .
' <input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" ' .
' accesskey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" ' .
' class="button" ' .
' onclick="this.form.action.value=\'Save\'; this.form.return_module.value=\'EcmTasks\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.isDuplicate.value=true; 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 != "Completed"}' .
' <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=\'Completed\'; this.form.action.value=\'Save\';this.form.return_module.value=\'EcmTasks\';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 (
array (
array (
'name' => 'name',
'label' => 'LBL_SUBJECT',
),
'status',
),
array (
'date_due',
array (
'name' => 'parent_name',
'customLabel' => '{sugar_translate label=\'LBL_MODULE_NAME\' module=$fields.parent_type.value}',
),
),
array (
'date_start',
/*
array (
'name' => 'contact_name',
'label' => 'LBL_CONTACT',
),
*/
),
array (
'priority',
),
array (
array (
'name' => 'assigned_user_name',
'label' => 'LBL_ASSIGNED_TO',
),
array (
'name' => 'assigned_user_name2',
'label' => 'LBL_ASSIGNED_TO',
),
),
array (
array (
'name' => 'created_by_name',
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
'label' => 'LBL_DATE_ENTERED',
),
array (
'name' => 'modified_by_name',
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
'label' => 'LBL_DATE_MODIFIED',
),
),
array (
'description',
),
)
);
?>

View File

@@ -0,0 +1,104 @@
<?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['EcmTasks']['EditView'] = array(
'templateMeta' => array('form' => array('hidden'=>array('<input type="hidden" name="isSaveAndNew" value="false">'),
'buttons' =>array('SAVE', 'CANCEL',
array('customCode'=>'{if $fields.status.value != "Completed"}' .
'<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" ' .
'accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" ' .
'class="button" ' .
'onclick="document.getElementById(\'status\').value=\'Completed\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'EcmTasks\'; 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\');" ' .
'type="submit" name="button" ' .
'value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}')),
),
'maxColumns' => '2',
'widths' => array(
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30')
),
),
'panels' =>array (
'default' =>
array (
array (
array('name'=>'name', 'displayParams'=>array('required'=>true)),
array('name'=>'status', 'displayParams'=>array('required'=>true)),
),
array (
array('name'=>'date_due',
'type'=>'datetimecombo',
'displayParams'=>array('showNoneCheckbox'=>true, 'showFormats'=>true)
),
'parent_name',
),
array (
array('name'=>'date_start',
'type'=>'datetimecombo',
'displayParams'=>array('showNoneCheckbox'=>true, 'showFormats'=>true)
),
// 'contact_name',
),
array (
array('name'=>'priority', 'displayParams'=>array('required'=>true)),
),
array (
'assigned_user_name',
'assigned_user_name2',
// array('CustomCode' => '<td valign="top" width="37.5%"><input type="text" name="assigned_user_name" class="sqsEnabled yui-ac-input" tabindex="106" id="assigned_user_name" size="" value="Dominik Brzóska" title="" autocomplete="off"><div id="EditView_assigned_user_name_results" class="yui-ac-container"><div class="yui-ac-content" style="display: none;"><div class="yui-ac-hd" style="display: none;"></div><div class="yui-ac-bd"><ul><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li></ul></div><div class="yui-ac-ft" style="display: none;"></div></div></div><input type="hidden" name="assigned_user_id" id="assigned_user_id" value="2e72f487-d92b-954e-f50c-528b10ce81c9"><span class="id-ff multiple"><button type="button" name="btn_assigned_user_name" id="btn_assigned_user_name" tabindex="106" title="Wybierz [Alt+T]" accesskey="T" class="button firstChild" value="Wybierz" onclick="open_popup(" .&quot;Users&quot;,600,400,&quot;&quot;,true,false,{&quot;call_back_function&quot;:&quot;set_return&quot;,&quot;form_name&quot;:&quot;EditView&quot;,&quot;field_to_name_array&quot;:{&quot;id&quot;:&quot;assigned_user_id&quot;,&quot;user_name&quot;:&quot;assigned_user_name&quot;}},&quot;single&quot;,true);"><img src="themes/default/images/id-ff-select.png?s=bed8cd35065048ceebdc639ebe305e2c&amp;c=1"></button><button type="button" name="btn_clr_assigned_user_name" id="btn_clr_assigned_user_name" tabindex="106" title="Wyczyść[Alt+C]" accesskey="C" class="button lastChild" onclick="this.form.assigned_user_name.value = ""; this.form.assigned_user_id.value = "";" value="Wyczyść"><img src="themes/default/images/id-ff-clear.png?s=bed8cd35065048ceebdc639ebe305e2c&amp;c=1"></button></span><script type="text/javascript"><!--if(typeof QSProcessedFieldsArray != "undefined")QSProcessedFieldsArray["EditView_assigned_user_name"] = false;enableQS(false);--></script></td>')
),
array (
array('name'=>'description', 'displayParams'=>array('rows'=>8, 'cols'=>60)),
),
),
)
);
?>

View File

@@ -0,0 +1,114 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
$listViewDefs['EcmTasks'] = array(
'SET_COMPLETE' => array(
'width' => '1',
'label' => 'LBL_LIST_CLOSE',
'link' => true,
'sortable' => false,
'default' => true,
'related_fields' => array('status')),
'NAME' => array(
'width' => '30',
'label' => 'LBL_LIST_SUBJECT',
'link' => true,
'default' => true),
'CONTACT_NAME' => array(
'width' => '15',
'label' => 'LBL_LIST_CONTACT',
'link' => true,
'id' => 'CONTACT_ID',
'module' => 'Contacts',
'default' => true,
'ACLTag' => 'CONTACT',
'related_fields' => array('contact_id')),
'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_DUE' => array(
'width' => '15',
'label' => 'LBL_LIST_DUE_DATE',
'link' => false,
'default' => true),
'TIME_DUE' => array(
'width' => '5',
'label' => 'LBL_LIST_DUE_TIME',
'sortable' => false,
'link' => false,
'default' => true),
'STATUS' => array(
'width' => '10',
'label' => 'LBL_LIST_STATUS',
'link' => false,
'default' => true),
'PRIORITY' => array(
'width' => '10',
'label' => 'LBL_LIST_PRIORITY',
'link' => false,
'default' => true),
'ASSIGNED_USER_NAME' => array(
'width' => '2',
'label' => 'LBL_LIST_ASSIGNED_TO_NAME',
'default' => true),
'CREATED_BY_NAME' => array (
'name' => 'created_by_name',
'label' => 'LBL_CREATED_BY_NAME',
'default' => true,
),
'DATE_START' => array(
'width' => '5',
'label' => 'LBL_LIST_START_DATE',
'link' => false,
'default' => false),
);
?>

View File

@@ -0,0 +1,61 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
$searchdefs['EcmTasks'] = 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))
'options' => 'ecmtask_users_dom'
),
array('name' => 'assigned_user_id2', 'type' => 'enum', 'label' => 'Przydzielone do dwa', //'function' => array('name' => 'get_user_array', 'params' => array(false))
'options' => 'ecmtask_users_dom'
),
'status',
),
),
);
?>

View File

@@ -0,0 +1,74 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 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['EcmTasks']['SideQuickCreate'] = array(
'templateMeta' => array('form'=>array('buttons'=>array('SAVE'),
'headerTpl'=>'include/EditView/header.tpl',
'footerTpl'=>'include/EditView/footer.tpl',
'button_location'=>'bottom',
),
'maxColumns' => '1',
'panelClass'=>'none',
'labelsOnTop'=>true,
'widths' => array(
array('label' => '10', 'field' => '30'),
),
),
'panels' =>array (
'DEFAULT' =>
array (
array (
array('name'=>'name', 'displayParams'=>array('required'=>true, 'size'=>20)),
),
array (
array('name'=>'date_due'),
),
array (
array('name'=>'priority','displayParams'=>array('required'=>true)),
),
array (
array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)),
),
),
)
);
?>

View File

@@ -0,0 +1,65 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 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']['EcmTasks'] = array(
'LBL_DETAILVIEW'=>array(
'template'=>'xtpl',
'template_file'=>'modules/EcmTasks/DetailView.html',
'php_file'=>'modules/EcmTasks/DetailView.php',
'type'=>'DetailView',
),
'LBL_EDITVIEW'=>array(
'template'=>'xtpl',
'template_file'=>'modules/EcmTasks/EditView.html',
'php_file'=>'modules/EcmTasks/EditView.php',
'type'=>'EditView',
),
'LBL_LISTVIEW'=>array(
'template'=>'listview',
'meta_file'=>'modules/EcmTasks/listviewdefs.php',
'type'=>'ListView',
),
'LBL_SEARCHFORM'=>array(
'template'=>'xtpl',
'template_file'=>'modules/EcmTasks/SearchForm.html',
'php_file'=>'modules/EcmTasks/ListView.php',
'type'=>'SearchForm',
),
);

View File

@@ -0,0 +1,106 @@
<?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' => "(ecmtasks.status='planned')",
'list_fields' => array(
'AD2' => 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%',
),
'date_due'=>array(
'vname' => 'LBL_LIST_DUE_DATE',
'width' => '10%',
'alias' => 'date_start',
'sort_by' => 'date_start',
),
'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_due'=>array(
'usage'=>'query_only',
'alias' => 'time_start'
) ,
),
);
?>

View File

@@ -0,0 +1,109 @@
<?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' => "",
'list_fields' => array(
'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%',
),
'contact_name'=>array(
'widget_class' => 'SubPanelDetailViewLink',
'target_record_key' => 'contact_id',
'target_module' => 'Contacts',
'module' => 'Contacts',
'vname' => 'LBL_LIST_CONTACT',
'width' => '11%',
),
'parent_name'=>array(
'vname' => 'LBL_LIST_RELATED_TO',
'width' => '22%',
'target_record_key' => 'parent_id',
'target_module_key'=>'parent_type',
'widget_class' => 'SubPanelDetailViewLink',
'sortable'=>false,
),
'date_modified'=>array(
'vname' => 'LBL_LIST_DATE_MODIFIED',
'width' => '10%',
),
'edit_button'=>array(
'vname' => 'LBL_EDIT_BUTTON',
'widget_class' => 'SubPanelEditButton',
'width' => '2%',
),
'remove_button'=>array(
'vname' => 'LBL_REMOVE',
'widget_class' => 'SubPanelRemoveButton',
'width' => '2%',
),
'parent_id'=>array(
'usage'=>'query_only',
),
'parent_type'=>array(
'usage'=>'query_only',
),
'filename'=>array(
'usage'=>'query_only',
'force_exists'=>true
),
),
);
?>

View File

@@ -0,0 +1,106 @@
<?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' => "(ecmtasks.status='made' OR ecmtasks.status='canceled')",
'list_fields' => array(
'AD' => array (
'widget_class' => 'SubPanelAdditionalDetailsLink',
'vname' => '&nbsp;',
'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%',
),
'contact_name'=>array(
'widget_class' => 'SubPanelDetailViewLink',
'target_record_key' => 'contact_id',
'target_module' => 'Contacts',
'module' => 'Contacts',
'vname' => 'LBL_LIST_CONTACT',
'width' => '11%',
),
'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
),
),
);
?>

View File

@@ -0,0 +1,116 @@
<?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.
'top_buttons' => array(
array (
'widget_class'=>'SubPanelTopCreateButton',
),
array (
'widget_class'=>'SubPanelTopSelectButton', 'popup_module' => 'EcmTasks'
),
),
'list_fields' => array(
'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%',
),
'contact_name'=>array(
'widget_class' => 'SubPanelDetailViewLink',
'target_record_key' => 'contact_id',
'target_module' => 'Contacts',
'module' => 'Contacts',
'vname' => 'LBL_LIST_CONTACT',
'width' => '11%',
),
'parent_name'=>array(
'vname' => 'LBL_LIST_RELATED_TO',
'width' => '22%',
'target_record_key' => 'parent_id',
'target_module_key'=>'parent_type',
'widget_class' => 'SubPanelDetailViewLink',
'sortable'=>false,
),
'date_modified'=>array(
'vname' => 'LBL_LIST_DATE_MODIFIED',
'width' => '10%',
),
'edit_button'=>array(
'vname' => 'LBL_EDIT_BUTTON',
'widget_class' => 'SubPanelEditButton',
'width' => '2%',
),
'remove_button'=>array(
'vname' => 'LBL_REMOVE',
'widget_class' => 'SubPanelRemoveButton',
'width' => '2%',
),
'parent_id'=>array(
'usage'=>'query_only',
),
'parent_type'=>array(
'usage'=>'query_only',
),
'filename'=>array(
'usage'=>'query_only',
'force_exists'=>true
),
),
);
?>

View File

@@ -0,0 +1,207 @@
{*
/**
* 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="ecmtasksQuickCreate" id="ecmtasksQuickCreate" method="POST" action="index.php">
<input type="hidden" name="module" value="EcmTasks">
<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="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 id='assigned_user_id' name='assigned_user_id' type="hidden" value="{$ASSIGNED_USER_ID}" />
<input type="hidden" name="to_pdf" value='1'>
<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('EcmTasksQuickCreate');\""} 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='EcmTasks';" 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" rowspan="2"><slot>{$MOD.LBL_SUBJECT} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
<td rowspan="2"><slot><textarea name='name' cols="50" tabindex='1' rows="1">{$NAME}</textarea></slot></td>
<td class="dataLabel" width="15%"><slot>{$MOD.LBL_PRIORITY} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
<td class="dataField" nowrap width="35%"><slot><select tabindex='2' name='priority'>{$PRIORITY_OPTIONS}</select></slot></td>
</tr>
<tr>
<td class="dataLabel" width="15%"><slot>{$MOD.LBL_STATUS} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
<td width="35%"><slot><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_DUE_DATE_AND_TIME}</slot></td>
<td class="dataField" nowrap="nowrap"><slot>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td nowrap="nowrap"><input name='date_due' id='jscal_field' onblur="parseDate(this, '{$USER_DATEFORMAT}');" tabindex='2' maxlength='10' size='11' {$READONLY} type="text" value="{$DATE_DUE}">
<img src="themes/default/images/jscalendar.gif" alt="{$APP.LBL_ENTER_DATE}" id="jscal_trigger" align="absmiddle">&nbsp;</td>
<td nowrap="nowrap"><input name='time_due' size='5' maxlength='5' tabindex='2' {$READONLY} type="text" value='{$TIME_DUE}'>{$DUE_TIME_MERIDIEM} </td>
{if $TIME_MERIDIEM}
<td><select name='due_meridiem' tabindex="2">{$TIME_MERIDIEM}</select></td>
{/if}
<td nowrap="nowrap">&nbsp;<input name='date_due_flag'class="checkbox" type='checkbox' tabindex="1" onClick="set_date_due_values(this.form);">&nbsp;{$MOD.LBL_NONE}</td>
</tr>
<tr>
<td nowrap="nowrap"><span class="dateFormat">{$USER_DATEFORMAT}</span></td>
<td nowrap="nowrap"><span class="dateFormat">{$TIME_FORMAT}</span></td>
</tr>
</table></slot>
</td>
</tr>
<tr>
<td class="dataLabel"><slot>{$MOD.LBL_START_DATE_AND_TIME}</slot></td>
<td class="dataField" nowrap="nowrap"><slot>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td nowrap="nowrap"><input name='date_start' id='date_start' onblur="parseDate(this, '{$CALENDAR_DATEFORMAT}');" tabindex='2' maxlength='10' size='11' {$READONLY} type="text" value="{$DATE_START}"> <img src="themes/default/images/jscalendar.gif" alt="{$APP.LBL_ENTER_DATE}" id="date_start_trigger" align="absmiddle">&nbsp;</td>
<td nowrap="nowrap"><input name='time_start' size='5' maxlength='5' tabindex='2' {$READONLY} type="text" value='{$TIME_START}'>{$START_TIME_MERIDIEM} </td>
{if $TIME_MERIDIEM}
<td><select name='start_meridiem' tabindex="2">{$TIME_MERIDIEM}</select></td>
{/if}
<td nowrap="nowrap">&nbsp;<input name='date_start_flag' class="checkbox" type='checkbox' tabindex="1" onClick="set_date_start_values(this.form);">&nbsp;{$MOD.LBL_NONE}</td>
</tr>
<tr>
<td nowrap="nowrap"><span class="dateFormat">{$USER_DATEFORMAT}</span></td>
<td nowrap="nowrap"><span class="dateFormat">{$TIME_FORMAT}</span></td>
</tr>
</table></slot>
</td>
</tr>
</table>
</form>
<script type="text/javascript">
{literal}
Calendar.setup ({
inputField : "jscal_field", daFormat : "{/literal}{$CALENDAR_FORMAT}{literal}", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1
});
Calendar.setup ({
inputField : "date_start", daFormat : "{/literal}{$CALENDAR_FORMAT}{literal}", showsTime : false, button : "date_start_trigger", singleClick : true, step : 1
});
{/literal}
{$additionalScripts}
</script>
<script type="text/javascript">
{literal}
function set_date_due_values(form) {
if (form.date_due_flag.checked) {
form.date_due_flag.value='on';
form.date_due.value="";
form.time_due.value="";
form.date_due.readOnly=true;
form.time_due.readOnly=true;
if(typeof(form.due_meridiem) != 'undefined') form.due_meridiem.disabled=true;
document.images.jscal_trigger.width = 18;
document.images.jscal_trigger.height = 18;
}
else {
form.date_due_flag.value='off';
form.date_due.readOnly=false;
form.time_due.readOnly=false;
if(typeof(form.due_meridiem) != 'undefined') form.due_meridiem.disabled=false;
document.images.jscal_trigger.width = 18;
document.images.jscal_trigger.height = 18;
}
}
function set_date_start_values(form) {
if (form.date_start_flag.checked) {
form.date_start_flag.value='on';
form.date_start.value="";
form.time_start.value="";
form.date_start.readOnly=true;
form.time_start.readOnly=true;
if(typeof(form.start_meridiem) != 'undefined') form.start_meridiem.disabled=true;
document.images.date_start_trigger.width = 18;
document.images.date_start_trigger.height = 18;
}
else {
form.date_start_flag.value='off';
form.date_start.readOnly=false;
form.time_start.readOnly=false;
if(typeof(form.start_meridiem) != 'undefined') form.start_meridiem.disabled=false;
document.images.date_start_trigger.width = 18;
document.images.date_start_trigger.height = 18;
}
}
{/literal}
set_date_due_values(document.ecmtasksQuickCreate);
set_date_start_values(document.ecmtasksQuickCreate);
</script>

View File

@@ -0,0 +1,364 @@
<?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 ['EcmTask'] = array (
'table' => 'ecmtasks',
'fields' => array (
'name' => array (
'name' => 'name',
'vname' => 'LBL_SUBJECT',
'dbType' => 'varchar',
'type' => 'name',
'len' => '50',
'importable' => 'required',
'required' => true
),
'google_calendar_ecmtask' => array (
'name' => 'google_calendar_ecmtask',
'type' => 'varchar',
'len' => '255'
),
'status' => array (
'name' => 'status',
'vname' => 'LBL_STATUS',
'type' => 'enum',
'options' => 'activity_status_dom',
'len' => 25
),
'date_due_flag' => array (
'name' => 'date_due_flag',
'vname' => 'LBL_DATE_DUE_FLAG',
'type' => 'bool',
'default' => 1,
'group' => 'date_due'
),
'date_due' => array (
'name' => 'date_due',
'vname' => 'LBL_DUE_DATE',
'type' => 'datetime',
'group' => 'date_due'
),
'time_due' => array (
'name' => 'time_due',
'vname' => 'LBL_DUE_TIME',
'type' => 'datetime',
// 'db_concat_fields'=> array(0=>'date_due'),
'source' => 'non-db',
'importable' => 'false',
'massupdate' => false
),
'date_due_field' => array (
'name' => 'date_due_field',
'group' => 'date_due',
'vname' => 'LBL_DUE_DATE_AND_TIME',
'type' => 'datetimecombo',
'date' => 'date_due',
'time' => 'time_due',
'date_readonly' => 'date_due_readonly',
'time_readonly' => 'time_due_readonly',
'noneCheckbox' => true,
'noneCheckboxJavascript' => 'onClick="set_date_due_values(this.form);"',
'checkboxId' => 'date_due_flag',
'checked' => 'date_due_checked',
'meridian' => 'date_due_meridian',
'showFormats' => true,
'source' => 'non-db',
'comment' => 'Used for meta-data framework',
'importable' => 'false'
),
'date_start_flag' => array (
'name' => 'date_start_flag',
'vname' => 'LBL_DATE_START_FLAG',
'type' => 'bool',
'group' => 'date_start',
'default' => 1
),
'date_start' => array (
'name' => 'date_start',
'vname' => 'LBL_START_DATE',
'type' => 'datetime',
'group' => 'date_start'
),
'date_start_field' => array (
'group' => 'date_start',
'name' => 'date_start_field',
'vname' => 'LBL_DUE_DATE_AND_TIME',
'type' => 'datetimecombo',
'date' => 'date_start',
'time' => 'time_start',
'date_readonly' => 'date_start_readonly',
'time_readonly' => 'time_start_readonly',
'noneCheckbox' => true,
'noneCheckboxJavascript' => 'onClick="set_date_start_values(this.form);"',
'checkboxId' => 'date_start_flag',
'checked' => 'date_start_checked',
'meridian' => 'date_start_meridian',
'showFormats' => true,
'source' => 'non-db',
'comment' => 'Used for meta-data framework'
),
'parent_type' => array (
'name' => 'parent_type',
'vname' => 'LBL_PARENT_NAME',
'type' => 'varchar',
'group' => 'parent_name',
'required' => false,
'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'
),
'parent_id' => array (
'name' => 'parent_id',
'type' => 'id',
'group' => 'parent_name',
'reportable' => false,
'vname' => 'LBL_PARENT_ID'
),
'contact_id' => array (
'name' => 'contact_id',
'type' => 'id',
'group' => 'contact_name',
'reportable' => false,
'vname' => 'LBL_CONTACT_ID'
),
'contact_name' => array (
'name' => 'contact_name',
'rname' => 'last_name',
'db_concat_fields' => array (
0 => 'first_name',
1 => 'last_name'
),
'source' => 'non-db',
'len' => '510',
'group' => 'contact_name',
'vname' => 'LBL_CONTACT_NAME',
'reportable' => false,
'id_name' => 'contact_id',
'join_name' => 'contacts',
'type' => 'relate',
'module' => 'Contacts',
'link' => 'contacts',
'table' => 'contacts'
),
'assigned_user_id2' => array (
'name' => 'assigned_user_id2',
'type' => 'id',
'group' => 'assigned_user_id2',
'reportable' => false,
'vname' => 'LBL_ASSIGNED_USER_ID'
),
'assigned_user_name2' => array (
'name' => 'assigned_user_name2',
'rname' => 'full_name',
'db_concat_fields' => array (
0 => 'first_name',
1 => 'last_name'
),
'source' => 'non-db',
'len' => '510',
'group' => 'assigned_user_name2',
'vname' => 'LBL_CONTACT_NAME',
'reportable' => false,
'id_name' => 'assigned_user_id2',
'join_name' => 'users',
'type' => 'relate',
'module' => 'Users',
'link' => 'users',
'table' => 'users'
),
'contact_phone' => array (
'name' => 'contact_phone',
'type' => 'phone',
'source' => 'non-db',
'vname' => 'LBL_CONTACT_PHONE'
),
'contact_email' => array (
'name' => 'contact_email',
'type' => 'varchar',
'vname' => 'LBL_EMAIL_ADDRESS',
'source' => 'non-db'
),
'priority' => array (
'name' => 'priority',
'vname' => 'LBL_PRIORITY',
'type' => 'enum',
'options' => 'ecmtask_priority_dom',
'len' => 25
),
'contacts' => array (
'name' => 'contacts',
'type' => 'link',
'relationship' => 'contact_ecmtasks',
'source' => 'non-db',
'side' => 'right',
'vname' => 'LBL_CONTACT'
),
'accounts' => array (
'name' => 'accounts',
'type' => 'link',
'relationship' => 'account_ecmtasks',
'source' => 'non-db',
'vname' => 'LBL_ACCOUNT'
),
'opportunities' => array (
'name' => 'opportunities',
'type' => 'link',
'relationship' => 'opportunity_ecmtasks',
'source' => 'non-db',
'vname' => 'LBL_TASKS'
)
),
'relationships' => array (
'ecmtasks_assigned_user' => array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'EcmTasks',
'rhs_table' => 'ecmtasks',
'rhs_key' => 'assigned_user_id',
'relationship_type' => 'one-to-many'
),
'ecmtasks_assigned_user2' => array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'EcmTasks',
'rhs_table' => 'ecmtasks',
'rhs_key' => 'assigned_user_id',
'relationship_type' => 'one-to-many'
),
'ecmtasks_modified_user' => array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'EcmTasks',
'rhs_table' => 'ecmtasks',
'rhs_key' => 'modified_user_id',
'relationship_type' => 'one-to-many'
),
'ecmtasks_created_by' => array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'EcmTasks',
'rhs_table' => 'ecmtasks',
'rhs_key' => 'created_by',
'relationship_type' => 'one-to-many'
)
)
,
'indices' => array (
array (
'name' => 'idx_tsk_name',
'type' => 'index',
'fields' => array (
'name'
)
),
array (
'name' => 'idx_ecmtask_con_del',
'type' => 'index',
'fields' => array (
'contact_id',
'deleted'
)
),
array (
'name' => 'idx_ecmtask_par_del',
'type' => 'index',
'fields' => array (
'parent_id',
'parent_type',
'deleted'
)
),
array (
'name' => 'idx_ecmtask_assigned',
'type' => 'index',
'fields' => array (
'assigned_user_id'
)
),
array (
'name' => 'idx_ecmtask_assigned',
'type' => 'index',
'fields' => array (
'assigned_user_id2'
)
)
)
,
// This enables optimistic locking for Saves From EditView
'optimistic_locking' => true
);
VardefManager::createVardef ( 'EcmTasks', 'EcmTask', array (
'default',
'assignable'
)
);
?>

View File

@@ -0,0 +1,78 @@
<?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 EcmTasks 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 EcmTasksViewEdit extends ViewEdit {
function EcmTasksViewEdit(){
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'] != 'EcmTasks' && 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() {
if($this->ev->isDuplicate){
$this->bean->status = $GLOBALS['mod_strings']['LBL_DEFAULT_STATUS'];
} //if
parent::display();
}
}
?>