]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Meetings/metadata/editviewdefs.php
Release 6.5.6
[Github/sugarcrm.git] / modules / Meetings / 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 ['Meetings'] =
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         ),
50         'buttons' =>
51         array (
52           0 =>
53           array (
54                         'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id ="SAVE_HEADER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.meetings.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}">',
55                   ),
56           1 => 'CANCEL',
57           2 =>
58           array (
59              'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" id="save_and_send_invites_header" class="button" onclick="document.EditView.send_invites.value=\'1\';SUGAR.meetings.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}">',
60                   ),
61           3 => 
62           array (
63             'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" id="close_and_create_new_header" class="button" onclick="SUGAR.meetings.fill_invitees(); document.EditView.status.value=\'Held\'; document.EditView.action.value=\'Save\'; document.EditView.return_module.value=\'Meetings\'; 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}',
64            ),
65         ),
66         'headerTpl' => 'modules/Meetings/tpls/header.tpl',
67
68           'buttons_footer' =>
69         array (
70           0 =>
71           array (
72                         'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id ="SAVE_FOOTER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.meetings.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}">',
73                   ),
74           1 => 'CANCEL',
75           2 =>
76           array (
77              'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" id="save_and_send_invites_footer" class="button" onclick="document.EditView.send_invites.value=\'1\';SUGAR.meetings.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}">',
78                   ),
79           3 =>
80           array (
81             'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" id="close_and_create_new_footer" class="button" onclick="SUGAR.meetings.fill_invitees(); document.EditView.status.value=\'Held\'; document.EditView.action.value=\'Save\'; document.EditView.return_module.value=\'Meetings\'; 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}',
82            ),
83         ),
84         'footerTpl' => 'modules/Meetings/tpls/footer.tpl',
85       ),
86       'widths' =>
87       array (
88         0 =>
89         array (
90           'label' => '10',
91           'field' => '30',
92         ),
93         1 =>
94         array (
95           'label' => '10',
96           'field' => '30',
97         ),
98       ),
99       'javascript' => '<script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>
100 {sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"}
101 <script>toggle_portal_flag();function toggle_portal_flag()  {ldelim} {$TOGGLE_JS} {rdelim} 
102 function formSubmitCheck(){ldelim}if(check_form(\'EditView\')){ldelim}document.EditView.submit();{rdelim}{rdelim}</script>',
103       'useTabs' => false,
104     ),
105     'panels' =>
106     array (
107       'lbl_meeting_information' =>
108       array (
109         array (
110           array (
111             'name' => 'name',
112
113           ),
114           array (
115             'name' => 'status',
116             'fields' =>
117             array (
118               array (
119                 'name' => 'status',
120               ),
121             ),
122          ),
123       ),
124       
125       
126       array (
127           array (
128             'name' => 'date_start',
129             'type' => 'datetimecombo',
130             'displayParams' =>
131             array (
132               'required' => true,
133               'updateCallback' => 'SugarWidgetScheduler.update_time();',
134             ),
135           ),
136           array (
137             'name' => 'location',
138             'comment' => 'Meeting location',
139             'label' => 'LBL_LOCATION',
140           ),
141         ),
142         
143         
144       array (
145           array (
146             'name' => 'date_end',
147             'type' => 'datetimecombo',
148             'displayParams' =>
149             array (
150               'required' => true,
151               'updateCallback' => 'SugarWidgetScheduler.update_time();',
152             ),
153           ),
154           array (
155             'name' => 'parent_name',
156             'label' => 'LBL_LIST_RELATED_TO',
157           ),
158         ),      
159         
160         array(        
161           array (
162             'name' => 'duration',
163             'customCode' => '
164                 @@FIELD@@
165                 <input id="duration_hours" name="duration_hours" type="hidden" value="{$fields.duration_hours.value}">
166                 <input id="duration_minutes" name="duration_minutes" type="hidden" value="{$fields.duration_minutes.value}">
167                 {sugar_getscript file="modules/Meetings/duration_dependency.js"}
168                 <script type="text/javascript">
169                     var date_time_format = "{$CALENDAR_FORMAT}";
170                     {literal}
171                     SUGAR.util.doWhen(function(){return typeof DurationDependency != "undefined" && typeof document.getElementById("duration") != "undefined"}, function(){
172                         var duration_dependency = new DurationDependency("date_start","date_end","duration",date_time_format);
173                         initEditView(YAHOO.util.Selector.query(\'select#duration\')[0].form);
174                     });
175                     {/literal}
176                 </script>            
177             ',
178             'customCodeReadOnly' => '{$fields.duration_hours.value}{$MOD.LBL_HOURS_ABBREV} {$fields.duration_minutes.value}{$MOD.LBL_MINSS_ABBREV} ',
179           ),
180           array (
181             'name' => 'add_parent_invitee',
182                 'comment' => 'Link to add invitees',
183                 'customCode' => '<a id="add_parent_invitee" style="color:#0B578F; text-decoration:underline; cursor:pointer" onclick="SugarWidgetSchedulerAttendees.formAddParent();">{$MOD.LBL_ADD_PARENT_INVITEE}</a>',
184           ),
185         ),
186         array (
187           array (
188             'name' => 'reminder_time',
189             'customCode' => '{include file="modules/Meetings/tpls/reminders.tpl"}',
190             'label' => 'LBL_REMINDER',
191           ),
192         ),
193         array (
194           array (
195             'name' => 'description',
196             'comment' => 'Full text of the note',
197             'label' => 'LBL_DESCRIPTION',
198           ),
199         ),
200       ),
201       'LBL_PANEL_ASSIGNMENT' =>
202       array (
203         array (
204           array (
205             'name' => 'assigned_user_name',
206             'label' => 'LBL_ASSIGNED_TO_NAME',
207           ),
208         ),
209       ),
210     ),
211   ),
212 );
213 ?>