init
This commit is contained in:
161
modules/CampaignTrackers/CampaignTracker.php
Executable file
161
modules/CampaignTrackers/CampaignTracker.php
Executable file
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: The primary Function of this file is to manage all the data
|
||||
* used by other files in this nodule. It should extend the SugarBean which impelments
|
||||
* all the basic database operations. Any custom behaviors can be implemented here by
|
||||
* implemeting functions available in the SugarBean.
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class CampaignTracker extends SugarBean {
|
||||
/* Foreach instance of the bean you will need to access the fields in the table.
|
||||
* So define a variable for each one of them, the varaible name should be same as the field name
|
||||
* Use this module's vardef file as a reference to create these variables.
|
||||
*/
|
||||
var $id;
|
||||
var $date_entered;
|
||||
var $created_by;
|
||||
var $date_modified;
|
||||
var $modified_by;
|
||||
var $deleted;
|
||||
var $tracker_key;
|
||||
var $tracker_url;
|
||||
var $tracker_name;
|
||||
var $campaign_id;
|
||||
var $campaign_name;
|
||||
var $message_url;
|
||||
var $is_optout;
|
||||
|
||||
/* End field definitions*/
|
||||
|
||||
/* variable $table_name is used by SugarBean and methods in this file to constructs queries
|
||||
* set this variables value to the table associated with this bean.
|
||||
*/
|
||||
var $table_name = 'campaign_trkrs';
|
||||
|
||||
/*This variable overrides the object_name variable in SugarBean, wher it has a value of null.*/
|
||||
var $object_name = 'CampaignTracker';
|
||||
|
||||
/**/
|
||||
var $module_dir = 'CampaignTrackers';
|
||||
|
||||
/* This is a legacy variable, set its value to true for new modules*/
|
||||
var $new_schema = true;
|
||||
|
||||
/* $column_fields holds a list of columns that exist in this bean's table. This list is referenced
|
||||
* when fetching or saving data for the bean. As you modify a table you need to keep this up to date.
|
||||
*/
|
||||
var $column_fields = Array(
|
||||
'id'
|
||||
,'tracker_key'
|
||||
,'tracker_url'
|
||||
,'tracker_name'
|
||||
,'campaign_id'
|
||||
);
|
||||
|
||||
// This is used to retrieve related fields from form posts.
|
||||
var $additional_column_fields = Array('campaign_id');
|
||||
var $relationship_fields = Array('campaing_id'=>'campaign');
|
||||
|
||||
var $required_fields = array('tracker_name'=>1,'tracker_url'=>1);
|
||||
|
||||
/*This bean's constructor*/
|
||||
function CampaignTracker() {
|
||||
parent::SugarBean();
|
||||
}
|
||||
|
||||
function save() {
|
||||
//make sure that the url has a scheme, if not then add http:// scheme
|
||||
if ($this->is_optout!=1 ){
|
||||
$url = strtolower(trim($this->tracker_url));
|
||||
if(!preg_match('/^(http|https|ftp):\/\//i', $url)){
|
||||
$this->tracker_url = 'http://'.$url;
|
||||
}
|
||||
}
|
||||
|
||||
parent::save();
|
||||
}
|
||||
|
||||
/* This method should return the summary text which is used to build the bread crumb navigation*/
|
||||
/* Generally from this method you would return value of a field that is required and is of type string*/
|
||||
function get_summary_text()
|
||||
{
|
||||
return "$this->tracker_name";
|
||||
}
|
||||
|
||||
|
||||
/* This method is used to generate query for the list form. The base implementation of this method
|
||||
* uses the table_name and list_field varaible to generate the basic query and then adds the custom field
|
||||
* join and team filter. If you are implementing this function do not forget to consider the additional conditions.
|
||||
*/
|
||||
|
||||
function fill_in_additional_detail_fields() {
|
||||
global $sugar_config;
|
||||
|
||||
//setup campaign name.
|
||||
$query = "SELECT name from campaigns where id = '$this->campaign_id'";
|
||||
$result =$this->db->query($query,true," Error filling in additional detail fields: ");
|
||||
|
||||
// Get the id and the name.
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
if($row != null) {
|
||||
$this->campaign_name=$row['name'];
|
||||
}
|
||||
|
||||
if (!class_exists('Administration')) {
|
||||
|
||||
}
|
||||
$admin=new Administration();
|
||||
$admin->retrieveSettings('massemailer'); //retrieve all admin settings.
|
||||
if (isset($admin->settings['massemailer_tracking_entities_location_type']) and $admin->settings['massemailer_tracking_entities_location_type']=='2' and isset($admin->settings['massemailer_tracking_entities_location']) ) {
|
||||
$this->message_url=$admin->settings['massemailer_tracking_entities_location'];
|
||||
} else {
|
||||
$this->message_url=$sugar_config['site_url'];
|
||||
}
|
||||
if ($this->is_optout == 1) {
|
||||
$this->message_url .= '/index.php?entryPoint=removeme&identifier={MESSAGE_ID}';
|
||||
} else {
|
||||
$this->message_url .= '/index.php?entryPoint=campaign_trackerv2&track=' . $this->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
87
modules/CampaignTrackers/DetailView.html
Executable file
87
modules/CampaignTrackers/DetailView.html
Executable file
@@ -0,0 +1,87 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
<form action="index.php" method="post" name="DetailView" id="form">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width='100%'>
|
||||
<input type="hidden" name="module" value="CampaignTrackers">
|
||||
<input type="hidden" name="record" value="{ID}">
|
||||
<input type="hidden" name="campaign_name" value="{CAMPAIGN_NAME}">
|
||||
<input type="hidden" name="isDuplicate" value=false>
|
||||
<input type="hidden" name="action">
|
||||
<input type="hidden" name="return_module" value="{RETURN_MODULE}">
|
||||
<input type="hidden" name="return_action" value="{RETURN_ACTION}">
|
||||
<input type="hidden" name="return_id" value="{RETURN_ID}">
|
||||
{PORTAL_ON}
|
||||
<tr>
|
||||
<td><input title="{APP.LBL_EDIT_BUTTON_TITLE}" accessKey="{APP.LBL_EDIT_BUTTON_KEY}" class="button" onclick="this.form.return_module.value='{RETURN_MODULE}'; this.form.return_action.value='DetailView'; this.form.return_id.value='{RETURN_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='Campaigns'; 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='Campaigns'; 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} "></td>
|
||||
<td align='right'>{ADMIN_EDIT}</td>
|
||||
</tr></table>
|
||||
|
||||
</form>
|
||||
<table width="100%" border="0" cellspacing="{GRIDLINE}" cellpadding="0">
|
||||
<tr><td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="25%"><slot>{MOD.LBL_EDIT_CAMPAIGN_NAME}</slot></td>
|
||||
<td width="75%"><slot>{CAMPAIGN_NAME} </slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%"><slot>{MOD.LBL_EDIT_TRACKER_NAME}</slot></td>
|
||||
<td width="75%"><slot>{TRACKER_NAME} </slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%"><slot>{MOD.LBL_EDIT_OPT_OUT}</slot></td>
|
||||
<td width="75%"><slot><input name="is_optout" id=="is_optout" class="checkbox" type="checkbox" disabled {IS_OPTOUT_CHECKED}/></slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%"><slot>{MOD.LBL_EDIT_TRACKER_URL}</span></slot></td>
|
||||
<td width="75%"><slot>{TRACKER_URL} </slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%"><slot>{MOD.LBL_EDIT_TRACKER_KEY}</span></slot></td>
|
||||
<td width="75%"><slot>{TRACKER_KEY} </slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%"><slot>{MOD.LBL_EDIT_MESSAGE_URL}</span></slot></td>
|
||||
<td width="75%"><slot>{MESSAGE_URL} </slot></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<!-- END: main -->
|
||||
117
modules/CampaignTrackers/DetailView.php
Executable file
117
modules/CampaignTrackers/DetailView.php
Executable file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
global $mod_strings;
|
||||
|
||||
$focus = new CampaignTracker();
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
|
||||
$focus->id = "";
|
||||
}
|
||||
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->tracker_name, true);
|
||||
|
||||
|
||||
|
||||
$GLOBALS['log']->info("campaign tracker detail view");
|
||||
|
||||
$xtpl=new XTemplate ('modules/CampaignTrackers/DetailView.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
|
||||
if (isset($_REQUEST['return_module'])) {
|
||||
$xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
|
||||
} else {
|
||||
$xtpl->assign("RETURN_MODULE", 'Campaigns');
|
||||
}
|
||||
if (isset($_REQUEST['return_action'])) {
|
||||
$xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
|
||||
} else {
|
||||
$xtpl->assign("RETURN_ACTION", 'DetailView');
|
||||
}
|
||||
if (isset($_REQUEST['return_id'])) {
|
||||
$xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
|
||||
} else {
|
||||
$xtpl->assign("RETURN_ID", $focus->campaign_id);
|
||||
}
|
||||
|
||||
$xtpl->assign("GRIDLINE", $gridline);
|
||||
$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("ID", $focus->id);
|
||||
if (!empty($_REQUEST['campaign_name'])) {
|
||||
$xtpl->assign("CAMPAIGN_NAME", $_REQUEST['campaign_name']);
|
||||
} else {
|
||||
$xtpl->assign("CAMPAIGN_NAME", $focus->campaign_name);
|
||||
}
|
||||
|
||||
if (!empty($_REQUEST['campaign_id'])) {
|
||||
$xtpl->assign("CAMPAIGN_ID", $_REQUEST['campaign_id']);
|
||||
} else {
|
||||
$xtpl->assign("CAMPAIGN_ID", $focus->campaign_id);
|
||||
}
|
||||
$xtpl->assign("TRACKER_NAME", $focus->tracker_name);
|
||||
$xtpl->assign("TRACKER_URL", $focus->tracker_url);
|
||||
$xtpl->assign("MESSAGE_URL", $focus->message_url);
|
||||
$xtpl->assign("TRACKER_KEY", $focus->tracker_key);
|
||||
|
||||
if (!empty($focus->is_optout) && $focus->is_optout == 1) {
|
||||
$xtpl->assign("IS_OPTOUT_CHECKED","checked");
|
||||
}
|
||||
|
||||
|
||||
//$xtpl->assign("CREATED_BY", $focus->created_by_name);
|
||||
//$xtpl->assign("MODIFIED_BY", $focus->modified_by_name);
|
||||
//$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
|
||||
//$xtpl->assign("DATE_ENTERED", $focus->date_entered);
|
||||
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
?>
|
||||
90
modules/CampaignTrackers/EditView.html
Executable file
90
modules/CampaignTrackers/EditView.html
Executable file
@@ -0,0 +1,90 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<form name="EditView" method="POST" action="index.php" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="CampaignTrackers">
|
||||
<input type="hidden" name="record" value="{ID}">
|
||||
<input type="hidden" name="action">
|
||||
<input type="hidden" name="campaign_id" value ="{CAMPAIGN_ID}">
|
||||
<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 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>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="15%" scope="row"><slot>{MOD.LBL_EDIT_CAMPAIGN_NAME}</slot></td>
|
||||
<td width="85%" colspan=3><slot>{CAMPAIGN_NAME}</slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" scope="row"><slot>{MOD.LBL_EDIT_TRACKER_NAME}<span class="required"> {APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td width="35%" ><slot><input type="text" size="30" tabindex='1' name="tracker_name" value="{TRACKER_NAME}"></slot></td>
|
||||
<td width="15%" scope="row"><slot>{MOD.LBL_EDIT_OPT_OUT}</slot></td>
|
||||
<td width="35%" ><slot><input onclick="toggle_tracker_url(this);" name="is_optout" id="is_optout" tabindex='2' class="checkbox" type="checkbox" {IS_OPTOUT_CHECKED}/></slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" scope="row"><slot>{MOD.LBL_EDIT_TRACKER_URL} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td width="85%" colspan=3><slot><input type="text" size="100" maxlength='255' tabindex='3' {TRACKER_URL_DISABLED} name="tracker_url" id="tracker_url" value="{TRACKER_URL}"></slot></td>
|
||||
</tr>
|
||||
|
||||
</td></tr></table>
|
||||
{JAVASCRIPT}
|
||||
<script>
|
||||
function toggle_tracker_url(isoptout) {
|
||||
tracker_url = document.getElementById('tracker_url');
|
||||
if (isoptout.checked) {
|
||||
tracker_url.disabled=true;
|
||||
tracker_url.value="index.php?entryPoint=removeme";
|
||||
} else {
|
||||
tracker_url.disabled=false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!-- END: main -->
|
||||
129
modules/CampaignTrackers/EditView.php
Executable file
129
modules/CampaignTrackers/EditView.php
Executable file
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('modules/CampaignTrackers/Forms.php');
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $mod_strings;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$focus = new CampaignTracker();
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
$old_id = '';
|
||||
|
||||
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
|
||||
$focus->id = "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$GLOBALS['log']->info("Campaign Tracker Edit View");
|
||||
|
||||
$xtpl=new XTemplate ('modules/CampaignTrackers/EditView.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
|
||||
$campaignName = '';
|
||||
$campaignId = '';
|
||||
if (!empty($_REQUEST['campaign_name'])) {
|
||||
$xtpl->assign("CAMPAIGN_NAME", $_REQUEST['campaign_name']);
|
||||
$campaignName = $_REQUEST['campaign_name'];
|
||||
} else {
|
||||
$xtpl->assign("CAMPAIGN_NAME", $focus->campaign_name);
|
||||
$campaignName = $focus->campaign_name;
|
||||
}
|
||||
if (!empty($_REQUEST['campaign_id'])) {
|
||||
$xtpl->assign("CAMPAIGN_ID", $_REQUEST['campaign_id']);
|
||||
$campaignId = $_REQUEST['campaign_id'];
|
||||
} else {
|
||||
$xtpl->assign("CAMPAIGN_ID", $focus->campaign_id);
|
||||
$campaignId = $focus->campaign_id;
|
||||
}
|
||||
$middleText = "<a href='index.php?module=Campaigns&action=DetailView&record={$campaignId}'>{$campaignName}</a><span class='pointer'>»</span>{$mod_strings['LBL_MODULE_NAME']}";
|
||||
echo get_module_title($focus->module_dir, $middleText, true);
|
||||
|
||||
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']);
|
||||
|
||||
$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
|
||||
$xtpl->assign("JAVASCRIPT", get_set_focus_js().get_validate_record_js());
|
||||
$xtpl->assign("ID", $focus->id);
|
||||
|
||||
|
||||
|
||||
$xtpl->assign("TRACKER_NAME", $focus->tracker_name);
|
||||
$xtpl->assign("TRACKER_URL", $focus->tracker_url);
|
||||
|
||||
global $current_user;
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$record = '';
|
||||
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. "'>".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
|
||||
}
|
||||
if (!empty($focus->is_optout) && $focus->is_optout == 1) {
|
||||
$xtpl->assign("IS_OPTOUT_CHECKED","checked");
|
||||
$xtpl->assign("TRACKER_URL_DISABLED","disabled");
|
||||
}
|
||||
|
||||
$xtpl->parse("main");
|
||||
|
||||
$xtpl->out("main");
|
||||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName('EditView');
|
||||
$javascript->setSugarBean($focus);
|
||||
$javascript->addAllFields('');
|
||||
echo $javascript->getScript();
|
||||
?>
|
||||
69
modules/CampaignTrackers/Forms.html
Executable file
69
modules/CampaignTrackers/Forms.html
Executable file
@@ -0,0 +1,69 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<form action="index.php" method="post" name="quick_save" id="quick_save" onSubmit="return check_form('quick_save');">
|
||||
<input type="hidden" name="module" value="Campaigns" />
|
||||
<input type="hidden" name="action" value="Save" />
|
||||
<input type="hidden" name="return_action" value="DetailView" />
|
||||
<input type="hidden" name="return_module" value="Campaigns" />
|
||||
<input type="hidden" name="assigned_user_id" value='{USER_ID}'>
|
||||
{TEAM_ID}
|
||||
<p>
|
||||
{MOD.LBL_CAMPAIGN_NAME} <span class="required">*</span><br />
|
||||
<input type="text" name="name" value="" size="25" maxlength="25"/><br />
|
||||
{MOD.LBL_CAMPAIGN_STATUS} <span class="required">*</span><br />
|
||||
<select name='status'>{STATUS_OPTIONS}</select><br />
|
||||
{MOD.LBL_CAMPAIGN_END_DATE} <span class="required">*</span><br />
|
||||
<input onblur="parseDate(this, '{CALENDAR_DATEFORMAT}');" name='end_date' id='end_date' type="text" size='11' maxlength='10'> <img src="index.php?entryPoint=getImage&themeName={THEME}&imageName=jscalendar.gif" alt="{APP.LBL_ENTER_DATE}" id="end_date_trigger" align="absmiddle"> <span class="dateFormat">{APP.NTC_DATE_FORMAT}</span><br />
|
||||
{MOD.LBL_CAMPAIGN_TYPE} <span class="required">*</span><br />
|
||||
<select name='campaign_type'>{TYPE_OPTIONS}</select>
|
||||
</p>
|
||||
<p><input class="button" title="{APP.LBL_SAVE_BUTTON_TITLE}"
|
||||
type="submit" name="button" value="{APP.LBL_SAVE_BUTTON_LABEL}"
|
||||
accessKey="{APP.LBL_SAVE_BUTTON_KEY}" /></p>
|
||||
</form>
|
||||
|
||||
{JAVASCRIPT}
|
||||
<script type="text/javascript">
|
||||
|
||||
Calendar.setup ({
|
||||
inputField : "end_date", ifFormat : "{CALENDAR_DATEFORMAT}", showsTime : false, button : "end_date_trigger", singleClick : true, step : 1
|
||||
});
|
||||
|
||||
</script>
|
||||
<!-- END: main -->
|
||||
150
modules/CampaignTrackers/Forms.php
Executable file
150
modules/CampaignTrackers/Forms.php
Executable file
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Contains a variety of utility functions used to display UI
|
||||
* components such as form headers and footers. Intended to be modified on a per
|
||||
* theme basis.
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Create javascript to validate the data entered into a record.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
*/
|
||||
function get_validate_record_js () {
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$err_missing_required_fields = $app_strings['ERR_MISSING_REQUIRED_FIELDS'];
|
||||
|
||||
$the_script = <<<EOQ
|
||||
|
||||
<script type="text/javascript" language="Javascript">
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
function trim(s) {
|
||||
while (s.substring(0,1) == " ") {
|
||||
s = s.substring(1, s.length);
|
||||
}
|
||||
while (s.substring(s.length-1, s.length) == ' ') {
|
||||
s = s.substring(0,s.length-1);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
function verify_data(form) {
|
||||
var isError = false;
|
||||
var errorMessage = "";
|
||||
|
||||
if (isError == true) {
|
||||
alert("$err_missing_required_fields" + errorMessage);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
</script>
|
||||
|
||||
EOQ;
|
||||
|
||||
return $the_script;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create HTML form to enter a new record with the minimum necessary fields.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
*/
|
||||
function get_new_record_form () {
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $mod_strings;
|
||||
global $currentModule;
|
||||
global $current_user;
|
||||
global $timedate;
|
||||
|
||||
$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
|
||||
$form = new XTemplate ('modules/Campaigns/Forms.html');
|
||||
|
||||
$module_select = empty($_REQUEST['module_select']) ? ''
|
||||
: $_REQUEST['module_select'];
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', SugarThemeRegistry::current()->__toString());
|
||||
$form->assign("JAVASCRIPT", get_set_focus_js().get_validate_record_js());
|
||||
$form->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['campaign_status_dom'], "Planning"));
|
||||
$form->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['campaign_type_dom'], ""));
|
||||
|
||||
$form->assign("USER_ID", $current_user->id);
|
||||
|
||||
|
||||
$form->assign("CALENDAR_LANG", "en");
|
||||
$form->assign("USER_DATEFORMAT", '('. $timedate->get_user_date_format().')');
|
||||
$form->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
|
||||
|
||||
$form->parse('main');
|
||||
$the_form .= $form->text('main');
|
||||
|
||||
|
||||
$focus = new Campaign();
|
||||
|
||||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName('quick_save');
|
||||
$javascript->setSugarBean($focus);
|
||||
$javascript->addRequiredFields('');
|
||||
$jscript = $javascript->getScript();
|
||||
|
||||
$the_form .= $jscript . get_left_form_footer();
|
||||
return $the_form;
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
48
modules/CampaignTrackers/Menu.php
Executable file
48
modules/CampaignTrackers/Menu.php
Executable file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings;
|
||||
$module_menu = Array();
|
||||
if(ACLController::checkAccess('Campaigns', 'list', true))$module_menu[]= Array("index.php?module=Campaigns&action=index&return_module=Campaigns&return_action=index", $mod_strings['LNK_CAMPAIGN_LIST'],"Campaigns");
|
||||
?>
|
||||
81
modules/CampaignTrackers/Save.php
Executable file
81
modules/CampaignTrackers/Save.php
Executable file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
require_once('include/formbase.php');
|
||||
|
||||
$focus = new CampaignTracker();
|
||||
|
||||
$focus->retrieve($_POST['record']);
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
$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;
|
||||
|
||||
}
|
||||
}
|
||||
//set check box states.
|
||||
if (isset($_POST['is_optout']) && $_POST['is_optout'] =='on') {
|
||||
$focus->is_optout=1;
|
||||
$focus->tracker_url='index.php?entryPoint=removeme';
|
||||
} else {
|
||||
$focus->is_optout=0;
|
||||
}
|
||||
|
||||
$focus->save($check_notify);
|
||||
$return_id = $focus->id;
|
||||
$GLOBALS['log']->debug("Saved record with id of ".$return_id);
|
||||
handleRedirect('', '');
|
||||
?>
|
||||
73
modules/CampaignTrackers/language/en_us.lang.php
Executable file
73
modules/CampaignTrackers/language/en_us.lang.php
Executable file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_ID'=>'Id',
|
||||
'LBL_TRACKER_KEY'=>'Tracker Key',
|
||||
'LBL_TRACKER_URL'=>'Tracker URL',
|
||||
'LBL_TRACKER_NAME'=>'Tracker Name',
|
||||
'LBL_CAMPAIGN_ID'=>'Campaign Id',
|
||||
'LBL_DATE_ENTERED'=>'Date Entered',
|
||||
'LBL_DATE_MODIFIED'=>'Date Modified',
|
||||
'LBL_MODIFIED_USER_ID'=>'Modified User Id',
|
||||
'LBL_CREATED_BY'=>'Created By',
|
||||
'LBL_DELETED'=>'Deleted',
|
||||
'LBL_CAMPAIGN'=>'Campaign',
|
||||
'LBL_OPTOUT'=>'Opt-out',
|
||||
|
||||
'LBL_MODULE_NAME'=>'Campaign Trackers',
|
||||
'LBL_EDIT_CAMPAIGN_NAME'=>'Campaign Name:',
|
||||
'LBL_EDIT_TRACKER_NAME'=>'Tracker Name:',
|
||||
'LBL_EDIT_TRACKER_URL'=>'Tracker URL:',
|
||||
|
||||
'LBL_SUBPANEL_TRACKER_NAME'=>'Name',
|
||||
'LBL_SUBPANEL_TRACKER_URL'=>'URL',
|
||||
'LBL_SUBPANEL_TRACKER_KEY'=>'Key',
|
||||
'LBL_EDIT_MESSAGE_URL'=>'URL for Campaign Message:',
|
||||
'LBL_EDIT_TRACKER_KEY'=>'Tracker Key:',
|
||||
'LBL_EDIT_OPT_OUT'=>'Opt-out Link?',
|
||||
'LNK_CAMPAIGN_LIST'=>'Campaigns',
|
||||
);
|
||||
|
||||
?>
|
||||
65
modules/CampaignTrackers/language/pl_pl.lang.php
Executable file
65
modules/CampaignTrackers/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Professional End User
|
||||
* License Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-professional-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1-->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_ID'=>'Id',
|
||||
'LBL_TRACKER_KEY'=>'Klucz śledzenia',
|
||||
'LBL_TRACKER_URL'=>'Łącze URL śledzenia',
|
||||
'LBL_TRACKER_NAME'=>'Nazwa śledzenia',
|
||||
'LBL_CAMPAIGN_ID'=>'Id kampanii',
|
||||
'LBL_DATE_ENTERED'=>'Data wprowadzenia',
|
||||
'LBL_DATE_MODIFIED'=>'Data modyfikacji',
|
||||
'LBL_MODIFIED_USER_ID'=>'Id użytkownika modyfikującego',
|
||||
'LBL_CREATED_BY'=>'Utworzone przez',
|
||||
'LBL_DELETED'=>'Usunięte',
|
||||
'LBL_CAMPAIGN'=>'Kampania',
|
||||
'LBL_OPTOUT'=>'Opt-out',
|
||||
|
||||
'LBL_MODULE_NAME'=>'Śledzenie kampanii',
|
||||
'LBL_EDIT_CAMPAIGN_NAME'=>'Nazwa kampanii:',
|
||||
'LBL_EDIT_TRACKER_NAME'=>'Nazwa śledzenia:',
|
||||
'LBL_EDIT_TRACKER_URL'=>'Śledzenie łącz URL:',
|
||||
|
||||
'LBL_SUBPANEL_TRACKER_NAME'=>'Nazwa',
|
||||
'LBL_SUBPANEL_TRACKER_URL'=>'Łącze URL',
|
||||
'LBL_SUBPANEL_TRACKER_KEY'=>'Klucz',
|
||||
'LBL_EDIT_MESSAGE_URL'=>'Łącze URL do wiadomości kampanii:',
|
||||
'LBL_EDIT_TRACKER_KEY'=>'Klucz śledzenia:',
|
||||
'LBL_EDIT_OPT_OUT'=>'Czy stworzyć link Opt-out?',
|
||||
'LNK_CAMPAIGN_LIST'=>'Kampanie',
|
||||
);
|
||||
|
||||
?>
|
||||
75
modules/CampaignTrackers/metadata/subpanels/default.php
Executable file
75
modules/CampaignTrackers/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'tracker_name'=>array(
|
||||
'vname' => 'LBL_SUBPANEL_TRACKER_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '20%',
|
||||
),
|
||||
'tracker_url'=>array(
|
||||
'vname' => 'LBL_SUBPANEL_TRACKER_URL',
|
||||
'width' => '60%',
|
||||
),
|
||||
'tracker_key'=>array(
|
||||
'vname' => 'LBL_SUBPANEL_TRACKER_KEY',
|
||||
'width' => '10%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Cases',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Cases',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
156
modules/CampaignTrackers/vardefs.php
Executable file
156
modules/CampaignTrackers/vardefs.php
Executable file
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$dictionary['CampaignTracker'] = array('table' => 'campaign_trkrs',
|
||||
'comment' => 'Maintains the Tracker URLs used in campaign emails',
|
||||
|
||||
'fields' => array (
|
||||
'id' => array (
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required'=>true,
|
||||
'reportable'=>false,
|
||||
'comment' => 'Unique identifier'
|
||||
),
|
||||
'tracker_name' => array (
|
||||
'name' => 'tracker_name',
|
||||
'vname' => 'LBL_TRACKER_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '30',
|
||||
'comment' => 'The name of the campaign tracker'
|
||||
),
|
||||
'tracker_url' => array (
|
||||
'name' => 'tracker_url',
|
||||
'vname' => 'LBL_TRACKER_URL',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'default' => 'http://',
|
||||
'comment' => 'The URL that represents the landing page when the tracker URL in the campaign email is clicked'
|
||||
),
|
||||
'tracker_key' => array (
|
||||
'name' => 'tracker_key',
|
||||
'vname' => 'LBL_TRACKER_KEY',
|
||||
'type' => 'int',
|
||||
'len' => '11',
|
||||
'auto_increment' => true,
|
||||
'required'=>true,
|
||||
'studio' => array('editview' => false),
|
||||
'comment' => 'Internal key to uniquely identifier the tracker URL'
|
||||
),
|
||||
'campaign_id'=> array(
|
||||
'name'=>'campaign_id',
|
||||
'vname'=>'LBL_CAMPAIGN_ID',
|
||||
'type'=>'id',
|
||||
'required'=>false,
|
||||
'reportable'=>false,
|
||||
'comment' => 'The ID of the campaign'
|
||||
),
|
||||
'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',
|
||||
'vname' => 'LBL_MODIFIED_USER_ID',
|
||||
'dbType' => 'id',
|
||||
'type'=>'id',
|
||||
'comment' => 'User who last modified record'
|
||||
),
|
||||
'created_by' => array (
|
||||
'name' => 'created_by',
|
||||
'vname' => 'LBL_CREATED_BY',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'comment' => 'User ID who created record'
|
||||
),
|
||||
'is_optout' => array (
|
||||
'name' => 'is_optout',
|
||||
'vname' => 'LBL_OPTOUT',
|
||||
'type' => 'bool',
|
||||
'required' => true,
|
||||
'default' => '0',
|
||||
'reportable'=>false,
|
||||
'comment' => 'Indicator whether tracker URL represents an opt-out link'
|
||||
),
|
||||
'deleted' => array (
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_DELETED',
|
||||
'type' => 'bool',
|
||||
'required' => false,
|
||||
'default' => '0',
|
||||
'reportable'=>false,
|
||||
'comment' => 'Record deletion indicator'
|
||||
),
|
||||
'campaign' => array (
|
||||
'name' => 'campaign',
|
||||
'type' => 'link',
|
||||
'relationship' => 'campaign_campaigntrakers',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_CAMPAIGN',
|
||||
),
|
||||
),
|
||||
|
||||
'relationships'=>array(
|
||||
|
||||
'campaign_campaigntrakers' => array(
|
||||
'lhs_module'=> 'Campaigns',
|
||||
'lhs_table'=> 'campaigns',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module'=> 'CampaignTrackers',
|
||||
'rhs_table'=> 'campaign_trkrs',
|
||||
'rhs_key' => 'campaign_id',
|
||||
'relationship_type'=>'one-to-many'
|
||||
)
|
||||
)
|
||||
,'indices' => array (
|
||||
array('name' =>'campaign_trackepk', 'type' =>'primary', 'fields'=>array('id')),
|
||||
array('name' => 'campaign_tracker_key_idx', 'type'=>'index', 'fields'=>array('tracker_key')),
|
||||
)
|
||||
);
|
||||
?>
|
||||
Reference in New Issue
Block a user