@@ -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. |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | { |
48 | 48 | global $mod_strings; |
49 | 49 | $button = "<script src='include/javascript/checkbox.js' type='text/javascript'></script>"; |
50 | - $button .= "<form id='CustSelectForm' name='CustSelectForm' method='post' action=''>"; |
|
50 | + $button .= "<form id='CustSelectForm' name='CustSelectForm' method='post' action=''>"; |
|
51 | 51 | |
52 | 52 | // $button .= "<input id='custom_hidden_5' type='hidden' name='custom_hidden_5' value=''/>"; |
53 | 53 | $button .= "<input id='Custom_Select' class='button' type='button' name='Custom_Select' onclick='select_targets()' value='".$mod_strings['LBL_SELECT_DELEGATES']."'/>\n</form>"; |
@@ -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. |
@@ -56,27 +56,27 @@ discard block |
||
56 | 56 | |
57 | 57 | /** Take the keys for the strings and look them up. Module is literal, the rest are label keys |
58 | 58 | */ |
59 | - function SugarWidgetSubPanelTopButton($module='', $title='', $access_key='', $form_value='') |
|
59 | + function SugarWidgetSubPanelTopButton($module = '', $title = '', $access_key = '', $form_value = '') |
|
60 | 60 | { |
61 | 61 | global $app_strings; |
62 | 62 | |
63 | - if(is_array($module)) |
|
63 | + if (is_array($module)) |
|
64 | 64 | { |
65 | 65 | // it is really the class details from the mapping |
66 | 66 | $class_details = $module; |
67 | 67 | |
68 | 68 | // If keys were passed into the constructor, translate them from keys to values. |
69 | - if(!empty($class_details['module'])) |
|
69 | + if (!empty($class_details['module'])) |
|
70 | 70 | $this->module = $class_details['module']; |
71 | - if(!empty($class_details['title'])) |
|
71 | + if (!empty($class_details['title'])) |
|
72 | 72 | $this->title = $app_strings[$class_details['title']]; |
73 | - if(!empty($class_details['access_key'])) |
|
73 | + if (!empty($class_details['access_key'])) |
|
74 | 74 | $this->access_key = $app_strings[$class_details['access_key']]; |
75 | - if(!empty($class_details['form_value'])) |
|
75 | + if (!empty($class_details['form_value'])) |
|
76 | 76 | $this->form_value = translate($class_details['form_value'], $this->module); |
77 | - if(!empty($class_details['additional_form_fields'])) |
|
77 | + if (!empty($class_details['additional_form_fields'])) |
|
78 | 78 | $this->additional_form_fields = $class_details['additional_form_fields']; |
79 | - if(!empty($class_details['ACL'])){ |
|
79 | + if (!empty($class_details['ACL'])) { |
|
80 | 80 | $this->acl = $class_details['ACL']; |
81 | 81 | } |
82 | 82 | } |
@@ -85,19 +85,19 @@ discard block |
||
85 | 85 | $this->module = $module; |
86 | 86 | |
87 | 87 | // If keys were passed into the constructor, translate them from keys to values. |
88 | - if(!empty($title)) |
|
88 | + if (!empty($title)) |
|
89 | 89 | $this->title = $app_strings[$title]; |
90 | - if(!empty($access_key)) |
|
90 | + if (!empty($access_key)) |
|
91 | 91 | $this->access_key = $app_strings[$access_key]; |
92 | - if(!empty($form_value)) |
|
92 | + if (!empty($form_value)) |
|
93 | 93 | $this->form_value = translate($form_value, $module); |
94 | 94 | } |
95 | 95 | } |
96 | 96 | |
97 | 97 | public function getWidgetId($buttonSuffix = true) |
98 | 98 | { |
99 | - $widgetID = parent::getWidgetId() . '_'.preg_replace('[ ]', '', strtolower($this->form_value)); |
|
100 | - if($buttonSuffix){ |
|
99 | + $widgetID = parent::getWidgetId().'_'.preg_replace('[ ]', '', strtolower($this->form_value)); |
|
100 | + if ($buttonSuffix) { |
|
101 | 101 | $widgetID .= '_button'; |
102 | 102 | } |
103 | 103 | return $widgetID; |
@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | global $currentModule; |
110 | 110 | |
111 | 111 | // Create the additional form fields with real values if they were not passed in |
112 | - if(empty($additionalFormFields) && $this->additional_form_fields) |
|
112 | + if (empty($additionalFormFields) && $this->additional_form_fields) |
|
113 | 113 | { |
114 | - foreach($this->additional_form_fields as $key=>$value) |
|
114 | + foreach ($this->additional_form_fields as $key=>$value) |
|
115 | 115 | { |
116 | - if(!empty($defines['focus']->$value)) |
|
116 | + if (!empty($defines['focus']->$value)) |
|
117 | 117 | { |
118 | 118 | $additionalFormFields[$key] = $defines['focus']->$value; |
119 | 119 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | } |
126 | 126 | |
127 | 127 | |
128 | - if(!empty($this->module)) |
|
128 | + if (!empty($this->module)) |
|
129 | 129 | { |
130 | 130 | $defines['child_module_name'] = $this->module; |
131 | 131 | } |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $defines['child_module_name'] = $defines['module']; |
135 | 135 | } |
136 | 136 | |
137 | - $defines['parent_bean_name'] = get_class( $defines['focus']); |
|
137 | + $defines['parent_bean_name'] = get_class($defines['focus']); |
|
138 | 138 | $relationship_name = $this->get_subpanel_relationship_name($defines); |
139 | 139 | |
140 | 140 | |
@@ -144,65 +144,65 @@ discard block |
||
144 | 144 | $formValues['module'] = $defines['child_module_name']; |
145 | 145 | $formValues[strtolower($defines['parent_bean_name'])."_id"] = $defines['focus']->id; |
146 | 146 | |
147 | - if(isset($defines['focus']->name)) |
|
147 | + if (isset($defines['focus']->name)) |
|
148 | 148 | { |
149 | 149 | $formValues[strtolower($defines['parent_bean_name'])."_name"] = $defines['focus']->name; |
150 | 150 | // #26451,add these fields for custom one-to-many relate field. |
151 | - if(!empty($defines['child_module_name'])){ |
|
151 | + if (!empty($defines['child_module_name'])) { |
|
152 | 152 | $formValues[$relationship_name."_name"] = $defines['focus']->name; |
153 | 153 | $childFocusName = !empty($GLOBALS['beanList'][$defines['child_module_name']]) ? $GLOBALS['beanList'][$defines['child_module_name']] : ""; |
154 | - if(!empty($GLOBALS['dictionary'][ $childFocusName ]["fields"][$relationship_name .'_name']['id_name'])){ |
|
155 | - $formValues[$GLOBALS['dictionary'][ $childFocusName ]["fields"][$relationship_name .'_name']['id_name']] = $defines['focus']->id; |
|
154 | + if (!empty($GLOBALS['dictionary'][$childFocusName]["fields"][$relationship_name.'_name']['id_name'])) { |
|
155 | + $formValues[$GLOBALS['dictionary'][$childFocusName]["fields"][$relationship_name.'_name']['id_name']] = $defines['focus']->id; |
|
156 | 156 | } |
157 | 157 | } |
158 | 158 | } |
159 | 159 | |
160 | 160 | $formValues['return_module'] = $currentModule; |
161 | 161 | |
162 | - if($currentModule == 'Campaigns'){ |
|
162 | + if ($currentModule == 'Campaigns') { |
|
163 | 163 | $formValues['return_action'] = "DetailView"; |
164 | - }else{ |
|
164 | + } else { |
|
165 | 165 | $formValues['return_action'] = $defines['action']; |
166 | - if ( $formValues['return_action'] == 'SubPanelViewer' ) { |
|
166 | + if ($formValues['return_action'] == 'SubPanelViewer') { |
|
167 | 167 | $formValues['return_action'] = 'DetailView'; |
168 | 168 | } |
169 | 169 | } |
170 | 170 | |
171 | 171 | $formValues['return_id'] = $defines['focus']->id; |
172 | 172 | $formValues['return_relationship'] = $relationship_name; |
173 | - switch ( strtolower( $currentModule ) ) |
|
173 | + switch (strtolower($currentModule)) |
|
174 | 174 | { |
175 | 175 | case 'prospects' : |
176 | - $name = $defines['focus']->account_name ; |
|
177 | - break ; |
|
176 | + $name = $defines['focus']->account_name; |
|
177 | + break; |
|
178 | 178 | case 'documents' : |
179 | - $name = $defines['focus']->document_name ; |
|
180 | - break ; |
|
179 | + $name = $defines['focus']->document_name; |
|
180 | + break; |
|
181 | 181 | case 'kbdocuments' : |
182 | - $name = $defines['focus']->kbdocument_name ; |
|
183 | - break ; |
|
182 | + $name = $defines['focus']->kbdocument_name; |
|
183 | + break; |
|
184 | 184 | case 'leads' : |
185 | 185 | case 'contacts' : |
186 | - $name = $defines['focus']->first_name . " " .$defines['focus']->last_name ; |
|
187 | - break ; |
|
186 | + $name = $defines['focus']->first_name." ".$defines['focus']->last_name; |
|
187 | + break; |
|
188 | 188 | default : |
189 | 189 | $name = (isset($defines['focus']->name)) ? $defines['focus']->name : ""; |
190 | 190 | } |
191 | 191 | $formValues['return_name'] = $name; |
192 | 192 | |
193 | 193 | // TODO: move this out and get $additionalFormFields working properly |
194 | - if(empty($additionalFormFields['parent_type'])) |
|
194 | + if (empty($additionalFormFields['parent_type'])) |
|
195 | 195 | { |
196 | - if($defines['focus']->object_name=='Contact') { |
|
196 | + if ($defines['focus']->object_name == 'Contact') { |
|
197 | 197 | $additionalFormFields['parent_type'] = 'Accounts'; |
198 | 198 | } |
199 | 199 | else { |
200 | 200 | $additionalFormFields['parent_type'] = $defines['focus']->module_dir; |
201 | 201 | } |
202 | 202 | } |
203 | - if(empty($additionalFormFields['parent_name'])) |
|
203 | + if (empty($additionalFormFields['parent_name'])) |
|
204 | 204 | { |
205 | - if($defines['focus']->object_name=='Contact') { |
|
205 | + if ($defines['focus']->object_name == 'Contact') { |
|
206 | 206 | $additionalFormFields['parent_name'] = $defines['focus']->account_name; |
207 | 207 | $additionalFormFields['account_name'] = $defines['focus']->account_name; |
208 | 208 | } |
@@ -210,54 +210,54 @@ discard block |
||
210 | 210 | $additionalFormFields['parent_name'] = $defines['focus']->name; |
211 | 211 | } |
212 | 212 | } |
213 | - if(empty($additionalFormFields['parent_id'])) |
|
213 | + if (empty($additionalFormFields['parent_id'])) |
|
214 | 214 | { |
215 | - if($defines['focus']->object_name=='Contact') { |
|
215 | + if ($defines['focus']->object_name == 'Contact') { |
|
216 | 216 | $additionalFormFields['parent_id'] = $defines['focus']->account_id; |
217 | 217 | $additionalFormFields['account_id'] = $defines['focus']->account_id; |
218 | - } else if($defines['focus']->object_name=='Contract') { |
|
218 | + } else if ($defines['focus']->object_name == 'Contract') { |
|
219 | 219 | $additionalFormFields['contract_id'] = $defines['focus']->id; |
220 | 220 | } else { |
221 | 221 | $additionalFormFields['parent_id'] = $defines['focus']->id; |
222 | 222 | } |
223 | 223 | } |
224 | 224 | |
225 | - if ($defines['focus']->object_name=='Opportunity') { |
|
225 | + if ($defines['focus']->object_name == 'Opportunity') { |
|
226 | 226 | $additionalFormFields['account_id'] = $defines['focus']->account_id; |
227 | 227 | $additionalFormFields['account_name'] = $defines['focus']->account_name; |
228 | 228 | } |
229 | 229 | |
230 | - if (!empty($defines['child_module_name']) and $defines['child_module_name']=='Contacts' and !empty($defines['parent_bean_name']) and $defines['parent_bean_name']=='contact' ) { |
|
231 | - if (!empty($defines['focus']->id ) and !empty($defines['focus']->name)) { |
|
230 | + if (!empty($defines['child_module_name']) and $defines['child_module_name'] == 'Contacts' and !empty($defines['parent_bean_name']) and $defines['parent_bean_name'] == 'contact') { |
|
231 | + if (!empty($defines['focus']->id) and !empty($defines['focus']->name)) { |
|
232 | 232 | $formValues['reports_to_id'] = $defines['focus']->id; |
233 | 233 | $formValues['reports_to_name'] = $defines['focus']->name; |
234 | 234 | } |
235 | 235 | } |
236 | 236 | $formValues['action'] = "EditView"; |
237 | 237 | |
238 | - if ( $asUrl ) { |
|
238 | + if ($asUrl) { |
|
239 | 239 | $returnLink = ''; |
240 | - foreach($formValues as $key => $value ) { |
|
240 | + foreach ($formValues as $key => $value) { |
|
241 | 241 | $returnLink .= $key.'='.$value.'&'; |
242 | 242 | } |
243 | - foreach($additionalFormFields as $key => $value ) { |
|
243 | + foreach ($additionalFormFields as $key => $value) { |
|
244 | 244 | $returnLink .= $key.'='.$value.'&'; |
245 | 245 | } |
246 | - $returnLink = rtrim($returnLink,'&'); |
|
246 | + $returnLink = rtrim($returnLink, '&'); |
|
247 | 247 | |
248 | 248 | return $returnLink; |
249 | 249 | } else { |
250 | 250 | |
251 | - $form = 'form' . $relationship_name; |
|
252 | - $button = '<form action="index.php" method="post" name="form" id="' . $form . "\">\n"; |
|
253 | - foreach($formValues as $key => $value) { |
|
254 | - $button .= "<input type='hidden' name='" . $key . "' value='" . $value . "' />\n"; |
|
251 | + $form = 'form'.$relationship_name; |
|
252 | + $button = '<form action="index.php" method="post" name="form" id="'.$form."\">\n"; |
|
253 | + foreach ($formValues as $key => $value) { |
|
254 | + $button .= "<input type='hidden' name='".$key."' value='".$value."' />\n"; |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | // fill in additional form fields for all but action |
258 | - foreach($additionalFormFields as $key => $value) { |
|
259 | - if($key != 'action') { |
|
260 | - $button .= "<input type='hidden' name='" . $key . "' value='" . $value . "' />\n"; |
|
258 | + foreach ($additionalFormFields as $key => $value) { |
|
259 | + if ($key != 'action') { |
|
260 | + $button .= "<input type='hidden' name='".$key."' value='".$value."' />\n"; |
|
261 | 261 | } |
262 | 262 | } |
263 | 263 | |
@@ -269,18 +269,18 @@ discard block |
||
269 | 269 | /** This default function is used to create the HTML for a simple button */ |
270 | 270 | function display($defines, $additionalFormFields = null, $nonbutton = false) |
271 | 271 | { |
272 | - $temp=''; |
|
272 | + $temp = ''; |
|
273 | 273 | $inputID = $this->getWidgetId(); |
274 | 274 | |
275 | - if(!empty($this->acl) && ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], $this->acl, true)){ |
|
275 | + if (!empty($this->acl) && ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], $this->acl, true)) { |
|
276 | 276 | return $temp; |
277 | 277 | } |
278 | 278 | |
279 | 279 | global $app_strings; |
280 | 280 | |
281 | - if ( isset($_REQUEST['layout_def_key']) && $_REQUEST['layout_def_key'] == 'UserEAPM' ) { |
|
281 | + if (isset($_REQUEST['layout_def_key']) && $_REQUEST['layout_def_key'] == 'UserEAPM') { |
|
282 | 282 | // Subpanels generally don't go on the editview, so we have to handle this special |
283 | - $megaLink = $this->_get_form($defines, $additionalFormFields,true); |
|
283 | + $megaLink = $this->_get_form($defines, $additionalFormFields, true); |
|
284 | 284 | //$button = "<input title='$this->title' accesskey='$this->access_key' class='button' type='submit' name='$inputID' id='$inputID' value='$this->form_value' onclick='javascript:document.location=\"index.php?".$megaLink."\"; return false;'/>"; |
285 | 285 | } else { |
286 | 286 | $button = $this->_get_form($defines, $additionalFormFields); |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | */ |
311 | 311 | function get_subpanel_relationship_name($defines) { |
312 | 312 | $relationship_name = ''; |
313 | - if(!empty($defines)) { |
|
313 | + if (!empty($defines)) { |
|
314 | 314 | $relationship_name = isset($defines['module']) ? $defines['module'] : ''; |
315 | 315 | $dataSource = $defines['subpanel_definition']->get_data_source_name(true); |
316 | 316 | if (!empty($dataSource)) { |
@@ -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. |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | function displayList(&$layout_def) |
54 | 54 | { |
55 | - die("<pre>" . print_r($layout_def, true) . "</pre>"); |
|
55 | + die("<pre>".print_r($layout_def, true)."</pre>"); |
|
56 | 56 | |
57 | 57 | $rel = $layout_def['linked_field']; |
58 | 58 | $module = $layout_def['module']; |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | |
61 | 61 | global $app_strings; |
62 | 62 | |
63 | - $edit_icon_html = SugarThemeRegistry::current()->getImage( 'edit_inline', |
|
64 | - 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"'); |
|
63 | + $edit_icon_html = SugarThemeRegistry::current()->getImage('edit_inline', |
|
64 | + 'align="absmiddle" alt="'.$app_strings['LNK_EDIT'].'" border="0"'); |
|
65 | 65 | |
66 | 66 | $script = " |
67 | 67 | function editRel(name, id, module) { |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | return "<script>$script</script>" |
92 | 92 | . '<div onclick="editRel(\'p1_b1_accounts\', \'cac203f3-0380-495f-3231-4cf58f089f00\', \'Accounts\')">' |
93 | - . $edit_icon_html . "</div>"; |
|
93 | + . $edit_icon_html."</div>"; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | } |
@@ -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. |
@@ -56,13 +56,13 @@ discard block |
||
56 | 56 | |
57 | 57 | function display($defines, $additionalFormFields = NULL, $nonbutton = false) |
58 | 58 | { |
59 | - if((ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true) || |
|
60 | - $defines['module'] == "Activities" & !ACLController::checkAccess("Emails", 'edit', true))){ |
|
59 | + if ((ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true) || |
|
60 | + $defines['module'] == "Activities" & !ACLController::checkAccess("Emails", 'edit', true))) { |
|
61 | 61 | $temp = ''; |
62 | 62 | return $temp; |
63 | 63 | } |
64 | 64 | |
65 | - global $app_strings,$current_user,$sugar_config,$beanList,$beanFiles; |
|
65 | + global $app_strings, $current_user, $sugar_config, $beanList, $beanFiles; |
|
66 | 66 | $title = $app_strings['LBL_COMPOSE_EMAIL_BUTTON_TITLE']; |
67 | 67 | //$accesskey = $app_strings['LBL_COMPOSE_EMAIL_BUTTON_KEY']; |
68 | 68 | $value = $app_strings['LBL_COMPOSE_EMAIL_BUTTON_LABEL']; |
@@ -72,20 +72,20 @@ discard block |
||
72 | 72 | //martin Bug 19660 |
73 | 73 | $userPref = $current_user->getPreference('email_link_type'); |
74 | 74 | $defaultPref = $sugar_config['email_default_client']; |
75 | - if($userPref != '') { |
|
75 | + if ($userPref != '') { |
|
76 | 76 | $client = $userPref; |
77 | 77 | } else { |
78 | 78 | $client = $defaultPref; |
79 | 79 | } |
80 | - if($client != 'sugar') { |
|
80 | + if ($client != 'sugar') { |
|
81 | 81 | $bean = $defines['focus']; |
82 | 82 | // awu: Not all beans have emailAddress property, we must account for this |
83 | - if (isset($bean->emailAddress)){ |
|
83 | + if (isset($bean->emailAddress)) { |
|
84 | 84 | $to_addrs = $bean->emailAddress->getPrimaryAddress($bean); |
85 | - $button = "<input class='button' type='button' value='$value' id='". $this->getWidgetId() . "' name='".preg_replace('[ ]', '', $value)."' title='$title' onclick=\"location.href='mailto:$to_addrs';return false;\" />"; |
|
85 | + $button = "<input class='button' type='button' value='$value' id='".$this->getWidgetId()."' name='".preg_replace('[ ]', '', $value)."' title='$title' onclick=\"location.href='mailto:$to_addrs';return false;\" />"; |
|
86 | 86 | } |
87 | - else{ |
|
88 | - $button = "<input class='button' type='button' value='$value' id='". $this->getWidgetId() ."' name='".preg_replace('[ ]', '', $value)."' title='$title' onclick=\"location.href='mailto:';return false;\" />"; |
|
87 | + else { |
|
88 | + $button = "<input class='button' type='button' value='$value' id='".$this->getWidgetId()."' name='".preg_replace('[ ]', '', $value)."' title='$title' onclick=\"location.href='mailto:';return false;\" />"; |
|
89 | 89 | } |
90 | 90 | } else { |
91 | 91 | //Generate the compose package for the quick create options. |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $eUi = new EmailUI(); |
95 | 95 | $j_quickComposeOptions = $eUi->generateComposePackageForQuickCreate($composeData, http_build_query($composeData), false, $defines['focus']); |
96 | 96 | |
97 | - $button = "<input title='$title' id='". $this->getWidgetId()."' onclick='SUGAR.quickCompose.init($j_quickComposeOptions);' class='button' type='submit' name='".preg_replace('[ ]', '', $value)."_button' value='$value' />"; |
|
97 | + $button = "<input title='$title' id='".$this->getWidgetId()."' onclick='SUGAR.quickCompose.init($j_quickComposeOptions);' class='button' type='submit' name='".preg_replace('[ ]', '', $value)."_button' value='$value' />"; |
|
98 | 98 | } |
99 | 99 | return $button; |
100 | 100 | } |
@@ -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. |
@@ -50,15 +50,15 @@ discard block |
||
50 | 50 | global $app_strings; |
51 | 51 | global $currentModule; |
52 | 52 | |
53 | - $this->module="Calls"; |
|
53 | + $this->module = "Calls"; |
|
54 | 54 | $this->subpanelDiv = "activities"; |
55 | 55 | |
56 | 56 | // Create the additional form fields with real values if they were not passed in |
57 | - if(empty($additionalFormFields) && $this->additional_form_fields) |
|
57 | + if (empty($additionalFormFields) && $this->additional_form_fields) |
|
58 | 58 | { |
59 | - foreach($this->additional_form_fields as $key=>$value) |
|
59 | + foreach ($this->additional_form_fields as $key=>$value) |
|
60 | 60 | { |
61 | - if(!empty($defines['focus']->$value)) |
|
61 | + if (!empty($defines['focus']->$value)) |
|
62 | 62 | { |
63 | 63 | $additionalFormFields[$key] = $defines['focus']->$value; |
64 | 64 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
72 | - if(!empty($this->module)) |
|
72 | + if (!empty($this->module)) |
|
73 | 73 | { |
74 | 74 | $defines['child_module_name'] = $this->module; |
75 | 75 | } |
@@ -78,45 +78,45 @@ discard block |
||
78 | 78 | $defines['child_module_name'] = $defines['module']; |
79 | 79 | } |
80 | 80 | |
81 | - if(!empty($this->subpanelDiv)) |
|
81 | + if (!empty($this->subpanelDiv)) |
|
82 | 82 | { |
83 | 83 | $defines['subpanelDiv'] = $this->subpanelDiv; |
84 | 84 | } |
85 | 85 | |
86 | - $defines['parent_bean_name'] = get_class( $defines['focus']); |
|
86 | + $defines['parent_bean_name'] = get_class($defines['focus']); |
|
87 | 87 | |
88 | - $form = 'form' . $defines['child_module_name']; |
|
89 | - $button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_' . strtolower($defines['subpanelDiv']) . '\', \'' . addslashes($app_strings['LBL_LOADING']) . '\');" action="index.php" method="post" name="form" id="form' . $form . "\">\n"; |
|
88 | + $form = 'form'.$defines['child_module_name']; |
|
89 | + $button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_'.strtolower($defines['subpanelDiv']).'\', \''.addslashes($app_strings['LBL_LOADING']).'\');" action="index.php" method="post" name="form" id="form'.$form."\">\n"; |
|
90 | 90 | |
91 | 91 | //module_button is used to override the value of module name |
92 | 92 | $button .= "<input type='hidden' name='target_module' value='".$defines['child_module_name']."'>\n"; |
93 | 93 | $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_id' value='".$defines['focus']->id."'>\n"; |
94 | 94 | |
95 | - if(isset($defines['focus']->name)) |
|
95 | + if (isset($defines['focus']->name)) |
|
96 | 96 | { |
97 | 97 | $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_name' value='".$defines['focus']->name."'>"; |
98 | 98 | } |
99 | 99 | |
100 | 100 | $button .= '<input type="hidden" name="to_pdf" value="true" />'; |
101 | 101 | $button .= '<input type="hidden" name="tpl" value="QuickCreate.tpl" />'; |
102 | - $button .= '<input type="hidden" name="return_module" value="' . $currentModule . "\" />\n"; |
|
103 | - $button .= '<input type="hidden" name="return_action" value="' . $defines['action'] . "\" />\n"; |
|
104 | - $button .= '<input type="hidden" name="return_id" value="' . $defines['focus']->id . "\" />\n"; |
|
102 | + $button .= '<input type="hidden" name="return_module" value="'.$currentModule."\" />\n"; |
|
103 | + $button .= '<input type="hidden" name="return_action" value="'.$defines['action']."\" />\n"; |
|
104 | + $button .= '<input type="hidden" name="return_id" value="'.$defines['focus']->id."\" />\n"; |
|
105 | 105 | $button .= '<input type="hidden" name="record" value="" />'; |
106 | 106 | |
107 | 107 | // TODO: move this out and get $additionalFormFields working properly |
108 | - if(empty($additionalFormFields['parent_type'])) |
|
108 | + if (empty($additionalFormFields['parent_type'])) |
|
109 | 109 | { |
110 | - if($defines['focus']->object_name=='Contact') { |
|
110 | + if ($defines['focus']->object_name == 'Contact') { |
|
111 | 111 | $additionalFormFields['parent_type'] = 'Accounts'; |
112 | 112 | } |
113 | 113 | else { |
114 | 114 | $additionalFormFields['parent_type'] = $defines['focus']->module_dir; |
115 | 115 | } |
116 | 116 | } |
117 | - if(empty($additionalFormFields['parent_name'])) |
|
117 | + if (empty($additionalFormFields['parent_name'])) |
|
118 | 118 | { |
119 | - if($defines['focus']->object_name=='Contact') { |
|
119 | + if ($defines['focus']->object_name == 'Contact') { |
|
120 | 120 | $additionalFormFields['parent_name'] = $defines['focus']->account_name; |
121 | 121 | $additionalFormFields['account_name'] = $defines['focus']->account_name; |
122 | 122 | } |
@@ -124,9 +124,9 @@ discard block |
||
124 | 124 | $additionalFormFields['parent_name'] = $defines['focus']->name; |
125 | 125 | } |
126 | 126 | } |
127 | - if(empty($additionalFormFields['parent_id'])) |
|
127 | + if (empty($additionalFormFields['parent_id'])) |
|
128 | 128 | { |
129 | - if($defines['focus']->object_name=='Contact') { |
|
129 | + if ($defines['focus']->object_name == 'Contact') { |
|
130 | 130 | $additionalFormFields['parent_id'] = $defines['focus']->account_id; |
131 | 131 | $additionalFormFields['account_id'] = $defines['focus']->account_id; |
132 | 132 | } |
@@ -135,16 +135,16 @@ discard block |
||
135 | 135 | } |
136 | 136 | } |
137 | 137 | |
138 | - $button .= '<input type="hidden" name="action" value="SubpanelCreates" />' . "\n"; |
|
139 | - $button .= '<input type="hidden" name="module" value="Home" />' . "\n"; |
|
140 | - $button .= '<input type="hidden" name="target_action" value="QuickCreate" />' . "\n"; |
|
138 | + $button .= '<input type="hidden" name="action" value="SubpanelCreates" />'."\n"; |
|
139 | + $button .= '<input type="hidden" name="module" value="Home" />'."\n"; |
|
140 | + $button .= '<input type="hidden" name="target_action" value="QuickCreate" />'."\n"; |
|
141 | 141 | |
142 | 142 | // fill in additional form fields for all but action |
143 | - foreach($additionalFormFields as $key => $value) |
|
143 | + foreach ($additionalFormFields as $key => $value) |
|
144 | 144 | { |
145 | - if($key != 'action') |
|
145 | + if ($key != 'action') |
|
146 | 146 | { |
147 | - $button .= '<input type="hidden" name="' . $key . '" value="' . $value . '" />' . "\n"; |
|
147 | + $button .= '<input type="hidden" name="'.$key.'" value="'.$value.'" />'."\n"; |
|
148 | 148 | } |
149 | 149 | } |
150 | 150 | $button .= getVersionedScript('include/SugarFields/Fields/Datetimecombo/Datetimecombo.js')."\n"; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | function display($defines, $additionalFormFields = null, $nonbutton = false) |
155 | 155 | { |
156 | 156 | $focus = new Call; |
157 | - if ( !$focus->ACLAccess('EditView') ) { |
|
157 | + if (!$focus->ACLAccess('EditView')) { |
|
158 | 158 | return ''; |
159 | 159 | } |
160 | 160 |
@@ -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. |
@@ -53,11 +53,11 @@ discard block |
||
53 | 53 | global $currentModule; |
54 | 54 | |
55 | 55 | // Create the additional form fields with real values if they were not passed in |
56 | - if(empty($additionalFormFields) && $this->additional_form_fields) |
|
56 | + if (empty($additionalFormFields) && $this->additional_form_fields) |
|
57 | 57 | { |
58 | - foreach($this->additional_form_fields as $key=>$value) |
|
58 | + foreach ($this->additional_form_fields as $key=>$value) |
|
59 | 59 | { |
60 | - if(!empty($defines['focus']->$value)) |
|
60 | + if (!empty($defines['focus']->$value)) |
|
61 | 61 | { |
62 | 62 | $additionalFormFields[$key] = $defines['focus']->$value; |
63 | 63 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
71 | - if(!empty($this->module)) |
|
71 | + if (!empty($this->module)) |
|
72 | 72 | { |
73 | 73 | $defines['child_module_name'] = $this->module; |
74 | 74 | } |
@@ -77,26 +77,26 @@ discard block |
||
77 | 77 | $defines['child_module_name'] = $defines['module']; |
78 | 78 | } |
79 | 79 | |
80 | - $defines['parent_bean_name'] = get_class( $defines['focus']); |
|
80 | + $defines['parent_bean_name'] = get_class($defines['focus']); |
|
81 | 81 | |
82 | 82 | $relationship_name = $this->get_subpanel_relationship_name($defines); |
83 | 83 | |
84 | - $form = 'form' . $relationship_name; |
|
85 | - $button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_' . $defines['subpanel_definition']->name . '\', \'' . addslashes($app_strings['LBL_LOADING']) . '\');" action="index.php" method="post" name="form" id="form' . $form . "\">\n"; |
|
84 | + $form = 'form'.$relationship_name; |
|
85 | + $button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_'.$defines['subpanel_definition']->name.'\', \''.addslashes($app_strings['LBL_LOADING']).'\');" action="index.php" method="post" name="form" id="form'.$form."\">\n"; |
|
86 | 86 | |
87 | 87 | //module_button is used to override the value of module name |
88 | 88 | $button .= "<input type='hidden' name='target_module' value='".$defines['child_module_name']."'>\n"; |
89 | 89 | $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_id' value='".$defines['focus']->id."'>\n"; |
90 | 90 | |
91 | - if(isset($defines['focus']->name)) |
|
91 | + if (isset($defines['focus']->name)) |
|
92 | 92 | { |
93 | 93 | $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_name' value='".$defines['focus']->name."'>"; |
94 | 94 | #26451,add these fields for custom one-to-many relate field. |
95 | - if(!empty($defines['child_module_name'])){ |
|
96 | - $button .= "<input type='hidden' name='". $relationship_name ."_name' value='".$defines['focus']->name."'>"; |
|
95 | + if (!empty($defines['child_module_name'])) { |
|
96 | + $button .= "<input type='hidden' name='".$relationship_name."_name' value='".$defines['focus']->name."'>"; |
|
97 | 97 | $childFocusName = !empty($GLOBALS['beanList'][$defines['child_module_name']]) ? $GLOBALS['beanList'][$defines['child_module_name']] : ""; |
98 | - if(!empty($GLOBALS['dictionary'][ $childFocusName ]["fields"][$relationship_name .'_name']['id_name'])){ |
|
99 | - $button .= "<input type='hidden' name='". $GLOBALS['dictionary'][ $childFocusName ]["fields"][$relationship_name .'_name']['id_name'] ."' value='".$defines['focus']->id."'>"; |
|
98 | + if (!empty($GLOBALS['dictionary'][$childFocusName]["fields"][$relationship_name.'_name']['id_name'])) { |
|
99 | + $button .= "<input type='hidden' name='".$GLOBALS['dictionary'][$childFocusName]["fields"][$relationship_name.'_name']['id_name']."' value='".$defines['focus']->id."'>"; |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
@@ -104,29 +104,29 @@ discard block |
||
104 | 104 | $additionalFormFields['return_name'] = $defines['focus']->name; |
105 | 105 | } |
106 | 106 | |
107 | - if(!empty($defines['view'])) |
|
108 | - $button .= '<input type="hidden" name="target_view" value="'. $defines['view'] . '" />'; |
|
107 | + if (!empty($defines['view'])) |
|
108 | + $button .= '<input type="hidden" name="target_view" value="'.$defines['view'].'" />'; |
|
109 | 109 | $button .= '<input type="hidden" name="to_pdf" value="true" />'; |
110 | 110 | $button .= '<input type="hidden" name="tpl" value="QuickCreate.tpl" />'; |
111 | - $button .= '<input type="hidden" name="return_module" value="' . $currentModule . "\" />\n"; |
|
112 | - $button .= '<input type="hidden" name="return_action" value="' . $defines['action'] . "\" />\n"; |
|
113 | - $button .= '<input type="hidden" name="return_id" value="' . $defines['focus']->id . "\" />\n"; |
|
114 | - $button .= '<input type="hidden" name="return_relationship" value="' . $relationship_name . "\" />\n"; |
|
111 | + $button .= '<input type="hidden" name="return_module" value="'.$currentModule."\" />\n"; |
|
112 | + $button .= '<input type="hidden" name="return_action" value="'.$defines['action']."\" />\n"; |
|
113 | + $button .= '<input type="hidden" name="return_id" value="'.$defines['focus']->id."\" />\n"; |
|
114 | + $button .= '<input type="hidden" name="return_relationship" value="'.$relationship_name."\" />\n"; |
|
115 | 115 | $button .= '<input type="hidden" name="record" value="" />'; |
116 | 116 | |
117 | 117 | // TODO: move this out and get $additionalFormFields working properly |
118 | - if(empty($additionalFormFields['parent_type'])) |
|
118 | + if (empty($additionalFormFields['parent_type'])) |
|
119 | 119 | { |
120 | - if($defines['focus']->object_name=='Contact') { |
|
120 | + if ($defines['focus']->object_name == 'Contact') { |
|
121 | 121 | $additionalFormFields['parent_type'] = 'Accounts'; |
122 | 122 | } |
123 | 123 | else { |
124 | 124 | $additionalFormFields['parent_type'] = $defines['focus']->module_dir; |
125 | 125 | } |
126 | 126 | } |
127 | - if(empty($additionalFormFields['parent_name'])) |
|
127 | + if (empty($additionalFormFields['parent_name'])) |
|
128 | 128 | { |
129 | - if($defines['focus']->object_name=='Contact') { |
|
129 | + if ($defines['focus']->object_name == 'Contact') { |
|
130 | 130 | $additionalFormFields['parent_name'] = $defines['focus']->account_name; |
131 | 131 | $additionalFormFields['account_name'] = $defines['focus']->account_name; |
132 | 132 | } |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | $additionalFormFields['parent_name'] = $defines['focus']->name; |
135 | 135 | } |
136 | 136 | } |
137 | - if(empty($additionalFormFields['parent_id'])) |
|
137 | + if (empty($additionalFormFields['parent_id'])) |
|
138 | 138 | { |
139 | - if($defines['focus']->object_name=='Contact') { |
|
139 | + if ($defines['focus']->object_name == 'Contact') { |
|
140 | 140 | $additionalFormFields['parent_id'] = $defines['focus']->account_id; |
141 | 141 | $additionalFormFields['account_id'] = $defines['focus']->account_id; |
142 | 142 | } |
@@ -145,32 +145,32 @@ discard block |
||
145 | 145 | } |
146 | 146 | } |
147 | 147 | |
148 | - if(strtolower($defines['child_module_name']) =='contracts') { |
|
148 | + if (strtolower($defines['child_module_name']) == 'contracts') { |
|
149 | 149 | //set variables to account name, or parent account name |
150 | - if(strtolower($defines['parent_bean_name']) == 'account' ){ |
|
150 | + if (strtolower($defines['parent_bean_name']) == 'account') { |
|
151 | 151 | //if account is parent bean, then get focus id/focus name |
152 | - if(isset($defines['focus']->id))$additionalFormFields['account_id'] = $defines['focus']->id; |
|
153 | - if(isset($defines['focus']->name))$additionalFormFields['account_name'] = $defines['focus']->name; |
|
154 | - }elseif(strtolower($defines['parent_bean_name']) == 'quote' ){ |
|
152 | + if (isset($defines['focus']->id))$additionalFormFields['account_id'] = $defines['focus']->id; |
|
153 | + if (isset($defines['focus']->name))$additionalFormFields['account_name'] = $defines['focus']->name; |
|
154 | + }elseif (strtolower($defines['parent_bean_name']) == 'quote') { |
|
155 | 155 | //if quote is parent bean, then get billing_account_id/billing_account_name |
156 | - if(isset($defines['focus']->billing_account_id))$additionalFormFields['account_id'] = $defines['focus']->billing_account_id; |
|
157 | - if(isset($defines['focus']->billing_account_name))$additionalFormFields['account_name'] = $defines['focus']->billing_account_name; |
|
158 | - }else{ |
|
159 | - if(isset($defines['focus']->account_id))$additionalFormFields['account_id'] = $defines['focus']->account_id; |
|
160 | - if(isset($defines['focus']->account_name))$additionalFormFields['account_name'] = $defines['focus']->account_name; |
|
156 | + if (isset($defines['focus']->billing_account_id))$additionalFormFields['account_id'] = $defines['focus']->billing_account_id; |
|
157 | + if (isset($defines['focus']->billing_account_name))$additionalFormFields['account_name'] = $defines['focus']->billing_account_name; |
|
158 | + } else { |
|
159 | + if (isset($defines['focus']->account_id))$additionalFormFields['account_id'] = $defines['focus']->account_id; |
|
160 | + if (isset($defines['focus']->account_name))$additionalFormFields['account_name'] = $defines['focus']->account_name; |
|
161 | 161 | } |
162 | 162 | } |
163 | 163 | |
164 | - $button .= '<input type="hidden" name="action" value="SubpanelCreates" />' . "\n"; |
|
165 | - $button .= '<input type="hidden" name="module" value="Home" />' . "\n"; |
|
166 | - $button .= '<input type="hidden" name="target_action" value="QuickCreate" />' . "\n"; |
|
164 | + $button .= '<input type="hidden" name="action" value="SubpanelCreates" />'."\n"; |
|
165 | + $button .= '<input type="hidden" name="module" value="Home" />'."\n"; |
|
166 | + $button .= '<input type="hidden" name="target_action" value="QuickCreate" />'."\n"; |
|
167 | 167 | |
168 | 168 | // fill in additional form fields for all but action |
169 | - foreach($additionalFormFields as $key => $value) |
|
169 | + foreach ($additionalFormFields as $key => $value) |
|
170 | 170 | { |
171 | - if($key != 'action') |
|
171 | + if ($key != 'action') |
|
172 | 172 | { |
173 | - $button .= '<input type="hidden" name="' . $key . '" value=\'' . $value . '\' />' . "\n"; |
|
173 | + $button .= '<input type="hidden" name="'.$key.'" value=\''.$value.'\' />'."\n"; |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | */ |
185 | 185 | function get_subpanel_relationship_name($defines) { |
186 | 186 | $relationship_name = ''; |
187 | - if(!empty($defines)) { |
|
187 | + if (!empty($defines)) { |
|
188 | 188 | $relationship_name = isset($defines['module']) ? $defines['module'] : ''; |
189 | 189 | $dataSource = $defines['subpanel_definition']->get_data_source_name(true); |
190 | 190 | if (!empty($dataSource)) { |
@@ -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. |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | function queryFilterBetween(&$layout_def) |
72 | 72 | { |
73 | - return $this->_get_column_select($layout_def)." BETWEEN '".$GLOBALS['db']->quote($layout_def['input_name0']). "' AND '" . $GLOBALS['db']->quote($layout_def['input_name1']) . "'\n"; |
|
73 | + return $this->_get_column_select($layout_def)." BETWEEN '".$GLOBALS['db']->quote($layout_def['input_name0'])."' AND '".$GLOBALS['db']->quote($layout_def['input_name1'])."'\n"; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | function queryFilterStarts_With(&$layout_def) |
@@ -80,17 +80,17 @@ discard block |
||
80 | 80 | |
81 | 81 | function displayInput(&$layout_def) |
82 | 82 | { |
83 | - return '<input type="text" size="20" value="' . $layout_def['input_name0'] . '" name="' . $layout_def['name'] . '">'; |
|
83 | + return '<input type="text" size="20" value="'.$layout_def['input_name0'].'" name="'.$layout_def['name'].'">'; |
|
84 | 84 | |
85 | 85 | } |
86 | 86 | |
87 | 87 | function display($layout_def) |
88 | 88 | { |
89 | 89 | //Bug40995 |
90 | - if(isset($obj->layout_manager->defs['reporter']->focus->field_name_map[$layout_def['name']]['precision'])) |
|
90 | + if (isset($obj->layout_manager->defs['reporter']->focus->field_name_map[$layout_def['name']]['precision'])) |
|
91 | 91 | { |
92 | - $precision=$obj->layout_manager->defs['reporter']->focus->field_name_map[$layout_def['name']]['precision']; |
|
93 | - $layout_def['precision']=$precision; |
|
92 | + $precision = $obj->layout_manager->defs['reporter']->focus->field_name_map[$layout_def['name']]['precision']; |
|
93 | + $layout_def['precision'] = $precision; |
|
94 | 94 | } |
95 | 95 | //Bug40995 |
96 | 96 | return parent::display($layout_def); |
@@ -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. |
@@ -65,17 +65,17 @@ discard block |
||
65 | 65 | $module_name = 'Activities'; |
66 | 66 | $id = $widget_data['focus']->id; |
67 | 67 | $initial_filter = "&record=$id&module_name=$currentModule"; |
68 | - if(ACLController::moduleSupportsACL($widget_data['module']) && !ACLController::checkAccess($widget_data['module'], 'detail', true)){ |
|
69 | - $temp = '<input disabled type="button" name="summary_button" id="summary_button"' |
|
68 | + if (ACLController::moduleSupportsACL($widget_data['module']) && !ACLController::checkAccess($widget_data['module'], 'detail', true)) { |
|
69 | + $temp = '<input disabled type="button" name="summary_button" id="summary_button"' |
|
70 | 70 | . ' class="button"' |
71 | - . ' title="' . $title . '"' |
|
72 | - . ' value="' . $value . '"'; |
|
71 | + . ' title="'.$title.'"' |
|
72 | + . ' value="'.$value.'"'; |
|
73 | 73 | return $temp; |
74 | 74 | } |
75 | 75 | return '<input type="button" name="summary_button" id="summary_button"' |
76 | 76 | . ' class="button"' |
77 | - . ' title="' . $title . '"' |
|
78 | - . ' value="' . $value . '"' |
|
77 | + . ' title="'.$title.'"' |
|
78 | + . ' value="'.$value.'"' |
|
79 | 79 | . " onclick='open_popup(\"$module_name\",600,400,\"$initial_filter\",false,false,$json_encoded_php_array);' />\n"; |
80 | 80 | } |
81 | 81 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) |
|
3 | 3 | die('Not A Valid Entry Point'); |
4 | 4 | /********************************************************************************* |
5 | 5 | * SugarCRM Community Edition is a customer relationship management program developed by |
@@ -56,14 +56,14 @@ discard block |
||
56 | 56 | $func_name = 'display'.$context; |
57 | 57 | |
58 | 58 | if (!empty ($context) && method_exists($this, $func_name)) { |
59 | - return $this-> $func_name ($layout_def); |
|
59 | + return $this-> $func_name($layout_def); |
|
60 | 60 | } else { |
61 | 61 | return 'display not found:'.$func_name; |
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | 65 | function _get_column_alias($layout_def) { |
66 | - $alias_arr = array (); |
|
66 | + $alias_arr = array(); |
|
67 | 67 | |
68 | 68 | if (!empty ($layout_def['name']) && $layout_def['name'] == 'count') { |
69 | 69 | return 'count'; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $header_cell_text = $this->displayHeaderCellPlain($layout_def); |
120 | 120 | |
121 | 121 | $subpanel_module = $layout_def['subpanel_module']; |
122 | - $html_var = $subpanel_module . "_CELL"; |
|
122 | + $html_var = $subpanel_module."_CELL"; |
|
123 | 123 | if (empty ($this->base_URL)) { |
124 | 124 | $objListView = new ListView(); |
125 | 125 | $this->base_URL = $objListView -> getBaseURL($html_var); |
@@ -159,9 +159,9 @@ discard block |
||
159 | 159 | } |
160 | 160 | |
161 | 161 | function displayListPlain($layout_def) { |
162 | - $value= $this->_get_list_value($layout_def); |
|
163 | - if (isset($layout_def['widget_type']) && $layout_def['widget_type'] =='checkbox') { |
|
164 | - if ($value != '' && ($value == 'on' || intval($value) == 1 || $value == 'yes')) |
|
162 | + $value = $this->_get_list_value($layout_def); |
|
163 | + if (isset($layout_def['widget_type']) && $layout_def['widget_type'] == 'checkbox') { |
|
164 | + if ($value != '' && ($value == 'on' || intval($value) == 1 || $value == 'yes')) |
|
165 | 165 | { |
166 | 166 | return "<input name='checkbox_display' class='checkbox' type='checkbox' disabled='true' checked>"; |
167 | 167 | } |
@@ -173,14 +173,14 @@ discard block |
||
173 | 173 | function _get_list_value(& $layout_def) |
174 | 174 | { |
175 | 175 | $key = ''; |
176 | - if ( isset($layout_def['varname']) ) { |
|
176 | + if (isset($layout_def['varname'])) { |
|
177 | 177 | $key = strtoupper($layout_def['varname']); |
178 | 178 | } |
179 | 179 | else { |
180 | 180 | $key = strtoupper($this->_get_column_alias($layout_def)); |
181 | 181 | } |
182 | 182 | |
183 | - if ( isset($layout_def['fields'][$key]) ) { |
|
183 | + if (isset($layout_def['fields'][$key])) { |
|
184 | 184 | return $layout_def['fields'][$key]; |
185 | 185 | } |
186 | 186 | |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $myName = $layout_def['column_key']; |
212 | 212 | $vardef = $this->layout_manager->defs['reporter']->all_fields[$myName]; |
213 | 213 | |
214 | - if ( !isset($vardef) ) { |
|
214 | + if (!isset($vardef)) { |
|
215 | 215 | // No vardef, return an empty array |
216 | 216 | return array(); |
217 | 217 | } else { |