init
This commit is contained in:
95
modules/Tasks.cp/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php
Executable file
95
modules/Tasks.cp/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $current_user;
|
||||
|
||||
$dashletData['MyTasksDashlet']['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['MyTasksDashlet']['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'),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
47
modules/Tasks.cp/Dashlets/MyTasksDashlet/MyTasksDashlet.meta.php
Executable file
47
modules/Tasks.cp/Dashlets/MyTasksDashlet/MyTasksDashlet.meta.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['MyTasksDashlet'] = array('module' => 'Tasks',
|
||||
'title' => translate('LBL_LIST_MY_TASKS', 'Tasks'),
|
||||
'description' => 'A customizable view into Tasks',
|
||||
'category' => 'Module Views',
|
||||
'hidden' => true);
|
||||
?>
|
||||
60
modules/Tasks.cp/Dashlets/MyTasksDashlet/MyTasksDashlet.php
Executable file
60
modules/Tasks.cp/Dashlets/MyTasksDashlet/MyTasksDashlet.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/Dashlets/DashletGeneric.php');
|
||||
require_once('modules/Tasks/Task.php');
|
||||
|
||||
class MyTasksDashlet extends DashletGeneric {
|
||||
function MyTasksDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings;
|
||||
require('modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_LIST_MY_TASKS', 'Tasks');
|
||||
|
||||
$this->searchFields = $dashletData['MyTasksDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['MyTasksDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new Task();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
120
modules/Tasks.cp/EditView.php
Executable file
120
modules/Tasks.cp/EditView.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings, $current_user, $app_list_strings;
|
||||
|
||||
require_once('modules/Tasks/Task.php');
|
||||
require_once('modules/Tasks/Forms.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
$json = getJSONobj();
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/Tasks/views/EditView/view.edit.tasks.php');
|
||||
|
||||
$focus = new Task();
|
||||
|
||||
echo $focus->id;
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
$edit = new ViewEditTasks();
|
||||
$edit->ss = new Sugar_Smarty();
|
||||
$edit->module = 'Tasks';
|
||||
$edit->bean = $focus;
|
||||
//$edit->tplFile = 'include/ECM/EcmViews/EditView/Tabs/EditView.tpl';
|
||||
$edit->tplFile = 'include/EditView/EditView.tpl';
|
||||
|
||||
$focus = new Task();
|
||||
|
||||
//custom subpanel create button
|
||||
if ((isset($_REQUEST['first_parent_id'])) && (isset($_REQUEST['first_parent_type']))) {
|
||||
|
||||
switch ($_REQUEST['first_parent_type']) {
|
||||
case 'Accounts': {};
|
||||
case 'EcmProducts': $fields=' name ';
|
||||
break;
|
||||
case 'Contacts': $fields = ' first_name, last_name ';
|
||||
break;
|
||||
case 'EcmQuotes': $fields = ' document_no, name ';
|
||||
break;
|
||||
}
|
||||
|
||||
$q="SELECT ".$fields." FROM ".strtolower($_REQUEST['first_parent_type'])." WHERE id='".$_REQUEST['first_parent_id']."'";
|
||||
|
||||
$res = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query($q));
|
||||
|
||||
switch ($_REQUEST['first_parent_type']) {
|
||||
case 'Accounts': {};
|
||||
case 'EcmProducts': $name=$res['name'];
|
||||
break;
|
||||
case 'Contacts': $name=$res['first_name'].' '.$res['last_name'];
|
||||
break;
|
||||
case 'EcmQuotes': if ($res['name']!='')
|
||||
$name = $res['name']; else $name=$res['document_no'];
|
||||
break;
|
||||
}
|
||||
|
||||
$focus->first_parent_type=$_REQUEST['first_parent_type'];
|
||||
$focus->first_parent_name=$name;
|
||||
$focus->first_parent_id=$_REQUEST['first_parent_id'];
|
||||
|
||||
$edit->ss->assign("FIRST_PARENT_ID", $focus->first_parent_id);
|
||||
$edit->ss->assign("FIRST_PARENT_NAME", $focus->first_parent_name);
|
||||
}
|
||||
//end custom subpanel create
|
||||
if(isset($_REQUEST['record'])) {
|
||||
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
$edit->ss->assign("FIRST_PARENT_ID", $focus->first_parent_id);
|
||||
$edit->ss->assign("FIRST_PARENT_NAME", $focus->first_parent_name);
|
||||
$edit->ss->assign("SECOND_PARENT_ID", $focus->second_parent_id);
|
||||
$edit->ss->assign("SECOND_PARENT_NAME", $focus->second_parent_name);
|
||||
$edit->ss->assign("THIRD_PARENT_ID", $focus->third_parent_id);
|
||||
$edit->ss->assign("THIRD_PARENT_NAME", $focus->third_parent_name);
|
||||
|
||||
echo '<script language="javascript">
|
||||
var NEW_TASK = 0;
|
||||
</script>';
|
||||
|
||||
} else {
|
||||
echo '<script language="javascript">
|
||||
var NEW_TASK = 1;
|
||||
</script>';
|
||||
}
|
||||
//fields for first, second and thirs parent
|
||||
//add mz 2012-05-14
|
||||
$pto = ''; //second parent type options
|
||||
foreach ($app_list_strings['parent_type_display'] as $k=>$v){
|
||||
$pto.='<option value="'.$k.'"';
|
||||
if ($k==$focus->first_parent_type) $pto.=' selected';
|
||||
$pto.='>'.$v.'</option>';
|
||||
}
|
||||
$edit->ss->assign("FIRST_PARENT_TYPE_OPTIONS",$pto);
|
||||
|
||||
$pto = ''; //second parent type options
|
||||
foreach ($app_list_strings['parent_type_display'] as $k=>$v){
|
||||
$pto.='<option value="'.$k.'"';
|
||||
if ($k==$focus->second_parent_type) $pto.=' selected';
|
||||
$pto.='>'.$v.'</option>';
|
||||
}
|
||||
$edit->ss->assign("SECOND_PARENT_TYPE_OPTIONS",$pto);
|
||||
|
||||
$pto = ''; //third parent type options
|
||||
foreach ($app_list_strings['parent_type_display'] as $k=>$v){
|
||||
$pto.='<option value="'.$k.'"';
|
||||
if ($k==$focus->third_parent_type) $pto.=' selected';
|
||||
$pto.='>'.$v.'</option>';
|
||||
}
|
||||
$edit->ss->assign("THIRD_PARENT_TYPE_OPTIONS",$pto);
|
||||
|
||||
$edit->preDisplay();
|
||||
|
||||
|
||||
echo $edit->display();
|
||||
//echo '<div id="subpanels">';
|
||||
//require_once('subpanels.php');
|
||||
//echo '</div>';
|
||||
?>
|
||||
37
modules/Tasks.cp/Forms.php
Normal file
37
modules/Tasks.cp/Forms.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('include/EditView/SideQuickCreate.php');
|
||||
72
modules/Tasks.cp/Menu.php
Executable file
72
modules/Tasks.cp/Menu.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
//2008-10-08, Dawid Karlowicz, Section1
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
//<Section1>
|
||||
//Before
|
||||
/*
|
||||
if(ACLController::checkAccess('Calls', 'edit', true))$module_menu[]=Array("index.php?module=Calls&action=EditView&return_module=Calls&return_action=DetailView", $mod_strings['LNK_NEW_CALL'],"CreateCalls");
|
||||
if(ACLController::checkAccess('Meetings', 'edit', true))$module_menu[]=Array("index.php?module=Meetings&action=EditView&return_module=Meetings&return_action=DetailView", $mod_strings['LNK_NEW_MEETING'],"CreateMeetings");
|
||||
if(ACLController::checkAccess('Tasks', 'edit', true))$module_menu[]=Array("index.php?module=Tasks&action=EditView&return_module=Tasks&return_action=DetailView", $mod_strings['LNK_NEW_TASK'],"CreateTasks");
|
||||
if(ACLController::checkAccess('Notes', 'edit', true))$module_menu[]=Array("index.php?module=Notes&action=EditView&return_module=Notes&return_action=DetailView", $mod_strings['LNK_NEW_NOTE'],"CreateNotes");
|
||||
if(ACLController::checkAccess('Emails', 'edit', true))$module_menu[]=Array("index.php?module=Emails&action=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('Tasks', 'list', true))$module_menu[]=Array("index.php?module=Tasks&action=index&return_module=Tasks&return_action=DetailView", $mod_strings['LNK_TASK_LIST'],"Tasks");
|
||||
if(ACLController::checkAccess('Notes', 'list', true))$module_menu[]=Array("index.php?module=Notes&action=index&return_module=Notes&return_action=DetailView", $mod_strings['LNK_NOTE_LIST'],"Notes");
|
||||
if(ACLController::checkAccess('Emails', 'list', true))$module_menu[]=Array("index.php?module=Emails&action=index&return_module=Emails&return_action=DetailView", $mod_strings['LNK_EMAIL_LIST'],"Emails");
|
||||
if(ACLController::checkAccess('Calendar', 'list', true))$module_menu[]=Array("index.php?module=Calendar&action=index&view=day", $mod_strings['LNK_VIEW_CALENDAR'],"Calendar");
|
||||
if(ACLController::checkAccess('Tasks','list', true)) $module_menu[] = Array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
|
||||
*/
|
||||
//After
|
||||
if(ACLController::checkAccess('Tasks', 'edit', true))$module_menu[]=Array("index.php?module=Tasks&action=EditView&return_module=Tasks&return_action=DetailView", $mod_strings['LNK_NEW_TASK'],"CreateTasks");
|
||||
if(ACLController::checkAccess('Tasks', 'list', true))$module_menu[]=Array("index.php?module=Tasks&action=index&return_module=Tasks&return_action=DetailView", $mod_strings['LNK_TASK_LIST'],"Tasks");
|
||||
if(ACLController::checkAccess('Tasks','list', true)) $module_menu[] = Array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
|
||||
//</Section1>
|
||||
|
||||
?>
|
||||
64
modules/Tasks.cp/MyTasks.html
Executable file
64
modules/Tasks.cp/MyTasks.html
Executable 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=Tasks&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 -->
|
||||
88
modules/Tasks.cp/MyTasks.php
Executable file
88
modules/Tasks.cp/MyTasks.php
Executable file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('XTemplate/xtpl.php');
|
||||
|
||||
require_once('modules/Tasks/Task.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, 'Tasks');
|
||||
|
||||
$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();
|
||||
$seedTasks = new Task();
|
||||
if ($seedTasks->db->dbType=='mysql') {
|
||||
$format=array("'%Y-%m-%d'");
|
||||
$where = "tasks.assigned_user_id='". $current_user->id ."' and (tasks.status is NULL or (tasks.status!='Completed' and tasks.status!='Deferred')) ";
|
||||
$where .= "and (tasks.date_start is NULL or ";
|
||||
$where .= " CONCAT(".db_convert("tasks.date_start","date_format",$format).", CONCAT(' ',". db_convert("tasks.time_start","time_format",$format)." )) <=". "'".$tomorrow."')";
|
||||
}
|
||||
else if ($seedTasks->db->dbType=='mssql')
|
||||
{
|
||||
$where = "tasks.assigned_user_id='". $current_user->id ."' and (tasks.status is NULL or (tasks.status!='Completed' and tasks.status!='Deferred')) ";
|
||||
$where .= "and (tasks.date_start is NULL or ";
|
||||
$where .= db_convert("tasks.date_start","date_format") . ' + ' . db_convert("tasks.time_start","time_format") . " <=". "'".$tomorrow."')";
|
||||
}
|
||||
|
||||
else if ($seedTasks->db->dbType=='oci8')
|
||||
{
|
||||
$format=array("'YYYY-MM-DD'");
|
||||
$where = "tasks.assigned_user_id='". $current_user->id ."' and (tasks.status is NULL or (tasks.status!='Completed' and tasks.status!='Deferred')) ";
|
||||
$where .= "and (tasks.date_start is NULL or ";
|
||||
$where .= " CONCAT(".db_convert("tasks.date_start","date_format",$format).", CONCAT(' ',". db_convert("tasks.time_start","time_format",$format)." )) <=". "'".$tomorrow."')";
|
||||
}
|
||||
|
||||
$ListView->initNewXTemplate( 'modules/Tasks/MyTasks.html',$current_module_strings);
|
||||
$header_text = '';
|
||||
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=MyTasks&from_module=Tasks'>".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($seedTasks, "main", "TASK");
|
||||
?>
|
||||
145
modules/Tasks.cp/Save.php
Executable file
145
modules/Tasks.cp/Save.php
Executable file
@@ -0,0 +1,145 @@
|
||||
<?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/Tasks/Task.php');
|
||||
|
||||
$focus = new Task();
|
||||
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);
|
||||
|
||||
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 = 'Tasks';
|
||||
$email->parent_id = $focus->id;
|
||||
$email->assigned_user_id = $current_user->id;
|
||||
$email->status = 'read';
|
||||
$email->save();
|
||||
$email->load_relationship('tasks');
|
||||
$email->tasks->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->save($GLOBALS['check_notify']);
|
||||
$return_id = $focus->id;
|
||||
|
||||
//<Section1>
|
||||
//Before
|
||||
/*
|
||||
handleRedirect($return_id,'Tasks');
|
||||
*/
|
||||
//After
|
||||
if(isset($_REQUEST['save_and_create_work_item']))
|
||||
header("Location: index.php?module=EcmWorkItems&action=EditView&out_module=Tasks&out_id=".$return_id);
|
||||
else
|
||||
handleRedirect($return_id,'Tasks');
|
||||
//</Section1>
|
||||
?>
|
||||
202
modules/Tasks.cp/Task.js
Normal file
202
modules/Tasks.cp/Task.js
Normal file
@@ -0,0 +1,202 @@
|
||||
function updateDateDue() {
|
||||
document.getElementById('date_due').value =
|
||||
document.getElementById('date_due_date').value + ' '+
|
||||
document.getElementById('date_due_hours').value + ':'+
|
||||
document.getElementById('date_due_minutes').value;
|
||||
}
|
||||
|
||||
function updateDateStart() {
|
||||
document.getElementById('date_start').value =
|
||||
document.getElementById('date_start_date').value + ' '+
|
||||
document.getElementById('date_start_hours').value + ':'+
|
||||
document.getElementById('date_start_minutes').value;
|
||||
}
|
||||
function getCurrentDate() {
|
||||
var d = new Date();
|
||||
var m = d.getMonth()+1;
|
||||
if (m<10) m='0'+m;
|
||||
var today = d.getDate()+'.'+m+'.'+d.getFullYear();
|
||||
return today;
|
||||
}
|
||||
|
||||
function getCurrentTime(what) {
|
||||
var t = new Date();
|
||||
var h = t.getHours();
|
||||
var m = t.getMinutes();
|
||||
|
||||
//m can only be 0,15,30,45
|
||||
if (m/15>2.4)
|
||||
m = 15*Math.floor(m/15);
|
||||
else
|
||||
m = 15*(Math.floor(m/15)+1);
|
||||
|
||||
if (m<1) m='00';
|
||||
|
||||
var act_time = h+':'+m;
|
||||
|
||||
if (what==1)
|
||||
return act_time;
|
||||
if (what==2)
|
||||
return h;
|
||||
if (what==3)
|
||||
return m;
|
||||
}
|
||||
|
||||
function addEvent(object,eventName,do_function) {
|
||||
if(typeof(object) == "string") object = document.getElementById(object);
|
||||
if(!object) { alert('No object in function addEvent!'); return; }
|
||||
if(object.addEventListener) {
|
||||
object.addEventListener(eventName, do_function, false);
|
||||
} else {
|
||||
object.attachEvent('on'+eventName, do_function);
|
||||
}
|
||||
}
|
||||
|
||||
function hideFields() {
|
||||
document.getElementById('date_due_date').style.display='none';
|
||||
document.getElementById('date_due_trigger').style.display='none';
|
||||
|
||||
document.getElementById('date_start_date').style.display='none';
|
||||
document.getElementById('date_start_trigger').style.display='none';
|
||||
|
||||
document.getElementById('job_date_time_section').style.display='none';
|
||||
|
||||
if (document.getElementById('all_day').checked==true) {
|
||||
document.getElementById('date_due_minutes').disabled=true;
|
||||
document.getElementById('date_due_hours').disabled=true;
|
||||
document.getElementById('date_start_minutes').disabled=true;
|
||||
document.getElementById('date_start_hours').disabled=true;
|
||||
document.getElementById('no_time_finish').disabled=true;
|
||||
}
|
||||
|
||||
if (document.getElementById('no_time_finish').checked==true) {
|
||||
document.getElementById('date_due_minutes').disabled=true;
|
||||
document.getElementById('date_due_hours').disabled=true;
|
||||
}
|
||||
}
|
||||
|
||||
function fillData() {
|
||||
if (NEW_TASK==1) {
|
||||
document.getElementById('job_date_date').value = getCurrentDate();
|
||||
document.getElementById('date_start_date').value = getCurrentDate();
|
||||
document.getElementById('date_due_date').value = getCurrentDate();
|
||||
document.getElementById('date_start_hours').value = '08';
|
||||
document.getElementById('date_start_minutes').value = '00';
|
||||
document.getElementById('date_due_hours').value = '08';
|
||||
document.getElementById('date_due_minutes').value = '30';
|
||||
document.getElementById('job_date_hours').value = '08';
|
||||
document.getElementById('job_date_minutes').value = '00';
|
||||
document.getElementById('date_start').value=getCurrentDate()+' 08:00';
|
||||
document.getElementById('date_due').value=getCurrentDate()+' 08:30';
|
||||
} else {
|
||||
document.getElementById('job_date_date').value = document.getElementById('date_start_date').value;
|
||||
document.getElementById('job_date_hours').value = document.getElementById('date_start_hours').value;
|
||||
document.getElementById('job_date_minutes').value = document.getElementById('date_start_minutes').value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//onStart
|
||||
addEvent(window,'load', function() {
|
||||
|
||||
hideFields();
|
||||
fillData();
|
||||
|
||||
|
||||
//to remember time after select 'all_day'
|
||||
var sh = document.getElementById('date_start_hours').value;
|
||||
var sm = document.getElementById('date_start_minutes').value;
|
||||
var dh = document.getElementById('date_due_hours').value;
|
||||
var dm = document.getElementById('date_due_minutes').value;
|
||||
|
||||
document.getElementById('job_date_date').onchange = function() {
|
||||
obj = document.getElementById('job_date_date');
|
||||
document.getElementById('date_start_date').value = obj.value;
|
||||
document.getElementById('date_due_date').value = obj.value;
|
||||
document.getElementById('date_start').value=obj.value+' '+document.getElementById('date_start_hours').value+':'+document.getElementById('date_start_minutes').value;
|
||||
document.getElementById('date_due').value=obj.value+' '+document.getElementById('date_due_hours').value+':'+document.getElementById('date_due_minutes').value;
|
||||
}
|
||||
document.getElementById('all_day').onchange = function() {
|
||||
obj=document.getElementById('all_day');
|
||||
if (obj.checked==true) {
|
||||
sh = document.getElementById('date_start_hours').value;
|
||||
sm = document.getElementById('date_start_minutes').value;
|
||||
dh = document.getElementById('date_due_hours').value;
|
||||
dm = document.getElementById('date_due_minutes').value;
|
||||
|
||||
document.getElementById('date_start_hours').value = '08';
|
||||
document.getElementById('date_start_minutes').value = '00';
|
||||
document.getElementById('date_due_hours').value = '16';
|
||||
document.getElementById('date_due_minutes').value = '00';
|
||||
document.getElementById('job_date_hours').value = '08';
|
||||
document.getElementById('job_date_minutes').value = '00';
|
||||
updateDateDue();
|
||||
updateDateStart();
|
||||
|
||||
|
||||
document.getElementById('date_due_minutes').disabled=true;
|
||||
document.getElementById('date_due_hours').disabled=true;
|
||||
document.getElementById('date_start_minutes').disabled=true;
|
||||
document.getElementById('date_start_hours').disabled=true;
|
||||
document.getElementById('no_time_finish').disabled=true;
|
||||
}else{
|
||||
document.getElementById('date_start_hours').value = sh;
|
||||
document.getElementById('date_start_minutes').value = sm;
|
||||
document.getElementById('date_due_hours').value = dh;
|
||||
document.getElementById('date_due_minutes').value = dm;
|
||||
document.getElementById('job_date_hours').value = sh;
|
||||
document.getElementById('job_date_minutes').value = sm;
|
||||
updateDateDue();
|
||||
updateDateStart();
|
||||
|
||||
|
||||
document.getElementById('date_due_minutes').disabled=false;
|
||||
document.getElementById('date_due_hours').disabled=false;
|
||||
document.getElementById('date_start_minutes').disabled=false;
|
||||
document.getElementById('date_start_hours').disabled=false;
|
||||
document.getElementById('no_time_finish').disabled=false;
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('status').onchange=function() {
|
||||
var obj = document.getElementById('status');
|
||||
if ((obj.value=='made') || (obj.value=='canceled')) {
|
||||
//set all data and time filds to actual date() value
|
||||
document.getElementById('job_date_date').value = getCurrentDate();
|
||||
document.getElementById('date_start_date').value = getCurrentDate();
|
||||
document.getElementById('date_due_date').value = getCurrentDate();
|
||||
document.getElementById('date_start_hours').value = getCurrentTime(2);
|
||||
document.getElementById('date_start_minutes').value = getCurrentTime(3);
|
||||
document.getElementById('date_due_hours').value = getCurrentTime(2);
|
||||
document.getElementById('date_due_minutes').value = getCurrentTime(3);
|
||||
document.getElementById('job_date_hours').value = getCurrentTime(2);
|
||||
document.getElementById('job_date_minutes').value = getCurrentTime(3);
|
||||
document.getElementById('date_start').value=getCurrentDate()+' '+getCurrentTime(1);
|
||||
document.getElementById('date_due').value=getCurrentDate()+' '+getCurrentTime(1);
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('no_time_finish').onchange=function() {
|
||||
var obj = document.getElementById('no_time_finish');
|
||||
if (obj.checked==true) {
|
||||
document.getElementById('date_due_hours').value='23';
|
||||
document.getElementById('date_due_minutes').value='45';
|
||||
|
||||
document.getElementById('date_due_minutes').disabled=true;
|
||||
document.getElementById('date_due_hours').disabled=true;
|
||||
|
||||
}else{
|
||||
document.getElementById('date_due_hours').value='08';
|
||||
document.getElementById('date_due_minutes').value='30';
|
||||
|
||||
document.getElementById('date_due_minutes').disabled=false;
|
||||
document.getElementById('date_due_hours').disabled=false;
|
||||
}
|
||||
|
||||
updateDateDue();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
677
modules/Tasks.cp/Task.php
Executable file
677
modules/Tasks.cp/Task.php
Executable file
@@ -0,0 +1,677 @@
|
||||
<?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');
|
||||
|
||||
// Task is used to store customer information.
|
||||
class Task extends SugarBean {
|
||||
var $field_name_map;
|
||||
|
||||
// Stored fields
|
||||
var $id;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $assigned_user_id;
|
||||
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_task;
|
||||
|
||||
var $parent_name;
|
||||
var $contact_name;
|
||||
var $contact_phone;
|
||||
var $contact_email;
|
||||
var $assigned_user_name;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var $default_task_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 = "tasks";
|
||||
|
||||
var $object_name = "Task";
|
||||
var $module_dir = 'Tasks';
|
||||
|
||||
var $importable = true;
|
||||
// This is used to retrieve related fields from form posts.
|
||||
var $additional_column_fields = Array('assigned_user_name', 'assigned_user_id', 'contact_name', 'contact_phone', 'contact_email', 'parent_name');
|
||||
|
||||
|
||||
function Task() {
|
||||
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 tasks ";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$query .= "LEFT JOIN contacts
|
||||
ON tasks.contact_id=contacts.id";
|
||||
|
||||
|
||||
|
||||
$query .= " LEFT JOIN users
|
||||
ON tasks.assigned_user_id=users.id ";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$where_auto = '1=1';
|
||||
if($show_deleted == 0){
|
||||
$where_auto = " tasks.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 tasks.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 tasks.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 tasks.*, contacts.first_name, contacts.last_name";
|
||||
|
||||
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM contacts, tasks ";
|
||||
$where_auto = "tasks.contact_id = contacts.id AND tasks.deleted=0 AND contacts.deleted=0";
|
||||
}
|
||||
else
|
||||
{
|
||||
$query = 'SELECT tasks.*';
|
||||
|
||||
|
||||
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= ' FROM tasks ';
|
||||
$where_auto = "tasks.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 tasks.name";
|
||||
return $query;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function fill_in_additional_list_fields()
|
||||
{
|
||||
//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'];
|
||||
//}
|
||||
}
|
||||
|
||||
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);
|
||||
$task_fields = $this->get_list_view_array();
|
||||
$task_fields['TIME_DUE'] = $timedate->to_display_time($timedate->to_db_time($task_fields['DATE_DUE']));
|
||||
$task_fields['DATE_DUE'] = $timedate->to_display_date($timedate->to_db($task_fields['DATE_DUE']));
|
||||
|
||||
$date_due = $task_fields['DATE_DUE'];
|
||||
|
||||
if (!empty($this->priority))
|
||||
$task_fields['PRIORITY'] = $app_list_strings['task_priority_dom'][$this->priority];
|
||||
if (isset($this->parent_type))
|
||||
$task_fields['PARENT_MODULE'] = $this->parent_type;
|
||||
if ($this->status != "Completed" && $this->status != "Deferred" ) {
|
||||
$task_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=Tasks&record={$this->id}&status=Completed'>".get_image($image_path."close_inline","alt='Close' border='0'")."</a>";
|
||||
}
|
||||
|
||||
$dd = $timedate->to_db_date($date_due, false);
|
||||
if ($dd < $today){
|
||||
$task_fields['DATE_DUE']= "<font class='overdueTask'>".$date_due."</font>";
|
||||
}else if( $dd == $today ){
|
||||
$task_fields['DATE_DUE'] = "<font class='todaysTask'>".$date_due."</font>";
|
||||
}else{
|
||||
$task_fields['DATE_DUE'] = "<font class='futureTask'>".$date_due."</font>";
|
||||
}
|
||||
|
||||
require_once('include/generic/SugarWidgets/SugarWidgetSubPanelAdditionalDetailsLink.php');
|
||||
$arr = array();
|
||||
$swspadl = new SugarWidgetSubPanelAdditionalDetailsLink($arr);
|
||||
$arr = array( 'module' => 'Tasks', 'fields' => array ( 'ID' => $this->id ) );
|
||||
$task_fields['AD'] = $swspadl->displayList($arr);
|
||||
|
||||
$task_fields['CONTACT_NAME']= $this->contact_name; //return_name($task_fields,"FIRST_NAME","LAST_NAME");
|
||||
$task_fields['TITLE'] = '';
|
||||
if (!empty($task_fields['CONTACT_NAME'])) {
|
||||
$task_fields['TITLE'] .= $current_module_strings['LBL_LIST_CONTACT'].": ".$task_fields['CONTACT_NAME'];
|
||||
}
|
||||
if (!empty($this->parent_name)) {
|
||||
$task_fields['TITLE'] .= "\n".$app_list_strings['record_type_display_notes'][$this->parent_type].": ".$this->parent_name;
|
||||
$task_fields['PARENT_NAME']=$this->parent_name;
|
||||
}
|
||||
|
||||
return $task_fields;
|
||||
}
|
||||
|
||||
function set_notification_body($xtpl, $task)
|
||||
{
|
||||
global $app_list_strings;
|
||||
global $timedate;
|
||||
$notifyUser = $task->current_notify_user;
|
||||
$prefDate = User::getUserDateTimePreferences($notifyUser);
|
||||
$xtpl->assign("TASK_SUBJECT", $task->name);
|
||||
//MFH #13507
|
||||
$xtpl->assign("TASK_PRIORITY", (isset($task->priority)?$app_list_strings['task_priority_dom'][$task->priority]:""));
|
||||
$xtpl->assign("TASK_DUEDATE", $timedate->to_display_date_time($task->date_due . " " . $task->time_due,true,true,$notifyUser)." ".$prefDate['userGmt']);
|
||||
$xtpl->assign("TASK_STATUS", (isset($task->status)?$app_list_strings['task_status_dom'][$task->status]:""));
|
||||
$xtpl->assign("TASK_DESCRIPTION", $task->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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->assigned_user_id == 'f1963700-4249-2022-1022-4e393326a7b4' )
|
||||
$this->google_calendar_task = $this->addGoogleCalendarTask();
|
||||
$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 = 'Task';
|
||||
|
||||
$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 addGoogleCalendarTask() {
|
||||
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
|
||||
$gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
|
||||
$user = "mz@e5.pl";
|
||||
$pass = "3x4z8123";
|
||||
$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]));
|
||||
$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]));
|
||||
//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'];
|
||||
}
|
||||
|
||||
// save to server
|
||||
try {
|
||||
$event = $gcal->newEventEntry();
|
||||
$event->title = $gcal->newTitle($this->name);
|
||||
$event->content =$gcal->newContent($description);
|
||||
$when = $gcal->newWhen();
|
||||
$when->startTime = $start;
|
||||
$when->endTime = $end;
|
||||
$event->when = array($when);
|
||||
$event->where = array($gcal->newWhere($where));
|
||||
$new_task = $gcal->insertEvent($event);
|
||||
$google_calendar_task = $new_task->getEditLink()->href;
|
||||
//save gct_id
|
||||
//$GLOBALS['db'] -> query("UPDATE tasks SET google_calendar_task='".$google_calendar_task."' WHERE id='".$this->id."'");
|
||||
} catch (Zend_Gdata_App_Exception $e) {
|
||||
echo "Error: " . $e->getResponse();
|
||||
} catch (Exception $e) {
|
||||
echo "Error:" . $e->getResponse();
|
||||
}
|
||||
|
||||
return $google_calendar_task;
|
||||
}
|
||||
//</Section1>
|
||||
|
||||
}
|
||||
?>
|
||||
97
modules/Tasks.cp/TasksQuickCreate.php
Executable file
97
modules/Tasks.cp/TasksQuickCreate.php
Executable file
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/EditView/QuickCreate.php');
|
||||
require_once('modules/Tasks/Task.php');
|
||||
require_once('include/javascript/javascript.php');
|
||||
|
||||
class TasksQuickCreate extends QuickCreate {
|
||||
|
||||
var $javascript;
|
||||
|
||||
function process() {
|
||||
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
|
||||
$mod_strings = return_module_language($current_language, 'Tasks');
|
||||
|
||||
parent::process();
|
||||
|
||||
$this->ss->assign("PRIORITY_OPTIONS", get_select_options_with_id($app_list_strings['task_priority_dom'], $app_list_strings['task_priority_default']));
|
||||
$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['task_status_dom'], $app_list_strings['task_status_default']));
|
||||
$this->ss->assign("TIME_FORMAT", '('. $timedate->get_user_time_format().')');
|
||||
|
||||
$focus = new Task();
|
||||
$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(\"tasksQuickCreate\")) 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('tasksQuickCreate');
|
||||
|
||||
$focus = new Task();
|
||||
$this->javascript->setSugarBean($focus);
|
||||
$this->javascript->addAllFields('');
|
||||
|
||||
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
|
||||
}
|
||||
}
|
||||
?>
|
||||
5
modules/Tasks.cp/addGoogleCalendarTask.php
Normal file
5
modules/Tasks.cp/addGoogleCalendarTask.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
global $app_strings;
|
||||
var_dump($app_strings);
|
||||
return;
|
||||
?>
|
||||
75
modules/Tasks.cp/field_arrays.php
Executable file
75
modules/Tasks.cp/field_arrays.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Contains field arrays that are used for caching
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$fields_array['Task'] = array ('column_fields' =>Array("id"
|
||||
, "date_entered"
|
||||
, "date_modified"
|
||||
, "assigned_user_id"
|
||||
, "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','first_name','last_name','time_due', 'priority'
|
||||
|
||||
|
||||
|
||||
|
||||
),
|
||||
'required_fields' => array('name'=>1),
|
||||
);
|
||||
?>
|
||||
58
modules/Tasks.cp/language/en_us.help.DetailView.html
Executable file
58
modules/Tasks.cp/language/en_us.help.DetailView.html
Executable file
@@ -0,0 +1,58 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Tasks Detail Page</h1>
|
||||
|
||||
<p>
|
||||
<p>View task details such as status and the related account.</p>
|
||||
<ul>
|
||||
<li>To edit task 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 task. The system displays the new record in the Tasks list.
|
||||
<li>To delete a task, click <span class="helpButton">Delete</span>.
|
||||
<li>To close the task after changing its status to "Completed", and to create a new task, click <span class="helpButton">Close and Create New</span>.
|
||||
<li>To create a note or an attachment related to the task, click <span class="helpButton">Create Note or Attachment</span>.
|
||||
</ul>
|
||||
72
modules/Tasks.cp/language/en_us.help.EditView.html
Executable file
72
modules/Tasks.cp/language/en_us.help.EditView.html
Executable 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>Tasks</h1>
|
||||
|
||||
<p>
|
||||
Use the Tasks page to create a task for youself or for other users. </p>
|
||||
<p>
|
||||
<li>To create a task, enter the following information:</p>
|
||||
<ul>
|
||||
<li><span class="helpButton">Subject</span>. Enter the subject of the task.
|
||||
<li><span class="helpButton">Due Date and Time</span>. Optionally, click the Calendar icon and select the completion date for the task; enter the time in the adjoining box. If there is no specific deadline for the task, select the None box.
|
||||
Enter the due date information if you want to add the task 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 task; enter the time in the adjoining box.
|
||||
If there is no specific start date for the task, 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 task.
|
||||
|
||||
|
||||
|
||||
<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 task, 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 task. By default, it is assigned to you.
|
||||
<li><span class="helpButton">Description</span>. Enter a brief description of the task.
|
||||
</ul>
|
||||
<li>Click <span class="helpButton">Save</span> to create the task; click <span class="helpButton">Cancel</span> to exit the page without creating the task.
|
||||
<li>To close the task and create a copy of it, click <span class="helpButton">Close and Create New</span>. The status of the closed task changes to Completed; the status of the newly created task is, by default, set to Not Started.
|
||||
<li>To view a list of existing tasks on the Tasks Home page or to search for a specific task, click <span class="helpButton">Tasks</span> in the Shortcuts section. </li>
|
||||
61
modules/Tasks.cp/language/en_us.help.index.html
Executable file
61
modules/Tasks.cp/language/en_us.help.index.html
Executable 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>Tasks</h1>
|
||||
|
||||
<p>
|
||||
Use the Tasks page to create a task for youself or for other users. </p>
|
||||
<p>
|
||||
When you create a task, 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 task 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 task 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 task information, click <span class="helpButton">Save</span>.</li>
|
||||
<li>To exit the page without creating the task, click <span class="helpButton">Cancel</span>.</li>
|
||||
<li>To view a list of existing tasks on the Tasks Home page or to search for a specific task, click <span class="helpButton">Tasks</span> in the Shortcuts section. </li>
|
||||
<li>The Task List displays information such as the subject, contact, the related item, due date, team and user for each task. To view the details of a task, 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>
|
||||
|
||||
119
modules/Tasks.cp/language/en_us.lang.php
Executable file
119
modules/Tasks.cp/language/en_us.lang.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: 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' => 'Tasks',
|
||||
'LBL_TASK' => 'Tasks: ',
|
||||
'LBL_MODULE_TITLE' => ' Tasks: Home',
|
||||
'LBL_SEARCH_FORM_TITLE' => ' Task Search',
|
||||
'LBL_LIST_FORM_TITLE' => ' Task List',
|
||||
'LBL_NEW_FORM_TITLE' => ' Create Task',
|
||||
'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 Tasks',
|
||||
'LNK_NEW_CALL' => 'Schedule Call',
|
||||
'LNK_NEW_MEETING' => 'Schedule Meeting',
|
||||
'LNK_NEW_TASK' => 'Create Task',
|
||||
'LNK_NEW_NOTE' => 'Create Note or Attachment',
|
||||
'LNK_NEW_EMAIL' => 'Archive Email',
|
||||
'LNK_CALL_LIST' => 'Calls',
|
||||
'LNK_MEETING_LIST' => 'Meetings',
|
||||
'LNK_TASK_LIST' => 'Tasks',
|
||||
'LNK_NOTE_LIST' => 'Notes',
|
||||
'LNK_EMAIL_LIST' => 'Emails',
|
||||
'LNK_VIEW_CALENDAR' => 'Today',
|
||||
'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',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
119
modules/Tasks.cp/language/ge_ge.lang.php
Executable file
119
modules/Tasks.cp/language/ge_ge.lang.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: 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',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
103
modules/Tasks.cp/language/pl_pl.lang.php
Executable file
103
modules/Tasks.cp/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,103 @@
|
||||
<?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 płatn.:',
|
||||
'LBL_NEW_FORM_DUE_TIME' => 'Czas płatn.:',
|
||||
'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' => 'Podlega',
|
||||
'LBL_LIST_DUE_DATE' => 'Data płatn',
|
||||
'LBL_LIST_DUE_TIME' => 'Czas płatn',
|
||||
'LBL_SUBJECT' => 'Temat:',
|
||||
'LBL_STATUS' => 'Status:',
|
||||
'LBL_DUE_DATE' => 'Data płatn.:',
|
||||
'LBL_DUE_TIME' => 'Czas Płatności:',
|
||||
'LBL_PRIORITY' => 'Priorytet:',
|
||||
'LBL_COLON' => ':',
|
||||
'LBL_DUE_DATE_AND_TIME' => 'Data i czas płatn.:',
|
||||
'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 daty płatnosci',
|
||||
'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',
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
45
modules/Tasks.cp/metadata/SearchFields.php
Executable file
45
modules/Tasks.cp/metadata/SearchFields.php
Executable 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['Tasks'] =
|
||||
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' => 'task_status_dom', 'template_var' => 'STATUS_FILTER')
|
||||
);
|
||||
?>
|
||||
73
modules/Tasks.cp/metadata/additionalDetails.php
Executable file
73
modules/Tasks.cp/metadata/additionalDetails.php
Executable 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 additionalDetailsTask($fields) {
|
||||
static $mod_strings;
|
||||
global $app_list_strings;
|
||||
if(empty($mod_strings)) {
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'Tasks');
|
||||
}
|
||||
|
||||
$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=Tasks&record={$fields['ID']}";
|
||||
$viewLink = "index.php?action=DetailView&module=Tasks&record={$fields['ID']}";
|
||||
|
||||
$return_module = empty($_REQUEST['module']) ? 'Tasks' : $_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);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
140
modules/Tasks.cp/metadata/detailviewdefs.php
Executable file
140
modules/Tasks.cp/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,140 @@
|
||||
<?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['Tasks']['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=\'Tasks\'; 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=\'Tasks\';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('name' => 'contact_phone', 'type'=>'phone', 'label' => 'LBL_PHONE')
|
||||
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
null,
|
||||
array('name' => 'contact_email', 'label' => 'LBL_EMAIL_ADDRESS'),
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'label' => 'LBL_ASSIGNED_TO',
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'modified_by_name',
|
||||
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
|
||||
'label' => 'LBL_DATE_MODIFIED',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
array (
|
||||
'name' => 'created_by_name',
|
||||
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'description',
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
100
modules/Tasks.cp/metadata/editviewdefs.php
Executable file
100
modules/Tasks.cp/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,100 @@
|
||||
<?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['Tasks']['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=\'Tasks\'; 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',
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'description', 'displayParams'=>array('rows'=>8, 'cols'=>60)),
|
||||
),
|
||||
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
114
modules/Tasks.cp/metadata/listviewdefs.php
Executable file
114
modules/Tasks.cp/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$listViewDefs['Tasks'] = 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),
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
165
modules/Tasks.cp/metadata/quickcreatedefs.php
Executable file
165
modules/Tasks.cp/metadata/quickcreatedefs.php
Executable file
@@ -0,0 +1,165 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs ['Tasks'] =
|
||||
array (
|
||||
'QuickCreate' =>
|
||||
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=\'Tasks\'; 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',
|
||||
),
|
||||
),
|
||||
'useTabs' => false,
|
||||
),
|
||||
'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,
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'parent_name',
|
||||
'label' => 'LBL_LIST_RELATED_TO',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'date_start',
|
||||
'type' => 'datetimecombo',
|
||||
'displayParams' =>
|
||||
array (
|
||||
'showNoneCheckbox' => true,
|
||||
'showFormats' => true,
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'contact_name',
|
||||
'label' => 'LBL_CONTACT_NAME',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'priority',
|
||||
'displayParams' =>
|
||||
array (
|
||||
'required' => true,
|
||||
),
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'label' => 'LBL_ASSIGNED_TO_NAME',
|
||||
),
|
||||
),
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'description',
|
||||
'displayParams' =>
|
||||
array (
|
||||
'rows' => 8,
|
||||
'cols' => 60,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
58
modules/Tasks.cp/metadata/searchdefs.php
Executable file
58
modules/Tasks.cp/metadata/searchdefs.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?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['Tasks'] = 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' => 'task_users_dom'
|
||||
),
|
||||
'status',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
74
modules/Tasks.cp/metadata/sidecreateviewdefs.php
Executable file
74
modules/Tasks.cp/metadata/sidecreateviewdefs.php
Executable file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 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['Tasks']['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)),
|
||||
),
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
65
modules/Tasks.cp/metadata/studio.php
Executable file
65
modules/Tasks.cp/metadata/studio.php
Executable file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$GLOBALS['studioDefs']['Tasks'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Tasks/DetailView.html',
|
||||
'php_file'=>'modules/Tasks/DetailView.php',
|
||||
'type'=>'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Tasks/EditView.html',
|
||||
'php_file'=>'modules/Tasks/EditView.php',
|
||||
'type'=>'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template'=>'listview',
|
||||
'meta_file'=>'modules/Tasks/listviewdefs.php',
|
||||
'type'=>'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Tasks/SearchForm.html',
|
||||
'php_file'=>'modules/Tasks/ListView.php',
|
||||
'type'=>'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
54
modules/Tasks.cp/metadata/subpaneldefs.php
Normal file
54
modules/Tasks.cp/metadata/subpaneldefs.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
$layout_defs['Tasks']['subpanel_setup'] = array(
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
112
modules/Tasks.cp/metadata/subpanels/ForActivities.php
Executable file
112
modules/Tasks.cp/metadata/subpanels/ForActivities.php
Executable file
@@ -0,0 +1,112 @@
|
||||
<?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' => "(tasks.status='Not Started' OR tasks.status='In Progress' OR tasks.status='Pending Input')",
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'AD' => array (
|
||||
'widget_class' => 'SubPanelAdditionalDetailsLink',
|
||||
'vname' => ' ',
|
||||
'sortable' => false,
|
||||
'width' => 0,
|
||||
),
|
||||
'object_image'=>array(
|
||||
'vname' => 'LBL_OBJECT_IMAGE',
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'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'
|
||||
) ,
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
109
modules/Tasks.cp/metadata/subpanels/ForEmails.php
Executable file
109
modules/Tasks.cp/metadata/subpanels/ForEmails.php
Executable 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
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
106
modules/Tasks.cp/metadata/subpanels/ForHistory.php
Executable file
106
modules/Tasks.cp/metadata/subpanels/ForHistory.php
Executable 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' => "(tasks.status='Completed' OR tasks.status='Deferred')",
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'AD' => array (
|
||||
'widget_class' => 'SubPanelAdditionalDetailsLink',
|
||||
'vname' => ' ',
|
||||
'sortable' => false,
|
||||
'width' => 0,
|
||||
),
|
||||
'object_image'=>array(
|
||||
'vname' => 'LBL_OBJECT_IMAGE',
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name'=>array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
'status'=>array(
|
||||
'widget_class' => 'SubPanelActivitiesStatusField',
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
),
|
||||
'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
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
116
modules/Tasks.cp/metadata/subpanels/default.php
Executable file
116
modules/Tasks.cp/metadata/subpanels/default.php
Executable 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' => 'Tasks'
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
'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
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
7
modules/Tasks.cp/test.php
Normal file
7
modules/Tasks.cp/test.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
require_once('modules/Tasks/Task.php');
|
||||
$t = new Task();
|
||||
$t->retrieve('543bdf71-18ea-8ae9-13cd-5177a8953c1b');
|
||||
|
||||
$t->addGoogleCalendarTask();
|
||||
?>
|
||||
207
modules/Tasks.cp/tpls/QuickCreate.tpl
Executable file
207
modules/Tasks.cp/tpls/QuickCreate.tpl
Executable 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="tasksQuickCreate" id="tasksQuickCreate" method="POST" action="index.php">
|
||||
<input type="hidden" name="module" value="Tasks">
|
||||
<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('TasksQuickCreate');\""} 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='Tasks';" 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"> </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"> <input name='date_due_flag'class="checkbox" type='checkbox' tabindex="1" onClick="set_date_due_values(this.form);"> {$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"> </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"> <input name='date_start_flag' class="checkbox" type='checkbox' tabindex="1" onClick="set_date_start_values(this.form);"> {$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.tasksQuickCreate);
|
||||
set_date_start_values(document.tasksQuickCreate);
|
||||
</script>
|
||||
298
modules/Tasks.cp/vardefs.php
Executable file
298
modules/Tasks.cp/vardefs.php
Executable file
@@ -0,0 +1,298 @@
|
||||
<?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['Task'] = array('table' => 'tasks'
|
||||
,'fields' => array (
|
||||
'name' =>
|
||||
array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_SUBJECT',
|
||||
'dbType' => 'varchar',
|
||||
'type' => 'name',
|
||||
'len' => '50',
|
||||
'importable' => 'required',
|
||||
),
|
||||
'google_calendar_task' =>
|
||||
array (
|
||||
'name' => 'google_calendar_task',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
),
|
||||
'status' =>
|
||||
array (
|
||||
'name' => 'status',
|
||||
'vname' => 'LBL_STATUS',
|
||||
'type' => 'enum',
|
||||
'options' => 'task_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',
|
||||
),
|
||||
|
||||
'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' => 'task_priority_dom',
|
||||
'len'=>25,
|
||||
),
|
||||
'contacts'=> array(
|
||||
'name' => 'contacts',
|
||||
'type' => 'link',
|
||||
'relationship' => 'contact_tasks',
|
||||
'source'=>'non-db',
|
||||
'side'=>'right',
|
||||
'vname'=>'LBL_CONTACT',
|
||||
),
|
||||
'accounts' =>
|
||||
array (
|
||||
'name' => 'accounts',
|
||||
'type' => 'link',
|
||||
'relationship' => 'account_tasks',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_ACCOUNT',
|
||||
),
|
||||
'opportunities' =>
|
||||
array (
|
||||
'name' => 'opportunities',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunity_tasks',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_TASKS',
|
||||
),
|
||||
)
|
||||
,
|
||||
'relationships' => array (
|
||||
|
||||
'tasks_assigned_user' =>
|
||||
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
,'tasks_modified_user' =>
|
||||
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'modified_user_id',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
,'tasks_created_by' =>
|
||||
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'created_by',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)
|
||||
, 'indices' => array (
|
||||
array('name' =>'idx_tsk_name', 'type'=>'index', 'fields'=>array('name')),
|
||||
array('name' =>'idx_task_con_del', 'type'=>'index', 'fields'=>array('contact_id','deleted')),
|
||||
array('name' =>'idx_task_par_del', 'type'=>'index', 'fields'=>array('parent_id','parent_type','deleted')),
|
||||
array('name' =>'idx_task_assigned', 'type'=>'index', 'fields'=>array('assigned_user_id')),
|
||||
|
||||
|
||||
|
||||
)
|
||||
|
||||
//This enables optimistic locking for Saves From EditView
|
||||
,'optimistic_locking'=>true,
|
||||
);
|
||||
VardefManager::createVardef('Tasks','Task', array('default', 'assignable',
|
||||
|
||||
|
||||
|
||||
));
|
||||
?>
|
||||
428
modules/Tasks.cp/views/EditView/EditView.tpl
Executable file
428
modules/Tasks.cp/views/EditView/EditView.tpl
Executable file
@@ -0,0 +1,428 @@
|
||||
{*
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
* 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".
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
*}
|
||||
<script>
|
||||
window.onbeforeunload = confirmExit;
|
||||
function confirmExit(){
|
||||
return "Czy na pewno chcesz przerwac ?";
|
||||
}
|
||||
</script>
|
||||
|
||||
{literal}
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
.dataLabel { padding: 2px; }
|
||||
|
||||
.dataField { padding: 2px; }
|
||||
|
||||
.tabEditViewDF { padding: 2px; }
|
||||
|
||||
td .dataLabel { padding: 2px; }
|
||||
|
||||
td .dataField { padding: 2px; }
|
||||
|
||||
td .tabEditViewDF { padding: 2px; }
|
||||
|
||||
.tabForm { border-top:none; }
|
||||
|
||||
</style>
|
||||
|
||||
{/literal}
|
||||
|
||||
|
||||
|
||||
{{include file='modules/Tasks/views/EditView/header.tpl'}}
|
||||
|
||||
{sugar_include include=$includes}
|
||||
|
||||
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" class='tabDetailView' id='tabFormPagination'>
|
||||
|
||||
{{if $panelCount == 0}}
|
||||
|
||||
{{* Render tag for VCR control if SHOW_VCR_CONTROL is true *}}
|
||||
|
||||
{{if $SHOW_VCR_CONTROL}}
|
||||
|
||||
{$PAGINATION}
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{/if}}
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
{literal}
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
var SelectedTab = "";
|
||||
var TabsMainBlock = false;
|
||||
|
||||
function SetTab(tab_name) {
|
||||
|
||||
if(TabsMainBlock) return;
|
||||
|
||||
var TabMenu = document.getElementById('groupTabs');
|
||||
|
||||
var tabs = TabMenu.getElementsByTagName('li');
|
||||
|
||||
for(i=0;i<tabs.length;i++) {
|
||||
|
||||
if((tab_name+'_menu') === tabs[i].id) {
|
||||
|
||||
tabs[i].className = 'active';
|
||||
|
||||
tabs[i].getElementsByTagName('a')[0].className = 'current';
|
||||
|
||||
} else {
|
||||
|
||||
tabs[i].className = '';
|
||||
|
||||
tabs[i].getElementsByTagName('a')[0].className = '';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var prev = document.getElementById(SelectedTab);
|
||||
|
||||
var curr = document.getElementById(tab_name);
|
||||
|
||||
prev.style.display = 'none';
|
||||
|
||||
curr.style.display = '';
|
||||
|
||||
SelectedTab = tab_name;
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
{/literal}
|
||||
|
||||
|
||||
|
||||
<ul class="tabList" style="margin-top:10px;" id="groupTabs">
|
||||
|
||||
{{foreach name=section from=$sectionPanels key=label item=panel}}
|
||||
|
||||
{{if $panel[0][0].field.type == 'tab'}}
|
||||
|
||||
<li class="{{if $panel[0][0].field.active}}active{{/if}}" id="{{$label}}_menu">
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
var set{{$label}} = function() {literal} { {/literal} SetTab('{{$label}}'); {literal} }; {/literal}
|
||||
|
||||
{{if $panel[0][0].field.active}}SelectedTab="{{$label}}";{{/if}}
|
||||
|
||||
</script>
|
||||
|
||||
<a class="{{if $panel[0][0].field.active}}current{{/if}}" href="javascript:set{{$label}}();">{sugar_translate label='LBL_{{$label}}_TAB' module='{{$module}}'}</a>
|
||||
|
||||
</li>
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{/foreach}}
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
{{* Loop through all top level panels first *}}
|
||||
|
||||
{{counter name="panelCount" start=-1 print=false assign="panelCount"}}
|
||||
|
||||
|
||||
|
||||
{{foreach name=section from=$sectionPanels key=label item=panel}}
|
||||
|
||||
{{counter name="panelCount" print=false}}
|
||||
|
||||
|
||||
|
||||
{{* Print out the table data *}}
|
||||
|
||||
<div id="{{$label}}" style="display:{{if !$panel[0][0].field.active}}none{{/if}};">
|
||||
|
||||
{counter name="panelFieldCount" start=0 print=false assign="panelFieldCount"}
|
||||
|
||||
{{* Check to see if the panel variable is an array, if not, we'll attempt an include with type param php *}}
|
||||
|
||||
{{* See function.sugar_include.php *}}
|
||||
|
||||
{{if !is_array($panel)}}
|
||||
|
||||
{sugar_include type='php' file='{{$panel}}'}
|
||||
|
||||
{{else}}
|
||||
|
||||
|
||||
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="{$def.templateMeta.panelClass|default:tabForm}">
|
||||
|
||||
{{* Only show header if it is not default or an int value *}}
|
||||
|
||||
{{if !empty($label) && !is_int($label) && $label != 'DEFAULT'}}
|
||||
|
||||
<th class="dataLabel" align="left" colspan="8">
|
||||
|
||||
<h4>{sugar_translate label='LBL_{{$label}}' module='{{$module}}'}</h4>
|
||||
|
||||
</th>
|
||||
|
||||
{{/if}}
|
||||
|
||||
|
||||
|
||||
{{assign var='rowCount' value=0}}
|
||||
|
||||
{{foreach name=rowIteration from=$panel key=row item=rowData}}
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
|
||||
{{assign var='columnsInRow' value=$rowData|@count}}
|
||||
|
||||
{{assign var='columnsUsed' value=0}}
|
||||
|
||||
|
||||
|
||||
{{* Loop through each column and display *}}
|
||||
|
||||
{{counter name="colCount" start=0 print=false assign="colCount"}}
|
||||
|
||||
|
||||
|
||||
{{foreach name=colIteration from=$rowData key=col item=colData}}
|
||||
|
||||
{{counter name="colCount" print=false}}
|
||||
|
||||
{{math assign="tabIndex" equation="$panelCount * $maxColumns + $colCount"}}
|
||||
|
||||
{{if count($rowData) == $colCount}}
|
||||
|
||||
{{assign var="colCount" value=0}}
|
||||
|
||||
{{/if}}
|
||||
|
||||
|
||||
|
||||
{{if empty($def.templateMeta.labelsOnTop) && empty($colData.field.hideLabel)}}
|
||||
|
||||
<td valign="top" width='{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].label}}%' class="dataLabel" NOWRAP>
|
||||
|
||||
{{if isset($colData.field.customLabel)}}
|
||||
|
||||
{{$colData.field.customLabel}}
|
||||
|
||||
{{elseif isset($colData.field.label)}}
|
||||
|
||||
{capture name="label" assign="label}
|
||||
|
||||
{sugar_translate label='{{$colData.field.label}}' module='{{$module}}'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{$label|strip_semicolon}:
|
||||
|
||||
{{elseif isset($fields[$colData.field.name])}}
|
||||
|
||||
{capture name="label" assign="label}
|
||||
|
||||
{sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{$label|strip_semicolon}:
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{* Show the required symbol if field is required, but override not set. Or show if override is set *}}
|
||||
|
||||
{{if ($fields[$colData.field.name].required && (!isset($colData.field.displayParams.required) || $colData.field.displayParams.required)) ||
|
||||
|
||||
(isset($colData.field.displayParams.required) && $colData.field.displayParams.required)}}
|
||||
|
||||
<span class="required">{{$APP.LBL_REQUIRED_SYMBOL}}</span>
|
||||
|
||||
{{/if}}
|
||||
|
||||
</td>
|
||||
|
||||
{{/if}}
|
||||
|
||||
|
||||
|
||||
<td valign="top" width='{{if $colData.field.allCols}}100%{{else}}{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].field}}{{/if}}%' class='tabEditViewDF' {{if $colData.field.allCols}}colspan='8'{{else}}{{if $colData.colspan}}colspan='{{$colData.colspan}}'{{/if}}{{/if}} NOWRAP>
|
||||
|
||||
{{if !empty($def.templateMeta.labelsOnTop)}}
|
||||
|
||||
{{if isset($colData.field.label)}}
|
||||
|
||||
{{if !empty($colData.field.label)}}
|
||||
|
||||
{sugar_translate label='{{$colData.field.label}}' module='{{$module}}'}:
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{elseif isset($fields[$colData.field.name])}}
|
||||
|
||||
{sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'}:
|
||||
|
||||
{{/if}}
|
||||
|
||||
|
||||
|
||||
{{* Show the required symbol if field is required, but override not set. Or show if override is set *}}
|
||||
|
||||
{{if ($fields[$colData.field.name].required && (!isset($colData.field.displayParams.required) || $colData.field.displayParams.required)) ||
|
||||
|
||||
(isset($colData.field.displayParams.required) && $colData.field.displayParams.required)}}
|
||||
|
||||
<span class="required">{{$APP.LBL_REQUIRED_SYMBOL}}</span>
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{if !isset($colData.field.label) || !empty($colData.field.label)}}
|
||||
|
||||
<br>
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{/if}}
|
||||
|
||||
|
||||
|
||||
{{if $fields[$colData.field.name] && !empty($colData.field.fields) }}
|
||||
|
||||
{{foreach from=$colData.field.fields item=subField}}
|
||||
|
||||
{{if $fields[$subField.name]}}
|
||||
|
||||
{counter name="panelFieldCount"}
|
||||
|
||||
{{sugar_field parentFieldArray='fields' tabindex=$colData.field.tabindex vardef=$fields[$subField.name] displayType='editView' displayParams=$subField.displayParams formName=$form_name}}
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{/foreach}}
|
||||
|
||||
{{elseif !empty($colData.field.customCode)}}
|
||||
|
||||
{counter name="panelFieldCount"}
|
||||
|
||||
{{sugar_evalcolumn var=$colData.field.customCode colData=$colData tabindex=$colData.field.tabindex}}
|
||||
|
||||
{{elseif $fields[$colData.field.name]}}
|
||||
|
||||
{counter name="panelFieldCount"}
|
||||
|
||||
{{$colData.displayParams}}
|
||||
|
||||
{{sugar_field parentFieldArray='fields' tabindex=$colData.field.tabindex vardef=$fields[$colData.field.name] displayType='editView' displayParams=$colData.field.displayParams typeOverride=$colData.field.type formName=$form_name}}
|
||||
|
||||
{{/if}}
|
||||
|
||||
|
||||
|
||||
{{/foreach}}
|
||||
|
||||
</tr>
|
||||
|
||||
{{/foreach}}
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
{{/if}}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{if $panelFieldCount == 0}
|
||||
|
||||
<script>document.getElementById("{{$label}}").style.display='none';</script>
|
||||
|
||||
{/if}
|
||||
|
||||
{{/foreach}}
|
||||
|
||||
{{include file='modules/Tasks/views/EditView/footer.tpl'}}
|
||||
61
modules/Tasks.cp/views/EditView/footer.tpl
Executable file
61
modules/Tasks.cp/views/EditView/footer.tpl
Executable file
@@ -0,0 +1,61 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* 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".
|
||||
********************************************************************************/
|
||||
*}
|
||||
{{if empty($form.button_location) || $form.button_location == 'bottom'}}
|
||||
<div style="padding-top: 2px">
|
||||
{{if !empty($form) && !empty($form.buttons)}}
|
||||
{{foreach from=$form.buttons key=val item=button}}
|
||||
{{sugar_button module="$module" id="$button" view="$view"}}
|
||||
{{/foreach}}
|
||||
{{else}}
|
||||
{{sugar_button module="$module" id="SAVE" view="$view"}}
|
||||
{{sugar_button module="$module" id="CANCEL" view="$view"}}
|
||||
{{/if}}
|
||||
{{sugar_button module="$module" id="Audit" view="$view"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</form>
|
||||
{{if $externalJSFile}}
|
||||
require_once("'".$externalJSFile."'");
|
||||
{{/if}}
|
||||
|
||||
{$set_focus_block}
|
||||
|
||||
{{if isset($scriptBlocks)}}
|
||||
<!-- Begin Meta-Data Javascript -->
|
||||
{{$scriptBlocks}}
|
||||
<!-- End Meta-Data Javascript -->
|
||||
{{/if}}
|
||||
80
modules/Tasks.cp/views/EditView/header.tpl
Executable file
80
modules/Tasks.cp/views/EditView/header.tpl
Executable file
@@ -0,0 +1,80 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* 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".
|
||||
********************************************************************************/
|
||||
*}
|
||||
|
||||
<form action="index.php" method="POST" name="{$form_name}" id="{$form_id}" {$enctype}>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td style="padding-bottom: 2px;">
|
||||
<input type="hidden" name="module" value="{$module}">
|
||||
{if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}
|
||||
<input type="hidden" name="record" value="">
|
||||
{else}
|
||||
<input type="hidden" name="record" value="{$fields.id.value}">
|
||||
{/if}
|
||||
<input type="hidden" name="isDuplicate" value="false">
|
||||
<input type="hidden" name="action">
|
||||
<input type="hidden" name="return_module" value="{$smarty.request.return_module}">
|
||||
<input type="hidden" name="return_action" value="{$smarty.request.return_action}">
|
||||
<input type="hidden" name="return_id" value="{$smarty.request.return_id}">
|
||||
<input type="hidden" name="contact_role">
|
||||
{if !empty($smarty.request.return_module)}
|
||||
<input type="hidden" name="relate_to" value="{$smarty.request.return_module}">
|
||||
<input type="hidden" name="relate_id" value="{$smarty.request.return_id}">
|
||||
{/if}
|
||||
<input type="hidden" name="offset" value="{$offset}">
|
||||
{{if isset($form.hidden)}}
|
||||
{{foreach from=$form.hidden item=field}}
|
||||
{{$field}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if empty($form.button_location) || $form.button_location == 'top'}}
|
||||
{{if !empty($form) && !empty($form.buttons)}}
|
||||
{{foreach from=$form.buttons key=val item=button}}
|
||||
{{sugar_button module="$module" id="$button" view="$view"}}
|
||||
{{/foreach}}
|
||||
{{else}}
|
||||
{{sugar_button module="$module" id="SAVE" view="$view"}}
|
||||
{{sugar_button module="$module" id="CANCEL" view="$view"}}
|
||||
{{/if}}
|
||||
{{if empty($form.hideAudit) || !$form.hideAudit}}
|
||||
{{sugar_button module="$module" id="Audit" view="$view"}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td align='right'>{{$ADMIN_EDIT}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
186
modules/Tasks.cp/views/EditView/view.edit.tasks.php
Executable file
186
modules/Tasks.cp/views/EditView/view.edit.tasks.php
Executable file
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
* 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".
|
||||
|
||||
* *******************************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
* Created on Apr 13, 2007
|
||||
|
||||
*
|
||||
|
||||
* To change the template for this generated file go to
|
||||
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
|
||||
*/
|
||||
|
||||
require_once('include/EditView/EditView2.php');
|
||||
|
||||
|
||||
|
||||
class ViewEditTasks extends SugarView{
|
||||
|
||||
var $ev;
|
||||
|
||||
var $type ='edit';
|
||||
|
||||
var $useForSubpanel = false; //boolean variable to determine whether view can be used for subpanel creates
|
||||
|
||||
var $showTitle = true;
|
||||
|
||||
var $tplFile = 'include/EditView/EditView.tpl';
|
||||
|
||||
|
||||
|
||||
function ViewEditTasks(){
|
||||
|
||||
parent::SugarView();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function preDisplay(){
|
||||
|
||||
$metadataFile = null;
|
||||
|
||||
$foundViewDefs = false;
|
||||
|
||||
if(file_exists('custom/modules/' . $this->module . '/metadata/editviewdefs.php')){
|
||||
|
||||
$metadataFile = 'custom/modules/' . $this->module . '/metadata/editviewdefs.php';
|
||||
|
||||
$foundViewDefs = true;
|
||||
|
||||
}else{
|
||||
|
||||
if(file_exists('custom/modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
|
||||
require_once('custom/modules/'.$this->module.'/metadata/metafiles.php');
|
||||
|
||||
if(!empty($metafiles[$this->module]['editviewdefs'])){
|
||||
|
||||
$metadataFile = $metafiles[$this->module]['editviewdefs'];
|
||||
|
||||
$foundViewDefs = true;
|
||||
|
||||
}
|
||||
|
||||
}elseif(file_exists('modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
|
||||
require_once('modules/'.$this->module.'/metadata/metafiles.php');
|
||||
|
||||
if(!empty($metafiles[$this->module]['editviewdefs'])){
|
||||
|
||||
$metadataFile = $metafiles[$this->module]['editviewdefs'];
|
||||
|
||||
$foundViewDefs = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$GLOBALS['log']->debug("metadatafile=". $metadataFile);
|
||||
|
||||
if(!$foundViewDefs && file_exists('modules/'.$this->module.'/metadata/editviewdefs.php')){
|
||||
|
||||
$metadataFile = 'modules/'.$this->module.'/metadata/editviewdefs.php';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->ev = new EditView();
|
||||
|
||||
$this->ev->ss =& $this->ss;
|
||||
|
||||
$this->ev->setup($this->module, $this->bean, $metadataFile, $this->tplFile);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function display(){
|
||||
|
||||
$this->ev->process();
|
||||
|
||||
echo $this->ev->display($this->showTitle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
78
modules/Tasks.cp/views/view.edit.php
Executable file
78
modules/Tasks.cp/views/view.edit.php
Executable 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 Tasks 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 TasksViewEdit extends ViewEdit {
|
||||
|
||||
function TasksViewEdit(){
|
||||
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'] != 'Tasks' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) {
|
||||
$this->bean->status = '';
|
||||
} //if
|
||||
if(!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'Completed')) {
|
||||
$this->bean->status = 'Completed';
|
||||
}
|
||||
parent::preDisplay();
|
||||
}
|
||||
|
||||
function display() {
|
||||
if($this->ev->isDuplicate){
|
||||
$this->bean->status = $GLOBALS['mod_strings']['LBL_DEFAULT_STATUS'];
|
||||
} //if
|
||||
parent::display();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user