]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Calls/metadata/editviewdefs.php
Release 6.5.8
[Github/sugarcrm.git] / modules / Calls / metadata / editviewdefs.php
1 <?php
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
5  * 
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.
12  * 
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
16  * details.
17  * 
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
21  * 02110-1301 USA.
22  * 
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.
25  * 
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.
29  * 
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  ********************************************************************************/
36
37 $viewdefs ['Calls'] =
38 array (
39   'EditView' =>
40   array (
41     'templateMeta' =>
42     array (
43       'maxColumns' => '2',
44       'form' =>
45       array (
46         'hidden' =>
47         array (
48           0 => '<input type="hidden" name="isSaveAndNew" value="false">',
49           1 => '<input type="hidden" name="send_invites">',
50           2 => '<input type="hidden" name="user_invitees">',
51           3 => '<input type="hidden" name="lead_invitees">',
52           4 => '<input type="hidden" name="contact_invitees">',
53         ),
54         'buttons' =>
55         array (
56           0 =>
57           array (
58               'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id="SAVE_HEADER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\'; document.EditView.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}document.EditView.return_id.value=\'\'; {/if}formSubmitCheck();;" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
59           ),
60           1 => 'CANCEL',
61           2 =>
62           array (
63               'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" id="SAVE_SEND_HEADER" class="button" onclick="document.EditView.send_invites.value=\'1\';SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\';document.EditView.return_action.value=\'EditView\';document.EditView.return_module.value=\'{$smarty.request.return_module}\';formSubmitCheck();;" type="button" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">',
64           ),
65           3 =>
66           array (
67               'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" id="CLOSE_CREATE_HEADER" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="SUGAR.calls.fill_invitees(); document.EditView.status.value=\'Held\'; document.EditView.action.value=\'Save\'; document.EditView.return_module.value=\'Calls\'; document.EditView.isDuplicate.value=true; document.EditView.isSaveAndNew.value=true; document.EditView.return_action.value=\'EditView\'; document.EditView.return_id.value=\'{$fields.id.value}\'; formSubmitCheck();" type="button" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
68           ),
69         ),
70         'buttons_footer' =>
71         array (
72             0 =>
73             array (
74                 'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id="SAVE_FOOTER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\'; document.EditView.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}document.EditView.return_id.value=\'\'; {/if}formSubmitCheck();;" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
75             ),
76             1 => 'CANCEL',
77             2 =>
78             array (
79                 'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" id="SAVE_SEND_FOOTER" class="button" onclick="document.EditView.send_invites.value=\'1\';SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\';document.EditView.return_action.value=\'EditView\';document.EditView.return_module.value=\'{$smarty.request.return_module}\';formSubmitCheck();;" type="button" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">',
80             ),
81             3 =>
82             array (
83                             'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" id="CLOSE_CREATE_FOOTER" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="SUGAR.calls.fill_invitees(); document.EditView.status.value=\'Held\'; document.EditView.action.value=\'Save\'; document.EditView.return_module.value=\'Calls\'; document.EditView.isDuplicate.value=true; document.EditView.isSaveAndNew.value=true; document.EditView.return_action.value=\'EditView\'; document.EditView.return_id.value=\'{$fields.id.value}\'; formSubmitCheck();" type="button" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
84             ),
85         ),
86         'footerTpl' => 'modules/Calls/tpls/footer.tpl',
87       ),
88       'widths' =>
89       array (
90         0 =>
91         array (
92           'label' => '10',
93           'field' => '30',
94         ),
95         1 =>
96         array (
97           'label' => '10',
98           'field' => '30',
99         ),
100       ),
101       'javascript' => '{sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"}
102 <script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>
103 <script>toggle_portal_flag();function toggle_portal_flag()  {ldelim} {$TOGGLE_JS} {rdelim}
104 function formSubmitCheck(){ldelim}var duration=true;if(typeof(isValidDuration)!="undefined"){ldelim}duration=isValidDuration();{rdelim}if(check_form(\'EditView\') && duration){ldelim}SUGAR.ajaxUI.submitForm("EditView");{rdelim}{rdelim}</script>',
105        'useTabs' => false,
106     ),
107     'panels' =>
108     array (
109       'lbl_call_information' =>
110       array (
111         array (
112           array(
113                 'name' => 'name',
114           ),
115           array (
116             'name' => 'status',
117             'fields' =>
118             array (
119               array (
120                 'name' => 'direction',
121               ),
122               array (
123                 'name' => 'status',
124               ),
125             ),
126           ),
127         ),
128         array (
129           array (
130             'name' => 'date_start',
131             'displayParams' =>
132             array (
133               'updateCallback' => 'SugarWidgetScheduler.update_time();',
134             ),
135             'label' => 'LBL_DATE_TIME',
136           ),
137           array (
138             'name' => 'parent_name',
139             'label' => 'LBL_LIST_RELATED_TO',
140           ),
141         ),
142         array (
143           array (
144             'name' => 'duration_hours',
145             'label' => 'LBL_DURATION',
146             'customCode' => '{literal}<script type="text/javascript">function isValidDuration() { form = document.getElementById(\'EditView\'); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { alert(\'{/literal}{$MOD.NOTICE_DURATION_TIME}{literal}\'); return false; } return true; }</script>{/literal}<input id="duration_hours" name="duration_hours" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value}&nbsp;<span class="dateFormat">{$MOD.LBL_HOURS_MINUTES}</span>',
147
148           ),
149           array(
150             'name' => 'reminder_time',
151             'customCode' => '{include file="modules/Meetings/tpls/reminders.tpl"}',
152             'label' => 'LBL_REMINDER',
153           ),
154         ),
155         array (
156           array (
157             'name' => 'description',
158             'comment' => 'Full text of the note',
159             'label' => 'LBL_DESCRIPTION',
160           ),
161         ),
162       ),
163       'LBL_PANEL_ASSIGNMENT' =>
164       array (
165         array (
166           array (
167             'name' => 'assigned_user_name',
168             'label' => 'LBL_ASSIGNED_TO_NAME',
169           ),
170         ),
171       ),
172     ),
173   ),
174 );
175 ?>