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

View File

@@ -0,0 +1,5 @@
<?
$GLOBALS['db']->query("update ".$_REQUEST['type']." set status='".$_REQUEST['status']."' where id='".$_REQUEST['record']."'");
if($_REQUEST['backtoindex']==1)header("Location: index.php?module=EcmReminders&action=index");
else header("Location: index.php?module=EcmReminders&action=ReminderWindow&to_pdf=1");
?>

View File

@@ -0,0 +1,9 @@
<?
require_once("../../config.php");
$sql=mysql_connect($sugar_config['dbconfig']['db_host_name'],$sugar_config['dbconfig']['db_user_name'],$sugar_config['dbconfig']['db_password']);
mysql_select_db($sugar_config['dbconfig']['db_name']);
$GLOBALS['db']->query("update ".$_REQUEST['type']." set status='".$_REQUEST['status']."' where id='".$_REQUEST['record']."'");
header("Location: ReminderWindow.php");
mysql_close($sql);
?>

View File

@@ -0,0 +1,8 @@
<?
require_once('modules/EcmReminders/ReminderHelper.php');
closeSelected("meetings","Held","-1");
closeSelected("calls","Held","-1");
closeSelected("ecmreminders","Held","-1");
if($_REQUEST['backtoindex']==1)header("Location: index.php?module=EcmReminders&action=index");
else header("Location: index.php?module=EcmReminders&action=ReminderWindow&to_pdf=1");
?>

View File

@@ -0,0 +1,79 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
global $current_user;
$dashletData['MyEcmRemindersDashlet']['searchFields'] = array(
'date_entered' => array('default' => ''),
'date_modified' => array('default' => ''),
'assigned_user_id' => array('type' => 'assigned_user_name',
'default' => $current_user->name)
);
$dashletData['MyEcmRemindersDashlet']['columns'] = array(
'name' => array(
'width' => '40',
'label' => 'LBL_LIST_NAME',
'link' => true,
'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' => 'LBL_CREATED'),
'assigned_user_name' => array(
'width' => '8',
'label' => 'LBL_LIST_ASSIGNED_USER'),
);
?>

View File

@@ -0,0 +1,59 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
global $app_strings;
$dashletMeta['MyEcmRemindersDashlet'] = array(
'title' => translate('LBL_LIST_MY_ECMREMINDERS', 'EcmReminders'),
'icon' => 'modules/EcmReminders/images/EcmReminders.gif',
'description' => 'A customizable view into EcmReminders',
'category' => 'Module Views',
'hidden' => true);
?>

View File

@@ -0,0 +1,75 @@
<?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.
********************************************************************************/
require_once('include/Dashlets/DashletGeneric.php');
require_once('modules/EcmReminders/EcmReminder.php');
require_once('modules/EcmReminders/Dashlets/MyEcmRemindersDashlets/MyEcmRemindersDashlet.data.php');
class MyEcmRemindersDashlet extends DashletGeneric {
function MyEcmRemindersDashlet($id, $def = null) {
global $current_user, $app_strings, $dashletData;
parent::DashletGeneric($id, $def);
$this->searchFields = $dashletData['MyEcmRemindersDashlet']['searchFields'];
$this->columns = $dashletData['MyEcmRemindersDashlet']['columns'];
if(empty($def['title']))
$this->title = translate('LBL_LIST_MY_ECMREMINDERS', 'EcmReminders');
$this->seedBean = new EcmReminder();
}
function displayOptions() {
$this->processDisplayOptions();
$this->configureSS->assign('searchFields', $this->currentSearchFields);
return $this->configureSS->fetch($this->configureTpl);
}
}
?>

View File

@@ -0,0 +1,67 @@
<?php
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('modules/EcmReminders/EcmReminder.php');
$focus = new EcmReminder();
// PERFORM THE DELETE IF GIVEN A RECORD TO DELETE
if(!isset($_REQUEST['record']))
sugar_die("A record number must be specified to delete the record.");
$focus->retrieve($_REQUEST['record']);
if(!$focus->ACLAccess('Delete')){
ACLController::displayNoAccess(true);
sugar_cleanup(true);
}
$focus->mark_deleted($_REQUEST['record']);
// NOW THAT THE DELETE HAS BEEN PERFORMED, RETURN TO GIVEN LOCATION
header("Location: index.php?module=".$_REQUEST['return_module']."&action=".$_REQUEST['return_action']."&record=".$_REQUEST['return_id']);
?>

View File

@@ -0,0 +1,125 @@
<!--
/*****************************************************************************
* 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.
********************************************************************************/
-->
<!-- BEGIN: main -->
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<form action="index.php" method="post" name="DetailView" id="form">
<input type="hidden" name="module" value="EcmReminders">
<input type="hidden" name="record" value="{ID}">
<input type="hidden" name="isDuplicate" value=false>
<input type="hidden" name="action">
<input type="hidden" name="return_module">
<input type="hidden" name="return_action">
<input type="hidden" name="return_id" >
<tr>
<td style="padding-bottom: 2px;">
<input title="{APP.LBL_EDIT_BUTTON_TITLE}"
accessKey="{APP.LBL_EDIT_BUTTON_KEY}"
class="button"
onclick="this.form.return_module.value='EcmReminders'; this.form.return_action.value='DetailView'; this.form.return_id.value='{ID}'; this.form.action.value='EditView'"
type="submit"
name="Edit"
value=" {APP.LBL_EDIT_BUTTON_LABEL} ">
<input title="{APP.LBL_DUPLICATE_BUTTON_TITLE}"
accessKey="{APP.LBL_DUPLICATE_BUTTON_KEY}"
class="button"
onclick="this.form.return_module.value='EcmReminders'; this.form.return_action.value='index'; this.form.isDuplicate.value=true; this.form.action.value='EditView'"
type="submit"
name="Duplicate"
value=" {APP.LBL_DUPLICATE_BUTTON_LABEL} ">
<input title="{APP.LBL_DELETE_BUTTON_TITLE}"
accessKey="{APP.LBL_DELETE_BUTTON_KEY}"
class="button"
onclick="this.form.return_module.value='EcmReminders'; this.form.return_action.value='ListView'; this.form.action.value='Delete'; return confirm('{APP.NTC_DELETE_CONFIRMATION}')"
type="submit"
name="Delete"
value=" {APP.LBL_DELETE_BUTTON_LABEL} ">
{FIND_DUPES_MERGE_BUTTON}
</td>
<td align='right'>{ADMIN_EDIT}</td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="{GRIDLINE}" cellpadding="0" class="tabDetailView">
{PAGINATION}
<tr>
<td width="15%" class="tabDetailViewDL"><span sugar='slot1'>{MOD.LBL_NAME}</span sugar='slot'></td>
<td width="35%" class="tabDetailViewDF"><span sugar='slot1b'>{NAME}&nbsp;</span sugar='slot'></td>
<td width="15%" valign="top" class="tabDetailViewDL"><span sugar='slot2'>{APP.LBL_ASSIGNED_TO}</span sugar='slot'></td>
<td width="35%" valign="top" class="tabDetailViewDF"><span sugar='slot2b'>{ASSIGNED_TO}</span sugar='slot'></td>
</tr>
<tr>
<td valign="top" class="tabDetailViewDL"><span sugar='slot3'>{MOD.LBL_PARENT_ID}</span sugar='slot'></td>
<td valign="top" class="tabDetailViewDF"><span sugar='slot3b'>{PARENT_ID}</span sugar='slot'></td>
<td valign="top" class="tabDetailViewDL"><span sugar='slot4'>{MOD.LBL_PARENT_NAME}</span sugar='slot'></td>
<td valign="top" class="tabDetailViewDF"><span sugar='slot4b'>{PARENT_NAME}</span sugar='slot'></td>
</tr>
<tr>
<td valign="top" class="tabDetailViewDL"><span sugar='slot5'>{MOD.LBL_DESCRIPTION}</span sugar='slot'></td>
<td valign="top" class="tabDetailViewDF"><span sugar='slot5b'>{DESCRIPTION}&nbsp;</span sugar='slot'></td>
<td valign="top" class="tabDetailViewDL"><span sugar='slot6'>{MOD.LBL_DATE_START}</span sugar='slot'></td>
<td valign="top" class="tabDetailViewDF"><span sugar='slot6b'>{DATE_START}</span sugar='slot'></td>
</tr>
</table>
<!-- END: main -->
<!-- BEGIN: subpanel -->
<span sugar='slot23'>{SUBPANEL}</span sugar='slot'>
<!-- END: subpanel -->

View File

@@ -0,0 +1,145 @@
<?php
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('XTemplate/xtpl.php');
require_once('data/Tracker.php');
require_once('modules/EcmReminders/EcmReminder.php');
require_once('modules/EcmReminders/Forms.php');
require_once('include/DetailView/DetailView.php');
global $mod_strings;
global $app_strings;
$focus = new EcmReminder();
$detailView = new DetailView();
$offset = 0;
// ONLY LOAD A RECORD IF A RECORD ID IS GIVEN;
// A RECORD ID IS NOT GIVEN WHEN VIEWING IN LAYOUT EDITOR
if (isset($_REQUEST['offset']) or isset($_REQUEST['record'])) {
$result = $detailView->processSugarBean("ECMREMINDERS", $focus, $offset);
if($result == null) {
sugar_die($app_strings['ERROR_NO_RECORD']);
}
$focus = $result;
}else{
header("Location: index.php?module={EcmReminders}&action=index");
}
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
}
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->name, true);
echo "\n</p>\n";
global $theme;
$theme_path = "themes/".$theme."/";
$image_path = $theme_path."images/";
require_once($theme_path.'layout_utils.php');
$GLOBALS['log']->info("EcmReminders detail view");
$focus->format_all_fields();
$xtpl=new XTemplate ('modules/EcmReminders/DetailView.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("THEME", $theme);
$xtpl->assign("GRIDLINE", $gridline);
$xtpl->assign("IMAGE_PATH", $image_path);
$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
$xtpl->assign("ID", $focus->id);
$xtpl->assign("ASSIGNED_TO", $focus->assigned_user_name);
$xtpl->assign("NAME", $focus->name);
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
$xtpl->assign("PARENT_ID", $focus->parent_id);
$xtpl->assign("PARENT_NAME", $focus->parent_name);
$xtpl->assign("DESCRIPTION", nl2br(url2html($focus->description)));
$xtpl->assign("DATE_START", $focus->date_start);
global $current_user;
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
$xtpl->assign("ADMIN_EDIT","<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$_REQUEST['record']. "'>".get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
}
$xtpl->assign("CREATED_BY", $focus->created_by_name);
$xtpl->assign("MODIFIED_BY", $focus->modified_by_name);
$detailView->processListNavigation($xtpl, "ECMREMINDERS", $offset, $focus->is_AuditEnabled());
// ADDING CUSTOM FIELDS:
require_once('modules/DynamicFields/templates/Files/DetailView.php');
if(!empty($focus->id)) {
$merge_button = <<<EOQ
<input title="{$app_strings['LBL_DUP_MERGE']}" accessKey="M" class="button" onclick="this.form.return_module.value='EcmReminders'; this.form.return_action.value='DetailView';this.form.return_id.value='{$focus->id}'; this.form.action.value='Step1'; this.form.module.value='MergeRecords';" type="submit" name="Merge" value=" {$app_strings['LBL_DUP_MERGE']} "/>
EOQ;
$xtpl->assign("FIND_DUPES_MERGE_BUTTON", $merge_button);
}
$xtpl->parse("main");
$xtpl->out("main");
$sub_xtpl = $xtpl;
$old_contents = ob_get_contents();
ob_end_clean();
ob_start();
echo $old_contents;
require_once('modules/SavedSearch/SavedSearch.php');
$savedSearch = new SavedSearch();
$json = getJSONobj();
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('EcmReminders')));
$str = "<script>
YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
</script>";
echo $str;
?>

View File

@@ -0,0 +1,302 @@
<?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.
********************************************************************************/
require_once('data/SugarBean.php');
require_once('include/utils.php');
// SHOULD INCLUDE SELECTIVELY
class EcmReminder extends SugarBean {
var $field_name_map = array();
// STANDARD FIELDS
var $id;
var $date_entered;
var $date_modified;
var $modified_user_id;
var $assigned_user_id;
var $name;
//TABLE COLUMNS
var $parent_id;
var $parent_name;
var $description;
var $date_start;
var $role_id;
var $status;
// RELATED FIELDS
var $created_by;
var $created_by_name;
var $modified_by_name;
var $assigned_user_name;
// SUBPANELS RELATED
// MODULE OBJECT DETAILS
var $module_dir = 'EcmReminders';
var $table_name = "ecmreminders";
var $object_name = "EcmReminder";
//RELATED TABLE NAMES
// USED TO RETRIEVE RELATED FIELDS FROM FORM POSTS.
var $additional_column_fields = Array(
'assigned_user_name',
'assigned_user_id',
'modified_user_id',
'created_by',
);
var $relationship_fields = Array(
//RELATIONSHIP FIELDS
);
function EcmReminder() {
parent::SugarBean();
$this->setupCustomFields('EcmReminders');
foreach ($this->field_defs as $field)
{
$this->field_name_map[$field['name']] = $field;
}
}
var $new_schema = true;
function get_summary_text(){
return "$this->name";
}
function create_new_list_query($order_by, $where, $show_deleted = 0){
// Fill in the assigned_user_name
if($_REQUEST['module']=="Home")
{
$custom_join = $this->custom_fields->getJOIN();
$query['select'] = "SELECT ";
$query['select'] .= "
ecmreminders.*
,users.user_name as assigned_user_name";
if($custom_join){
$query .= $custom_join['select'];
}
$query['from'] .= " FROM ecmreminders
LEFT JOIN users
ON ecmreminders.assigned_user_id=users.id";
$query['from'] .= " ";
if($custom_join){
$query['from'] .= $custom_join['join'];
}
$where_auto = '1=1';
if($show_deleted == 0){
$where_auto = " $this->table_name.deleted=0 ";
}else if($show_deleted == 1){
$where_auto = " $this->table_name.deleted=1 ";
}
if($where != "")
$query['where'] .= "where $where AND ".$where_auto;
else
$query['where'] .= "where ".$where_auto;
if(substr_count($order_by, '.') > 0){
$query['order_by'] .= " ORDER BY $order_by";
}
else if($order_by != "")
$query['order_by'] .= " ORDER BY $order_by";
else
$query['order_by'] .= " ORDER BY ecmreminders.name";
return $query;
}
else
{
$ret_array['select']="select calls.*,meetings.*,ecmreminders.* ";
$ret_array['from']="from calls,meetings,ecmreminders ";
$ret_array['where']="where calls.deleted='0' and meetings.deleted='0' and ecmreminders.deleted='0' ";
$ret_array['order_by']="";
return $ret_array;
}
}
function create_list_query($order_by, $where, $show_deleted = 0){
// Fill in the assigned_user_name
$custom_join = $this->custom_fields->getJOIN();
$query = "SELECT ";
$query .= "
ecmreminders.*
,users.user_name as assigned_user_name";
if($custom_join){
$query .= $custom_join['select'];
}
$query .= " FROM ecmreminders
LEFT JOIN users
ON ecmreminders.assigned_user_id=users.id";
$query .= " ";
if($custom_join){
$query .= $custom_join['join'];
}
$where_auto = '1=1';
if($show_deleted == 0){
$where_auto = " $this->table_name.deleted=0 ";
}else if($show_deleted == 1){
$where_auto = " $this->table_name.deleted=1 ";
}
if($where != "")
$query .= "where $where AND ".$where_auto;
else
$query .= "where ".$where_auto;
if(substr_count($order_by, '.') > 0){
$query .= " ORDER BY $order_by";
}
else if($order_by != "")
$query .= " ORDER BY $order_by";
else
$query .= " ORDER BY ecmreminders.name";
return $query;
}
function create_export_query($order_by, $where){
$custom_join = $this->custom_fields->getJOIN();
$query = "SELECT
ecmreminders.*,
users.user_name assigned_user_name";
if($custom_join){
$query .= $custom_join['select'];
}
$query .= " FROM ecmreminders ";
$query .= " LEFT JOIN users
ON ecmreminders.assigned_user_id=users.id";
if($custom_join){
$query .= $custom_join['join'];
}
$query .= "";
$where_auto = " ecmreminders.deleted=0
";
if($where != "")
$query .= " where $where AND ".$where_auto;
else
$query .= " where ".$where_auto;
if($order_by != "")
$query .= " ORDER BY $order_by";
else
$query .= " ORDER BY ecmreminders.name";
return $query;
}
function fill_in_additional_list_fields(){
}
function fill_in_additional_detail_fields(){
// FILL IN THE ASSIGNED_USER_NAME
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
$this->created_by_name = get_assigned_user_name($this->created_by);
$this->modified_by_name = get_assigned_user_name($this->modified_user_id);
}
function get_list_view_data(){
global $current_language;
$the_array = parent::get_list_view_data();
$app_list_strings = return_app_list_strings_language($current_language);
$mod_strings = return_module_language($current_language, 'EcmReminders');
// THE NEW LISTVIEW CODE ONLY FETCHES COLUMNS THAT WE'RE DISPLAYING AND NOT ALL
// THE COLUMNS SO WE NEED THESE CHECKS.
$the_array['NAME'] = (($this->name == "") ? "<em>blank</em>" : $this->name);
$the_array['ENCODED_NAME'] = $this->name;
return $the_array;
}
/**
BUILDS A GENERIC SEARCH BASED ON THE QUERY STRING USING OR.
DO NOT INCLUDE ANY $THIS-> BECAUSE THIS IS CALLED ON WITHOUT HAVING THE CLASS INSTANTIATED.
*/
function build_generic_where_clause ($the_query_string) {
$where_clauses = Array();
$the_query_string = PearDatabase::quote(from_html($the_query_string));
array_push($where_clauses, "ecmreminders.name like '$the_query_string%'");
$the_where = "";
foreach($where_clauses as $clause){
if($the_where != "") $the_where .= " or ";
$the_where .= $clause;
}
return $the_where;
}
function set_notification_body($xtpl, $simplemodule){
global $mod_strings, $app_list_strings;
$xtpl->assign("NAME", $simplemodule->name);
$xtpl->assign("ECMREMINDERS_DESCRIPTION", $ecmreminders->description);
return $xtpl;
}
function bean_implements($interface){
switch($interface){
case 'ACL':return true;
}
return false;
}
function save($check_notify = FALSE){
return parent::save($check_notify);
}
}
?>

View File

@@ -0,0 +1,99 @@
<?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.
********************************************************************************/
require_once('include/EditView/QuickCreate.php');
require_once('modules/EcmReminders/EcmReminder.php');
require_once('include/javascript/javascript.php');
class EcmRemindersQuickCreate extends QuickCreate {
var $javascript;
function process() {
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
$mod_strings = return_module_language($current_language, 'EcmReminders');
parent::process();
//BUILDER:START dropdowns setup
//BUILDER:END dropdowns setup
if($this->viaAJAX) { // OVERRIDE FOR AJAX CALL
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"ecmremindersQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"ecmreminders\"); else return false;'");
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_ecmreminders\")';");
}
$this->ss->assign('viaAJAX', $this->viaAJAX);
$this->javascript = new javascript();
$this->javascript->setFormName('ecmremindersQuickCreate');
$focus = new EcmReminder();
$this->javascript->setSugarBean($focus);
$this->javascript->addAllFields('');
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
$json = getJSONobj();
$popup_request_data = array(
'call_back_function' => 'set_return',
'form_name' => 'ecmremindersQuickCreate',
'field_to_name_array' => array(
'id' => 'account_id',
'name' => 'account_name',
),
);
$encoded_popup_request_data = $json->encode($popup_request_data);
$this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data);
}
}
?>

View File

@@ -0,0 +1,180 @@
<!--
/*****************************************************************************
* 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.
********************************************************************************/
-->
<!-- BEGIN: main -->
<script type="text/javascript" src="include/javascript/popup_parent_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<form name="EditView" method="POST" action="index.php">
<input type="hidden" name="module" value="EcmReminders">
<input type="hidden" name="record" value="{ID}">
<input type="hidden" name="action">
<input type="hidden" name="return_module" value="{RETURN_MODULE}">
<input type="hidden" name="return_id" value="{RETURN_ID}">
<input type="hidden" name="return_action" value="{RETURN_ACTION}">
<input type="hidden" name="contact_id" value="{CONTACT_ID}">
<input type="hidden" name="email_id" value="{EMAIL_ID}">
<input type="hidden" name="account_id" value="{ACCOUNT_ID}">
<input type="hidden" name="case_id" value="{CASE_ID}">
<!--// InboundEmail support //-->
<input type="hidden" name="inbound_email_id" value="{INBOUND_EMAIL_ID}">
<input type="hidden" name="start" value="{START}">
<input type="hidden" name="type" value="{TYPE}">
<td style="padding-bottom: 2px;">
<input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button"
onclick="this.form.action.value='Save';return check_form('EditView');"
type="submit" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " >
<input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button"
onclick="this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'"
type="submit" name="button" value=" {APP.LBL_CANCEL_BUTTON_LABEL} ">
</td>
<td align="right" nowrap><span class="required">{APP.LBL_REQUIRED_SYMBOL}</span> {APP.NTC_REQUIRED}</td>
<td align='right'>{ADMIN_EDIT}</td>
</tr>
</table>
<p>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabForm">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15%" class="dataLabel"><span sugar='slot1'>{MOD.LBL_NAME} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></span sugar='slot'></td>
<td width="35%" class="dataField"><span sugar='slot1b'><input name='name' type="text" tabindex='1' size='35' maxlength='50' value="{NAME}"></span sugar='slot'></td>
<td class="dataLabel" ><span sugar='slot2'>{APP.LBL_ASSIGNED_TO}</span sugar='slot'></td>
<td class="dataField">
<span sugar='slot2b'>
<input class="sqsEnabled" tabindex="2" autocomplete="off" id="assigned_user_name" name='assigned_user_name' type="text" value="{ASSIGNED_USER_NAME}">
<input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{ASSIGNED_USER_ID}" />
<input title="{APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{APP.LBL_SELECT_BUTTON_KEY}" type="button" class="button" value='{APP.LBL_SELECT_BUTTON_LABEL}' name=btn1
onclick='open_popup("Users", 600, 400, "", true, false, {encoded_users_popup_request_data});' /></span sugar='slot'>
</td>
</tr>
<tr>
<!-- BEGIN: pro -->
<td width="15%" class="dataLabel">
<span sugar='slot4'>{APP.LBL_TEAM} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></span sugar='slot'>
</td>
<td class="dataField">
<span sugar='slot4b'>
<input class="sqsEnabled" tabindex="3" autocomplete="off" id="team_name" name='team_name' type="text" value="{TEAM_NAME}">
<input id='team_id' name='team_id' type="hidden" value="{TEAM_ID}" />
<input title="{APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{APP.LBL_SELECT_BUTTON_KEY}" type="button" tabindex='4' class="button" value='{APP.LBL_SELECT_BUTTON_LABEL}' name=btn1
onclick='open_popup("Teams", 600, 400, "", true, false, {encoded_team_popup_request_data});' />
</span sugar='slot'>
</td>
<!-- END: pro -->
<!-- BEGIN: open_source -->
<!-- END: open_source -->
</tr>
<tr>
<td valign="top" class="dataLabel"><span sugar='slot3'>{MOD.LBL_PARENT_ID}</span sugar='slot'></td>
<td valign="top" class="dataField">
<span sugar='slot3b'>
<input name='parent_id' title="Parent Id" type="text" tabindex='3' maxlength='36' value="{PARENT_ID}">
</span sugar='slot'>
</td>
<td valign="top" class="dataLabel"><span sugar='slot4'>{MOD.LBL_PARENT_NAME}</span sugar='slot'></td>
<td valign="top" class="dataField">
<span sugar='slot4b'>
<input name='parent_name' title="Parent Name" type="text" tabindex='4' maxlength='255' value="{PARENT_NAME}">
</span sugar='slot'>
</td>
</tr>
<tr>
<td width="15%" class="dataLabel" valign="top"><span sugar='slot5'>{MOD.LBL_DESCRIPTION}</span sugar='slot'></td>
<td width="35%" class="dataField">
<span sugar='slot5b'>
<textarea name='description' title="Description" tabindex='5' cols="30" rows="8">{DESCRIPTION}</textarea>
</span sugar='slot'>
</td>
<td class="dataLabel"><span sugar='slot6'>{MOD.LBL_DATE_START} </span sugar='slot'></td>
<td class="dataField">
<span sugar='slot6b'>
<input name='date_start'
onblur="parseDate(this, '{CALENDAR_DATEFORMAT}');"
id='jscal_fielddate_start'
type="text"
title="Date Start"
tabindex='6'
size='11'
maxlength='10'
value="{DATE_START}">
<img src="themes/{THEME}/images/jscalendar.gif" alt="{APP.LBL_ENTER_DATE}" id="jscal_triggerdate_start" align="absmiddle">
<span class="dateFormat">{USER_DATEFORMAT}</span>
<script>
Calendar.setup ({inputField : 'jscal_fielddate_start', ifFormat : '{CALENDAR_DATEFORMAT}', showsTime : false, button : 'jscal_triggerdate_start', singleClick : true, step : 1});addToValidate('EditView', 'date_start', 'date', false,'date_start' );
</script>
</span sugar='slot'>
</td>
</tr>
</table>
</td>
</tr>
</table>
</p>
<div style="padding-top: 2px">
<input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save';return check_form('EditView');" type="submit" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " >
<input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'" type="submit" name="button" value=" {APP.LBL_CANCEL_BUTTON_LABEL} ">
</div>
</form>
{JAVASCRIPT}
<!-- END: main -->

View File

@@ -0,0 +1,285 @@
<?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.
********************************************************************************/
// INCLUDE SUPPPORT MODULES
require_once('XTemplate/xtpl.php');
require_once('data/Tracker.php');
// INCLUDE MODULE OBJECT AND FORMS
require_once('modules/EcmReminders/EcmReminder.php');
require_once('modules/EcmReminders/Forms.php');
global $app_strings;
global $mod_strings;
global $mod_strings;
global $current_user;
global $sugar_version, $sugar_config;
// INSTANTIATES THE MODULE CLASSES
$focus = new EcmReminder();
// IF PROCESSING AN EXISTING RECORD, RETRIEVE IT
if(isset($_REQUEST['record'])) {
$focus->retrieve($_REQUEST['record']);
$focus->unformat_all_fields();
}
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
$focus->simplemodule_number = "";
}
$prefillArray = array(
'priority' => 'priority',
'name' => 'name',
'description' => 'description',
'status' => 'status',
'type' => 'type',
);
foreach($prefillArray as $requestKey => $focusVar) {
if (isset($_REQUEST[$requestKey]) && is_null($focus->$focusVar)) {
$focus->$focusVar = urldecode($_REQUEST[$requestKey]);
}
}
// BUILD MODULE TITLE LINE
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->name, true);
echo "\n</p>\n";
global $theme;
$theme_path = "themes/".$theme."/";
$image_path = $theme_path."images/";
require_once ($theme_path.'layout_utils.php');
$GLOBALS['log']->info("EcmReminders detail view");
// ASSIGN XTEMPLATE
$xtpl = new XTemplate ('modules/EcmReminders/EditView.html');
// FILL XTEMPLATE MODULE & APPLICATION LANGUAGE STRINGS
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
if (isset($_REQUEST['return_action'])) $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
if (empty($_REQUEST['return_id'])) {
$xtpl->assign("RETURN_ACTION", 'index');
}
///////////////////////////////////////
// SETUP POPUPS START
// Users Popup
$json = getJSONobj();
$popup_request_data = array(
'call_back_function' => 'set_return',
'form_name' => 'EditView',
'field_to_name_array' => array(
'id' => 'assigned_user_id',
'user_name' => 'assigned_user_name',
),
);
$xtpl->assign('encoded_users_popup_request_data', $json->encode($popup_request_data));
//
////////////////////////////////////////////////////////////////////////////////
// ACCOUNT_ID WILL BE SET WHEN USER CHOOSES TO CREATE A NEW SIMPLEMODULE FROM ACCOUNT DETAIL VIEW.
if (isset($_REQUEST['account_id'])) $xtpl->assign("ACCOUNT_ID", $_REQUEST['account_id']);
if (isset($_REQUEST['contact_id'])) $xtpl->assign("CONTACT_ID", $_REQUEST['contact_id']);
// SET THE CASE_ID, IF SET.
// WITH NEW CONCEPT OF SUBPANELS IT,
// WHEN THE SUBPANEL IS DISPLAYED IT PULLS FROM THE CLASS NAME WHICH IN THE SITUATION OF CASES IS ACASE SO THE FORM IS GENERATED
// WITH ACASE_ID INSTEAD OF CASE_ID, SO I HAVE DONE THE MAPPING HERE
if (isset($_REQUEST['acase_id'])) $xtpl->assign("CASE_ID",$_REQUEST['acase_id']);
else if(isset($_REQUEST['case_id'])) $xtpl->assign("CASE_ID",$_REQUEST['case_id']);
////////////////////////////////////////////////////////////////////////////////
// QUICK SEARCH SETUP
require_once('include/QuickSearchDefaults.php');
$qsd = new QuickSearchDefaults();
$sqs_objects = array(
'assigned_user_name' => $qsd->getQSUser(),
/*
//BUILDER:START Pro only
'team_name' => $qsd->getQSTeam()
//BUILDER:END Pro only
*/
);
$quicksearch_js = $qsd->getQSScripts();
$quicksearch_js .= '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
// QUICK SEARCH SETUP
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// ASSIGN GLOBAL VARIABLES
$xtpl->assign("THEME", $theme);
$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
$xtpl->assign("JAVASCRIPT", get_set_focus_js().get_validate_record_js(). $quicksearch_js);
$xtpl->assign("USER_DATEFORMAT", '('. $timedate->get_user_date_format().')');
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
// ASSIGN GLOBAL VARIABLES
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// ASSIGN MODULE DEFAULT VARIABLES
$xtpl->assign("ID", $focus->id);
if (!empty($focus->name))
$xtpl->assign("NAME", $focus->name);
else $xtpl->assign("NAME", "");
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
$xtpl->assign("CREATED_BY", $focus->created_by_name);
$xtpl->assign("MODIFIED_BY", $focus->modified_by_name);
if (empty($focus->assigned_user_id) && empty($focus->id)) $focus->assigned_user_id = $current_user->id;
if (empty($focus->assigned_name) && empty($focus->id)) $focus->assigned_user_name = $current_user->user_name;
$xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id));
$xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name);
$xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id );
// ASSIGN MODULE SPECIFIC VARIABLES
$xtpl->assign("PARENT_ID", $focus->parent_id);
$xtpl->assign("PARENT_NAME", $focus->parent_name);
$xtpl->assign("DESCRIPTION", $focus->description);
$xtpl->assign("DATE_START", $focus->date_start);
// ASSIGN MODULE DROPDOWNS WITH DEFAULT KEY
// ASSIGN MODULE VARIABLES AFFECTED BY DUPLICATE ACTION
if(!isset($_REQUEST['isDuplicate'])) {
$focus->id = "";
}
// ASSIGN MODULE DROPDOWNS WITHOUT DEFAULT KEY
//BUILDER:END of xtpl
// ADD CUSTOM FIELDS
require_once('modules/DynamicFields/templates/Files/EditView.php');
////////////////////////////////////////////////////////////////////////////////
// USER ASSIGNMENT
global $current_user;
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
$record = '';
// USER ASSIGNMENT
////////////////////////////////////////////////////////////////////////////////
if(!empty($_REQUEST['record'])){
$record = $_REQUEST['record'];
}
$xtpl->assign("ADMIN_EDIT","<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$record. "'>".get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
}
$xtpl->parse("main");
$xtpl->out("main");
require_once('include/javascript/javascript.php');
$javascript = new javascript();
$javascript->setFormName('EditView');
$javascript->setSugarBean($focus);
$javascript->addAllFields('');
//BUILDER:START Pro only
// $javascript->addFieldGeneric( 'team_name', 'varchar', $app_strings['LBL_TEAM'] ,'true');
// $javascript->addToValidateBinaryDependency('team_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_TEAM'], 'false', '', 'team_id');
//BUILDER:END Pro only
$javascript->addToValidateBinaryDependency('assigned_user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'], 'false', '', 'assigned_user_id');
echo $javascript->getScript();
////////////////////////////////////////////////////////////////////////////////
/// SELECT CHANGES TEXT INPUT FIELD
/*
$prob_array = $json->encode($app_list_strings['sales_probability_dom']);
$prePopProb = '';
if(empty($focus->id)) $prePopProb = 'document.getElementsByName(\'sales_stage\')[0].onchange();';
echo <<<EOQ
<script>
prob_array = $prob_array;
document.getElementsByName('sales_stage')[0].onchange = function() {
if(typeof(document.getElementsByName('sales_stage')[0].value) != "undefined" && prob_array[document.getElementsByName('sales_stage')[0].value]) {
document.getElementsByName('probability')[0].value = prob_array[document.getElementsByName('sales_stage')[0].value];
}
};
$prePopProb
</script>
EOQ;
*/
//
/// SELECT CHANGES TEXT INPUT FIELD
////////////////////////////////////////////////////////////////////////////////
require_once('modules/SavedSearch/SavedSearch.php');
$savedSearch = new SavedSearch();
$json = getJSONobj();
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('EcmReminders')));
$str = "<script>
YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
</script>";
echo $str;
?>

View File

@@ -0,0 +1,112 @@
<?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.
********************************************************************************/
/*******************************************************************************
* CREATE JAVASCRIPT TO VALIDATE THE DATA ENTERED INTO A RECORD.
*******************************************************************************/
function get_validate_record_js () {
}
/*******************************************************************************
* CREATE FORM FOR MENU RAPID CREATE
*******************************************************************************/
/*
function get_new_record_form () {
if(!ACLController::checkAccess('EcmReminders', 'edit', true)){
return '';
}
global $mod_strings;
global $app_strings;
global $app_list_strings;
global $mod_strings;
global $theme;
global $current_user;
$lbl_subject = $mod_strings['LBL_SUBJECT'];
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
$user_id = $current_user->id;
$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
$the_form .= <<<EOQ
<form name="EcmReminderSave" onSubmit="return check_form('EcmRemindersSave')" method="POST" action="index.php">
<input type="hidden" name="module" value="EcmReminders">
<input type="hidden" name="record" value="">
<input type="hidden" name="assigned_user_id" value='${user_id}'>
<input type="hidden" name="action" value="Save">
${lbl_subject}&nbsp;<span class="required">${lbl_required_symbol}</span><br>
<p><input name='name' type="text" size='20' maxlength="255"value=""><br>
</p>
<p>
<input title="${lbl_save_button_title}" accessKey="${lbl_save_button_key}" class="button" type="submit" name="button" value=" ${lbl_save_button_label} " >
</p>
</form>
EOQ;
require_once('include/javascript/javascript.php');
require_once('modules/EcmReminders/EcmReminder.php');
$javascript = new javascript();
$javascript->setFormName('EcmRemindersSave}');
$javascript->setSugarBean(new EcmReminder());
$javascript->addRequiredFields('');
$the_form .= $javascript->getScript();
$the_form .= get_left_form_footer();
return $the_form;
}
*/
?>

View File

@@ -0,0 +1,98 @@
<!--
/*****************************************************************************
* 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.
********************************************************************************/
-->
<!-- 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" NOWRAP>{CHECKALL}</td>
<td scope="col" width="32%" class="listViewThS1" NOWRAP><slot><a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_LIST_SUBJECT}{arrow_start}{name_arrow}{arrow_end}</a></slot></td>
<!-- BEGIN: pro_nav -->
<td scope="col" width="9%" class="listViewThS1" NOWRAP><slot><a href="{ORDER_BY}teams.name" class="listViewThLinkS1">{APP.LBL_LIST_TEAM}{arrow_start}{teams_name_arrow}{arrow_end}</a></slot></td>
<!-- END: pro_nav -->
<!-- BEGIN: open_source -->
<!-- END: open_source -->
<td scope="col" width="9%" class="listViewThS1" NOWRAP><slot><a href="{ORDER_BY}users.user_name" class="listViewThLinkS1">{APP.LBL_LIST_ASSIGNED_USER}{arrow_start}{users_user_name_arrow}{arrow_end}</a></slot></td>
</tr>
<!-- BEGIN: row -->
<tr height="20"
onmouseover="setPointer(this, '{ECMREMINDER.NAME}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
onmouseout="setPointer(this, '{ECMREMINDER.NAME}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
onmousedown="setPointer(this, '{ECMREMINDER.NAME}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>{PREROW}</td>
<td scope='row' valign=TOP class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
<slot>
<{TAG.MAIN} href="{URL_PREFIX}index.php?action=DetailView&module=EcmReminders&record={ECMREMINDER.ID}&offset={ECMREMINDER.OFFSET}&stamp={ECMREMINDER.STAMP}" class="listViewTdLinkS1">{ECMREMINDER.NAME}</{TAG.MAIN}>
</slot>
</td>
<!-- BEGIN: pro -->
<td valign=TOP class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" nowrap><slot>{ECMREMINDER.TEAM_NAME}</slot></td>
<!-- END: pro -->
<!-- BEGIN: open_source -->
<!-- END: open_source -->
<td valign=TOP class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" nowrap><slot>{ECMREMINDER.ASSIGNED_USER_NAME}</slot></td>
</tr>
<tr><td colspan="20" class="listViewHRS1"></td></tr>
<!-- END: row -->
{PAGINATION}
</table>
<!-- END: main -->

View File

@@ -0,0 +1,188 @@
<?php
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once ('XTemplate/xtpl.php');
require_once ("data/Tracker.php");
require_once ('modules/EcmReminders/EcmReminder.php');
require_once ('themes/'.$theme.'/layout_utils.php');
require_once ('log4php/LoggerManager.php');
require_once('include/ListView/ListViewSmarty.php');
require_once('modules/Currencies/Currency.php');
if(file_exists('custom/modules/EcmReminders/metadata/listviewdefs.php')){
require_once('custom/modules/EcmReminders/metadata/listviewdefs.php');
}else{
require_once('modules/EcmReminders/metadata/listviewdefs.php');
}
require_once('modules/SavedSearch/SavedSearch.php');
require_once('include/SearchForm/SearchForm.php');
$header_text = '';
global $app_strings;
global $mod_strings;
global $app_list_strings;
global $current_language;
$current_module_strings = return_module_language($current_language, 'EcmReminders');
global $urlPrefix;
global $currentModule;
global $theme;
global $current_user;
// FOCUS_LIST IS THE MEANS OF PASSING DATA TO A LISTVIEW.
global $focus_list;
// SETUP QUICKSEARCH
require_once('include/QuickSearchDefaults.php');
$qsd = new QuickSearchDefaults();
// CLEAR THE DISPLAY COLUMNS BACK TO DEFAULT WHEN CLEAR QUERY IS CALLED
if(!empty($_REQUEST['clear_query']) && $_REQUEST['clear_query'] == 'true')
$current_user->setPreference('ListViewDisplayColumns', array(), 0, $currentModule);
$savedDisplayColumns = $current_user->getPreference('ListViewDisplayColumns', $currentModule); // GET USER DEFINED DISPLAY COLUMNS
$json = getJSONobj();
$seedEcmReminder = new EcmReminder(); // SEED BEAN
$searchForm = new SearchForm('EcmReminders', $seedEcmReminder); // NEW SEARCHFORM INSTANCE
// SETUP LISTVIEW SMARTY
$lv = new ListViewSmarty();
$displayColumns = array();
// CHECK $_REQUEST IF NEW DISPLAY COLUMNS FROM POST
if (!empty($_REQUEST['displayColumns'])) {
foreach (explode('|', $_REQUEST['displayColumns']) as $num => $col) {
if (!empty($listViewDefs['EcmReminders'][$col]))
$displayColumns[$col] = $listViewDefs['EcmReminders'][$col];
}
}elseif(!empty($savedDisplayColumns)) { // USE USER DEFINED DISPLAY COLUMNS FROM PREFERENCES
$displayColumns = $savedDisplayColumns;
}else { // USE COLUMNS DEFINED IN LISTVIEWDEFS FOR DEFAULT DISPLAY COLUMNS
foreach($listViewDefs['EcmReminders'] as $col => $params) {
if(!empty($params['default']) && $params['default'])
$displayColumns[$col] = $params;
}
}
$params = array('massupdate' => true); // SETUP LISTVIEWSMARTY PARAMS
if(!empty($_REQUEST['orderBy'])) { // ORDER BY COMING FROM $_REQUEST
$params['orderBy'] = $_REQUEST['orderBy'];
$params['overrideOrder'] = true;
if(!empty($_REQUEST['sortOrder'])) $params['sortOrder'] = $_REQUEST['sortOrder'];
}
$lv->displayColumns = $displayColumns;
if(!empty($_REQUEST['search_form_only']) && $_REQUEST['search_form_only']) { // HANDLE AJAX REQUESTS FOR SEARCH FORMS ONLY
switch($_REQUEST['search_form_view']) {
case 'basic_search':
$searchForm->setup();
$searchForm->displayBasic(false);
break;
case 'advanced_search':
$searchForm->setup();
$searchForm->displayAdvanced(false);
break;
case 'saved_views':
echo $searchForm->displaySavedViews($listViewDefs, $lv, false);
break;
}
return;
}
// USE THE STORED QUERY IF THERE IS ONE
if (!isset($where)) $where = "";
require_once('modules/MySettings/StoreQuery.php');
$storeQuery = new StoreQuery();
if(!isset($_REQUEST['query'])){
$storeQuery->loadQuery($currentModule);
$storeQuery->populateRequest();
}else{
$storeQuery->saveFromGet($currentModule);
}
if(isset($_REQUEST['query'])){
// WE HAVE A QUERY
// FIRST SAVE COLUMNS
$current_user->setPreference('ListViewDisplayColumns', $displayColumns, 0, $currentModule);
$searchForm->populateFromRequest(); // GATHERS SEARCH FIELD INPUTS FROM $_REQUEST
$where_clauses = $searchForm->generateSearchWhere(true, "EcmReminder"); // BUILDS THE WHERE CLAUSE FROM SEARCH FIELD INPUTS
if (count($where_clauses) > 0 )$where = implode(' and ', $where_clauses);
$GLOBALS['log']->info("Here is the where clause for the list view: $where");
}
// START DISPLAY
// WHICH TAB OF SEARCH FORM TO DISPLAY
if(!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
$searchForm->setup();
if(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'advanced_search') {
$searchForm->displayAdvanced();
}elseif(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'saved_views'){
$searchForm->displaySavedViews($listViewDefs, $lv);
}else {
$searchForm->displayBasic();
}
}
echo $qsd->GetQSScripts();
//echo $where;
$lv->setup($seedEcmReminder, 'include/ListView/ListViewGeneric.tpl', $where, $params);
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
echo get_form_header($current_module_strings['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
echo $lv->display();
//print mysql_error();
$savedSearch = new SavedSearch();
$json = getJSONobj();
// FILLS IN SAVED VIEWS SELECT BOX ON SHORTCUT MENU
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('EcmReminders')));
$str = "<script>
YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
</script>";
echo $str;
?>

View File

@@ -0,0 +1,60 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
global $mod_strings;
/*
if(ACLController::checkAccess('EcmReminders', 'edit', true))
$module_menu [] = Array("index.php?module=EcmReminders&action=EditView&return_module=EcmReminders&return_action=DetailView", $mod_strings['LNK_NEW_ECMREMINDERS'],"CreateEcmReminders", 'EcmReminders');
*/
if(ACLController::checkAccess('EcmReminders', 'list', true))
$module_menu [] = Array("index.php?module=EcmReminders&action=index&return_module=EcmReminders&return_action=DetailView", $mod_strings['LNK_ECMREMINDERS_LIST'],"EcmReminders", 'EcmReminders');
if(ACLController::checkAccess('EcmReminders','list', true)) $module_menu[] = Array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
?>

View File

@@ -0,0 +1,116 @@
admin <!--
/*********************************************************************************
* 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".
********************************************************************************/
/*********************************************************************************
* {APP.LBL_CURRENCY_SYM}Header: /cvsroot/sugarcrm/sugarcrm/modules/Activities/OpenListView.html,v 1.1 2004/07/02 07:32:20 sugarclint Exp {APP.LBL_CURRENCY_SYM}
********************************************************************************/
-->
<!-- BEGIN: open_activity -->
<script type="text/javascript" src="include/JSON.js"></script>
<script type="text/javascript" src="include/jsolait/init.js"></script>
<script type="text/javascript">{JSON_CONFIG_JAVASCRIPT}</script>
<script type="text/javascript" src="include/javascript/jsclass_base.js"></script>
<script type="text/javascript" src="include/javascript/jsclass_async.js"></script>
<script>
//var global_request_registry = new Object();
function ResponseObj()
{
}
ResponseObj.prototype.response = function (result) {
if ( result.status == 'success')
{
if ( result.accept_status == 'decline')
{
//alert("The invitation has been declined");
var elem = document.getElementById('accept'+result.record);
elem.innerHTML= "Declined";
} else if ( result.accept_status == 'tentative') {
//alert("The invitation has been tentatively accepted");
var elem = document.getElementById('accept'+result.record);
elem.innerHTML= "Tentative";
} else {
//alert("The invitation has been accepted");
var elem = document.getElementById('accept'+result.record);
elem.innerHTML= "Accepted";
}
}
else
{
alert("There was an internal error: ");
}
}
function setAcceptStatus(module,id,status)
{
query = {"module":module,"record":id,"accept_status":status};
//rpcClient.call_method('query',request);
req_id = global_rpcClient.call_method('set_accept_status',query);
var res = new ResponseObj();
global_request_registry[req_id] = [ res,'response'];
}
</script>
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="listView">
<tr height="20" class="listViewThS1">
<td width="2%" class="listViewThS1"><img src="include/images/blank.gif" widht="1" height="1" alt=""></td>
<td scope="col" width="1%" class="listViewThS1">{MOD.LBL_LIST_CLOSE}</td>
<td scope="col" width="34%" class="listViewThS1">{MOD.LBL_LIST_SUBJECT}</td>
<td scope="col" width="10%" class="listViewThS1">{MOD.LBL_LIST_DATE}</td>
<td scope="col" width="10%" class="listViewThS1">{MOD.LBL_LIST_STATUS}</td>
</tr>
<!-- BEGIN: row -->
<tr height="20" onmouseover="setPointer(this, '{ACTIVITY.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');" onmouseout="setPointer(this, '{ACTIVITY.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');" onmousedown="setPointer(this, '{ACTIVITY.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
<td nowrap valign=TOP bgcolor="{BG_COLOR}" class={ROW_COLOR}S1 >{ACTIVITY_MODULE_PNG}</td>
<td nowrap valign=TOP bgcolor="{BG_COLOR}" align='center' class={ROW_COLOR}S1 >{ACTIVITY.SET_COMPLETE}</td>
<td scope='row' valign=TOP bgcolor="{BG_COLOR}" class={ROW_COLOR}S1 ><{ACTIVITY.TAG} title="{ACTIVITY.TITLE}" href="{URL_PREFIX}index.php?action=DetailView&module={ACTIVITY.MODULE}&record={ACTIVITY.ID}{RETURN_URL}" class="listViewTdLinkS1">{ACTIVITY.NAME}</{TAG.MAIN}></td>
<td nowrap valign=TOP bgcolor="{BG_COLOR}" class={ROW_COLOR}S1 >{ACTIVITY.TIME}</td>
<td nowrap valign=TOP bgcolor="{BG_COLOR}" class={ROW_COLOR}S1 >{ACTIVITY.STATUS}</td>
</tr>
<tr><td colspan="20" class="listViewHRS1"></td></tr>
<!-- END: row -->
</table>
<!-- END: open_activity -->

View File

@@ -0,0 +1,116 @@
<?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-2006 SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
********************************************************************************/
require_once('modules/EcmReminders/ReminderHelper.php');
require_once('XTemplate/xtpl.php');
$xtpl = new XTemplate ('modules/EcmReminders/ReminderWindow1.html');
global $mod_strings, $app_strings;
//$meetings=getList("meetings","showall"," and reminder_time!='-1'","date_start","date_start","Meetings",0);
//$calls=getList("calls","showall"," and reminder_time!='-1'","date_start","date_start","Calls",0);
$ecmreminders=getList("ecmreminders","showall"," and reminder_time!='-1'","date_start","date_start","EcmReminders",1);
if(count($meetings)+count($calls)+count($ecmreminders)==0)
{
$list='<script></script>';
}
else
{
for($i=0;$i<count($ecmreminders);$i++)$name[]=$ecmreminders[$i];
rsort($name);
$list=ListView($name);
}
$js='
function selectallitems()
{';
if(count($name)>0)
{
foreach($name as $value)
{
$js.='if(document.getElementById("selectall").checked==true){document.getElementById("check'.$value['id'].'").checked=true}else {document.getElementById("check'.$value['id'].'").checked=false} ;
';
}
}
$js.='
}';
$javascript='';
$javascript.='
<script>
'.$js.'
function show(id,date,hour,minute)
{
document.getElementById("date").value=date;
document.getElementById("hour").value=hour;
document.getElementById("minute").value=minute;
}
function showdiv(id)
{
document.getElementById("postponeTo").style.display="none";
document.getElementById("postponeBy").style.display="none";
document.getElementById("li_postponeTo").className="";
document.getElementById("li_postponeBy").className="";
document.getElementById("a_postponeTo").className="";
document.getElementById("a_postponeBy").className="";
document.getElementById(id).style.display="block";
document.getElementById("li_"+id).className="active";
document.getElementById("a_"+id).className="current";
}
</script>';
$hour='<select name="hour" id="hour">';
for($i=0;$i<=23;$i++)
{
if($i<=9)$value="0".$i;
else $value=$i;
$hour.='<option value="'.$i.'"';
if($i==$_SESSION['reminder']['hour'])$hour.=' selected';
$hour.='>'.$value.'</option>';
}
$hour.='</select>';
$minute='<select name="minute" id="minute">';
for($min=0;$min<60;$min++)
{
if($min==0)$value="00";
else $value=$min;
$minute.='<option value="'.$min.'"';
if($min==$_SESSION['reminder']['minute'])$minute.=' selected';
$minute.='>'.$value.'</option>';
}
$minute.='</select>';
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("DATE_START",$_SESSION['reminder']['date']);
$xtpl->assign("LIST",$list);
$xtpl->assign("HOUR",$hour);
$xtpl->assign("MINUTE",$minute);
$xtpl->assign("JAVASCRIPT",$javascript);
$xtpl->parse("main");
$xtpl->out("main");
?>

View File

@@ -0,0 +1,122 @@
<!--
/*****************************************************************************
* 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.
********************************************************************************/
-->
<!-- BEGIN: main -->
<!-- BEGIN: SearchHeader -->
{SET_RETURN_JS}
<script type="text/javascript">
function toggleDisplay(id){
if(this.document.getElementById( id).style.display=='none'){
this.document.getElementById( id).style.display='inline'
if(this.document.getElementById(id+"link") != undefined){
this.document.getElementById(id+"link").style.display='none';
}
}else{
this.document.getElementById( id).style.display='none'
if(this.document.getElementById(id+"link") != undefined){
this.document.getElementById(id+"link").style.display='inline';
}
}
}
</script>
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="tabForm">
<tr>
<td>
<div id='divsearchform' style='display:inline'>
<form>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="dataLabel" nowrap="nowrap" width="40%">{MOD.LBL_NAME}&nbsp;&nbsp;<input type="text" size="20" name="name" class="dataField" value="{NAME}" /></td>
<td width="10%" align="right">
<input type="hidden" name="action" value="Popup" />
<input type="hidden" name="query" value="true"/>
<input type="hidden" name="module" value="{MODULE_NAME}" />
<input type="hidden" name="parent_id" value="{parent_id}" />
<input type="hidden" name="parent_name" value="{parent_name}" />
<input type="submit" name="button" class="button"
title="{APP.LBL_SEARCH_BUTTON_TITLE}"
accesskey="{APP.LBL_SEARCH_BUTTON_KEY}"
value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
</td>
</tr>
</table>
</form>
</div>
</td>
</tr>
</table>
<!-- END: SearchHeader -->
<!-- BEGIN: SearchHeaderEnd -->
<!-- END: SearchHeaderEnd -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="listView">
<!-- BEGIN: list_nav_row -->
{PAGINATION}
<!-- END: list_nav_row -->
<tr height="20">
<td scope="col" width="65%" class="listViewThS1"><a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_LIST_NAME}{arrow_start}{name_arrow}{arrow_end}</a></td>
<td scope="col" width="35%" class="listViewThS1"><a href="{ORDER_BY}assigned_user_name" class="listViewThLinkS1">{MOD.LBL_LIST_ASSIGNED_USER_ID}{arrow_start}{assigned_user_name_arrow}{arrow_end}</a></td>
</tr>
<!-- BEGIN: row -->
<tr height="20"
onmouseover="setPointer(this, '{ecmreminders.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
onmouseout ="setPointer(this, '{ecmreminders.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
onmousedown="setPointer(this, '{ecmreminders.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
<td scope='row' class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><a href="#" onclick="set_return('{.ID}', '{ecmreminders.NAME}'); window.close();" class="listViewTdLinkS1">{ecmreminders.NAME}</a></td>
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{ecmreminders.ASSIGNED_USER_NAME}</td>
</tr>
<tr>
<td colspan="20" class="listViewHRS1"></td>
</tr>
<!-- END: row -->
</table>
<!-- END: main -->

View File

@@ -0,0 +1,57 @@
<?php
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/Popups/Popup_picker.php');
$popup = new Popup_Picker();
echo $popup->process_page();
?>

View File

@@ -0,0 +1,131 @@
<!--
/*****************************************************************************
* 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.
********************************************************************************/
-->
<!-- BEGIN: main -->
<!-- BEGIN: SearchHeader -->
<script type="text/javascript" src="include/JSON.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
<script type="text/javascript" src="include/javascript/popup_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="tabForm">
<tr>
<td>
<form action="index.php" method="post" name="popup_query_form" id="the_form">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="dataLabel" nowrap="nowrap">{MOD.LBL_NAME}&nbsp;&nbsp;<input type="text" name="name" size="20" class="dataField" value="{NAME}" /></td>
<td width="20%" align="right">
<input type="hidden" name="module" value="{MODULE_NAME}" />
<input type="hidden" name="action" value="Popup" />
<input type="hidden" name="query" value="true" />
<input type="hidden" name="request_data" value="{request_data}" />
<input type="hidden" name="record_id" value="" />
<input type="submit" name="button" class="button"
title="{APP.LBL_SEARCH_BUTTON_TITLE}"
accessKey="{APP.LBL_SEARCH_BUTTON_KEY}"
value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
<input type="hidden" name="mode" value="{MULTI_SELECT}" />
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
/* initialize the popup request from the parent */
if(window.document.forms['popup_query_form'].request_data.value == "")
{
window.document.forms['popup_query_form'].request_data.value
= JSON.stringify(window.opener.get_popup_request_data());
}
-->
</script>
<!-- END: SearchHeader -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="listView">
<!-- BEGIN: list_nav_row -->
{PAGINATION}
<!-- END: list_nav_row -->
<tr height="20" class="listViewThS1">
<td scope="col" width="5%" class="listViewThS1" NOWRAP>{CHECKALL}</td>
<td scope="col" scope="col" width="35%" class="listViewThS1" NOWRAP>
<slot>
<a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_NAME}{arrow_start}{name_arrow}{arrow_end}</a>
</slot>
</td>
</tr>
<!-- BEGIN: row -->
<tr height="20"
onmouseover="setPointer(this, '{ECMREMINDER.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
onmouseout="setPointer(this, '{ECMREMINDER.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
onmousedown="setPointer(this, '{ECMREMINDER.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>{PREROW}</td>
<td scope="row" valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
<slot>
<{TAG.MAIN} href="#"
onclick="send_back('EcmReminder','{ECMREMINDER.ID}');"
class="listViewTdLinkS1">{ECMREMINDER.NAME}</{TAG.MAIN}>
</slot>
</td>
</tr>
<tr>
<td colspan="20" class="listViewHRS1"></td>
</tr>
<!-- END: row -->
</table>
{ASSOCIATED_JAVASCRIPT_DATA}
<!-- END: main -->

View File

@@ -0,0 +1,147 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
global $theme;
require_once('modules/EcmReminders/EcmReminder.php');
require_once('themes/'.$theme.'/layout_utils.php');
require_once('log4php/LoggerManager.php');
require_once('XTemplate/xtpl.php');
require_once('include/ListView/ListView.php');
$image_path = 'themes/'.$theme.'/images/';
class Popup_Picker{
function Popup_Picker(){
;
}
function _get_where_clause(){
$where = '';
if(isset($_REQUEST['query'])){
$where_clauses = array();
append_where_clause($where_clauses, "name", "ecmreminders.name");
$where = generate_where_statement($where_clauses);
}
return $where;
}
function process_page(){
global $theme;
global $mod_strings;
global $app_strings;
global $currentModule;
$output_html = '';
$where = '';
$where = $this->_get_where_clause();
$image_path = 'themes/'.$theme.'/images/';
$name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
if(!$hide_clear_button){
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
.$app_strings['LBL_CLEAR_BUTTON_KEY'] ."' value=' "
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
}
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
.$app_strings['LBL_CANCEL_BUTTON_KEY'] ."' value=' "
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
$button .= "</form>\n";
$form = new XTemplate('modules/EcmReminders/Popup_picker.html');
$form->assign('MOD', $mod_strings);
$form->assign('APP', $app_strings);
$form->assign('THEME', $theme);
$form->assign('MODULE_NAME', $currentModule);
$form->assign('NAME', $name);
$form->assign('request_data', $request_data);
ob_start();
insert_popup_header($theme);
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
$form->parse('main.SearchHeader');
$output_html .= $form->text('main.SearchHeader');
$output_html .= get_form_footer();
// RESET THE SECTIONS THAT ARE ALREADY IN THE PAGE SO THAT THEY DO NOT PRINT AGAIN LATER.
$form->reset('main.SearchHeader');
// CREATE THE LISTVIEW
$seed_bean = new EcmReminder();
$ListView = new ListView();
$ListView->show_export_button = false;
$ListView->process_for_popups = true;
$ListView->setXTemplate($form);
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
$ListView->setHeaderText($button);
$ListView->setQuery($where, '', 'name', 'ECMREMINDER');
$ListView->setModStrings($mod_strings);
ob_start();
$ListView->processListView($seed_bean, 'main', 'ECMREMINDER');
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= get_form_footer();
$output_html .= insert_popup_footer();
return $output_html;
}
} // end of class Popup_Picker
?>

View File

@@ -0,0 +1,9 @@
<?
require_once('modules/EcmReminders/ReminderHelper.php');
postponeBy("date_start","meetings");
postponeBy("date_start","calls");
postponeBy("date_start","ecmreminders");
postponeBy("reminder_date","ecmdocs");
if($_REQUEST['backtoindex']==1)header("Location: index.php?module=EcmReminders&action=index");
else header("Location: index.php?module=EcmReminders&action=ReminderWindow&to_pdf=1");
?>

View File

@@ -0,0 +1,9 @@
<?
require_once('modules/EcmReminders/ReminderHelper.php');
postponeTo("date_start","meetings");
postponeTo("date_start","calls");
postponeTo("date_start","ecmreminders");
postponeTo("reminder_date","ecmdocs");
if($_REQUEST['backtoindex']==1)header("Location: index.php?module=EcmReminders&action=index");
else header("Location: index.php?module=EcmReminders&action=ReminderWindow&to_pdf=1");
?>

View File

@@ -0,0 +1,204 @@
<?
//error_reporting(0);
//*****************************************************************
function calculateGMT() {
static $gmt;
if(!isset($gmt)) {
global $timedate;
$dd = gmdate("Y-m-d H:i:s");
$dd2 = $timedate->handle_offset($dd, "Y-m-d H:i:s", true);
$gmt = strtotime($dd2) - strtotime($dd);
}
return $gmt;
}
//*****************************************************************
function getList($type,$status,$reminder_time,$order_by,$date_field,$module,$role_id)
{
global $timedate;
if($status=="showall")
{
$stat=1;
$status="Held";
}
$gmt = calculateGMT();
$i=0;
$z="select * from ".$type." where deleted='0' ".$reminder_time." and status!='".$status."' order by ".$order_by." desc";
$w=$GLOBALS['db']->query($z);
while($r=$GLOBALS['db']->fetchByAssoc($w))
{
$show=0;
if($r['assigned_user_id']==$_SESSION['authenticated_user_id'])$show=1;
if($show==1)
{
$date_start=explode(" ",$r[$date_field]);
$ts=explode(":",$date_start[1]);
$ds=explode("-",$date_start[0]);
if(strtotime($r[$date_field])-$r['reminder_time'] <= strtotime(gmdate("Y-m-d H:i:s")) || $stat)
{
$name[$i]['date_start'] = $date_start[0];
$name[$i]['time_start']= $date_start[1];
$name[$i]['name']=$r['name'];
$name[$i]['id']=$r['id'];
$name[$i]['type']=$type;
$name[$i]['status']=$r['status'];
$name[$i]['reminder_time']=$r['reminder_time'];
$name[$i]['parent_id']=$r['parent_id'];
$name[$i]['parent_module']=$r['parent_module'];
$name[$i]['description']=$r['description'];
$name[$i]['status']=$r['status'];
$name[$i]['module']=$module;
if($type=="ecmreminders")$name[$i]['icon']= $r['parent_name'];//"ListEcmDocs";
else $name[$i]['icon']=$module;
$name[$i]['edit']=1;
$name[$i]['record_id']=$r['id'];
$name[$i]['record_module']=$module;
if($type=="ecmreminders")
{
$name[$i]['edit']=0;
$name[$i]['record_id']=$r['parent_id'];
$name[$i]['record_module']=$r['parent_name'];
}
$i++;
}
}
}
if (isset($name))
return $name;
else return '';
}
function postponeBy($date_field,$type)
{
global $timedate;
if(count($_POST['check']))
{
foreach($_POST['check'] as $check)
{
if($check)
{
/*$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select reminder_time,".$date_field." from ".$type." where id='".$check."'"));
if($r[$date_field] && $r['reminder_time'])
{
$date_start=explode(" ",$r[$date_field]);
$ts=explode(":",$date_start[1]);
$ds=explode("-",$date_start[0]);
$new_date=gmdate("Y-m-d H:i:s",mktime($ts[0],$ts[1],$ts[2],$ds[1],$ds[2],$ds[0])+$_POST['rsec']+7200);
$ndate=explode(" ",$new_date);
$GLOBALS['db']->query("update ".$type." set ".$date_field."='".$ndate[0]." ".$ndate[1]."' where id='".$check."'");
}*/
$GLOBALS['db']->query("update ".$type." set reminder_time=reminder_time-".$_REQUEST['rsec']." where id='".$check."'");
}
}
}
}
function postponeTo($date_field,$type)
{
global $timedate;
$gmt = calculateGMT();
if(count($_POST['check']))
{
foreach($_POST['check'] as $check)
{
if($check)
{
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select reminder_time,".$date_field." from ".$type." where id='".$check."'"));
$date=$r[$date_field];
$time=strtotime($date);
$date_time=strtotime($timedate->to_display($_REQUEST['date'],$timedate->get_date_format(), "Y-m-d")." ".$_REQUEST['hour'].":".$_REQUEST['minute'].":00");
$reminder_time=$time-$date_time+$gmt;
$GLOBALS['db']->query("update ".$type." set reminder_time='".$reminder_time."' where id='".$check."'");
/*
$time_start=date("H:i:s",strtotime($_REQUEST['date'][6].$_REQUEST['date'][7].$_REQUEST['date'][8].$_REQUEST['date'][9]."-".$_REQUEST['date'][3].$_REQUEST['date'][4]."-".$_REQUEST['date'][0].$_REQUEST['date'][1]." ".$_REQUEST['hour'].":".$_REQUEST['minute'].":00"));
$GLOBALS['db']->query("update ".$type." set ".$date_field."='".$_REQUEST['date'][6].$_REQUEST['date'][7].$_REQUEST['date'][8].$_REQUEST['date'][9]."-".$_REQUEST['date'][3].$_REQUEST['date'][4]."-".$_REQUEST['date'][0].$_REQUEST['date'][1]." ".$time_start."' where id='".$check."'");*/
}
}
}
}
function closeSelected($type,$status,$reminder_time)
{
global $timedate;
if(count($_POST['check']))
{
foreach($_POST['check'] as $check)
{
if($check)
{
if($reminder_time=="-1")$rt=",reminder_time='-1'";
else $rt="";
$GLOBALS['db']->query("update ".$type." set status='".$status."'".$rt." where id='".$check."'");
}
}
}
}
function reminderTime($type)
{
global $timedate;
if(count($_POST['check']))
{
foreach($_POST['check'] as $check)
{
if($check)
{
$r=$GLOBALS['db']->FetchByAssoc($GLOBALS['db']->query("select reminder_time from ".$type." where id='".$check."'"));
$rtime=$_REQUEST['reminder_minutes']+$_REQUEST['reminder_hours'];
if($rtime<0)$rtime=60;
$GLOBALS['db']->query("update ".$type." set reminder_time='".$rtime."' where id='".$check."'");
}
}
}
}
function ListView($name)
{
global $timedate;
$html="";
for($i=0;$i<count($name);$i++)
{
$value=$name[$i];
$ts=explode(":",$value['time_start']);
if($value['reminder_time'] != -1)
{
$rem = date("Y-m-d H:i:s",strtotime($value['date_start'].' '.$value['time_start'])-$value['reminder_time']+calculateGMT());
$rexp=explode(" ",$rem);
$date_rem=$rexp[0];
$rrexp=explode(":",$rexp[1]);
}
else $rem="";
if($i==0)
{
$check="checked";
global $timedate;
$_SESSION['reminder']['date']=$timedate->to_display_date($date_rem,false);
$_SESSION['reminder']['hour']=$rrexp[0];
$_SESSION['reminder']['minute']=$rrexp[1];
}
else $check="";
$onclick='<a class="listViewTdLinkS1" style="cursor:pointer;" onclick="window.open(\'index.php?module='.$value['record_module'].'&action=DetailView&record='.$value['record_id'].'&close=1\',\'CRM\',\'height=780,width=1014,scrollbars=yes\',\'\').focus();">'.$value['name'].'</a>';
$editlink="";
if($value['edit'])$editlink='<a style="cursor:pointer;" onclick="window.open(\'index.php?module='.$value['module'].'&action=EditView&record='.$value['id'].'\',\'CRM\',\'height=780,width=1014,scrollbars=yes\',\'\').focus();"><img src="themes/Sugar/images/edit_inline.gif" border="0"></a>';
$ddd = date("Y-m-d H:i:s",strtotime($value['date_start'].' '.$value['time_start'])-$value['reminder_time']);
$ddd2 = date("Y-m-d H:i:s",strtotime($value['date_start'].' '.$value['time_start']));
$html.='<tr>
<td valign="top" class="oddListRowS1" bgcolor="#ffffff"><input onclick="sListView.check_item(this, document.MassUpdate);show(\''.$value['id'].'\',\''.$timedate->to_display($date_rem, "Y-m-d",$timedate->get_date_format()).'\',\''.$rrexp[0].'\',\''.$rrexp[1].'\');" type="checkbox" name="check[]" id="check'.$value['id'].'" value="'.$value['id'].'" '.$check.'></td>
<td valign="top" class="oddListRowS1" bgcolor="#ffffff"><img src="themes/default/images/'.$value['icon'].'.gif" border="0"></td>
<td valign="top" class="oddListRowS1" bgcolor="#ffffff">'.$onclick.'</td>
<td valign="top" class="oddListRowS1" bgcolor="#ffffff">'.$timedate->to_display_date_time($ddd).'</td>
<td valign="top" class="oddListRowS1" bgcolor="#ffffff">'.$timedate->to_display_date_time($ddd2).'</td>
<td valign="top" class="oddListRowS1" bgcolor="#ffffff">'.$value['status'].'</td>
</tr>';
}
return $html;
}
?>

View File

@@ -0,0 +1,112 @@
<!-- BEGIN: main -->
<link rel="stylesheet" type="text/css" media="all" href="themes/Sugar5/css/style.css">
<link rel="stylesheet" type="text/css" href="themes/Sugar5/css/yui.css" />
<link rel="stylesheet" type="text/css" href="themes/Sugar5/css/deprecated.css" />
<link rel="stylesheet" type="text/css" media="all" href="themes/Sugar5/calendar-win2k-cold-1.css?s=5.0.0e&c=">
<link href="themes/Sugar5/colors.sugar.css?s=5.0.0e&c=" rel="stylesheet" type="text/css" title="sugar" />
<script type="text/javascript" src="jscalendar/calendar.js?s=5.0.0e&c="></script>
<script type="text/javascript" src="jscalendar/lang/calendar-en.js?s=5.0.0e&c="></script>
<script type="text/javascript" src="jscalendar/calendar-setup_3.js?s=5.0.0e&c="></script>
<script type="text/javascript" src="modules/EcmReminders/helper.js"></script>
<form name="ReminderWindow" action="index.php?module=EcmReminders&action=ReminderWindow" method="POST">
<input type="hidden" name="module" value="EcmReminders" />
<input type="hidden" name="action" id="action" />
<input type="hidden" name="backtoindex" id="backtoindex" value="0" />
<div style="height:10px;width:300px;background:#ffffff;display:none;position:absolute; top:0; right:0;" id="desc">
<table bgcolor="#cccccc" class="olBgClass" border="0" cellpadding="1" cellspacing="1" width="300">
<tbody>
<tr>
<td>
<table class="olCgClass" border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody>
<tr>
<td class="olCgClass" width="100%">
<div id="desc-title" class="olCapFontClass"></div>
</td>
<td align="right">
<a href="javascript:hidedescription();" title="Click to Close" onClick="javascript:hidedescription();" class="olCloseFontClass"><img src="themes/Sugar/images/close_inline.gif" border="0"></a>
</td>
</tr>
</tbody>
</table>
<table class="olFgClass" border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody>
<tr>
<td class="olFgClass" valign="top" background="#ffffff">
<div id="desc-desc" class="olFontClass"><br></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<table width="618" border="0" align="center" cellpadding="0" cellspacing="0" class="h3Row">
<tr>
<td nowrap><h3>{MOD.LBL_REMINDER_LIST}</h3></td>
</tr>
</table>
<div style="overflow:auto;height:340px;width:648px;">
<table width="502" border="0" cellspacing="0" cellpadding="0" class="listView" align="center">
<tr>
<td scope="col" width="30" class="listViewThS1" NOWRAP><input type="checkbox" name="selectall" id="selectall" value="1" onclick="selectallitems();" /></td>
<td scope="col" width="20" class="listViewThS1" NOWRAP>&nbsp;</td>
<td scope="col" width="127" class="listViewThS1" nowrap="nowrap">{MOD.LBL_LIST_NAME}&nbsp;</td>
<td scope="col" width="120" class="listViewThS1" nowrap="nowrap">{MOD.LBL_LIST_REMINDER_DATE}&nbsp;</td>
<td scope="col" width="122" class="listViewThS1" nowrap="nowrap">{MOD.LBL_LIST_EVENT_DATE}&nbsp;</td>
<td scope="col" width="30" class="listViewThS1" NOWRAP>{MOD.LBL_LIST_STATUS}</td>
<td scope="col" width="30" class="listViewThS1" NOWRAP>&nbsp;</td>
<td scope="col" width="30" class="listViewThS1" NOWRAP>&nbsp;</td>
</tr>
{LIST}
</table>
</div>
<br />
<div id="close" style="display:block; ">
<input type="submit" class="button" name="button" value="{MOD.LBL_CLOSE_SELECTED_BUTTON_LABEL}" onclick="document.getElementById('action').value='CloseSelected';" />
</div>
<br>
<ul class="tablist">
<li id="li_postponeBy" class="active"><a class="current" id="a_postponeBy" href="javascript:showdiv('postponeBy');">{MOD.LBL_POSTPONE_BY}</a></li>
<li id="li_postponeTo"><a id="a_postponeTo" href="javascript:showdiv('postponeTo');">{MOD.LBL_POSTPONE_TO}</a></li>
</ul>
<br>
<div id="postponeBy" style="display:block;">
<select name='rsec' id='rsec'>
<OPTION value='300'>5 {MOD.LBL_POSTPONEBY_DROPDOWN_MIN}</OPTION>
<OPTION value='600'>10 {MOD.LBL_POSTPONEBY_DROPDOWN_MIN}</OPTION>
<OPTION value='900'>15 {MOD.LBL_POSTPONEBY_DROPDOWN_MIN}</OPTION>
<OPTION value='1800'>30 {MOD.LBL_POSTPONEBY_DROPDOWN_MIN}</OPTION>
<OPTION value='3600'>1 {MOD.LBL_POSTPONEBY_DROPDOWN_HOUR}</OPTION>
<OPTION value='7200'>2 {MOD.LBL_POSTPONEBY_DROPDOWN_HOURS}</OPTION>
<OPTION value='14400'>4 {MOD.LBL_POSTPONEBY_DROPDOWN_HOURS}</OPTION>
<OPTION value='28800'>8 {MOD.LBL_POSTPONEBY_DROPDOWN_HOURS}</OPTION>
<OPTION value='43200'>12 {MOD.LBL_POSTPONEBY_DROPDOWN_HOURS}</OPTION>
<OPTION value='86400'>1 {MOD.LBL_POSTPONEBY_DROPDOWN_DAY}</OPTION>
<OPTION value='172800'>2 {MOD.LBL_POSTPONEBY_DROPDOWN_DAYS}</OPTION>
<OPTION value='259200'>3 {MOD.LBL_POSTPONEBY_DROPDOWN_DAYS}</OPTION>
<OPTION value='345600'>4 {MOD.LBL_POSTPONEBY_DROPDOWN_DAYS}</OPTION>
<OPTION value='604800'>1 {MOD.LBL_POSTPONEBY_DROPDOWN_WEEK}</OPTION>
<OPTION value='1209600'>2 {MOD.LBL_POSTPONEBY_DROPDOWN_WEEKS}</OPTION>
</select>
<input type="submit" name="button" value="{MOD.LBL_UPDATE_BUTTON_LABEL}" class="button" onclick="document.getElementById('action').value='PostponeBy';" />
</div>
<div id="postponeTo" style="display:none;">
{MOD.LBL_DATE}: <input name="date" id="date" size="11" maxlength="10" type="text" value="{DATE_START}" /> <img src="themes/default/images/jscalendar.gif" alt="%d.%m.%Y" id="date_trigger" align="absmiddle">
<script type="text/javascript">
Calendar.setup ({
inputField : "date", ifFormat : "%d.%m.%Y", showsTime : false, button : "date_trigger", singleClick : true, step : 1
});
</script>&nbsp;&nbsp;{MOD.LBL_TIME}:
{HOUR}
{MINUTE}
<input type="submit" name="button" value="{MOD.LBL_UPDATE_BUTTON_LABEL}" class="button" onclick="document.getElementById('action').value='PostponeTo';" />
</div>
</form>
{JAVASCRIPT}
<!-- END: main -->

View File

@@ -0,0 +1,97 @@
<?
require_once('modules/EcmReminders/ReminderHelper.php');
require_once('XTemplate/xtpl.php');
$xtpl = new XTemplate ('modules/EcmReminders/ReminderWindow.html');
global $mod_strings, $app_strings;
$meetings=getList("meetings","Held"," and reminder_time!='-1'","date_start","date_start","Meetings",0);
$calls=getList("calls","Held"," and reminder_time!='-1'","date_start","date_start","Calls",0);
//$tasks=getList("tasks","Completed","","date_start","date_start","Tasks");
$ecmreminders=getList("ecmreminders","Held"," and reminder_time!='-1'","date_start","date_start","EcmReminders",1);
if(count($meetings)+count($calls)+count($ecmreminders)==0)
{
$list='<script>window.close();</script>';
}
else
{
for($i=0;$i<count($meetings);$i++)$name[]=$meetings[$i];
for($i=0;$i<count($calls);$i++)$name[]=$calls[$i];
//for($i=0;$i<count($tasks);$i++)$name[]=$tasks[$i];
for($i=0;$i<count($ecmreminders);$i++)$name[]=$ecmreminders[$i];
rsort($name);
//print_r($name);
$list=ListView($name);
}
$js='
function selectallitems()
{';
if(count($name)>0)
{
foreach($name as $value)
{
$js.='if(document.getElementById("selectall").checked==true){document.getElementById("check'.$value['id'].'").checked=true}else {document.getElementById("check'.$value['id'].'").checked=false} ;
';
}
}
$js.='
}';
$javascript='';
$javascript.='
<script>
'.$js.'
function show(id,date,hour,minute)
{
document.getElementById("date").value=date;
document.getElementById("hour").value=hour;
document.getElementById("minute").value=minute;
}
function showdiv(id)
{
document.getElementById("postponeTo").style.display="none";
document.getElementById("postponeBy").style.display="none";
document.getElementById("li_postponeTo").className="";
document.getElementById("li_postponeBy").className="";
document.getElementById("a_postponeTo").className="";
document.getElementById("a_postponeBy").className="";
document.getElementById(id).style.display="block";
document.getElementById("li_"+id).className="active";
document.getElementById("a_"+id).className="current";
}
</script>';
$hour='<select name="hour" id="hour">';
for($i=0;$i<=23;$i++)
{
if($i<=9)$value="0".$i;
else $value=$i;
$hour.='<option value="'.$i.'"';
if($i==$_SESSION['reminder']['hour'])$hour.=' selected';
$hour.='>'.$value.'</option>';
}
$hour.='</select>';
$mins=array(0,15,30,45);
$minute='<select name="minute" id="minute">';
for($min=0;$min<60;$min++)
{
if($min==0)$value="00";
else $value=$min;
$minute.='<option value="'.$min.'"';
if($min==$_SESSION['reminder']['minute'])$minute.=' selected';
$minute.='>'.$value.'</option>';
}
$minute.='</select>';
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("DATE_START",$_SESSION['reminder']['date']);
$xtpl->assign("LIST",$list);
$xtpl->assign("HOUR",$hour);
$xtpl->assign("MINUTE",$minute);
$xtpl->assign("JAVASCRIPT",$javascript);
$xtpl->parse("main");
$xtpl->out("main");
?>

View File

@@ -0,0 +1,106 @@
<!-- BEGIN: main -->
<link rel="stylesheet" type="text/css" media="all" href="themes/Sugar/calendar-win2k-cold-1.css?s=5.0.0e&c=">
<link href="themes/Sugar/colors.sugar.css?s=5.0.0e&c=" rel="stylesheet" type="text/css" title="sugar" />
<script type="text/javascript" src="jscalendar/calendar.js?s=5.0.0e&c="></script>
<script type="text/javascript" src="jscalendar/lang/calendar-en.js?s=5.0.0e&c="></script>
<script type="text/javascript" src="jscalendar/calendar-setup_3.js?s=5.0.0e&c="></script>
<script type="text/javascript" src="modules/EcmReminders/helper.js"></script>
<form name="ReminderWindow" action="index.php?module=EcmReminders&action=index" method="POST">
<input type="hidden" name="module" value="EcmReminders" />
<input type="hidden" name="action" id="action" />
<input type="hidden" name="backtoindex" id="backtoindex" value="1" />
<div style="height:10px;width:300px;background:#ffffff;display:none;position:absolute; top:0; right:0;" id="desc">
<table bgcolor="#cccccc" class="olBgClass" border="0" cellpadding="1" cellspacing="1" width="300">
<tbody>
<tr>
<td>
<table class="olCgClass" border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody>
<tr>
<td class="olCgClass" width="100%">
<div id="desc-title" class="olCapFontClass"></div>
</td>
<td align="right">
<a href="javascript:hidedescription();" title="Click to Close" onClick="javascript:hidedescription();" class="olCloseFontClass"><img src="themes/Sugar/images/close_inline.gif" border="0"></a>
</td>
</tr>
</tbody>
</table>
<table class="olFgClass" border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody>
<tr>
<td class="olFgClass" valign="top" background="#ffffff">
<div id="desc-desc" class="olFontClass"><br></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="listView" align="left">
<tr>
<td scope="col" width="30" class="listViewThS1" NOWRAP><input type="checkbox" name="selectall" id="selectall" value="1" onclick="selectallitems();" /></td>
<td scope="col" width="20" class="listViewThS1" NOWRAP>&nbsp;</td>
<td scope="col" width="127" class="listViewThS1" nowrap="nowrap">{MOD.LBL_LIST_NAME}&nbsp;</td>
<td scope="col" width="120" class="listViewThS1" nowrap="nowrap">{MOD.LBL_LIST_REMINDER_DATE}&nbsp;</td>
<td scope="col" width="122" class="listViewThS1" nowrap="nowrap">{MOD.LBL_LIST_EVENT_DATE}&nbsp;</td>
<td scope="col" width="30" class="listViewThS1" NOWRAP>{MOD.LBL_LIST_STATUS}</td>
<td scope="col" width="30" class="listViewThS1" NOWRAP>&nbsp;</td>
<td scope="col" width="30" class="listViewThS1" NOWRAP>&nbsp;</td>
</tr>
{LIST}
</table>
<p><br />
<br />
</p>
<p>&nbsp; </p>
<div id="close" style="display:block; ">
<input type="submit" class="button" name="button" value="{MOD.LBL_CLOSE_SELECTED_BUTTON_LABEL}" onclick="document.getElementById('action').value='CloseSelected';" />
</div>
<br>
<ul class="tablist">
<li id="li_postponeBy" class="active"><a class="current" id="a_postponeBy" href="javascript:showdiv('postponeBy');">{MOD.LBL_POSTPONE_BY}</a></li>
<li id="li_postponeTo"><a id="a_postponeTo" href="javascript:showdiv('postponeTo');">{MOD.LBL_POSTPONE_TO}</a></li>
</ul>
<br>
<div id="postponeBy" style="display:block;">
<select name='rsec' id='rsec'>
<OPTION value='300'>5 {MOD.LBL_POSTPONEBY_DROPDOWN_MIN}</OPTION>
<OPTION value='600'>10 {MOD.LBL_POSTPONEBY_DROPDOWN_MIN}</OPTION>
<OPTION value='900'>15 {MOD.LBL_POSTPONEBY_DROPDOWN_MIN}</OPTION>
<OPTION value='1800'>30 {MOD.LBL_POSTPONEBY_DROPDOWN_MIN}</OPTION>
<OPTION value='3600'>1 {MOD.LBL_POSTPONEBY_DROPDOWN_HOUR}</OPTION>
<OPTION value='7200'>2 {MOD.LBL_POSTPONEBY_DROPDOWN_HOURS}</OPTION>
<OPTION value='14400'>4 {MOD.LBL_POSTPONEBY_DROPDOWN_HOURS}</OPTION>
<OPTION value='28800'>8 {MOD.LBL_POSTPONEBY_DROPDOWN_HOURS}</OPTION>
<OPTION value='43200'>12 {MOD.LBL_POSTPONEBY_DROPDOWN_HOURS}</OPTION>
<OPTION value='86400'>1 {MOD.LBL_POSTPONEBY_DROPDOWN_DAY}</OPTION>
<OPTION value='172800'>2 {MOD.LBL_POSTPONEBY_DROPDOWN_DAYS}</OPTION>
<OPTION value='259200'>3 {MOD.LBL_POSTPONEBY_DROPDOWN_DAYS}</OPTION>
<OPTION value='345600'>4 {MOD.LBL_POSTPONEBY_DROPDOWN_DAYS}</OPTION>
<OPTION value='604800'>1 {MOD.LBL_POSTPONEBY_DROPDOWN_WEEK}</OPTION>
<OPTION value='1209600'>2 {MOD.LBL_POSTPONEBY_DROPDOWN_WEEKS}</OPTION>
</select>
<input type="submit" name="button" value="{MOD.LBL_UPDATE_BUTTON_LABEL}" class="button" onclick="document.getElementById('action').value='PostponeBy';" />
</div>
<div id="postponeTo" style="display:none;">
{MOD.LBL_DATE}: <input name="date" id="date" size="11" maxlength="10" type="text" value="{DATE_START}" /> <img src="themes/default/images/jscalendar.gif" alt="%d.%m.%Y" id="date_trigger" align="absmiddle">
<script type="text/javascript">
Calendar.setup ({
inputField : "date", ifFormat : "%d.%m.%Y", showsTime : false, button : "date_trigger", singleClick : true, step : 1
});
</script>&nbsp;&nbsp;{MOD.LBL_TIME}:
{HOUR}
{MINUTE}
<input type="submit" name="button" value="{MOD.LBL_UPDATE_BUTTON_LABEL}" class="button" onclick="document.getElementById('action').value='PostponeTo';" />
</div>
</form>
{JAVASCRIPT}
<!-- END: main -->

View File

@@ -0,0 +1,87 @@
<?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.
********************************************************************************/
require_once('modules/EcmReminders/EcmReminder.php');
require_once('include/formbase.php');
$focus = new EcmReminder();
$focus->retrieve($_POST['record']);
if(!$focus->ACLAccess('Save')){
ACLController::displayNoAccess(true);
sugar_cleanup(true);
}
if (!empty($_POST['assigned_user_id']) && ($focus->assigned_user_id != $_POST['assigned_user_id']) && ($_POST['assigned_user_id'] != $current_user->id)) {
$check_notify = TRUE;
}else{
$check_notify = FALSE;
}
foreach($focus->column_fields as $field){
if(isset($_POST[$field])){
$value = $_POST[$field];
$focus->$field = $value;
}
}
foreach($focus->additional_column_fields as $field){
if(isset($_POST[$field])){
$value = $_POST[$field];
$focus->$field = $value;
}
}
$focus->unformat_all_fields();
$focus->save($check_notify);
$return_id = $focus->id;
handleRedirect($return_id,'EcmReminders');
?>

View File

@@ -0,0 +1,110 @@
<!--
/*****************************************************************************
* 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.
********************************************************************************/
-->
<!-- BEGIN: main -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="border-top: 0px none; margin-bottom: 4px" class="tabForm">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="dataLabel" noWrap>
<span sugar='slot1'>{MOD.LBL_NAME}</span sugar='slot'>
</td>
<td valign="top" class="dataField">
<span sugar='slot1b'>
<input type=text size="20" name="name_basic" class=dataField value="{NAME}" />
</span sugar='slot'>
</td>
<td class="dataLabel">{APP.LBL_CURRENT_USER_FILTER}&nbsp;&nbsp;
<input name='current_user_only_basic' onchange='this.form.submit();' onchange='this.form.submit();' class="checkbox" type="checkbox" {CURRENT_USER_ONLY}>
</td>
</tr>
<td width="15%" class="dataLabel" valign="top"><span sugar='slot2'>{MOD.LBL_DESCRIPTION}</span sugar='slot'></td>
<td width="85%" class="dataField">
<span sugar='slot2b'>
<textarea name='description_basic' title="Description" tabindex='2' cols="30" rows="8">{DESCRIPTION}</textarea>
</span sugar='slot'>
</td>
</tr>
<tr>
</table>
</td>
</tr>
</table>
<!-- END: main -->
<!-- BEGIN: advanced -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-top: 0px none; margin-bottom: 4px" class="tabForm">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="20%" class="dataLabel"><span sugar='slot1'>{MOD.LBL_NAME}</span sugar='slot'></td>
<td width="25%" class="dataField"><span sugar='slot1b'><input name='name' type="text" tabindex='1' size='25' maxlength='50' value="{NAME}"></span sugar='slot'></td>
<td class="dataLabel"><span sugar='slot2'>{APP.LBL_ASSIGNED_TO}</span sugar='slot'></td>
<td class="dataField"><span sugar='slot2b'><select tabindex='1' style="width: 150px" size='3' name='assigned_user_id[]' multiple="multiple">{USER_FILTER}</select></span sugar='slot'></td>
<tr>
<td width="15%" class="dataLabel" valign="top"><span sugar='slot`3`'>{MOD.LBL_DESCRIPTION}</span sugar='slot'></td>
<td width="85%" class="dataField">
<span sugar='slot`3`b'>
<textarea name='description' title="Description" tabindex='`3`' cols="30" rows="8">{DESCRIPTION}</textarea>
</span sugar='slot'>
</td>
</tr>
<tr>
</tr>
</table>
</td>
</tr>
</table>
<!-- END: advanced -->

View File

@@ -0,0 +1,40 @@
<?
require_once('modules/EcmReminders/ReminderHelper.php');
$meetings = array();
$calls = array();
$ecmreminders = array();
global $current_user;
$rem_time = $current_user->getPreference('reminder_time');
if(empty($rem_time)){
$rem_time = -1;
}
if($rem_time != -1)
{
$name = array();
$ecmreminders=getList("ecmreminders","showall"," and reminder_time!='-1'","date_start","date_start","EcmReminders",1);
if (!is_array($ecmreminders)) return;
foreach ($ecmreminders as $v) {
//echo $v['reminder_time'];
if($v['reminder_time'] != -1)
{
$rem = strtotime($v['date_start'].' '.$v['time_start'])-$v['reminder_time']+calculateGMT()-$rem_time;
$cur = mktime();
if ($rem - $cur < 0) $name[] = $v;
}
}
if(count($name)>0) {
echo "ok";
}
}
?>

View File

@@ -0,0 +1,89 @@
<!--
/*****************************************************************************
* 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.
********************************************************************************/
-->
<!-- BEGIN: main -->
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="listView">
<tr height="20" >
<td scope="col" width="5%" class="listViewThS1"><slot>{MOD.LBL_LIST_NUMBER}</slot></td>
<td scope="col" width="50%" class="listViewThS1"><slot>{MOD.LBL_LIST_SUBJECT}</slot></td>
<td scope="col" width="15%" class="listViewThS1"><slot>{MOD.LBL_LIST_STATUS}</slot></td>
<td scope="col" width="5%" class="listViewThS1"><slot>&nbsp;</slot></td>
<td scope="col" width="50%" class="listViewThS1"><slot>{MOD.LBL_LIST_NAME}</slot></td>
</tr>
<!-- BEGIN: row -->
<tr height="20" onmouseover="setPointer(this, '{ECMREMINDERS.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
onmouseout="setPointer(this, '{ECMREMINDERS.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
onmousedown="setPointer(this, '{ECMREMINDERS.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
<td scope='row' valign=TOP bgcolor="{BG_COLOR}" class="{ROW_COLOR}S1" ><slot>{ECMREMINDERS.NUMBER}</slot></td>
<td valign=TOP bgcolor="{BG_COLOR}" class="{ROW_COLOR}S1" ><slot>
<a href="{URL_PREFIX}index.php?action=DetailView&module=EcmReminders&record={ECMREMINDERS.ID}" class="listViewTdLinkS1">{ECMREMINDERS.NAME}</a></slot>
</td>
<td valign=TOP bgcolor="{BG_COLOR}" class="{ROW_COLOR}S1" ><slot>{ECMREMINDERS.STATUS}</slot></td>
<td nowrap align="center" valign=TOP bgcolor="{BG_COLOR}" class="{ROW_COLOR}S1" >
<slot>
<a class="listViewTdToolsS1" href="{URL_PREFIX}index.php?action=EditView&module=EcmReminders&record={ECMREMINDERS.ID}{RETURN_URL}">{EDIT_INLINE_PNG}</a>&nbsp;
<a class="listViewTdToolsS1" href="{URL_PREFIX}index.php?action=EditView&module=EcmReminders&record={ECMREMINDERS.ID}{RETURN_URL}">{APP.LNK_EDIT}</a>
</slot>
</td>
<td scope='row' valign=TOP bgcolor="{BG_COLOR}" class="{ROW_COLOR}S1" ><slot>{ECMREMINDERS.NAME}</slot></td>
<td valign=TOP bgcolor="{BG_COLOR}" class="{ROW_COLOR}S1" >
<slot>
<a href="{URL_PREFIX}index.php?action=DetailView&module=EcmReminders&record={ECMREMINDERS.ID}" class="listViewTdLinkS1">{ECMREMINDERS.NAME}</a>
</slot>
</td>
</tr>
<tr>
<td colspan="20" class="listViewHRS1"></td>
</tr>
<!-- END: row -->
</table>
<!-- END: main -->

View File

@@ -0,0 +1,130 @@
<?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.
********************************************************************************/
require_once('XTemplate/xtpl.php');
require_once("data/Tracker.php");
require_once("include/ListView/ListView.php");
global $app_strings;
global $current_language;
$current_module_strings = return_module_language($current_language, 'EcmReminders');
$header_text = '';
global $currentModule;
global $theme;
global $focus;
global $action;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
require_once($theme_path.'layout_utils.php');
///////////////////////////////////////
/// SETUP PARENT POPUP
$popup_request_data = array(
'call_back_function' => 'set_return_and_save',
'form_name' => 'DetailView',
'field_to_name_array' => array(
'id' => 'ecmreminder_id',
),
);
$json = getJSONobj();
$encoded_popup_request_data = $json->encode($popup_request_data);
///
///////////////////////////////////////
// FOCUS_LIST IS THE MEANS OF PASSING DATA TO A SUBPANELVIEW.
global $focus_list;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
$button .= "<input type='hidden' name='module' value='EcmReminders'>\n";
if ($currentModule == 'Accounts') {
$button .= "<input type='hidden' name='account_id' value='$focus->id'>\n";
$button .= "<input type='hidden' name='account_name' value='$focus->name'>\n";
}elseif ($currentModule == 'Contacts') {
$button .= "<input type='hidden' name='account_id' value='$focus->account_id'>\n";
$button .= "<input type='hidden' name='account_name' value='$focus->account_name'>\n";
$button .= "<input type='hidden' name='contact_id' value='$focus->id'>\n";
}elseif ($currentModule == 'Cases') {
$button .= "<input type='hidden' name='case_id' value='$focus->id'>\n";
}
$button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
$button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
$button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
$button .= "<input type='hidden' name='action'>\n";
$button .= "<input title='".$app_strings['LBL_NEW_BUTTON_TITLE']
."' accessKey='".$app_strings['LBL_NEW_BUTTON_KEY']
."' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value=' "
.$app_strings['LBL_NEW_BUTTON_LABEL']." '>\n";
$button .= "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE']."' accessKey='"
.$app_strings['LBL_SELECT_BUTTON_KEY']."' type='button' class='button' value=' "
.$app_strings['LBL_SELECT_BUTTON_LABEL']
." ' name='button' onclick='open_popup(\"EcmReminders\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n";
$button .= "</form>\n";
$ListView = new ListView();
$ListView->initNewXTemplate( 'modules/EcmReminders/SubPanelView.html',$current_module_strings);
$ListView->xTemplateAssign("RETURN_URL", "&return_module=".$currentModule."&return_action=DetailView&return_id={$_REQUEST['record']}");
$ListView->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path.'edit_inline', 'align="absmiddle" alt="'.$app_strings['LNK_EDIT'] .'" border="0"'));
$ListView->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path.'delete_inline','align="absmiddle" alt="'.$app_strings['LNK_REMOVE'].'" border="0"'));
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
$header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=EcmReminders&record="
.$_REQUEST['record']."'>"
.get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")
."</a>";
}
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME'] . $header_text );
$ListView->setHeaderText($button);
$ListView->processListView($focus_list, "main", "ECMREMINDER");
?>

View File

@@ -0,0 +1,29 @@
<?
function show_time_select($value)
{
$d=floor($value/3600);
$m=$value-$d*3600;
$s=$m/60;
if(!$value)$s=1;
$minutes='<select name="reminder_minutes">';
for($i=0;$i<=59;$i++)
{
$v=$i*60;
$minutes.='<option value="'.$v.'"';
if($i==$s)$minutes.=' selected';
$minutes.='>'.$i.'</option>';
}
$minutes.='</select>';
$hours='<select name="reminder_hours">';
for($i=0;$i<=23;$i++)
{
$v=$i*3600;
$hours.='<option value="'.$v.'"';
if($i==$d)$hours.=' selected';
$hours.='>'.$i.'</option>';
}
$hours.='</select>';
return 'hours: '.$hours.' minutes: '.$minutes;
}
?>

View File

@@ -0,0 +1,85 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the 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.
********************************************************************************/
$fields_array['EcmReminder'] = array (
'column_fields' => Array(
"id",
"name",
"date_entered",
"date_modified",
"modified_user_id",
"assigned_user_id",
"created_by",
//NEW COLUMN FIELDS
"parent_id",
"parent_name",
"description",
"date_start",
"role_id",
"status",
),
'list_fields' => Array(
'id',
'name',
'assigned_user_name',
'assigned_user_id',
//NEW LIST_FIELDS
'parent_id',
'parent_name',
'description',
'date_start',
'role_id',
'status',
),
'required_fields' => array(
'name'=>1
),
);
?>

View File

@@ -0,0 +1,164 @@
function showdescription(id,title,desc,minus,object)
{
if(!minus)minus=0;
var sum=17-minus;
document.getElementById("desc").style.display="inline";
document.getElementById("desc-title").innerHTML=title;
document.getElementById("desc-desc").innerHTML=desc;
posy=findPosY(object)+sum;
posx=findPosX(object);
moveDiv(document.getElementById("desc"),posy,posx);
}
function hidedescription()
{
document.getElementById("desc").style.display="none";
}
function mintajaxget(url,tag)
{
var req=mint.Request();
req.Set('timeout',10000000);
req.Set('retryNum',0);
req.OnLoading=function(){$(tag).innerHTML='<img src="themes/default/images/loading.gif" border="0">';}
req.OnSuccess = function(){if($(tag).type=='text'){if(this.responseText!="")$(tag).value=this.responseText;}else{if(this.responseText!="")$(tag).innerHTML=this.responseText;}}
req.Send(url,tag);
}
function mintajaxpost(url,tag,form)
{
var req=mint.Request();
req.OnSuccess=function(){$(tag).innerHTML=this.responseText;}
req.OnLoading=function(){$(tag).innerHTML='<img src="themes/default/images/loading.gif" border="0">';}
req.SendForm(form);
}
function moveDiv(obj, mvTop, mvLeft) {
obj.style.position = "absolute";
obj.style.top = mvTop;
obj.style.left = mvLeft;
}
function getPos(inputElement) {
var coords = new Object();
coords.x = 0;
coords.y = 0;
try {
targetElement = inputElement;
if(targetElement.x && targetElement.y) {
coords.x = targetElement.x;
coords.y = targetElement.y;
} else {
if(targetElement.offsetParent) {
coords.x += targetElement.offsetLeft;
coords.y += targetElement.offsetTop;
while(targetElement = targetElement.offsetParent) {
coords.x += targetElement.offsetLeft;
coords.y += targetElement.offsetTop;
}
} else {
//alert("Could not find any reference for coordinate positioning.");
}
}
return coords;
} catch(error) {
//alert(error.msg);
return coords;
}
}
function findPosX(obj)
{
var curleft = 0;
if(obj.offsetParent)
while(1)
{
curleft += obj.offsetLeft;
if(!obj.offsetParent)
break;
obj = obj.offsetParent;
}
else if(obj.x)
curleft += obj.x;
return curleft;
//return getPos(obj).x;
}
function findPosY(obj)
{
var curtop = 0;
if(obj.offsetParent)
while(1)
{
curtop += obj.offsetTop;
if(!obj.offsetParent)
break;
obj = obj.offsetParent;
}
else if(obj.y)
curtop += obj.y;
return curtop;
//return getPos(obj).y;
}
function showdiv(id,div,minusy,minusx)
{
document.getElementById(div).style.display="inline";
posy=findPosY(document.getElementById(id))-minusy;
posx=findPosX(document.getElementById(id))-minusx;
moveDiv(document.getElementById(div),posy,posx);
}
function hidediv(div)
{
document.getElementById(div).style.display="none";
}
function showprice(id,price,order_by,sorder)
{
document.getElementById('price').value=price;
document.getElementById('product_id').value=id;
document.getElementById('order_by').value=order_by;
document.getElementById('sorder').value=sorder;
document.getElementById('price-block').style.display="block";
}
function getPrice(id,type)
{
var purchase_price=document.getElementById('purchase_price_'+id).value;
var margin_rate=document.getElementById('margin_rate_'+id).value;
var list_price;
list_price=parseFloat(purchase_price)/(1-parseFloat(margin_rate)/100);
if(!isNaN(list_price))document.getElementById('list_price_'+id).value=roundNumber(list_price,2);
}
function CurrencyFormatted(amount)
{
var i = parseFloat(amount);
if(isNaN(i)) { i = 0.00; }
var minus = '';
if(i < 0) { minus = '-'; }
i = Math.abs(i);
i = parseInt((i + .005) * 100);
i = i / 100;
s = new String(i);
if(s.indexOf('.') < 0) { s += '.00'; }
if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
s = minus + s;
return s;
}
function roundN(rnum,rlength)
{
var newnumber = Math.round(rnum*Math.pow(10,rlength))/Math.pow(10,rlength);
return newnumber;
}
function roundNumber(num, dec)
{
if(!isNaN(num))return CurrencyFormatted(roundN(parseFloat(num),dec));
else return "";
}
function ShowHideBlock(id)
{
if(document.getElementById(id).style.display=="block")
{
document.getElementById(id).style.display="none"
}
else
{
document.getElementById(id).style.display="block"
}
}

View File

@@ -0,0 +1,61 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
global $theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
require_once ($theme_path."layout_utils.php");
global $mod_strings;
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_TITLE'], true);
echo "\n</p>\n";
include ('modules/EcmReminders/OpenListView.php');
?>

View File

@@ -0,0 +1,166 @@
<?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.
********************************************************************************/
$mod_strings = array (
'appointment_filter_dom' => array(
'today' => 'today'
,'tomorrow' => 'tomorrow'
,'this Saturday' => 'this week'
,'next Saturday' => 'next week'
,'last this_month' => 'this month'
,'last next_month' => 'next month'
),
'LBL_UPCOMING' => 'Reminder',
'LBL_TODAY' => 'through ',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_CONTACT' => 'Contact',
'LBL_LIST_RELATED_TO' => 'Related to',
'LBL_LIST_DATE' => 'Date',
'LBL_LIST_TIME' => 'Start Time',
'LBL_LIST_CLOSE' => 'Close',
'LBL_LIST_STATUS' => 'Status',
// FOR SYSTEM USE
'LBL_MODULE_NAME' => 'Reminders',
'LBL_MODULE_TITLE' => 'Reminders: Home',
'LBL_MODULE_ID' => 'Reminders',
'LBL_SEARCH_FORM_TITLE' => 'Reminders Search',
'LBL_LIST_FORM_TITLE' => 'Reminders List',
'LBL_NEW_FORM_TITLE' => 'New Reminders',
'LBL_ECMREMINDERS' => 'Reminders:',
'LBL_ECMREMINDERS_SUBJECT' => 'Reminders Subject:',
'LBL_SYSTEM_ID' => 'System ID',
// FOR LIST VIEW
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_LAST_MODIFIED' => 'Last Modified',
'LBL_LIST_MY_ECMREMINDERS' => 'My Assigned Reminders',
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
'LBL_LIST_PARENT_ID' => 'Parent Id',
'LBL_LIST_PARENT_NAME' => 'Parent Name',
'LBL_LIST_DESCRIPTION' => 'Description',
'LBL_LIST_DATE_START' => 'Date Start',
// FOR NOTIFICATION POPUPS
'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to remove this ecmreminder from this Reminder?',
'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this contact from the Reminder?',
'NTC_REMOVE_ACCOUNT_CONFIRMATION' => 'Are you sure you want to remove this ecmreminder from this account?',
'ERR_DELETE_RECORD' => 'A record number must be specified to delete the ecmreminder.',
// FOR DEFAULT FIELDS
'LBL_NAME' => 'Name:',
'LBL_SUBJECT' => 'Name:',
'LBL_CREATED_BY' => 'Created by:',
'LBL_CREATED' => 'Created by:',
'LBL_ASSIGNED_TO' => 'Assigned to:',
'LBL_ASSIGNED_USER_ID' => 'Assigned To:',
'LBL_DATE_ENTERED' => 'Date Created:',
'LBL_DATE_CREATED' => 'Create Date:',
'LBL_DATE_MODIFIED' => 'Last Modified',
'LBL_MODIFIED_BY' => 'Last Modified by:',
'LBL_MODIFIED' => 'Modified by:',
'LBL_DATE_LAST_MODIFIED' => 'Modify Date:',
// FOR NEW FIELDS
'LBL_PARENT_ID' => 'Parent Id',
'LBL_PARENT_NAME' => 'Parent Name',
'LBL_DESCRIPTION' => 'Description',
'LBL_DATE_START' => 'Date Start',
// FOR GROUPS
'LBL_GROUP_MASTER' => 'ECMREMINDER INFORMATION',
'LBL_GROUP_PARENT_ID' => '',
'LBL_GROUP_PARENT_NAME' => '',
'LBL_GROUP_DESCRIPTION' => '',
'LBL_GROUP_DATE_START' => '',
// FOR SUBPANELS
'LBL_ECMREMINDERS_SUBPANEL_TITLE' => 'Reminders',
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
'LBL_HISTORY_SUBPANEL_TITLE' => 'History',
'LBL_ECMREMINDERS' => 'Reminders',
// FOR MENU LABELS
'LNK_NEW_ECMREMINDERS' => 'Create Reminder',
'LNK_LIST_ECMREMINDER' => 'Reminders List',
// FOR MENU LINKS
'LNK_NEW_ECMREMINDER' => 'Create Reminders',
'LNK_ECMREMINDERS_LIST' => 'Reminders',
'LNK_ECMREMINDERS_REPORTS' => 'Reminders Reports',
// FOR ADDITIONAL MENUS
// FOR DASHLETS
'LBL_LIST_ECMREMINDERS' => 'Reminders',
'LBL_REMINDER_LIST' => 'Remind List',
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_REMINDER_DATE' => 'Reminder Date',
'LBL_LIST_EVENT_DATE' => 'Event Date',
'LBL_LIST_STATUS' => 'Status',
'LBL_POSTPONE_BY' => 'Postpone By',
'LBL_POSTPONE_TO' => 'Postpone To',
'LBL_DATE' => 'Date',
'LBL_TIME' => 'Time',
'LBL_POSTPONEBY_DROPDOWN_MIN' => 'min',
'LBL_POSTPONEBY_DROPDOWN_HOUR' => 'hour.',
'LBL_POSTPONEBY_DROPDOWN_HOURS' => 'hours',
'LBL_POSTPONEBY_DROPDOWN_DAY' => 'day',
'LBL_POSTPONEBY_DROPDOWN_DAYS' => 'days',
'LBL_POSTPONEBY_DROPDOWN_WEEK' => 'week',
'LBL_POSTPONEBY_DROPDOWN_WEEKS' => 'weeks',
'LBL_UPDATE_BUTTON_LABEL' => 'Update',
'LBL_CLOSE_SELECTED_BUTTON_LABEL' => 'Close Selected',
);
?>

View File

@@ -0,0 +1,162 @@
<?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.
********************************************************************************/
$mod_strings = array (
'appointment_filter_dom' => array(
'today' => 'today'
,'tomorrow' => 'tomorrow'
,'this Saturday' => 'this week'
,'next Saturday' => 'next week'
,'last this_month' => 'this month'
,'last next_month' => 'next month'
),
'LBL_UPCOMING' => 'Reminder',
'LBL_TODAY' => 'through ',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_CONTACT' => 'Contact',
'LBL_LIST_RELATED_TO' => 'Related to',
'LBL_LIST_DATE' => 'Date',
'LBL_LIST_TIME' => 'Start Time',
'LBL_LIST_CLOSE' => 'Close',
'LBL_LIST_STATUS' => 'Status',
// FOR SYSTEM USE
'LBL_MODULE_NAME' => 'Reminders',
'LBL_MODULE_TITLE' => 'Reminders: Home',
'LBL_MODULE_ID' => 'Reminders',
'LBL_SEARCH_FORM_TITLE' => 'Reminders Search',
'LBL_LIST_FORM_TITLE' => 'Reminders List',
'LBL_NEW_FORM_TITLE' => 'New Reminders',
'LBL_ECMREMINDERS' => 'Reminders:',
'LBL_ECMREMINDERS_SUBJECT' => 'Reminders Subject:',
'LBL_SYSTEM_ID' => 'System ID',
// FOR LIST VIEW
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_LAST_MODIFIED' => 'Last Modified',
'LBL_LIST_MY_ECMREMINDERS' => 'My Assigned Reminders',
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
'LBL_LIST_PARENT_ID' => 'Parent Id',
'LBL_LIST_PARENT_NAME' => 'Parent Name',
'LBL_LIST_DESCRIPTION' => 'Description',
'LBL_LIST_DATE_START' => 'Date Start',
// FOR NOTIFICATION POPUPS
'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to remove this ecmreminder from this Reminder?',
'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this contact from the Reminder?',
'NTC_REMOVE_ACCOUNT_CONFIRMATION' => 'Are you sure you want to remove this ecmreminder from this account?',
'ERR_DELETE_RECORD' => 'A record number must be specified to delete the ecmreminder.',
// FOR DEFAULT FIELDS
'LBL_NAME' => 'Name:',
'LBL_SUBJECT' => 'Name:',
'LBL_CREATED_BY' => 'Created by:',
'LBL_CREATED' => 'Created by:',
'LBL_ASSIGNED_TO' => 'Assigned to:',
'LBL_ASSIGNED_USER_ID' => 'Assigned To:',
'LBL_DATE_ENTERED' => 'Date Created:',
'LBL_DATE_CREATED' => 'Create Date:',
'LBL_DATE_MODIFIED' => 'Last Modified',
'LBL_MODIFIED_BY' => 'Last Modified by:',
'LBL_MODIFIED' => 'Modified by:',
'LBL_DATE_LAST_MODIFIED' => 'Modify Date:',
// FOR NEW FIELDS
'LBL_PARENT_ID' => 'Parent Id',
'LBL_PARENT_NAME' => 'Parent Name',
'LBL_DESCRIPTION' => 'Description',
'LBL_DATE_START' => 'Date Start',
// FOR GROUPS
'LBL_GROUP_MASTER' => 'ECMREMINDER INFORMATION',
'LBL_GROUP_PARENT_ID' => '',
'LBL_GROUP_PARENT_NAME' => '',
'LBL_GROUP_DESCRIPTION' => '',
'LBL_GROUP_DATE_START' => '',
// FOR SUBPANELS
'LBL_ECMREMINDERS_SUBPANEL_TITLE' => 'Reminders',
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
'LBL_HISTORY_SUBPANEL_TITLE' => 'History',
'LBL_ECMREMINDERS' => 'Reminders',
// FOR MENU LABELS
'LNK_NEW_ECMREMINDERS' => 'Create Reminder',
'LNK_LIST_ECMREMINDER' => 'Reminders List',
// FOR MENU LINKS
'LNK_NEW_ECMREMINDER' => 'Create Reminders',
'LNK_ECMREMINDERS_LIST' => 'Reminders',
'LNK_ECMREMINDERS_REPORTS' => 'Reminders Reports',
// FOR ADDITIONAL MENUS
// FOR DASHLETS
'LBL_LIST_ECMREMINDERS' => 'Reminders',
'LBL_REMINDER_LIST' => 'Remind List',
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_REMINDER_DATE' => 'Reminder Date',
'LBL_LIST_EVENT_DATE' => 'Event Date',
'LBL_LIST_STATUS' => 'Status',
'LBL_POSTPONE_BY' => 'Postpone By',
'LBL_POSTPONE_TO' => 'Postpone To',
'LBL_DATE' => 'Date',
'LBL_TIME' => 'Time',
'LBL_POSTPONEBY_DROPDOWN_MIN' => 'min',
'LBL_POSTPONEBY_DROPDOWN_HOUR' => 'hour.',
'LBL_POSTPONEBY_DROPDOWN_HOURS' => 'hours',
'LBL_POSTPONEBY_DROPDOWN_DAY' => 'day',
'LBL_POSTPONEBY_DROPDOWN_DAYS' => 'days',
'LBL_POSTPONEBY_DROPDOWN_WEEK' => 'week',
'LBL_POSTPONEBY_DROPDOWN_WEEKS' => 'weeks',
'LBL_UPDATE_BUTTON_LABEL' => 'Update',
'LBL_CLOSE_SELECTED_BUTTON_LABEL' => 'Close Selected',
);
?>

View File

@@ -0,0 +1,162 @@
<?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.
********************************************************************************/
$mod_strings = array (
'appointment_filter_dom' => array(
'today' => 'today'
,'tomorrow' => 'tomorrow'
,'this Saturday' => 'this week'
,'next Saturday' => 'next week'
,'last this_month' => 'this month'
,'last next_month' => 'next month'
),
'LBL_UPCOMING' => 'Reminder',
'LBL_TODAY' => 'through ',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_CONTACT' => 'Contact',
'LBL_LIST_RELATED_TO' => 'Related to',
'LBL_LIST_DATE' => 'Date',
'LBL_LIST_TIME' => 'Start Time',
'LBL_LIST_CLOSE' => 'Close',
'LBL_LIST_STATUS' => 'Status',
// FOR SYSTEM USE
'LBL_MODULE_NAME' => 'Reminders',
'LBL_MODULE_TITLE' => 'Przypominacz: Strona Główna',
'LBL_MODULE_ID' => 'Reminders',
'LBL_SEARCH_FORM_TITLE' => 'Reminders Search',
'LBL_LIST_FORM_TITLE' => 'Reminders List',
'LBL_NEW_FORM_TITLE' => 'New Reminders',
'LBL_ECMREMINDERS' => 'Reminders:',
'LBL_ECMREMINDERS_SUBJECT' => 'Reminders Subject:',
'LBL_SYSTEM_ID' => 'System ID',
// FOR LIST VIEW
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_LAST_MODIFIED' => 'Last Modified',
'LBL_LIST_MY_ECMREMINDERS' => 'My Assigned Reminders',
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
'LBL_LIST_PARENT_ID' => 'Parent Id',
'LBL_LIST_PARENT_NAME' => 'Parent Name',
'LBL_LIST_DESCRIPTION' => 'Description',
'LBL_LIST_DATE_START' => 'Date Start',
// FOR NOTIFICATION POPUPS
'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to remove this ecmreminder from this Reminder?',
'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this contact from the Reminder?',
'NTC_REMOVE_ACCOUNT_CONFIRMATION' => 'Are you sure you want to remove this ecmreminder from this account?',
'ERR_DELETE_RECORD' => 'A record number must be specified to delete the ecmreminder.',
// FOR DEFAULT FIELDS
'LBL_NAME' => 'Name:',
'LBL_SUBJECT' => 'Name:',
'LBL_CREATED_BY' => 'Created by:',
'LBL_CREATED' => 'Created by:',
'LBL_ASSIGNED_TO' => 'Assigned to:',
'LBL_ASSIGNED_USER_ID' => 'Assigned To:',
'LBL_DATE_ENTERED' => 'Date Created:',
'LBL_DATE_CREATED' => 'Create Date:',
'LBL_DATE_MODIFIED' => 'Last Modified',
'LBL_MODIFIED_BY' => 'Last Modified by:',
'LBL_MODIFIED' => 'Modified by:',
'LBL_DATE_LAST_MODIFIED' => 'Modify Date:',
// FOR NEW FIELDS
'LBL_PARENT_ID' => 'Parent Id',
'LBL_PARENT_NAME' => 'Parent Name',
'LBL_DESCRIPTION' => 'Description',
'LBL_DATE_START' => 'Date Start',
// FOR GROUPS
'LBL_GROUP_MASTER' => 'ECMREMINDER INFORMATION',
'LBL_GROUP_PARENT_ID' => '',
'LBL_GROUP_PARENT_NAME' => '',
'LBL_GROUP_DESCRIPTION' => '',
'LBL_GROUP_DATE_START' => '',
// FOR SUBPANELS
'LBL_ECMREMINDERS_SUBPANEL_TITLE' => 'Reminders',
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
'LBL_HISTORY_SUBPANEL_TITLE' => 'History',
'LBL_ECMREMINDERS' => 'Reminders',
// FOR MENU LABELS
'LNK_NEW_ECMREMINDERS' => 'Create Reminder',
'LNK_LIST_ECMREMINDER' => 'Reminders List',
// FOR MENU LINKS
'LNK_NEW_ECMREMINDER' => 'Create Reminders',
'LNK_ECMREMINDERS_LIST' => 'Reminders',
'LNK_ECMREMINDERS_REPORTS' => 'Reminders Reports',
// FOR ADDITIONAL MENUS
// FOR DASHLETS
'LBL_LIST_ECMREMINDERS' => 'Reminders',
'LBL_REMINDER_LIST' => 'Lista Przypomnień',
'LBL_LIST_NAME' => 'Nazwa',
'LBL_LIST_REMINDER_DATE' => 'Czas Przypomnienia',
'LBL_LIST_EVENT_DATE' => 'Czas Wydarzenia',
'LBL_LIST_STATUS' => 'Status',
'LBL_POSTPONE_BY' => 'Przypomnij za',
'LBL_POSTPONE_TO' => 'Przesuń na',
'LBL_DATE' => 'Data',
'LBL_TIME' => 'Czas',
'LBL_POSTPONEBY_DROPDOWN_MIN' => 'minut',
'LBL_POSTPONEBY_DROPDOWN_HOUR' => 'godzina',
'LBL_POSTPONEBY_DROPDOWN_HOURS' => 'godzin',
'LBL_POSTPONEBY_DROPDOWN_DAY' => 'dzień',
'LBL_POSTPONEBY_DROPDOWN_DAYS' => 'dni',
'LBL_POSTPONEBY_DROPDOWN_WEEK' => 'tydzień',
'LBL_POSTPONEBY_DROPDOWN_WEEKS' => 'tygodni',
'LBL_UPDATE_BUTTON_LABEL' => 'Aktualizuj',
'LBL_CLOSE_SELECTED_BUTTON_LABEL' => 'Zamknij Zaznaczone',
);
?>

View File

@@ -0,0 +1,57 @@
<?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.
********************************************************************************/
$smarty->debugging = true;
$smarty->debugging_ctrl=($_SERVER['SERVER_NAME']=='localhost:8080')?'URL':'NONE';
$layout_defs['EcmReminders'] = array(
//LIST OF WHAT SUBPANELS TO SHOW IN THE DETAILVIEW
'subpanel_setup' => array(
),
);
?>

View File

@@ -0,0 +1,59 @@
<?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.
********************************************************************************/
$searchFields['EcmReminders'] =
array (
'name' => array('query_type' => 'default'),
'current_user_only'=> array('query_type' => 'default',
'db_field' => array('assigned_user_id'),
'my_items' => true
),
'assigned_user_id' => array('query_type' => 'default'),
);
?>

View File

@@ -0,0 +1,79 @@
<?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.
********************************************************************************/
require_once('include/utils.php');
function additionalDetailsEcmReminder($fields) {
static $mod_strings;
global $app_strings;
if(empty($mod_strings)) {
global $current_language;
$mod_strings = return_module_language($current_language, 'EcmReminders');
}
$overlib_string = '';
//BUILDER:START overlibstring
if(!empty($fields['DESCRIPTION'])){
$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> <BR>' . substr($fields['DESCRIPTION'], 0, 300);
if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
$overlib_string .= '<br>';
}
//BUILDER:END overlibstring
return array(
'fieldToAddTo' => 'NAME',
'string' => $overlib_string,
'editLink' => "index.php?action=EditView&module=EcmReminders&return_module=EcmReminders&record={$fields['ID']}",
'viewLink' => "index.php?action=DetailView&module=EcmReminders&return_module=EcmReminders&record={$fields['ID']}");
}
?>

View File

@@ -0,0 +1,88 @@
<?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.
********************************************************************************/
$listViewDefs['EcmReminders'] = array(
'NAME' => array(
'width' => '20',
'label' => 'LBL_NAME',
'default' => true,
'link' => true),
'PARENT_ID' => array(
'width' => '10',
'label' => 'LBL_PARENT_ID'),
'PARENT_NAME' => array(
'width' => '10',
'label' => 'LBL_PARENT_NAME'),
'DESCRIPTION' => array(
'width' => '10',
'label' => 'LBL_DESCRIPTION'),
'DATE_START' => array(
'width' => '10',
'label' => 'LBL_DATE_START'),
'DATE_MODIFIED' => array(
'width' => '5',
'label' => 'LBL_DATE_MODIFIED'),
'DATE_ENTERED' => array(
'width' => '5',
'label' => 'LBL_DATE_ENTERED'),
'CREATED_BY_NAME' => array(
'width' => '10',
'label' => 'LBL_CREATED'),
'ASSIGNED_USER_NAME' => array(
'width' => '2',
'label' => 'LBL_LIST_ASSIGNED_USER',
'default' => true),
'MODIFIED_USER_NAME' => array(
'width' => '2',
'label' => 'LBL_MODIFIED')
);
?>

View File

@@ -0,0 +1,60 @@
<?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.
********************************************************************************/
$popupMeta = array(
'moduleMain' => 'EcmReminder',
'varName' => 'ECMREMINDER',
'orderBy' => 'ecmreminders.name',
'whereClauses' => array(
'name' => 'ecmreminders.name',
),
'searchInputs' => array('name', 'name')
);
?>

View File

@@ -0,0 +1,76 @@
<?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.
********************************************************************************/
$GLOBALS['studioDefs']['EcmReminders'] = array(
'LBL_DETAILVIEW'=>array(
'template' => 'xtpl',
'template_file' => 'modules/EcmReminders/DetailView.html',
'php_file' => 'modules/EcmReminders/DetailView.php',
'type' => 'DetailView',
),
'LBL_EDITVIEW'=>array(
'template' => 'xtpl',
'template_file' => 'modules/EcmReminders/EditView.html',
'php_file' => 'modules/EcmReminders/EditView.php',
'type' => 'EditView',
),
'LBL_LISTVIEW'=>array(
'template' => 'listview',
'meta_file' => 'modules/EcmReminders/listviewdefs.php',
'type' => 'ListView',
),
'LBL_SEARCHFORM'=>array(
'template' => 'xtpl',
'template_file' => 'modules/EcmReminders/SearchForm.html',
'php_file' => 'modules/EcmReminders/ListView.php',
'type' => 'SearchForm',
),
);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
function show_reminder()
{
var req=mint.Request();
req.OnSuccess = function()
{
if(this.responseText=="ok")
window.open('index.php?module=EcmReminders&action=ReminderWindow&to_pdf=1', 'Reminder', 'height=540,width=560').focus();
}
req.Send("index.php?module=EcmReminders&action=ShowReminder&to_pdf=1");
}

View File

@@ -0,0 +1,82 @@
<?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.
********************************************************************************/
$subpanel_layout = array(
'top_buttons' => array(
array('widget_class' => 'SubPanelTopCreateButton'),
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmReminders'),
),
'where' => '',
'list_fields' => array(
'name'=>array(
'vname' => 'LBL_LIST_NAME',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '50%',
),
'assigned_user_name' => array (
'name' => 'assigned_user_name',
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
),
'edit_button'=>array(
'widget_class' => 'SubPanelEditButton',
'module' => 'EcmReminders',
'width' => '4%',
),
'remove_button'=>array(
'widget_class' => 'SubPanelRemoveButton',
'module' => 'EcmReminders',
'width' => '5%',
),
),
);
?>

View File

@@ -0,0 +1,59 @@
<form name="ecmremindersQuickCreate" id="ecmremindersQuickCreate" method="POST" action="index.php">
<input type="hidden" name="module" value="EcmReminders">
<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}">
<input type="hidden" name="to_pdf" value='1'>
<input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{$ASSIGNED_USER_ID}" />
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left" style="padding-bottom: 2px;">
<input title= "{$APP.LBL_SAVE_BUTTON_TITLE}"
accessKey= "{$APP.LBL_SAVE_BUTTON_KEY}"
class= "button"
type= "submit"
name= "button" {$saveOnclick|default:"onclick=\"return check_form('EcmRemindersQuickCreate');\""} 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='EcmReminders';"
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_ECMREMINDER_INFORMATION}</slot></h4>
</th>
</tr>
<tr>
<td valign="top" class="dataLabel" width="15%"><slot>{$MOD.LBL_NAME} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
<td width="35%"><slot><textarea name='name' cols="40" tabindex='1' rows="1">{$NAME}</textarea></slot></td>
</tr>
</table>
</form>
<script>
{$additionalScripts}
</script>

View File

@@ -0,0 +1,275 @@
<?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.
********************************************************************************/
$dictionary['EcmReminder'] = array(
'table' => 'ecmreminders',
'audited' => true,
'comment' => 'EcmReminders',
'duplicate_merge' => true,
'unified_search' => true,
'fields' => array (
//STANDARD FIELDS SECTION
'id' => array (
'name' => 'id',
'vname' => 'LBL_ID',
'type' => 'id',
'required' => true,
'reportable' => false,
'comment' => 'Unique identifier'
),
'name' => array (
'name' => 'name',
'vname' => 'LBL_NAME',
'type' => 'name',
'required' => true,
'dbType' => 'varchar',
'len' => 255,
'audited' => true,
'unified_search' => true,
'comment' => 'The short description of the record contents',
'massupdate' => true,
'merge_filter' => 'selected',
),
'date_entered' => array (
'name' => 'date_entered',
'vname' => 'LBL_DATE_ENTERED',
'type' => 'datetime',
'required' => true,
'comment' => 'Date record created'
),
'date_modified' => array (
'name' => 'date_modified',
'vname' => 'LBL_DATE_MODIFIED',
'type' => 'datetime',
'required' => true,
'comment' => 'Date record last modified'
),
'modified_user_id' => array (
'name' => 'modified_user_id',
'rname' => 'user_name',
'id_name' => 'modified_user_id',
'vname' => 'LBL_MODIFIED',
'type' => 'assigned_user_name',
'table' => 'modified_user_id_users',
'isnull' => 'false',
'dbType' => 'varchar',
'len' => 36,
'required' => true,
'reportable' => true,
'comment' => 'User who last modified record'
),
'assigned_user_id' => array (
'name' => 'assigned_user_id',
'rname' => 'user_name',
'id_name' => 'assigned_user_id',
'vname' => 'LBL_ASSIGNED_TO',
'type' => 'relate',
'table' => 'users',
'isnull' => 'false',
'dbType' => 'varchar',
'reportable' => true,
'len' => 36,
'audited' => true,
'comment' => 'User assigned to record',
'module' => 'Users',
'duplicate_merge' => 'disabled'
),
'assigned_user_name' => array (
'name' => 'assigned_user_name',
'vname' => 'LBL_ASSIGNED_TO',
'type' => 'varchar',
'reportable' => false,
'source' => 'nondb',
'table' => 'users',
'massupdate' => true,
'duplicate_merge' => 'disabled'
),
'created_by' => array (
'name' => 'created_by',
'rname' => 'user_name',
'id_name' => 'created_by',
'vname' => 'LBL_CREATED',
'type' => 'assigned_user_name',
'table' => 'created_by_users',
'isnull' => 'false',
'dbType' => 'varchar',
'len' => 36,
'comment' => 'User that created the record'
),
'created_by_link' => array (
'name' => 'created_by_link',
'type' => 'link',
'relationship' => 'ecmreminders_created_by',
'vname' => 'LBL_CREATED_BY_USER',
'link_type' => 'one',
'module' => 'Users',
'bean_name' => 'User',
'source' => 'non-db',
),
'modified_user_link' => array (
'name' => 'modified_user_link',
'type' => 'link',
'relationship' => 'ecmreminders_modified_user',
'vname' => 'LBL_MODIFIED_BY_USER',
'link_type' => 'one',
'module' => 'Users',
'bean_name' => 'User',
'source' => 'non-db',
),
'assigned_user_link' => array (
'name' => 'assigned_user_link',
'type' => 'link',
'relationship' => 'ecmreminders_assigned_user',
'vname' => 'LBL_ASSIGNED_TO_USER',
'link_type' => 'one',
'module' => 'Users',
'bean_name' => 'User',
'source' => 'non-db',
'duplicate_merge' => 'enabled',
'rname' => 'user_name',
'id_name' => 'assigned_user_id',
'table' => 'users',
),
'deleted' => array (
'name' => 'deleted',
'vname' => 'LBL_CREATED_BY',
'type' => 'bool',
'required' => true,
'reportable' => false,
'comment' => 'Record deletion indicator'
),
//NEW FIELDS SECTION
'parent_id' => array(
'type' => 'varchar',
'name' => 'parent_id',
'vname' => 'LBL_PARENT_ID',
'comment' => 'Parent Id',
'max_size' => '36',
'len' => '36',
),
'parent_name' => array(
'type' => 'varchar',
'name' => 'parent_name',
'vname' => 'LBL_PARENT_NAME',
'comment' => 'Parent Name',
'max_size' => '255',
'len' => '255',
),
'description' => array(
'type' => 'text',
'name' => 'description',
'vname' => 'LBL_DESCRIPTION',
'comment' => 'Description',
),
'date_start' => array(
'type' => 'datetime',
'name' => 'date_start',
'vname' => 'LBL_DATE_START',
'comment' => 'Date Start',
),
'role_id' => array(
'name' => 'role_id',
'type' => 'id',
'vname' => 'LBL_ROLE_ID',
),
'reminder_time' => array(
'type' => 'int',
'name' => 'reminder_time',
'vname' => 'LBL_REMINDER_TIME',
'comment' => 'Reminder Time',
'max_size' => '11',
'len' => '11',
),
'status' => array(
'type' => 'varchar',
'name' => 'status',
'vname' => 'LBL_STATUS',
),
//FOR SUBPANELS
),
//INDICES SECTION
'indices' => array (
array('name' =>'ecmremindersspk', 'type' =>'primary', 'fields'=>array('id')),
array('name' =>'idx_ecmreminders_name', 'type' =>'index', 'fields'=>array('name'))
)
//RELATIONSHIPS SECTION
, 'relationships' => array (
'ecmreminders_assigned_user' => array(
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
'rhs_module'=> 'EcmReminders', 'rhs_table'=> 'ecmreminders', 'rhs_key' => 'assigned_user_id',
'relationship_type'=>'one-to-many')
,'ecmreminders_modified_user' => array(
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
'rhs_module'=> 'EcmReminders', 'rhs_table'=> 'ecmreminders', 'rhs_key' => 'modified_user_id',
'relationship_type'=>'one-to-many')
,'ecmreminders_created_by' => array(
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
'rhs_module'=> 'EcmReminders', 'rhs_table'=> 'ecmreminders', 'rhs_key' => 'created_by',
'relationship_type'=>'one-to-many')
),
//THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW
'optimistic_locking'=>true,
);
?>