2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Affero General Public License version 3 as published by the
8 * Free Software Foundation with the addition of the following permission added
9 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
18 * You should have received a copy of the GNU Affero General Public License along with
19 * this program; if not, see http://www.gnu.org/licenses or write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26 * The interactive user interfaces in modified source and object code versions
27 * of this program must display Appropriate Legal Notices, as required under
28 * Section 5 of the GNU Affero General Public License version 3.
30 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31 * these Appropriate Legal Notices must retain the display of the "Powered by
32 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33 * technical reasons, the Appropriate Legal Notices must display the words
34 * "Powered by SugarCRM".
35 ********************************************************************************/
37 $viewdefs['Campaigns']['DetailView'] = array(
38 'templateMeta' => array('form' => array(
39 'hidden'=>array('<input type="hidden" name="mode" value="">'),
41 array('EDIT', 'DUPLICATE', 'DELETE',
42 array('customCode'=>'<input title="{$MOD.LBL_TEST_BUTTON_TITLE}" class="button" onclick="this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'Schedule\';this.form.mode.value=\'test\';SUGAR.ajaxUI.submitForm(this.form);" type="{$ADD_BUTTON_STATE}" name="button" id="send_test_button" value="{$MOD.LBL_TEST_BUTTON_LABEL}">',
43 //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
44 'sugar_html' => array(
46 'value' => '{$MOD.LBL_TEST_BUTTON_LABEL}',
47 'htmlOptions' => array(
48 'type' => '{$ADD_BUTTON_STATE}',
49 'title' => '{$MOD.LBL_TEST_BUTTON_TITLE}',
51 'onclick' => 'this.form = document.getElementById(\'formDetailView\'); this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'Schedule\';this.form.mode.value=\'test\';SUGAR.ajaxUI.submitForm(this.form);',
53 'id' => 'send_test_button',
57 array('customCode'=>'<input title="{$MOD.LBL_QUEUE_BUTTON_TITLE}" class="button" onclick="this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'Schedule\';SUGAR.ajaxUI.submitForm(this.form);" type="{$ADD_BUTTON_STATE}" name="button" id="send_emails_button" value="{$MOD.LBL_QUEUE_BUTTON_LABEL}">',
58 //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
59 'sugar_html' => array(
61 'value' => '{$MOD.LBL_QUEUE_BUTTON_LABEL}',
62 'htmlOptions' => array(
63 'type' => '{$ADD_BUTTON_STATE}',
64 'title' => '{$MOD.LBL_QUEUE_BUTTON_TITLE}',
66 'onclick' => 'this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'Schedule\';SUGAR.ajaxUI.submitForm(this.form);',
68 'id' => 'send_emails_button',
72 array('customCode'=>'<input title="{$APP.LBL_MAILMERGE}" class="button" onclick="this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'MailMerge\';SUGAR.ajaxUI.submitForm(this.form);" type="submit" name="button" id="mail_merge_button" value="{$APP.LBL_MAILMERGE}">',
73 //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
74 'sugar_html' => array(
76 'value' => '{$APP.LBL_MAILMERGE}',
77 'htmlOptions' => array(
78 'title' => '{$APP.LBL_MAILMERGE}',
80 'onclick' => 'this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'MailMerge\';SUGAR.ajaxUI.submitForm(this.form);',
82 'id' => 'mail_merge_button',
86 array('customCode'=>'<input title="{$MOD.LBL_MARK_AS_SENT}" class="button" onclick="this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'DetailView\';this.form.mode.value=\'set_target\';SUGAR.ajaxUI.submitForm(this.form);" type="{$TARGET_BUTTON_STATE}" name="button" id="mark_as_sent_button" value="{$MOD.LBL_MARK_AS_SENT}">',
87 //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
88 'sugar_html' => array(
90 'value' => '{$MOD.LBL_MARK_AS_SENT}',
91 'htmlOptions' => array(
92 'type' => '{$TARGET_BUTTON_STATE}',
93 'title' => '{$MOD.LBL_MARK_AS_SENT}',
95 'onclick' => 'this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'DetailView\';this.form.mode.value=\'set_target\';SUGAR.ajaxUI.submitForm(this.form);',
97 'id' => 'mark_as_sent_button',
102 array('customCode'=>'<script>{$MSG_SCRIPT}</script>'),
104 'links' => array('<input type="button" class="button" onclick="javascript:window.location=\'index.php?module=Campaigns&action=WizardHome&record={$fields.id.value}\';" name="button" id="launch_wizard_button" value="{$MOD.LBL_TO_WIZARD_TITLE}" />',
105 '<input type="button" class="button" onclick="javascript:window.location=\'index.php?module=Campaigns&action=TrackDetailView&record={$fields.id.value}\';" name="button" id="view_status_button" value="{$MOD.LBL_TRACK_BUTTON_LABEL}" />',
106 '<input id="viewRoiButtonId" type="button" class="button" onclick="javascript:window.location=\'index.php?module=Campaigns&action=RoiDetailView&record={$fields.id.value}\';" name="button" id="view_roi_button" value="{$MOD.LBL_TRACK_ROI_BUTTON_LABEL}" />',
112 array('label' => '10', 'field' => '30'),
113 array('label' => '10', 'field' => '30')
118 'lbl_campaign_information'=> array(
123 'label' => 'LBL_CAMPAIGN_STATUS',
130 'name' => 'start_date',
131 'label' => 'LBL_CAMPAIGN_START_DATE',
138 'name' => 'end_date',
139 'label' => 'LBL_CAMPAIGN_END_DATE',
142 'name' => 'frequency',
143 'customCode' => '{if $fields.campaign_type.value == "NewsLetter"}<div style=\'none\' id=\'freq_field\'>{$APP_LIST.newsletter_frequency_dom[$fields.frequency.value]}</div>{/if} ',
144 'customLabel' => '{if $fields.campaign_type.value == "NewsLetter"}<div style=\'none\' id=\'freq_label\'>{$MOD.LBL_CAMPAIGN_FREQUENCY}</div>{/if} '
150 'name' => 'impressions',
151 'label' => 'LBL_CAMPAIGN_IMPRESSIONS',
159 'label' => '{$MOD.LBL_CAMPAIGN_BUDGET} ({$CURRENCY})',
162 'name' => 'expected_cost',
163 'label' => '{$MOD.LBL_CAMPAIGN_EXPECTED_COST} ({$CURRENCY})',
169 'name' => 'actual_cost',
170 'label' => '{$MOD.LBL_CAMPAIGN_ACTUAL_COST} ({$CURRENCY})',
173 'name' => 'expected_revenue',
174 'label' => '{$MOD.LBL_CAMPAIGN_EXPECTED_REVENUE} ({$CURRENCY})',
181 'name' => 'objective',
182 'label' => 'LBL_CAMPAIGN_OBJECTIVE',
190 'label' => 'LBL_CAMPAIGN_CONTENT',
195 'LBL_PANEL_ASSIGNMENT' => array(
198 'name' => 'assigned_user_name',
199 'label' => 'LBL_ASSIGNED_TO',
202 'name' => 'date_modified',
203 'label' => 'LBL_DATE_MODIFIED',
204 'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
209 'name' => 'date_entered',
210 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',