@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | require_once('include/MySugar/MySugar.php'); |
46 | 46 | |
47 | 47 | // build dashlet cache file if not found |
48 | -if(!is_file($cachefile = sugar_cached('dashlets/dashlets.php'))) { |
|
48 | +if (!is_file($cachefile = sugar_cached('dashlets/dashlets.php'))) { |
|
49 | 49 | require_once('include/Dashlets/DashletCacheBuilder.php'); |
50 | 50 | |
51 | 51 | $dc = new DashletCacheBuilder(); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | $hasUserPreferences = (!isset($pages) || empty($pages) || !isset($dashlets) || empty($dashlets)) ? false : true; |
65 | 65 | |
66 | -if(!$hasUserPreferences){ |
|
66 | +if (!$hasUserPreferences) { |
|
67 | 67 | $dashlets = array(); |
68 | 68 | |
69 | 69 | //list of preferences to move over and to where |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $old_columns = $current_user->getPreference('columns', 'home'); |
89 | 89 | $old_dashlets = $current_user->getPreference('dashlets', 'home'); |
90 | 90 | |
91 | - if (isset($old_columns) && !empty($old_columns) && isset($old_dashlets) && !empty($old_dashlets)){ |
|
91 | + if (isset($old_columns) && !empty($old_columns) && isset($old_dashlets) && !empty($old_dashlets)) { |
|
92 | 92 | $columns = $old_columns; |
93 | 93 | $dashlets = $old_dashlets; |
94 | 94 | |
@@ -98,23 +98,23 @@ discard block |
||
98 | 98 | $current_user->setPreference('columns', $old_columns, 0, 'home'); |
99 | 99 | $current_user->setPreference('dashlets', $old_dashlets, 0, 'home'); |
100 | 100 | } |
101 | - else{ |
|
101 | + else { |
|
102 | 102 | // This is here to get Sugar dashlets added above the rest |
103 | - $dashlets[create_guid()] = array ('className' => 'SugarFeedDashlet', |
|
103 | + $dashlets[create_guid()] = array('className' => 'SugarFeedDashlet', |
|
104 | 104 | 'module' => 'SugarFeed', |
105 | 105 | 'forceColumn' => 1, |
106 | 106 | 'fileLocation' => $dashletsFiles['SugarFeedDashlet']['file'], |
107 | 107 | ); |
108 | 108 | |
109 | - foreach($defaultDashlets as $dashletName=>$module){ |
|
109 | + foreach ($defaultDashlets as $dashletName=>$module) { |
|
110 | 110 | // clint - fixes bug #20398 |
111 | 111 | // only display dashlets that are from visibile modules and that the user has permission to list |
112 | 112 | $myDashlet = new MySugar($module); |
113 | 113 | $displayDashlet = $myDashlet->checkDashletDisplay(); |
114 | - if (isset($dashletsFiles[$dashletName]) && $displayDashlet){ |
|
114 | + if (isset($dashletsFiles[$dashletName]) && $displayDashlet) { |
|
115 | 115 | $options = array(); |
116 | - $prefsforthisdashlet = array_keys($prefstomove,$dashletName); |
|
117 | - foreach ( $prefsforthisdashlet as $pref ) { |
|
116 | + $prefsforthisdashlet = array_keys($prefstomove, $dashletName); |
|
117 | + foreach ($prefsforthisdashlet as $pref) { |
|
118 | 118 | $options[$pref] = $current_user->getPreference($pref); |
119 | 119 | } |
120 | 120 | $dashlets[create_guid()] = array('className' => $dashletName, |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | $columns[1]['width'] = '40%'; |
135 | 135 | $columns[1]['dashlets'] = array(); |
136 | 136 | |
137 | - foreach($dashlets as $guid=>$dashlet) { |
|
138 | - if( $dashlet['forceColumn'] == 0 ) array_push($columns[0]['dashlets'], $guid); |
|
137 | + foreach ($dashlets as $guid=>$dashlet) { |
|
138 | + if ($dashlet['forceColumn'] == 0) array_push($columns[0]['dashlets'], $guid); |
|
139 | 139 | else array_push($columns[1]['dashlets'], $guid); |
140 | 140 | $count++; |
141 | 141 | } |
@@ -150,29 +150,29 @@ discard block |
||
150 | 150 | // handles upgrading from versions that had the 'Dashboard' module; move those items over to the Home page |
151 | 151 | $pagesDashboard = $current_user->getPreference('pages', 'Dashboard'); |
152 | 152 | $dashletsDashboard = $current_user->getPreference('dashlets', 'Dashboard'); |
153 | -if ( !empty($pagesDashboard) ) { |
|
153 | +if (!empty($pagesDashboard)) { |
|
154 | 154 | // move dashlets from the dashboard to be at the end of the home screen dashlets |
155 | - foreach ($pagesDashboard[0]['columns'] as $dashboardColumnKey => $dashboardColumn ) { |
|
156 | - foreach ($dashboardColumn['dashlets'] as $dashletItem ) { |
|
155 | + foreach ($pagesDashboard[0]['columns'] as $dashboardColumnKey => $dashboardColumn) { |
|
156 | + foreach ($dashboardColumn['dashlets'] as $dashletItem) { |
|
157 | 157 | $pages[0]['columns'][$dashboardColumnKey]['dashlets'][] = $dashletItem; |
158 | 158 | } |
159 | 159 | } |
160 | - $pages = array_merge($pages,$pagesDashboard); |
|
160 | + $pages = array_merge($pages, $pagesDashboard); |
|
161 | 161 | $current_user->setPreference('pages', $pages, 0, 'Home'); |
162 | 162 | } |
163 | -if ( !empty($dashletsDashboard) ) { |
|
164 | - $dashlets = array_merge($dashlets,$dashletsDashboard); |
|
163 | +if (!empty($dashletsDashboard)) { |
|
164 | + $dashlets = array_merge($dashlets, $dashletsDashboard); |
|
165 | 165 | $current_user->setPreference('dashlets', $dashlets, 0, 'Home'); |
166 | 166 | } |
167 | -if ( !empty($pagesDashboard) || !empty($dashletsDashboard) ) |
|
167 | +if (!empty($pagesDashboard) || !empty($dashletsDashboard)) |
|
168 | 168 | $current_user->resetPreferences('Dashboard'); |
169 | 169 | |
170 | -if (empty($pages)){ |
|
170 | +if (empty($pages)) { |
|
171 | 171 | $pages = array(); |
172 | 172 | $pageIndex = 0; |
173 | 173 | $pages[0]['columns'] = $columns; |
174 | 174 | $pages[0]['numColumns'] = '3'; |
175 | - $pages[0]['pageTitleLabel'] = 'LBL_HOME_PAGE_1_NAME'; // "My Sugar" |
|
175 | + $pages[0]['pageTitleLabel'] = 'LBL_HOME_PAGE_1_NAME'; // "My Sugar" |
|
176 | 176 | $pageIndex++; |
177 | 177 | $current_user->setPreference('pages', $pages, 0, 'Home'); |
178 | 178 | $activePage = 0; |
@@ -191,34 +191,34 @@ discard block |
||
191 | 191 | $dashletIds = array(); // collect ids to pass to javascript |
192 | 192 | $display = array(); |
193 | 193 | |
194 | -foreach($pages[$activePage]['columns'] as $colNum => $column) { |
|
195 | - if ($colNum == $numCols){ |
|
194 | +foreach ($pages[$activePage]['columns'] as $colNum => $column) { |
|
195 | + if ($colNum == $numCols) { |
|
196 | 196 | break; |
197 | 197 | } |
198 | 198 | $display[$colNum]['width'] = $column['width']; |
199 | 199 | $display[$colNum]['dashlets'] = array(); |
200 | - foreach($column['dashlets'] as $num => $id) { |
|
200 | + foreach ($column['dashlets'] as $num => $id) { |
|
201 | 201 | // clint - fixes bug #20398 |
202 | 202 | // only display dashlets that are from visibile modules and that the user has permission to list |
203 | - if(!empty($id) && isset($dashlets[$id]) && is_file($dashlets[$id]['fileLocation'])) { |
|
203 | + if (!empty($id) && isset($dashlets[$id]) && is_file($dashlets[$id]['fileLocation'])) { |
|
204 | 204 | $module = 'Home'; |
205 | - if ( !empty($dashletsFiles[$dashlets[$id]['className']]['module']) ) |
|
205 | + if (!empty($dashletsFiles[$dashlets[$id]['className']]['module'])) |
|
206 | 206 | $module = $dashletsFiles[$dashlets[$id]['className']]['module']; |
207 | 207 | // Bug 24772 - Look into the user preference for the module the dashlet is a part of in case |
208 | 208 | // of the Report Chart dashlets. |
209 | - elseif ( !empty($dashlets[$id]['module']) ) |
|
209 | + elseif (!empty($dashlets[$id]['module'])) |
|
210 | 210 | $module = $dashlets[$id]['module']; |
211 | 211 | |
212 | 212 | $myDashlet = new MySugar($module); |
213 | 213 | |
214 | - if($myDashlet->checkDashletDisplay()) { |
|
214 | + if ($myDashlet->checkDashletDisplay()) { |
|
215 | 215 | require_once($dashlets[$id]['fileLocation']); |
216 | 216 | |
217 | 217 | |
218 | 218 | $dashlet = new $dashlets[$id]['className']($id, (isset($dashlets[$id]['options']) ? $dashlets[$id]['options'] : array())); |
219 | 219 | // Need to add support to dynamically display/hide dashlets |
220 | 220 | // If it has a method 'shouldDisplay' we will call it to see if we should display it or not |
221 | - if (method_exists($dashlet,'shouldDisplay')) { |
|
221 | + if (method_exists($dashlet, 'shouldDisplay')) { |
|
222 | 222 | if (!$dashlet->shouldDisplay()) { |
223 | 223 | // This dashlet doesn't want us to show it, skip it. |
224 | 224 | continue; |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | |
230 | 230 | $dashlets = $current_user->getPreference('dashlets', 'Home'); // Using hardcoded 'Home' because DynamicAction.php $_REQUEST['module'] value is always Home |
231 | 231 | $lvsParams = array(); |
232 | - if(!empty($dashlets[$id]['sort_options'])){ |
|
232 | + if (!empty($dashlets[$id]['sort_options'])) { |
|
233 | 233 | $lvsParams = $dashlets[$id]['sort_options']; |
234 | 234 | } |
235 | 235 | |
@@ -238,10 +238,10 @@ discard block |
||
238 | 238 | $display[$colNum]['dashlets'][$id]['display'] = $dashlet->display(); |
239 | 239 | $display[$colNum]['dashlets'][$id]['displayHeader'] = $dashlet->getHeader(); |
240 | 240 | $display[$colNum]['dashlets'][$id]['displayFooter'] = $dashlet->getFooter(); |
241 | - if($dashlet->hasScript) { |
|
241 | + if ($dashlet->hasScript) { |
|
242 | 242 | $display[$colNum]['dashlets'][$id]['script'] = $dashlet->displayScript(); |
243 | 243 | } |
244 | - } catch (Exception $ex) { |
|
244 | + }catch (Exception $ex) { |
|
245 | 245 | $display[$colNum]['dashlets'][$id]['display'] = $ex->getMessage(); |
246 | 246 | $display[$colNum]['dashlets'][$id]['displayHeader'] = $dashlet->getHeader(); |
247 | 247 | $display[$colNum]['dashlets'][$id]['displayFooter'] = $dashlet->getFooter(); |
@@ -253,18 +253,18 @@ discard block |
||
253 | 253 | |
254 | 254 | |
255 | 255 | $i = 0; |
256 | - while($i < count($pages)){ |
|
257 | - if($i == 0){ |
|
256 | + while ($i < count($pages)) { |
|
257 | + if ($i == 0) { |
|
258 | 258 | $pageTabs[$i]['pageTitle'] = $GLOBALS['app_strings']['LBL_SUITE_DASHBOARD']; |
259 | 259 | // $pageTabs[$i]['active'] = 'current'; |
260 | - }else{ |
|
260 | + } else { |
|
261 | 261 | $pageTabs[$i]['pageTitle'] = $pages[$i]['pageTitle']; |
262 | 262 | $divPages[] = $i; |
263 | 263 | } |
264 | 264 | $i++; |
265 | 265 | } |
266 | 266 | |
267 | -if(!empty($sugar_config['lock_homepage']) && $sugar_config['lock_homepage'] == true) $sugar_smarty->assign('lock_homepage', true); |
|
267 | +if (!empty($sugar_config['lock_homepage']) && $sugar_config['lock_homepage'] == true) $sugar_smarty->assign('lock_homepage', true); |
|
268 | 268 | |
269 | 269 | $sugar_smarty->assign('sugarVersion', $sugar_version); |
270 | 270 | $sugar_smarty->assign('sugarFlavor', $sugar_flavor); |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | |
275 | 275 | $sugar_smarty->assign('maxCount', empty($sugar_config['max_dashlets_homepage']) ? 15 : $sugar_config['max_dashlets_homepage']); |
276 | 276 | $sugar_smarty->assign('dashletCount', $count); |
277 | -$sugar_smarty->assign('dashletIds', '["' . implode('","', $dashletIds) . '"]'); |
|
277 | +$sugar_smarty->assign('dashletIds', '["'.implode('","', $dashletIds).'"]'); |
|
278 | 278 | $sugar_smarty->assign('columns', $display); |
279 | 279 | |
280 | 280 | global $theme; |
@@ -305,16 +305,16 @@ discard block |
||
305 | 305 | $sugar_smarty->assign('chartResources', $resources); |
306 | 306 | $sugar_smarty->assign('mySugarChartResources', $mySugarResources); |
307 | 307 | |
308 | -if (file_exists("custom/themes/" . $theme ."/tpls/MySugar.tpl")) { |
|
309 | - echo $sugar_smarty->fetch("custom/themes/" . $theme ."/tpls/MySugar.tpl"); |
|
308 | +if (file_exists("custom/themes/".$theme."/tpls/MySugar.tpl")) { |
|
309 | + echo $sugar_smarty->fetch("custom/themes/".$theme."/tpls/MySugar.tpl"); |
|
310 | 310 | } |
311 | -else if(file_exists('custom/include/MySugar/tpls/MySugar.tpl')) { |
|
311 | +else if (file_exists('custom/include/MySugar/tpls/MySugar.tpl')) { |
|
312 | 312 | echo $sugar_smarty->fetch('custom/include/MySugar/tpls/MySugar.tpl'); |
313 | 313 | } |
314 | -elseif (file_exists("themes/" . $theme ."/tpls/MySugar.tpl")) { |
|
315 | - echo $sugar_smarty->fetch("themes/" . $theme ."/tpls/MySugar.tpl"); |
|
314 | +elseif (file_exists("themes/".$theme."/tpls/MySugar.tpl")) { |
|
315 | + echo $sugar_smarty->fetch("themes/".$theme."/tpls/MySugar.tpl"); |
|
316 | 316 | } |
317 | -else if(file_exists('include/MySugar/tpls/MySugar.tpl')) { |
|
317 | +else if (file_exists('include/MySugar/tpls/MySugar.tpl')) { |
|
318 | 318 | echo $sugar_smarty->fetch('include/MySugar/tpls/MySugar.tpl'); |
319 | 319 | } |
320 | 320 | else { |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -97,8 +99,7 @@ discard block |
||
97 | 99 | $old_dashlets = array(); |
98 | 100 | $current_user->setPreference('columns', $old_columns, 0, 'home'); |
99 | 101 | $current_user->setPreference('dashlets', $old_dashlets, 0, 'home'); |
100 | - } |
|
101 | - else{ |
|
102 | + } else{ |
|
102 | 103 | // This is here to get Sugar dashlets added above the rest |
103 | 104 | $dashlets[create_guid()] = array ('className' => 'SugarFeedDashlet', |
104 | 105 | 'module' => 'SugarFeed', |
@@ -135,8 +136,11 @@ discard block |
||
135 | 136 | $columns[1]['dashlets'] = array(); |
136 | 137 | |
137 | 138 | foreach($dashlets as $guid=>$dashlet) { |
138 | - if( $dashlet['forceColumn'] == 0 ) array_push($columns[0]['dashlets'], $guid); |
|
139 | - else array_push($columns[1]['dashlets'], $guid); |
|
139 | + if( $dashlet['forceColumn'] == 0 ) { |
|
140 | + array_push($columns[0]['dashlets'], $guid); |
|
141 | + } else { |
|
142 | + array_push($columns[1]['dashlets'], $guid); |
|
143 | + } |
|
140 | 144 | $count++; |
141 | 145 | } |
142 | 146 | } |
@@ -164,8 +168,9 @@ discard block |
||
164 | 168 | $dashlets = array_merge($dashlets,$dashletsDashboard); |
165 | 169 | $current_user->setPreference('dashlets', $dashlets, 0, 'Home'); |
166 | 170 | } |
167 | -if ( !empty($pagesDashboard) || !empty($dashletsDashboard) ) |
|
171 | +if ( !empty($pagesDashboard) || !empty($dashletsDashboard) ) { |
|
168 | 172 | $current_user->resetPreferences('Dashboard'); |
173 | +} |
|
169 | 174 | |
170 | 175 | if (empty($pages)){ |
171 | 176 | $pages = array(); |
@@ -202,12 +207,14 @@ discard block |
||
202 | 207 | // only display dashlets that are from visibile modules and that the user has permission to list |
203 | 208 | if(!empty($id) && isset($dashlets[$id]) && is_file($dashlets[$id]['fileLocation'])) { |
204 | 209 | $module = 'Home'; |
205 | - if ( !empty($dashletsFiles[$dashlets[$id]['className']]['module']) ) |
|
206 | - $module = $dashletsFiles[$dashlets[$id]['className']]['module']; |
|
210 | + if ( !empty($dashletsFiles[$dashlets[$id]['className']]['module']) ) { |
|
211 | + $module = $dashletsFiles[$dashlets[$id]['className']]['module']; |
|
212 | + } |
|
207 | 213 | // Bug 24772 - Look into the user preference for the module the dashlet is a part of in case |
208 | 214 | // of the Report Chart dashlets. |
209 | - elseif ( !empty($dashlets[$id]['module']) ) |
|
210 | - $module = $dashlets[$id]['module']; |
|
215 | + elseif ( !empty($dashlets[$id]['module']) ) { |
|
216 | + $module = $dashlets[$id]['module']; |
|
217 | + } |
|
211 | 218 | |
212 | 219 | $myDashlet = new MySugar($module); |
213 | 220 | |
@@ -257,14 +264,16 @@ discard block |
||
257 | 264 | if($i == 0){ |
258 | 265 | $pageTabs[$i]['pageTitle'] = $GLOBALS['app_strings']['LBL_SUITE_DASHBOARD']; |
259 | 266 | // $pageTabs[$i]['active'] = 'current'; |
260 | - }else{ |
|
267 | + } else{ |
|
261 | 268 | $pageTabs[$i]['pageTitle'] = $pages[$i]['pageTitle']; |
262 | 269 | $divPages[] = $i; |
263 | 270 | } |
264 | 271 | $i++; |
265 | 272 | } |
266 | 273 | |
267 | -if(!empty($sugar_config['lock_homepage']) && $sugar_config['lock_homepage'] == true) $sugar_smarty->assign('lock_homepage', true); |
|
274 | +if(!empty($sugar_config['lock_homepage']) && $sugar_config['lock_homepage'] == true) { |
|
275 | + $sugar_smarty->assign('lock_homepage', true); |
|
276 | +} |
|
268 | 277 | |
269 | 278 | $sugar_smarty->assign('sugarVersion', $sugar_version); |
270 | 279 | $sugar_smarty->assign('sugarFlavor', $sugar_flavor); |
@@ -307,17 +316,13 @@ discard block |
||
307 | 316 | |
308 | 317 | if (file_exists("custom/themes/" . $theme ."/tpls/MySugar.tpl")) { |
309 | 318 | echo $sugar_smarty->fetch("custom/themes/" . $theme ."/tpls/MySugar.tpl"); |
310 | -} |
|
311 | -else if(file_exists('custom/include/MySugar/tpls/MySugar.tpl')) { |
|
319 | +} else if(file_exists('custom/include/MySugar/tpls/MySugar.tpl')) { |
|
312 | 320 | echo $sugar_smarty->fetch('custom/include/MySugar/tpls/MySugar.tpl'); |
313 | -} |
|
314 | -elseif (file_exists("themes/" . $theme ."/tpls/MySugar.tpl")) { |
|
321 | +} elseif (file_exists("themes/" . $theme ."/tpls/MySugar.tpl")) { |
|
315 | 322 | echo $sugar_smarty->fetch("themes/" . $theme ."/tpls/MySugar.tpl"); |
316 | -} |
|
317 | -else if(file_exists('include/MySugar/tpls/MySugar.tpl')) { |
|
323 | +} else if(file_exists('include/MySugar/tpls/MySugar.tpl')) { |
|
318 | 324 | echo $sugar_smarty->fetch('include/MySugar/tpls/MySugar.tpl'); |
319 | -} |
|
320 | -else { |
|
325 | +} else { |
|
321 | 326 | $GLOBALS['log']->fatal('MySugar.tpl not found'); |
322 | 327 | } |
323 | 328 |
@@ -24,12 +24,12 @@ |
||
24 | 24 | * Used to delete a project's related tasks after a project is deleted |
25 | 25 | */ |
26 | 26 | class delete_project_tasks { |
27 | - function delete_tasks(&$bean, $event, $arguments){ |
|
27 | + function delete_tasks(&$bean, $event, $arguments) { |
|
28 | 28 | global $db; |
29 | 29 | $Task = BeanFactory::getBean('ProjectTask'); |
30 | 30 | $tasks = $Task->get_full_list("order_number", "project_task.project_id = '".$bean->id."'"); |
31 | 31 | |
32 | - foreach($tasks as $task){ |
|
32 | + foreach ($tasks as $task) { |
|
33 | 33 | $query = "UPDATE project_task SET deleted ='1' WHERE id ='".$task->id."'"; |
34 | 34 | $update = $db->query($query); |
35 | 35 | } |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -66,24 +66,24 @@ |
||
66 | 66 | $this->javascript->setSugarBean($focus); |
67 | 67 | $this->javascript->addAllFields(''); |
68 | 68 | |
69 | - //$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['project_status_dom'], $focus->status)); |
|
69 | + //$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['project_status_dom'], $focus->status)); |
|
70 | 70 | $this->ss->assign('additionalScripts', $this->javascript->getScript(false)); |
71 | 71 | $this->ss->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format()); |
72 | 72 | |
73 | 73 | |
74 | 74 | $json = getJSONobj(); |
75 | 75 | |
76 | - $popup_request_data = array( |
|
77 | - 'call_back_function' => 'set_return', |
|
78 | - 'form_name' => 'projectsQuickCreate', |
|
79 | - 'field_to_name_array' => array( |
|
80 | - 'id' => 'account_id', |
|
81 | - 'name' => 'account_name', |
|
82 | - ), |
|
83 | - ); |
|
76 | + $popup_request_data = array( |
|
77 | + 'call_back_function' => 'set_return', |
|
78 | + 'form_name' => 'projectsQuickCreate', |
|
79 | + 'field_to_name_array' => array( |
|
80 | + 'id' => 'account_id', |
|
81 | + 'name' => 'account_name', |
|
82 | + ), |
|
83 | + ); |
|
84 | 84 | |
85 | - $encoded_popup_request_data = $json->encode($popup_request_data); |
|
86 | - $this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data); |
|
85 | + $encoded_popup_request_data = $json->encode($popup_request_data); |
|
86 | + $this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data); |
|
87 | 87 | |
88 | 88 | |
89 | 89 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | $this->ss->assign("SALUTATION_OPTIONS", get_select_options_with_id($app_list_strings['salutation_dom'], '')); |
57 | 57 | |
58 | - if($this->viaAJAX) { // override for ajax call |
|
58 | + if ($this->viaAJAX) { // override for ajax call |
|
59 | 59 | $this->ss->assign('saveOnclick', "onclick='if(check_form(\"contactsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"contacts\"); else return false;'"); |
60 | 60 | $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_contacts\")';"); |
61 | 61 | } |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -42,25 +42,25 @@ |
||
42 | 42 | |
43 | 43 | |
44 | 44 | function additionalDetailsProject($fields) { |
45 | - static $mod_strings; |
|
46 | - if(empty($mod_strings)) { |
|
47 | - global $current_language; |
|
48 | - $mod_strings = return_module_language($current_language, 'Project'); |
|
49 | - } |
|
45 | + static $mod_strings; |
|
46 | + if(empty($mod_strings)) { |
|
47 | + global $current_language; |
|
48 | + $mod_strings = return_module_language($current_language, 'Project'); |
|
49 | + } |
|
50 | 50 | |
51 | - $overlib_string = ''; |
|
51 | + $overlib_string = ''; |
|
52 | 52 | |
53 | - if(!empty($fields['DESCRIPTION'])) { |
|
54 | - $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
|
55 | - if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
56 | - } |
|
53 | + if(!empty($fields['DESCRIPTION'])) { |
|
54 | + $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
|
55 | + if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
56 | + } |
|
57 | 57 | |
58 | - return array('fieldToAddTo' => 'NAME', |
|
59 | - 'string' => $overlib_string, |
|
60 | - 'editLink' => "index.php?action=EditView&module=Project&return_module=Project&record={$fields['ID']}", |
|
61 | - 'viewLink' => "index.php?action=DetailView&module=Project&return_module=Project&record={$fields['ID']}"); |
|
58 | + return array('fieldToAddTo' => 'NAME', |
|
59 | + 'string' => $overlib_string, |
|
60 | + 'editLink' => "index.php?action=EditView&module=Project&return_module=Project&record={$fields['ID']}", |
|
61 | + 'viewLink' => "index.php?action=DetailView&module=Project&return_module=Project&record={$fields['ID']}"); |
|
62 | 62 | } |
63 | 63 | |
64 | - ?> |
|
64 | + ?> |
|
65 | 65 | |
66 | 66 | |
67 | 67 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -43,16 +43,16 @@ discard block |
||
43 | 43 | |
44 | 44 | function additionalDetailsProject($fields) { |
45 | 45 | static $mod_strings; |
46 | - if(empty($mod_strings)) { |
|
46 | + if (empty($mod_strings)) { |
|
47 | 47 | global $current_language; |
48 | 48 | $mod_strings = return_module_language($current_language, 'Project'); |
49 | 49 | } |
50 | 50 | |
51 | 51 | $overlib_string = ''; |
52 | 52 | |
53 | - if(!empty($fields['DESCRIPTION'])) { |
|
54 | - $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
|
55 | - if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
53 | + if (!empty($fields['DESCRIPTION'])) { |
|
54 | + $overlib_string .= '<b>'.$mod_strings['LBL_DESCRIPTION'].'</b> '.substr($fields['DESCRIPTION'], 0, 300); |
|
55 | + if (strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | return array('fieldToAddTo' => 'NAME', |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -91,7 +93,9 @@ discard block |
||
91 | 93 | } |
92 | 94 | if(!empty($fields['DESCRIPTION'])) { |
93 | 95 | $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
94 | - if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
96 | + if(strlen($fields['DESCRIPTION']) > 300) { |
|
97 | + $overlib_string .= '...'; |
|
98 | + } |
|
95 | 99 | $overlib_string .= '<br>'; |
96 | 100 | } |
97 | 101 | $overlib_string .= '<br>'; |
@@ -1,78 +1,78 @@ |
||
1 | 1 | <?php |
2 | 2 | $dashletData['ProjectDashlet']['searchFields'] = array ( |
3 | - 'date_entered' => |
|
4 | - array ( |
|
3 | + 'date_entered' => |
|
4 | + array ( |
|
5 | 5 | 'default' => '', |
6 | - ), |
|
7 | - 'date_modified' => |
|
8 | - array ( |
|
6 | + ), |
|
7 | + 'date_modified' => |
|
8 | + array ( |
|
9 | 9 | 'default' => '', |
10 | - ), |
|
11 | - 'assigned_user_id' => |
|
12 | - array ( |
|
10 | + ), |
|
11 | + 'assigned_user_id' => |
|
12 | + array ( |
|
13 | 13 | 'type' => 'assigned_user_name', |
14 | 14 | 'default' => 'Administrator', |
15 | - ), |
|
15 | + ), |
|
16 | 16 | ); |
17 | 17 | $dashletData['ProjectDashlet']['columns'] = array ( |
18 | - 'name' => |
|
19 | - array ( |
|
18 | + 'name' => |
|
19 | + array ( |
|
20 | 20 | 'width' => '30%', |
21 | 21 | 'label' => 'LBL_LIST_NAME', |
22 | 22 | 'link' => true, |
23 | 23 | 'default' => true, |
24 | 24 | 'name' => 'name', |
25 | - ), |
|
26 | - 'status' => |
|
27 | - array ( |
|
25 | + ), |
|
26 | + 'status' => |
|
27 | + array ( |
|
28 | 28 | 'type' => 'enum', |
29 | 29 | 'default' => true, |
30 | 30 | 'label' => 'LBL_STATUS', |
31 | 31 | 'width' => '10%', |
32 | 32 | 'name' => 'status', |
33 | - ), |
|
34 | - 'estimated_start_date' => |
|
35 | - array ( |
|
33 | + ), |
|
34 | + 'estimated_start_date' => |
|
35 | + array ( |
|
36 | 36 | 'type' => 'date', |
37 | 37 | 'label' => 'LBL_DATE_START', |
38 | 38 | 'width' => '10%', |
39 | 39 | 'default' => true, |
40 | 40 | 'name' => 'estimated_start_date', |
41 | - ), |
|
42 | - 'assigned_user_name' => |
|
43 | - array ( |
|
41 | + ), |
|
42 | + 'assigned_user_name' => |
|
43 | + array ( |
|
44 | 44 | 'width' => '8%', |
45 | 45 | 'label' => 'LBL_LIST_ASSIGNED_USER', |
46 | 46 | 'name' => 'assigned_user_name', |
47 | 47 | 'default' => true, |
48 | - ), |
|
49 | - 'estimated_end_date' => |
|
50 | - array ( |
|
48 | + ), |
|
49 | + 'estimated_end_date' => |
|
50 | + array ( |
|
51 | 51 | 'type' => 'date', |
52 | 52 | 'label' => 'LBL_DATE_END', |
53 | 53 | 'width' => '10%', |
54 | 54 | 'default' => true, |
55 | 55 | 'name' => 'estimated_end_date', |
56 | - ), |
|
57 | - 'date_modified' => |
|
58 | - array ( |
|
56 | + ), |
|
57 | + 'date_modified' => |
|
58 | + array ( |
|
59 | 59 | 'width' => '15%', |
60 | 60 | 'label' => 'LBL_DATE_MODIFIED', |
61 | 61 | 'name' => 'date_modified', |
62 | 62 | 'default' => false, |
63 | - ), |
|
64 | - 'date_entered' => |
|
65 | - array ( |
|
63 | + ), |
|
64 | + 'date_entered' => |
|
65 | + array ( |
|
66 | 66 | 'width' => '15%', |
67 | 67 | 'label' => 'LBL_DATE_ENTERED', |
68 | 68 | 'default' => false, |
69 | 69 | 'name' => 'date_entered', |
70 | - ), |
|
71 | - 'created_by' => |
|
72 | - array ( |
|
70 | + ), |
|
71 | + 'created_by' => |
|
72 | + array ( |
|
73 | 73 | 'width' => '8%', |
74 | 74 | 'label' => 'LBL_CREATED', |
75 | 75 | 'name' => 'created_by', |
76 | 76 | 'default' => false, |
77 | - ), |
|
77 | + ), |
|
78 | 78 | ); |
@@ -1,22 +1,22 @@ discard block |
||
1 | 1 | <?php |
2 | -$dashletData['ProjectDashlet']['searchFields'] = array ( |
|
2 | +$dashletData['ProjectDashlet']['searchFields'] = array( |
|
3 | 3 | 'date_entered' => |
4 | - array ( |
|
4 | + array( |
|
5 | 5 | 'default' => '', |
6 | 6 | ), |
7 | 7 | 'date_modified' => |
8 | - array ( |
|
8 | + array( |
|
9 | 9 | 'default' => '', |
10 | 10 | ), |
11 | 11 | 'assigned_user_id' => |
12 | - array ( |
|
12 | + array( |
|
13 | 13 | 'type' => 'assigned_user_name', |
14 | 14 | 'default' => 'Administrator', |
15 | 15 | ), |
16 | 16 | ); |
17 | -$dashletData['ProjectDashlet']['columns'] = array ( |
|
17 | +$dashletData['ProjectDashlet']['columns'] = array( |
|
18 | 18 | 'name' => |
19 | - array ( |
|
19 | + array( |
|
20 | 20 | 'width' => '30%', |
21 | 21 | 'label' => 'LBL_LIST_NAME', |
22 | 22 | 'link' => true, |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | 'name' => 'name', |
25 | 25 | ), |
26 | 26 | 'status' => |
27 | - array ( |
|
27 | + array( |
|
28 | 28 | 'type' => 'enum', |
29 | 29 | 'default' => true, |
30 | 30 | 'label' => 'LBL_STATUS', |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | 'name' => 'status', |
33 | 33 | ), |
34 | 34 | 'estimated_start_date' => |
35 | - array ( |
|
35 | + array( |
|
36 | 36 | 'type' => 'date', |
37 | 37 | 'label' => 'LBL_DATE_START', |
38 | 38 | 'width' => '10%', |
@@ -40,14 +40,14 @@ discard block |
||
40 | 40 | 'name' => 'estimated_start_date', |
41 | 41 | ), |
42 | 42 | 'assigned_user_name' => |
43 | - array ( |
|
43 | + array( |
|
44 | 44 | 'width' => '8%', |
45 | 45 | 'label' => 'LBL_LIST_ASSIGNED_USER', |
46 | 46 | 'name' => 'assigned_user_name', |
47 | 47 | 'default' => true, |
48 | 48 | ), |
49 | 49 | 'estimated_end_date' => |
50 | - array ( |
|
50 | + array( |
|
51 | 51 | 'type' => 'date', |
52 | 52 | 'label' => 'LBL_DATE_END', |
53 | 53 | 'width' => '10%', |
@@ -55,21 +55,21 @@ discard block |
||
55 | 55 | 'name' => 'estimated_end_date', |
56 | 56 | ), |
57 | 57 | 'date_modified' => |
58 | - array ( |
|
58 | + array( |
|
59 | 59 | 'width' => '15%', |
60 | 60 | 'label' => 'LBL_DATE_MODIFIED', |
61 | 61 | 'name' => 'date_modified', |
62 | 62 | 'default' => false, |
63 | 63 | ), |
64 | 64 | 'date_entered' => |
65 | - array ( |
|
65 | + array( |
|
66 | 66 | 'width' => '15%', |
67 | 67 | 'label' => 'LBL_DATE_ENTERED', |
68 | 68 | 'default' => false, |
69 | 69 | 'name' => 'date_entered', |
70 | 70 | ), |
71 | 71 | 'created_by' => |
72 | - array ( |
|
72 | + array( |
|
73 | 73 | 'width' => '8%', |
74 | 74 | 'label' => 'LBL_CREATED', |
75 | 75 | 'name' => 'created_by', |
@@ -42,102 +42,102 @@ |
||
42 | 42 | |
43 | 43 | $viewdefs ['Project'] = |
44 | 44 | array ( |
45 | - 'EditView' => |
|
46 | - array ( |
|
45 | + 'EditView' => |
|
46 | + array ( |
|
47 | 47 | 'templateMeta' => |
48 | 48 | array ( |
49 | - 'maxColumns' => '2', |
|
50 | - 'widths' => |
|
51 | - array ( |
|
49 | + 'maxColumns' => '2', |
|
50 | + 'widths' => |
|
51 | + array ( |
|
52 | 52 | 0 => |
53 | 53 | array ( |
54 | - 'label' => '10', |
|
55 | - 'field' => '30', |
|
54 | + 'label' => '10', |
|
55 | + 'field' => '30', |
|
56 | 56 | ), |
57 | 57 | 1 => |
58 | 58 | array ( |
59 | - 'label' => '10', |
|
60 | - 'field' => '30', |
|
59 | + 'label' => '10', |
|
60 | + 'field' => '30', |
|
61 | 61 | ), |
62 | - ), |
|
63 | - 'form' => |
|
64 | - array ( |
|
62 | + ), |
|
63 | + 'form' => |
|
64 | + array ( |
|
65 | 65 | 'hidden' => '<input type="hidden" name="is_template" value="{$is_template}" />', |
66 | 66 | 'buttons' => |
67 | 67 | array ( |
68 | - 0 => 'SAVE', |
|
69 | - 1 => |
|
70 | - array ( |
|
68 | + 0 => 'SAVE', |
|
69 | + 1 => |
|
70 | + array ( |
|
71 | 71 | 'customCode' => '{if !empty($smarty.request.return_action) && $smarty.request.return_action == "ProjectTemplatesDetailView" && (!empty($fields.id.value) || !empty($smarty.request.return_id)) }<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value=\'ProjectTemplatesDetailView\'; this.form.module.value=\'{$smarty.request.return_module}\'; this.form.record.value=\'{$smarty.request.return_id}\';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" id="CANCEL{$place}"> {elseif !empty($smarty.request.return_action) && $smarty.request.return_action == "DetailView" && (!empty($fields.id.value) || !empty($smarty.request.return_id)) }<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value=\'DetailView\'; this.form.module.value=\'{$smarty.request.return_module}\'; this.form.record.value=\'{$smarty.request.return_id}\';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" id="CANCEL{$place}"> {elseif $is_template}<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value=\'ProjectTemplatesListView\'; this.form.module.value=\'{$smarty.request.return_module}\'; this.form.record.value=\'{$smarty.request.return_id}\';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" id="CANCEL{$place}"> {else}<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value=\'index\'; this.form.module.value=\'{$smarty.request.return_module}\'; this.form.record.value=\'{$smarty.request.return_id}\';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" id="CANCEL{$place}"> {/if}', |
72 | - ), |
|
72 | + ), |
|
73 | 73 | ), |
74 | - ), |
|
75 | - 'useTabs' => false, |
|
76 | - 'tabDefs' => |
|
77 | - array ( |
|
74 | + ), |
|
75 | + 'useTabs' => false, |
|
76 | + 'tabDefs' => |
|
77 | + array ( |
|
78 | 78 | 'LBL_PROJECT_INFORMATION' => |
79 | 79 | array ( |
80 | - 'newTab' => false, |
|
81 | - 'panelDefault' => 'expanded', |
|
80 | + 'newTab' => false, |
|
81 | + 'panelDefault' => 'expanded', |
|
82 | 82 | ), |
83 | 83 | 'LBL_PANEL_ASSIGNMENT' => |
84 | 84 | array ( |
85 | - 'newTab' => false, |
|
86 | - 'panelDefault' => 'expanded', |
|
85 | + 'newTab' => false, |
|
86 | + 'panelDefault' => 'expanded', |
|
87 | + ), |
|
87 | 88 | ), |
88 | - ), |
|
89 | 89 | ), |
90 | 90 | 'panels' => |
91 | 91 | array ( |
92 | - 'lbl_project_information' => |
|
93 | - array ( |
|
92 | + 'lbl_project_information' => |
|
93 | + array ( |
|
94 | 94 | 0 => |
95 | 95 | array ( |
96 | - 0 => 'name', |
|
97 | - 1 => 'status', |
|
96 | + 0 => 'name', |
|
97 | + 1 => 'status', |
|
98 | 98 | ), |
99 | 99 | 1 => |
100 | 100 | array ( |
101 | - 0 => 'estimated_start_date', |
|
102 | - 1 => 'priority', |
|
101 | + 0 => 'estimated_start_date', |
|
102 | + 1 => 'priority', |
|
103 | 103 | ), |
104 | 104 | 2 => |
105 | 105 | array ( |
106 | - 0 => 'estimated_end_date', |
|
107 | - 1 => '', |
|
106 | + 0 => 'estimated_end_date', |
|
107 | + 1 => '', |
|
108 | 108 | ), |
109 | 109 | 3 => |
110 | 110 | array ( |
111 | - 0 => 'description', |
|
111 | + 0 => 'description', |
|
112 | + ), |
|
112 | 113 | ), |
113 | - ), |
|
114 | - 'LBL_PANEL_ASSIGNMENT' => |
|
115 | - array ( |
|
114 | + 'LBL_PANEL_ASSIGNMENT' => |
|
115 | + array ( |
|
116 | 116 | 0 => |
117 | 117 | array ( |
118 | - 0 => 'assigned_user_name', |
|
119 | - 1 => |
|
120 | - array ( |
|
118 | + 0 => 'assigned_user_name', |
|
119 | + 1 => |
|
120 | + array ( |
|
121 | 121 | 'name' => 'am_projecttemplates_project_1_name', |
122 | - ), |
|
122 | + ), |
|
123 | 123 | ), |
124 | 124 | 1 => |
125 | 125 | array ( |
126 | - 0 => |
|
127 | - array ( |
|
126 | + 0 => |
|
127 | + array ( |
|
128 | 128 | 'name' => 'date_entered', |
129 | 129 | 'comment' => 'Date record created', |
130 | 130 | 'label' => 'LBL_DATE_ENTERED', |
131 | - ), |
|
132 | - 1 => |
|
133 | - array ( |
|
131 | + ), |
|
132 | + 1 => |
|
133 | + array ( |
|
134 | 134 | 'name' => 'date_modified', |
135 | 135 | 'comment' => 'Date record last modified', |
136 | 136 | 'label' => 'LBL_DATE_MODIFIED', |
137 | - ), |
|
137 | + ), |
|
138 | + ), |
|
138 | 139 | ), |
139 | - ), |
|
140 | 140 | ), |
141 | - ), |
|
141 | + ), |
|
142 | 142 | ); |
143 | 143 | ?> |
@@ -41,96 +41,96 @@ |
||
41 | 41 | |
42 | 42 | |
43 | 43 | $viewdefs ['Project'] = |
44 | -array ( |
|
44 | +array( |
|
45 | 45 | 'EditView' => |
46 | - array ( |
|
46 | + array( |
|
47 | 47 | 'templateMeta' => |
48 | - array ( |
|
48 | + array( |
|
49 | 49 | 'maxColumns' => '2', |
50 | 50 | 'widths' => |
51 | - array ( |
|
51 | + array( |
|
52 | 52 | 0 => |
53 | - array ( |
|
53 | + array( |
|
54 | 54 | 'label' => '10', |
55 | 55 | 'field' => '30', |
56 | 56 | ), |
57 | 57 | 1 => |
58 | - array ( |
|
58 | + array( |
|
59 | 59 | 'label' => '10', |
60 | 60 | 'field' => '30', |
61 | 61 | ), |
62 | 62 | ), |
63 | 63 | 'form' => |
64 | - array ( |
|
64 | + array( |
|
65 | 65 | 'hidden' => '<input type="hidden" name="is_template" value="{$is_template}" />', |
66 | 66 | 'buttons' => |
67 | - array ( |
|
67 | + array( |
|
68 | 68 | 0 => 'SAVE', |
69 | 69 | 1 => |
70 | - array ( |
|
70 | + array( |
|
71 | 71 | 'customCode' => '{if !empty($smarty.request.return_action) && $smarty.request.return_action == "ProjectTemplatesDetailView" && (!empty($fields.id.value) || !empty($smarty.request.return_id)) }<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value=\'ProjectTemplatesDetailView\'; this.form.module.value=\'{$smarty.request.return_module}\'; this.form.record.value=\'{$smarty.request.return_id}\';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" id="CANCEL{$place}"> {elseif !empty($smarty.request.return_action) && $smarty.request.return_action == "DetailView" && (!empty($fields.id.value) || !empty($smarty.request.return_id)) }<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value=\'DetailView\'; this.form.module.value=\'{$smarty.request.return_module}\'; this.form.record.value=\'{$smarty.request.return_id}\';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" id="CANCEL{$place}"> {elseif $is_template}<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value=\'ProjectTemplatesListView\'; this.form.module.value=\'{$smarty.request.return_module}\'; this.form.record.value=\'{$smarty.request.return_id}\';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" id="CANCEL{$place}"> {else}<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value=\'index\'; this.form.module.value=\'{$smarty.request.return_module}\'; this.form.record.value=\'{$smarty.request.return_id}\';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" id="CANCEL{$place}"> {/if}', |
72 | 72 | ), |
73 | 73 | ), |
74 | 74 | ), |
75 | 75 | 'useTabs' => false, |
76 | 76 | 'tabDefs' => |
77 | - array ( |
|
77 | + array( |
|
78 | 78 | 'LBL_PROJECT_INFORMATION' => |
79 | - array ( |
|
79 | + array( |
|
80 | 80 | 'newTab' => false, |
81 | 81 | 'panelDefault' => 'expanded', |
82 | 82 | ), |
83 | 83 | 'LBL_PANEL_ASSIGNMENT' => |
84 | - array ( |
|
84 | + array( |
|
85 | 85 | 'newTab' => false, |
86 | 86 | 'panelDefault' => 'expanded', |
87 | 87 | ), |
88 | 88 | ), |
89 | 89 | ), |
90 | 90 | 'panels' => |
91 | - array ( |
|
91 | + array( |
|
92 | 92 | 'lbl_project_information' => |
93 | - array ( |
|
93 | + array( |
|
94 | 94 | 0 => |
95 | - array ( |
|
95 | + array( |
|
96 | 96 | 0 => 'name', |
97 | 97 | 1 => 'status', |
98 | 98 | ), |
99 | 99 | 1 => |
100 | - array ( |
|
100 | + array( |
|
101 | 101 | 0 => 'estimated_start_date', |
102 | 102 | 1 => 'priority', |
103 | 103 | ), |
104 | 104 | 2 => |
105 | - array ( |
|
105 | + array( |
|
106 | 106 | 0 => 'estimated_end_date', |
107 | 107 | 1 => '', |
108 | 108 | ), |
109 | 109 | 3 => |
110 | - array ( |
|
110 | + array( |
|
111 | 111 | 0 => 'description', |
112 | 112 | ), |
113 | 113 | ), |
114 | 114 | 'LBL_PANEL_ASSIGNMENT' => |
115 | - array ( |
|
115 | + array( |
|
116 | 116 | 0 => |
117 | - array ( |
|
117 | + array( |
|
118 | 118 | 0 => 'assigned_user_name', |
119 | 119 | 1 => |
120 | - array ( |
|
120 | + array( |
|
121 | 121 | 'name' => 'am_projecttemplates_project_1_name', |
122 | 122 | ), |
123 | 123 | ), |
124 | 124 | 1 => |
125 | - array ( |
|
125 | + array( |
|
126 | 126 | 0 => |
127 | - array ( |
|
127 | + array( |
|
128 | 128 | 'name' => 'date_entered', |
129 | 129 | 'comment' => 'Date record created', |
130 | 130 | 'label' => 'LBL_DATE_ENTERED', |
131 | 131 | ), |
132 | 132 | 1 => |
133 | - array ( |
|
133 | + array( |
|
134 | 134 | 'name' => 'date_modified', |
135 | 135 | 'comment' => 'Date record last modified', |
136 | 136 | 'label' => 'LBL_DATE_MODIFIED', |
@@ -40,13 +40,13 @@ |
||
40 | 40 | |
41 | 41 | |
42 | 42 | $popupMeta = array('moduleMain' => 'Project', |
43 | - 'varName' => 'PROJECT', |
|
44 | - 'orderBy' => 'name', |
|
45 | - 'whereClauses' => |
|
46 | - array('name' => 'project.name'), |
|
47 | - 'searchInputs' => |
|
48 | - array('name') |
|
49 | - ); |
|
43 | + 'varName' => 'PROJECT', |
|
44 | + 'orderBy' => 'name', |
|
45 | + 'whereClauses' => |
|
46 | + array('name' => 'project.name'), |
|
47 | + 'searchInputs' => |
|
48 | + array('name') |
|
49 | + ); |
|
50 | 50 | |
51 | 51 | |
52 | 52 | ?> |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -38,28 +38,28 @@ |
||
38 | 38 | ********************************************************************************/ |
39 | 39 | |
40 | 40 | |
41 | - $searchdefs['Project'] = array( |
|
42 | - 'templateMeta' => array( |
|
43 | - 'maxColumns' => '3', |
|
44 | - 'maxColumnsBasic' => '4', |
|
41 | + $searchdefs['Project'] = array( |
|
42 | + 'templateMeta' => array( |
|
43 | + 'maxColumns' => '3', |
|
44 | + 'maxColumnsBasic' => '4', |
|
45 | 45 | 'widths' => array('label' => '10', 'field' => '30'), |
46 | - ), |
|
46 | + ), |
|
47 | 47 | 'layout' => array( |
48 | - 'basic_search' => array( |
|
49 | - 'name', |
|
50 | - array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'), |
|
48 | + 'basic_search' => array( |
|
49 | + 'name', |
|
50 | + array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'), |
|
51 | 51 | array ('name' => 'favorites_only','label' => 'LBL_FAVORITES_FILTER','type' => 'bool',), |
52 | 52 | |
53 | 53 | |
54 | 54 | ), |
55 | - 'advanced_search' => array( |
|
56 | - 'name', |
|
57 | - 'estimated_start_date', |
|
58 | - 'estimated_end_date', |
|
59 | - 'status', |
|
60 | - 'priority', |
|
55 | + 'advanced_search' => array( |
|
56 | + 'name', |
|
57 | + 'estimated_start_date', |
|
58 | + 'estimated_end_date', |
|
59 | + 'status', |
|
60 | + 'priority', |
|
61 | 61 | |
62 | - ), |
|
63 | - ), |
|
64 | - ); |
|
62 | + ), |
|
63 | + ), |
|
64 | + ); |
|
65 | 65 | ?> |
@@ -48,7 +48,7 @@ |
||
48 | 48 | 'basic_search' => array( |
49 | 49 | 'name', |
50 | 50 | array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'), |
51 | - array ('name' => 'favorites_only','label' => 'LBL_FAVORITES_FILTER','type' => 'bool',), |
|
51 | + array('name' => 'favorites_only', 'label' => 'LBL_FAVORITES_FILTER', 'type' => 'bool',), |
|
52 | 52 | |
53 | 53 | |
54 | 54 | ), |
@@ -51,20 +51,20 @@ |
||
51 | 51 | and favorites.parent_type = "'.$module_name.'" |
52 | 52 | and favorites.assigned_user_id = "' .$current_user->id . '") OR NOT ({0}', |
53 | 53 | 'db_field'=>array('id')), |
54 | - //Range Search Support |
|
55 | - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
56 | - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
57 | - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
58 | - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
59 | - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
60 | - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
54 | + //Range Search Support |
|
55 | + 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
56 | + 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
57 | + 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
58 | + 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
59 | + 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
60 | + 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
61 | 61 | |
62 | - 'range_estimated_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
63 | - 'start_range_estimated_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
64 | - 'end_range_estimated_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
65 | - 'range_estimated_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
66 | - 'start_range_estimated_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
67 | - 'end_range_estimated_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
68 | - //Range Search Support |
|
62 | + 'range_estimated_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
63 | + 'start_range_estimated_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
64 | + 'end_range_estimated_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
65 | + 'range_estimated_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
66 | + 'start_range_estimated_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
67 | + 'end_range_estimated_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
68 | + //Range Search Support |
|
69 | 69 | ); |
70 | 70 | ?> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -40,31 +40,31 @@ discard block |
||
40 | 40 | global $current_user; |
41 | 41 | $module_name = "Project"; |
42 | 42 | $searchFields['Project'] = |
43 | - array ( |
|
44 | - 'name' => array( 'query_type'=>'default'), |
|
45 | - 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
43 | + array( |
|
44 | + 'name' => array('query_type'=>'default'), |
|
45 | + 'current_user_only'=> array('query_type'=>'default', 'db_field'=>array('assigned_user_id'), 'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
46 | 46 | 'favorites_only' => array( |
47 | 47 | 'query_type'=>'format', |
48 | 48 | 'operator' => 'subquery', |
49 | 49 | 'subquery' => 'SELECT favorites.parent_id FROM favorites |
50 | 50 | WHERE favorites.deleted = 0 |
51 | 51 | and favorites.parent_type = "'.$module_name.'" |
52 | - and favorites.assigned_user_id = "' .$current_user->id . '") OR NOT ({0}', |
|
52 | + and favorites.assigned_user_id = "' .$current_user->id.'") OR NOT ({0}', |
|
53 | 53 | 'db_field'=>array('id')), |
54 | 54 | //Range Search Support |
55 | - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
56 | - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
57 | - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
58 | - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
59 | - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
60 | - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
55 | + 'range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
56 | + 'start_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
57 | + 'end_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
58 | + 'range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
59 | + 'start_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
60 | + 'end_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
61 | 61 | |
62 | - 'range_estimated_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
63 | - 'start_range_estimated_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
64 | - 'end_range_estimated_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
65 | - 'range_estimated_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
66 | - 'start_range_estimated_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
67 | - 'end_range_estimated_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
62 | + 'range_estimated_start_date' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
63 | + 'start_range_estimated_start_date' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
64 | + 'end_range_estimated_start_date' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
65 | + 'range_estimated_end_date' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
66 | + 'start_range_estimated_end_date' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
67 | + 'end_range_estimated_end_date' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
68 | 68 | //Range Search Support |
69 | 69 | ); |
70 | 70 | ?> |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |