Completed
Push — master ( 24ce66...da2f36 )
by Adam
25:35
created
modules/Opportunities/OpportunityFormBase.php 3 patches
Indentation   +129 added lines, -129 removed lines patch added patch discarded remove patch
@@ -45,97 +45,97 @@  discard block
 block discarded – undo
45 45
 
46 46
 
47 47
 function checkForDuplicates($prefix){
48
-	require_once('include/formbase.php');
48
+    require_once('include/formbase.php');
49 49
 	
50
-	$focus = new Opportunity();
51
-	$query = '';
52
-	$baseQuery = 'select id, name, sales_stage,amount, date_closed  from opportunities where deleted!=1 and (';
53
-
54
-	if(isset($_POST[$prefix.'name']) && !empty($_POST[$prefix.'name'])){
55
-		$query = $baseQuery ."  name like '%".$_POST[$prefix.'name']."%'";
56
-		$query .= getLikeForEachWord('name', $_POST[$prefix.'name']);
57
-	}
58
-
59
-	if(!empty($query)){
60
-		$rows = array();
61
-		global $db;
62
-		$result = $db->query($query.')');
63
-		$i=-1;
64
-		while(($row=$db->fetchByAssoc($result)) != null) {
65
-			$i++;
66
-			$rows[$i] = $row;
67
-		}
68
-		if ($i==-1) return null;
50
+    $focus = new Opportunity();
51
+    $query = '';
52
+    $baseQuery = 'select id, name, sales_stage,amount, date_closed  from opportunities where deleted!=1 and (';
53
+
54
+    if(isset($_POST[$prefix.'name']) && !empty($_POST[$prefix.'name'])){
55
+        $query = $baseQuery ."  name like '%".$_POST[$prefix.'name']."%'";
56
+        $query .= getLikeForEachWord('name', $_POST[$prefix.'name']);
57
+    }
58
+
59
+    if(!empty($query)){
60
+        $rows = array();
61
+        global $db;
62
+        $result = $db->query($query.')');
63
+        $i=-1;
64
+        while(($row=$db->fetchByAssoc($result)) != null) {
65
+            $i++;
66
+            $rows[$i] = $row;
67
+        }
68
+        if ($i==-1) return null;
69 69
 		
70
-		return $rows;		
71
-	}
72
-	return null;
70
+        return $rows;		
71
+    }
72
+    return null;
73 73
 }
74 74
 
75 75
 
76 76
 function buildTableForm($rows, $mod='Opportunities'){
77
-	if(!empty($mod)){
78
-	global $current_language;
79
-	$mod_strings = return_module_language($current_language, $mod);
80
-	}else global $mod_strings;
81
-	global $app_strings;
82
-	$cols = sizeof($rows[0]) * 2 + 1;
83
-	$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>';
84
-
85
-	$form .= "<form action='index.php' method='post' name='dupOpps'><input type='hidden' name='selectedOpportunity' value=''>";
86
-	$form .= "<table width='100%' cellpadding='0' cellspacing='0' class='list view'>";
87
-	$form .= "<tr class='pagination'><td colspan='$cols'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td><input type='submit' class='button' name='ContinueOpportunity' value='${mod_strings['LNK_NEW_OPPORTUNITY']}'></td></tr></table></td></tr><tr>";
88
-	$form .= "<tr><td scope='col'>&nbsp;</td>";
77
+    if(!empty($mod)){
78
+    global $current_language;
79
+    $mod_strings = return_module_language($current_language, $mod);
80
+    }else global $mod_strings;
81
+    global $app_strings;
82
+    $cols = sizeof($rows[0]) * 2 + 1;
83
+    $form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>';
84
+
85
+    $form .= "<form action='index.php' method='post' name='dupOpps'><input type='hidden' name='selectedOpportunity' value=''>";
86
+    $form .= "<table width='100%' cellpadding='0' cellspacing='0' class='list view'>";
87
+    $form .= "<tr class='pagination'><td colspan='$cols'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td><input type='submit' class='button' name='ContinueOpportunity' value='${mod_strings['LNK_NEW_OPPORTUNITY']}'></td></tr></table></td></tr><tr>";
88
+    $form .= "<tr><td scope='col'>&nbsp;</td>";
89 89
     require_once('include/formbase.php');
90
-	$form .= getPostToForm();
91
-	if(isset($rows[0])){
92
-		foreach ($rows[0] as $key=>$value){
93
-			if($key != 'id'){
94
-					$form .= "<td scope='col'>". $mod_strings[$mod_strings['db_'.$key]]. "</td>";
95
-		}}
96
-		$form .= "</tr>";
97
-	}
98
-
99
-	$rowColor = 'oddListRowS1';
100
-	foreach($rows as $row){
101
-
102
-		$form .= "<tr class='$rowColor'>";
103
-
104
-		$form .= "<td width='1%' nowrap='nowrap'><a href='#' onclick='document.dupOpps.selectedOpportunity.value=\"${row['id']}\";document.dupOpps.submit();'>[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a>&nbsp;&nbsp;</td>";
105
-		$wasSet = false;
106
-		foreach ($row as $key=>$value){
107
-				if($key != 'id'){
108
-					if(!$wasSet){
109
-					$form .= "<td scope='row'><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>";
110
-					$wasSet = true;
111
-					}else{
112
-					$form .= "<td><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>";
113
-					}
114
-				}}
115
-
116
-		if($rowColor == 'evenListRowS1'){
117
-			$rowColor = 'oddListRowS1';
118
-		}else{
119
-			 $rowColor = 'evenListRowS1';
120
-		}
121
-		$form .= "</tr>";
122
-	}
90
+    $form .= getPostToForm();
91
+    if(isset($rows[0])){
92
+        foreach ($rows[0] as $key=>$value){
93
+            if($key != 'id'){
94
+                    $form .= "<td scope='col'>". $mod_strings[$mod_strings['db_'.$key]]. "</td>";
95
+        }}
96
+        $form .= "</tr>";
97
+    }
98
+
99
+    $rowColor = 'oddListRowS1';
100
+    foreach($rows as $row){
101
+
102
+        $form .= "<tr class='$rowColor'>";
103
+
104
+        $form .= "<td width='1%' nowrap='nowrap'><a href='#' onclick='document.dupOpps.selectedOpportunity.value=\"${row['id']}\";document.dupOpps.submit();'>[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a>&nbsp;&nbsp;</td>";
105
+        $wasSet = false;
106
+        foreach ($row as $key=>$value){
107
+                if($key != 'id'){
108
+                    if(!$wasSet){
109
+                    $form .= "<td scope='row'><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>";
110
+                    $wasSet = true;
111
+                    }else{
112
+                    $form .= "<td><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>";
113
+                    }
114
+                }}
115
+
116
+        if($rowColor == 'evenListRowS1'){
117
+            $rowColor = 'oddListRowS1';
118
+        }else{
119
+                $rowColor = 'evenListRowS1';
120
+        }
121
+        $form .= "</tr>";
122
+    }
123 123
     $form .= "<tr class='pagination'><td colspan='$cols'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td><input type='submit' class='button' name='ContinueOpportunity' value='${mod_strings['LNK_NEW_OPPORTUNITY']}'></td></tr></table></td></tr><tr>";
124
-	$form .= "</table><BR></form>";
124
+    $form .= "</table><BR></form>";
125 125
 
126
-	return $form;
126
+    return $form;
127 127
 
128 128
 
129 129
 
130 130
 }
131 131
 
132 132
 function getForm($prefix, $mod='Opportunities'){
133
-	if(!ACLController::checkAccess('Opportunities', 'edit', true)){
134
-		return '';
135
-	}
133
+    if(!ACLController::checkAccess('Opportunities', 'edit', true)){
134
+        return '';
135
+    }
136 136
 if(!empty($mod)){
137
-	global $current_language;
138
-	$mod_strings = return_module_language($current_language, $mod);
137
+    global $current_language;
138
+    $mod_strings = return_module_language($current_language, $mod);
139 139
 }else global $mod_strings;
140 140
 global $app_strings;
141 141
 global $sugar_version, $sugar_config;
@@ -165,18 +165,18 @@  discard block
 block discarded – undo
165 165
 }
166 166
 
167 167
 function getWideFormBody($prefix, $mod='Opportunities', $formname='', $lead='', $showaccount = true){
168
-	if(!ACLController::checkAccess('Opportunities', 'edit', true)){
169
-		return '';
170
-	}
171
-	if(empty($lead)){
172
-		$lead = new Lead();
173
-	}
168
+    if(!ACLController::checkAccess('Opportunities', 'edit', true)){
169
+        return '';
170
+    }
171
+    if(empty($lead)){
172
+        $lead = new Lead();
173
+    }
174 174
 global $mod_strings, $sugar_config;
175 175
 $showaccount = $showaccount && $sugar_config['require_accounts'];
176 176
 $temp_strings = $mod_strings;
177 177
 if(!empty($mod)){
178
-	global $current_language;
179
-	$mod_strings = return_module_language($current_language, $mod);
178
+    global $current_language;
179
+    $mod_strings = return_module_language($current_language, $mod);
180 180
 }
181 181
 
182 182
 global $app_strings;
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
 $ntc_date_format = $timedate->get_user_date_format();
216 216
 $cal_dateformat = $timedate->get_cal_date_format();
217 217
 if (isset($lead->assigned_user_id)) {
218
-	$user_id=$lead->assigned_user_id;
218
+    $user_id=$lead->assigned_user_id;
219 219
 } else {
220
-	$user_id = $current_user->id;
220
+    $user_id = $current_user->id;
221 221
 }
222 222
 
223 223
 
@@ -229,9 +229,9 @@  discard block
 block discarded – undo
229 229
 
230 230
 
231 231
 if (isset($lead->opportunity_amount)) {
232
-	$opp_amount=$lead->opportunity_amount;
232
+    $opp_amount=$lead->opportunity_amount;
233 233
 } else {
234
- 	$opp_amount='';
234
+        $opp_amount='';
235 235
 }
236 236
 $jsCalendarImage = SugarThemeRegistry::current()->getImageURL('jscalendar.gif');
237 237
 $the_form .= <<<EOQ
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 </tr>
258 258
 EOQ;
259 259
 if($showaccount){
260
-	$the_form .= <<<EOQ
260
+    $the_form .= <<<EOQ
261 261
 <tr>
262 262
     <td scope="row">${mod_strings['LBL_ACCOUNT_NAME']}&nbsp;<span class="required">${lbl_required_symbol}</span></td>
263 263
 </tr>
@@ -285,9 +285,9 @@  discard block
 block discarded – undo
285 285
 </tr>
286 286
 EOQ;
287 287
 //carry forward custom lead fields to opportunities during Lead Conversion
288
-	$tempOpp = new Opportunity();
289
-	if (method_exists($lead, 'convertCustomFieldsForm')) $lead->convertCustomFieldsForm($the_form, $tempOpp, $prefix);
290
-	unset($tempOpp);
288
+    $tempOpp = new Opportunity();
289
+    if (method_exists($lead, 'convertCustomFieldsForm')) $lead->convertCustomFieldsForm($the_form, $tempOpp, $prefix);
290
+    unset($tempOpp);
291 291
 
292 292
 $the_form .= <<<EOQ
293 293
 
@@ -315,12 +315,12 @@  discard block
 block discarded – undo
315 315
 } // end getWideFormBody
316 316
 
317 317
 function getFormBody($prefix, $mod='Opportunities', $formname=''){
318
-	if(!ACLController::checkAccess('Opportunities', 'edit', true)){
319
-		return '';
320
-	}
318
+    if(!ACLController::checkAccess('Opportunities', 'edit', true)){
319
+        return '';
320
+    }
321 321
 if(!empty($mod)){
322
-	global $current_language;
323
-	$mod_strings = return_module_language($current_language, $mod);
322
+    global $current_language;
323
+    $mod_strings = return_module_language($current_language, $mod);
324 324
 }else global $mod_strings;
325 325
 global $app_strings;
326 326
 global $app_list_strings;
@@ -363,13 +363,13 @@  discard block
 block discarded – undo
363 363
 /// SETUP ACCOUNT POPUP
364 364
 
365 365
 $popup_request_data = array(
366
-	'call_back_function' => 'set_return',
367
-	'form_name' => "{$prefix}OppSave",
368
-	'field_to_name_array' => array(
369
-		'id' => 'account_id',
370
-		'name' => 'account_name',
371
-		),
372
-	);
366
+    'call_back_function' => 'set_return',
367
+    'form_name' => "{$prefix}OppSave",
368
+    'field_to_name_array' => array(
369
+        'id' => 'account_id',
370
+        'name' => 'account_name',
371
+        ),
372
+    );
373 373
 
374 374
 $json = getJSONobj();
375 375
 $encoded_popup_request_data = $json->encode($popup_request_data);
@@ -429,12 +429,12 @@  discard block
 block discarded – undo
429 429
     global $current_user;
430 430
 	
431 431
 	
432
-	require_once('include/formbase.php');
432
+    require_once('include/formbase.php');
433 433
 	
434
-	$focus = new Opportunity();
435
-	if($useRequired &&  !checkRequired($prefix, array_keys($focus->required_fields))){
436
-		return null;
437
-	}
434
+    $focus = new Opportunity();
435
+    if($useRequired &&  !checkRequired($prefix, array_keys($focus->required_fields))){
436
+        return null;
437
+    }
438 438
 
439 439
     if(empty($_POST['currency_id'])){
440 440
         $currency_id = $current_user->getPreference('currency');
@@ -442,28 +442,28 @@  discard block
 block discarded – undo
442 442
             $focus->currency_id =   $currency_id;
443 443
         }
444 444
     }
445
-	$focus = populateFromPost($prefix, $focus);
446
-	if( !ACLController::checkAccess($focus->module_dir, 'edit', $focus->isOwner($current_user->id))){
447
-		ACLController::displayNoAccess(true);
448
-	}
449
-	$check_notify = FALSE;
450
-	if (isset($GLOBALS['check_notify'])) {
451
-		$check_notify = $GLOBALS['check_notify'];
452
-	}
453
-
454
-	$focus->save($check_notify);
455
-
456
-	if(!empty($_POST['duplicate_parent_id'])){
457
-		clone_relationship($focus->db, array('opportunities_contacts'),'opportunity_id',  $_POST['duplicate_parent_id'], $focus->id);
458
-	}
459
-	$return_id = $focus->id;
445
+    $focus = populateFromPost($prefix, $focus);
446
+    if( !ACLController::checkAccess($focus->module_dir, 'edit', $focus->isOwner($current_user->id))){
447
+        ACLController::displayNoAccess(true);
448
+    }
449
+    $check_notify = FALSE;
450
+    if (isset($GLOBALS['check_notify'])) {
451
+        $check_notify = $GLOBALS['check_notify'];
452
+    }
453
+
454
+    $focus->save($check_notify);
455
+
456
+    if(!empty($_POST['duplicate_parent_id'])){
457
+        clone_relationship($focus->db, array('opportunities_contacts'),'opportunity_id',  $_POST['duplicate_parent_id'], $focus->id);
458
+    }
459
+    $return_id = $focus->id;
460 460
 	
461
-	$GLOBALS['log']->debug("Saved record with id of ".$return_id);
462
-	if($redirect){
463
-		handleRedirect($return_id,"Opportunities" );
464
-	}else{
465
-		return $focus;
466
-	}
461
+    $GLOBALS['log']->debug("Saved record with id of ".$return_id);
462
+    if($redirect){
463
+        handleRedirect($return_id,"Opportunities" );
464
+    }else{
465
+        return $focus;
466
+    }
467 467
 }
468 468
 
469 469
 }
Please login to merge, or discard this patch.
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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.
@@ -41,31 +41,31 @@  discard block
 block discarded – undo
41 41
 
42 42
 
43 43
 
44
-class OpportunityFormBase{
44
+class OpportunityFormBase {
45 45
 
46 46
 
47
-function checkForDuplicates($prefix){
47
+function checkForDuplicates($prefix) {
48 48
 	require_once('include/formbase.php');
49 49
 	
50 50
 	$focus = new Opportunity();
51 51
 	$query = '';
52 52
 	$baseQuery = 'select id, name, sales_stage,amount, date_closed  from opportunities where deleted!=1 and (';
53 53
 
54
-	if(isset($_POST[$prefix.'name']) && !empty($_POST[$prefix.'name'])){
55
-		$query = $baseQuery ."  name like '%".$_POST[$prefix.'name']."%'";
54
+	if (isset($_POST[$prefix.'name']) && !empty($_POST[$prefix.'name'])) {
55
+		$query = $baseQuery."  name like '%".$_POST[$prefix.'name']."%'";
56 56
 		$query .= getLikeForEachWord('name', $_POST[$prefix.'name']);
57 57
 	}
58 58
 
59
-	if(!empty($query)){
59
+	if (!empty($query)) {
60 60
 		$rows = array();
61 61
 		global $db;
62 62
 		$result = $db->query($query.')');
63
-		$i=-1;
64
-		while(($row=$db->fetchByAssoc($result)) != null) {
63
+		$i = -1;
64
+		while (($row = $db->fetchByAssoc($result)) != null) {
65 65
 			$i++;
66 66
 			$rows[$i] = $row;
67 67
 		}
68
-		if ($i==-1) return null;
68
+		if ($i == -1) return null;
69 69
 		
70 70
 		return $rows;		
71 71
 	}
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
 }
74 74
 
75 75
 
76
-function buildTableForm($rows, $mod='Opportunities'){
77
-	if(!empty($mod)){
76
+function buildTableForm($rows, $mod = 'Opportunities') {
77
+	if (!empty($mod)) {
78 78
 	global $current_language;
79 79
 	$mod_strings = return_module_language($current_language, $mod);
80
-	}else global $mod_strings;
80
+	} else global $mod_strings;
81 81
 	global $app_strings;
82 82
 	$cols = sizeof($rows[0]) * 2 + 1;
83
-	$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>';
83
+	$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE'].'</td></tr><tr><td height="20"></td></tr></table>';
84 84
 
85 85
 	$form .= "<form action='index.php' method='post' name='dupOpps'><input type='hidden' name='selectedOpportunity' value=''>";
86 86
 	$form .= "<table width='100%' cellpadding='0' cellspacing='0' class='list view'>";
@@ -88,34 +88,34 @@  discard block
 block discarded – undo
88 88
 	$form .= "<tr><td scope='col'>&nbsp;</td>";
89 89
     require_once('include/formbase.php');
90 90
 	$form .= getPostToForm();
91
-	if(isset($rows[0])){
92
-		foreach ($rows[0] as $key=>$value){
93
-			if($key != 'id'){
94
-					$form .= "<td scope='col'>". $mod_strings[$mod_strings['db_'.$key]]. "</td>";
91
+	if (isset($rows[0])) {
92
+		foreach ($rows[0] as $key=>$value) {
93
+			if ($key != 'id') {
94
+					$form .= "<td scope='col'>".$mod_strings[$mod_strings['db_'.$key]]."</td>";
95 95
 		}}
96 96
 		$form .= "</tr>";
97 97
 	}
98 98
 
99 99
 	$rowColor = 'oddListRowS1';
100
-	foreach($rows as $row){
100
+	foreach ($rows as $row) {
101 101
 
102 102
 		$form .= "<tr class='$rowColor'>";
103 103
 
104 104
 		$form .= "<td width='1%' nowrap='nowrap'><a href='#' onclick='document.dupOpps.selectedOpportunity.value=\"${row['id']}\";document.dupOpps.submit();'>[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a>&nbsp;&nbsp;</td>";
105 105
 		$wasSet = false;
106
-		foreach ($row as $key=>$value){
107
-				if($key != 'id'){
108
-					if(!$wasSet){
106
+		foreach ($row as $key=>$value) {
107
+				if ($key != 'id') {
108
+					if (!$wasSet) {
109 109
 					$form .= "<td scope='row'><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>";
110 110
 					$wasSet = true;
111
-					}else{
111
+					} else {
112 112
 					$form .= "<td><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>";
113 113
 					}
114 114
 				}}
115 115
 
116
-		if($rowColor == 'evenListRowS1'){
116
+		if ($rowColor == 'evenListRowS1') {
117 117
 			$rowColor = 'oddListRowS1';
118
-		}else{
118
+		} else {
119 119
 			 $rowColor = 'evenListRowS1';
120 120
 		}
121 121
 		$form .= "</tr>";
@@ -129,14 +129,14 @@  discard block
 block discarded – undo
129 129
 
130 130
 }
131 131
 
132
-function getForm($prefix, $mod='Opportunities'){
133
-	if(!ACLController::checkAccess('Opportunities', 'edit', true)){
132
+function getForm($prefix, $mod = 'Opportunities') {
133
+	if (!ACLController::checkAccess('Opportunities', 'edit', true)) {
134 134
 		return '';
135 135
 	}
136
-if(!empty($mod)){
136
+if (!empty($mod)) {
137 137
 	global $current_language;
138 138
 	$mod_strings = return_module_language($current_language, $mod);
139
-}else global $mod_strings;
139
+} else global $mod_strings;
140 140
 global $app_strings;
141 141
 global $sugar_version, $sugar_config;
142 142
 
@@ -164,17 +164,17 @@  discard block
 block discarded – undo
164 164
 return $the_form;
165 165
 }
166 166
 
167
-function getWideFormBody($prefix, $mod='Opportunities', $formname='', $lead='', $showaccount = true){
168
-	if(!ACLController::checkAccess('Opportunities', 'edit', true)){
167
+function getWideFormBody($prefix, $mod = 'Opportunities', $formname = '', $lead = '', $showaccount = true) {
168
+	if (!ACLController::checkAccess('Opportunities', 'edit', true)) {
169 169
 		return '';
170 170
 	}
171
-	if(empty($lead)){
171
+	if (empty($lead)) {
172 172
 		$lead = new Lead();
173 173
 	}
174 174
 global $mod_strings, $sugar_config;
175 175
 $showaccount = $showaccount && $sugar_config['require_accounts'];
176 176
 $temp_strings = $mod_strings;
177
-if(!empty($mod)){
177
+if (!empty($mod)) {
178 178
 	global $current_language;
179 179
 	$mod_strings = return_module_language($current_language, $mod);
180 180
 }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 //$prePopProb = '';
201 201
 //if(empty($this->bean->id)) 
202 202
 $prePopProb = 'document.getElementsByName(\''.$prefix.'sales_stage\')[0].onchange();';
203
-$probability_script=<<<EOQ
203
+$probability_script = <<<EOQ
204 204
 	<script>
205 205
 	prob_array = $prob_array;
206 206
 	document.getElementsByName('{$prefix}sales_stage')[0].onchange = function() {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 $ntc_date_format = $timedate->get_user_date_format();
216 216
 $cal_dateformat = $timedate->get_cal_date_format();
217 217
 if (isset($lead->assigned_user_id)) {
218
-	$user_id=$lead->assigned_user_id;
218
+	$user_id = $lead->assigned_user_id;
219 219
 } else {
220 220
 	$user_id = $current_user->id;
221 221
 }
@@ -225,13 +225,13 @@  discard block
 block discarded – undo
225 225
 // $cal_lang = (empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language];
226 226
 $cal_lang = "en";
227 227
 
228
-$the_form="";
228
+$the_form = "";
229 229
 
230 230
 
231 231
 if (isset($lead->opportunity_amount)) {
232
-	$opp_amount=$lead->opportunity_amount;
232
+	$opp_amount = $lead->opportunity_amount;
233 233
 } else {
234
- 	$opp_amount='';
234
+ 	$opp_amount = '';
235 235
 }
236 236
 $jsCalendarImage = SugarThemeRegistry::current()->getImageURL('jscalendar.gif');
237 237
 $the_form .= <<<EOQ
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 <td ><input name='{$prefix}date_closed' onblur="parseDate(this, '$cal_dateformat');" size='12' maxlength='10' id='${prefix}jscal_field' type="text" value="">&nbsp;<!--not_in_theme!--><img src="{$jsCalendarImage}" alt="{$app_strings['LBL_ENTER_DATE']}"  id="${prefix}jscal_trigger" align="absmiddle"></td>
257 257
 </tr>
258 258
 EOQ;
259
-if($showaccount){
259
+if ($showaccount) {
260 260
 	$the_form .= <<<EOQ
261 261
 <tr>
262 262
     <td scope="row">${mod_strings['LBL_ACCOUNT_NAME']}&nbsp;<span class="required">${lbl_required_symbol}</span></td>
@@ -308,20 +308,20 @@  discard block
 block discarded – undo
308 308
 $javascript->setFormName($formname);
309 309
 $javascript->setSugarBean(new Opportunity());
310 310
 $javascript->addRequiredFields($prefix);
311
-$the_form .=$javascript->getScript();
311
+$the_form .= $javascript->getScript();
312 312
 $mod_strings = $temp_strings;
313 313
 return $the_form;
314 314
 
315 315
 } // end getWideFormBody
316 316
 
317
-function getFormBody($prefix, $mod='Opportunities', $formname=''){
318
-	if(!ACLController::checkAccess('Opportunities', 'edit', true)){
317
+function getFormBody($prefix, $mod = 'Opportunities', $formname = '') {
318
+	if (!ACLController::checkAccess('Opportunities', 'edit', true)) {
319 319
 		return '';
320 320
 	}
321
-if(!empty($mod)){
321
+if (!empty($mod)) {
322 322
 	global $current_language;
323 323
 	$mod_strings = return_module_language($current_language, $mod);
324
-}else global $mod_strings;
324
+} else global $mod_strings;
325 325
 global $app_strings;
326 326
 global $app_list_strings;
327 327
 global $theme;
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 		$lbl_opportunity_name&nbsp;<span class="required">$lbl_required_symbol</span><br>
357 357
 		<input name='{$prefix}name' type="text" value="">
358 358
 EOQ;
359
-if($sugar_config['require_accounts']){
359
+if ($sugar_config['require_accounts']) {
360 360
 
361 361
 ///////////////////////////////////////
362 362
 ///
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 $qsd = QuickSearchDefaults::getQuickSearchDefaults();
409 409
 $sqs_objects = array('qc_account_name' => $qsd->getQSParent());
410 410
 $sqs_objects['qc_account_name']['populate_list'] = array('qc_account_name', 'qc_account_id');
411
-$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
411
+$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = '.$json->encode($sqs_objects).'</script>';
412 412
 $the_form .= $quicksearch_js;
413 413
 
414 414
 
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
 $javascript->setFormName($formname);
418 418
 $javascript->setSugarBean(new Opportunity());
419 419
 $javascript->addRequiredFields($prefix);
420
-$the_form .=$javascript->getScript();
420
+$the_form .= $javascript->getScript();
421 421
 
422 422
 
423 423
 return $the_form;
@@ -425,25 +425,25 @@  discard block
 block discarded – undo
425 425
 }
426 426
 
427 427
 
428
-function handleSave($prefix,$redirect=true, $useRequired=false){
428
+function handleSave($prefix, $redirect = true, $useRequired = false) {
429 429
     global $current_user;
430 430
 	
431 431
 	
432 432
 	require_once('include/formbase.php');
433 433
 	
434 434
 	$focus = new Opportunity();
435
-	if($useRequired &&  !checkRequired($prefix, array_keys($focus->required_fields))){
435
+	if ($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))) {
436 436
 		return null;
437 437
 	}
438 438
 
439
-    if(empty($_POST['currency_id'])){
439
+    if (empty($_POST['currency_id'])) {
440 440
         $currency_id = $current_user->getPreference('currency');
441
-        if(isset($currency_id)){
442
-            $focus->currency_id =   $currency_id;
441
+        if (isset($currency_id)) {
442
+            $focus->currency_id = $currency_id;
443 443
         }
444 444
     }
445 445
 	$focus = populateFromPost($prefix, $focus);
446
-	if( !ACLController::checkAccess($focus->module_dir, 'edit', $focus->isOwner($current_user->id))){
446
+	if (!ACLController::checkAccess($focus->module_dir, 'edit', $focus->isOwner($current_user->id))) {
447 447
 		ACLController::displayNoAccess(true);
448 448
 	}
449 449
 	$check_notify = FALSE;
@@ -453,15 +453,15 @@  discard block
 block discarded – undo
453 453
 
454 454
 	$focus->save($check_notify);
455 455
 
456
-	if(!empty($_POST['duplicate_parent_id'])){
457
-		clone_relationship($focus->db, array('opportunities_contacts'),'opportunity_id',  $_POST['duplicate_parent_id'], $focus->id);
456
+	if (!empty($_POST['duplicate_parent_id'])) {
457
+		clone_relationship($focus->db, array('opportunities_contacts'), 'opportunity_id', $_POST['duplicate_parent_id'], $focus->id);
458 458
 	}
459 459
 	$return_id = $focus->id;
460 460
 	
461 461
 	$GLOBALS['log']->debug("Saved record with id of ".$return_id);
462
-	if($redirect){
463
-		handleRedirect($return_id,"Opportunities" );
464
-	}else{
462
+	if ($redirect) {
463
+		handleRedirect($return_id, "Opportunities");
464
+	} else {
465 465
 		return $focus;
466 466
 	}
467 467
 }
Please login to merge, or discard this patch.
Braces   +21 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
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.
@@ -65,7 +67,9 @@  discard block
 block discarded – undo
65 67
 			$i++;
66 68
 			$rows[$i] = $row;
67 69
 		}
68
-		if ($i==-1) return null;
70
+		if ($i==-1) {
71
+		    return null;
72
+		}
69 73
 		
70 74
 		return $rows;		
71 75
 	}
@@ -77,7 +81,9 @@  discard block
 block discarded – undo
77 81
 	if(!empty($mod)){
78 82
 	global $current_language;
79 83
 	$mod_strings = return_module_language($current_language, $mod);
80
-	}else global $mod_strings;
84
+	} else {
85
+	    global $mod_strings;
86
+	}
81 87
 	global $app_strings;
82 88
 	$cols = sizeof($rows[0]) * 2 + 1;
83 89
 	$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>';
@@ -108,14 +114,14 @@  discard block
 block discarded – undo
108 114
 					if(!$wasSet){
109 115
 					$form .= "<td scope='row'><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>";
110 116
 					$wasSet = true;
111
-					}else{
117
+					} else{
112 118
 					$form .= "<td><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>";
113 119
 					}
114 120
 				}}
115 121
 
116 122
 		if($rowColor == 'evenListRowS1'){
117 123
 			$rowColor = 'oddListRowS1';
118
-		}else{
124
+		} else{
119 125
 			 $rowColor = 'evenListRowS1';
120 126
 		}
121 127
 		$form .= "</tr>";
@@ -136,7 +142,9 @@  discard block
 block discarded – undo
136 142
 if(!empty($mod)){
137 143
 	global $current_language;
138 144
 	$mod_strings = return_module_language($current_language, $mod);
139
-}else global $mod_strings;
145
+} else {
146
+    global $mod_strings;
147
+}
140 148
 global $app_strings;
141 149
 global $sugar_version, $sugar_config;
142 150
 
@@ -286,7 +294,9 @@  discard block
 block discarded – undo
286 294
 EOQ;
287 295
 //carry forward custom lead fields to opportunities during Lead Conversion
288 296
 	$tempOpp = new Opportunity();
289
-	if (method_exists($lead, 'convertCustomFieldsForm')) $lead->convertCustomFieldsForm($the_form, $tempOpp, $prefix);
297
+	if (method_exists($lead, 'convertCustomFieldsForm')) {
298
+	    $lead->convertCustomFieldsForm($the_form, $tempOpp, $prefix);
299
+	}
290 300
 	unset($tempOpp);
291 301
 
292 302
 $the_form .= <<<EOQ
@@ -321,7 +331,9 @@  discard block
 block discarded – undo
321 331
 if(!empty($mod)){
322 332
 	global $current_language;
323 333
 	$mod_strings = return_module_language($current_language, $mod);
324
-}else global $mod_strings;
334
+} else {
335
+    global $mod_strings;
336
+}
325 337
 global $app_strings;
326 338
 global $app_list_strings;
327 339
 global $theme;
@@ -461,7 +473,7 @@  discard block
 block discarded – undo
461 473
 	$GLOBALS['log']->debug("Saved record with id of ".$return_id);
462 474
 	if($redirect){
463 475
 		handleRedirect($return_id,"Opportunities" );
464
-	}else{
476
+	} else{
465 477
 		return $focus;
466 478
 	}
467 479
 }
Please login to merge, or discard this patch.
modules/ProspectLists/field_arrays.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,15 +46,15 @@
 block discarded – undo
46 46
  * Contributor(s): ______________________________________..
47 47
  ********************************************************************************/
48 48
 $fields_array['ProspectList'] = array ('column_fields' => array(
49
-				"id", "date_entered",
50
-				"date_modified", "modified_user_id",
51
-				"assigned_user_id", "created_by",
52
-				"name", "description",'list_type','domain_name',
53
-	),
49
+                "id", "date_entered",
50
+                "date_modified", "modified_user_id",
51
+                "assigned_user_id", "created_by",
52
+                "name", "description",'list_type','domain_name',
53
+    ),
54 54
         'list_fields' =>  array(
55
-				'id', 'name', 'description','list_type',
56
-				'assigned_user_id','assigned_user_name',
57
-	),
55
+                'id', 'name', 'description','list_type',
56
+                'assigned_user_id','assigned_user_name',
57
+    ),
58 58
     'required_fields' =>  array('name'=>1,'list_type'=>2),
59 59
 );
60 60
 ?>
61 61
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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,16 +45,16 @@  discard block
 block discarded – undo
45 45
  * All Rights Reserved.
46 46
  * Contributor(s): ______________________________________..
47 47
  ********************************************************************************/
48
-$fields_array['ProspectList'] = array ('column_fields' => array(
48
+$fields_array['ProspectList'] = array('column_fields' => array(
49 49
 				"id", "date_entered",
50 50
 				"date_modified", "modified_user_id",
51 51
 				"assigned_user_id", "created_by",
52
-				"name", "description",'list_type','domain_name',
52
+				"name", "description", 'list_type', 'domain_name',
53 53
 	),
54 54
         'list_fields' =>  array(
55
-				'id', 'name', 'description','list_type',
56
-				'assigned_user_id','assigned_user_name',
55
+				'id', 'name', 'description', 'list_type',
56
+				'assigned_user_id', 'assigned_user_name',
57 57
 	),
58
-    'required_fields' =>  array('name'=>1,'list_type'=>2),
58
+    'required_fields' =>  array('name'=>1, 'list_type'=>2),
59 59
 );
60 60
 ?>
61 61
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
modules/ProspectLists/ProspectListFormBase.php 3 patches
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -52,71 +52,71 @@  discard block
 block discarded – undo
52 52
 
53 53
 function getForm($prefix, $mod='', $form=''){
54 54
 	
55
-	if(!ACLController::checkAccess('ProspectLists', 'edit', true)){
56
-		return '';
57
-	}
55
+    if(!ACLController::checkAccess('ProspectLists', 'edit', true)){
56
+        return '';
57
+    }
58 58
 	
59
-	if(!empty($mod)){
60
-		global $current_language;
61
-		$mod_strings = return_module_language($current_language, $mod);
62
-	} else {
63
-		global $mod_strings;
64
-	}
65
-	global $app_strings,$current_user;
59
+    if(!empty($mod)){
60
+        global $current_language;
61
+        $mod_strings = return_module_language($current_language, $mod);
62
+    } else {
63
+        global $mod_strings;
64
+    }
65
+    global $app_strings,$current_user;
66 66
 	
67
-	$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
68
-	$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
69
-	$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
70
-	$user_id = $current_user->id;
67
+    $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
68
+    $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
69
+    $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
70
+    $user_id = $current_user->id;
71 71
 
72 72
 
73
-	$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
74
-	$the_form .= <<<EOQ
73
+    $the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
74
+    $the_form .= <<<EOQ
75 75
 		<form name="${prefix}ProspectListSave" onSubmit="return check_form('${prefix}ProspectListSave');" method="POST" action="index.php">
76 76
 			<input type="hidden" name="${prefix}module" value="ProspectLists">
77 77
 			<input type="hidden" name="${prefix}action" value="Save">
78 78
 			<input type="hidden" name="assigned_user_id" value='${user_id}'>
79 79
 EOQ;
80 80
 
81
-	$the_form .= $this->getFormBody($prefix, $mod, $prefix."ProspectListSave");
82
-	$the_form .= <<<EOQ
81
+    $the_form .= $this->getFormBody($prefix, $mod, $prefix."ProspectListSave");
82
+    $the_form .= <<<EOQ
83 83
 		<p><input title="$lbl_save_button_title" accessKey="$lbl_save_button_key" class="button" type="submit" name="button" value="  $lbl_save_button_label  " ></p>
84 84
 		</form>
85 85
 
86 86
 EOQ;
87 87
 
88
-	$the_form .= get_left_form_footer();
89
-	$the_form .= get_validate_record_js();
88
+    $the_form .= get_left_form_footer();
89
+    $the_form .= get_validate_record_js();
90 90
 
91
-	return $the_form;	
91
+    return $the_form;	
92 92
 }
93 93
 
94 94
 function getFormBody($prefix, $mod='',$formname='', $size='30',$script=true) {
95
-	if(!ACLController::checkAccess('ProspectLists', 'edit', true)){
96
-		return '';
97
-	}
98
-	global $mod_strings;
99
-	$temp_strings = $mod_strings;
100
-	if(!empty($mod)){
101
-		global $current_language;
102
-		$mod_strings = return_module_language($current_language, $mod);
103
-	}
104
-	global $app_strings;
105
-	global $current_user;
106
-	global $app_list_strings;
95
+    if(!ACLController::checkAccess('ProspectLists', 'edit', true)){
96
+        return '';
97
+    }
98
+    global $mod_strings;
99
+    $temp_strings = $mod_strings;
100
+    if(!empty($mod)){
101
+        global $current_language;
102
+        $mod_strings = return_module_language($current_language, $mod);
103
+    }
104
+    global $app_strings;
105
+    global $current_user;
106
+    global $app_list_strings;
107 107
 	
108
-	$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
109
-	$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
110
-	$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
111
-	$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
112
-	$user_id = $current_user->id;
108
+    $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
109
+    $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
110
+    $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
111
+    $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
112
+    $user_id = $current_user->id;
113 113
 
114
-	$list_options=get_select_options_with_id($app_list_strings['prospect_list_type_dom'], 'default');
114
+    $list_options=get_select_options_with_id($app_list_strings['prospect_list_type_dom'], 'default');
115 115
 	
116
-	$lbl_prospect_list_name = $mod_strings['LBL_PROSPECT_LIST_NAME'];
117
-	$lbl_list_type = $mod_strings['LBL_LIST_TYPE'];
116
+    $lbl_prospect_list_name = $mod_strings['LBL_PROSPECT_LIST_NAME'];
117
+    $lbl_list_type = $mod_strings['LBL_LIST_TYPE'];
118 118
 	
119
-	$form = <<<EOQ
119
+    $form = <<<EOQ
120 120
 			<p><input type="hidden" name="record" value="">
121 121
 			$lbl_prospect_list_name&nbsp;<span class="required">$lbl_required_symbol</span><br>
122 122
 			<input name='name' type="text" value=""><br>
@@ -126,43 +126,43 @@  discard block
 block discarded – undo
126 126
 
127 127
 	
128 128
 	
129
-	$javascript = new javascript();
130
-	$javascript->setFormName($formname);
131
-	$javascript->setSugarBean(new ProspectList());
132
-	$javascript->addRequiredFields($prefix);
133
-	$form .=$javascript->getScript();
134
-	$mod_strings = $temp_strings;
135
-	return $form;
129
+    $javascript = new javascript();
130
+    $javascript->setFormName($formname);
131
+    $javascript->setSugarBean(new ProspectList());
132
+    $javascript->addRequiredFields($prefix);
133
+    $form .=$javascript->getScript();
134
+    $mod_strings = $temp_strings;
135
+    return $form;
136 136
 }
137 137
 
138
-	function handleSave($prefix,$redirect=true, $useRequired=false){
138
+    function handleSave($prefix,$redirect=true, $useRequired=false){
139 139
 		
140 140
 		
141
-		require_once('include/formbase.php');
141
+        require_once('include/formbase.php');
142 142
 	
143 143
 		
144
-		$focus = new ProspectList();
145
-		if($useRequired &&  !checkRequired($prefix, array_keys($focus->required_fields))){
146
-			return null;
147
-		}
148
-		$focus = populateFromPost($prefix, $focus);
149
-		if(!$focus->ACLAccess('Save')){
150
-			ACLController::displayNoAccess(true);
151
-			sugar_cleanup(true);
152
-		}
153
-		if(empty($focus->name)){
154
-			return null;
155
-		}	
144
+        $focus = new ProspectList();
145
+        if($useRequired &&  !checkRequired($prefix, array_keys($focus->required_fields))){
146
+            return null;
147
+        }
148
+        $focus = populateFromPost($prefix, $focus);
149
+        if(!$focus->ACLAccess('Save')){
150
+            ACLController::displayNoAccess(true);
151
+            sugar_cleanup(true);
152
+        }
153
+        if(empty($focus->name)){
154
+            return null;
155
+        }	
156 156
         if ( !isset($focus->assigned_user_id) || $focus->assigned_user_id == '' )
157 157
             $focus->assigned_user_id = $GLOBALS['current_user']->id;
158 158
 	
159
-		$return_id = $focus->save();
160
-		if($redirect){
161
-			$GLOBALS['log']->debug("Saved record with id of ".$return_id);
162
-			handleRedirect($return_id, "ProspectLists");
163
-		} else { 
164
-			return $focus;
165
-		}
166
-	}
159
+        $return_id = $focus->save();
160
+        if($redirect){
161
+            $GLOBALS['log']->debug("Saved record with id of ".$return_id);
162
+            handleRedirect($return_id, "ProspectLists");
163
+        } else { 
164
+            return $focus;
165
+        }
166
+    }
167 167
 }
168 168
 ?>
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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,19 +50,19 @@  discard block
 block discarded – undo
50 50
 class ProspectListFormBase {
51 51
 
52 52
 
53
-function getForm($prefix, $mod='', $form=''){
53
+function getForm($prefix, $mod = '', $form = '') {
54 54
 	
55
-	if(!ACLController::checkAccess('ProspectLists', 'edit', true)){
55
+	if (!ACLController::checkAccess('ProspectLists', 'edit', true)) {
56 56
 		return '';
57 57
 	}
58 58
 	
59
-	if(!empty($mod)){
59
+	if (!empty($mod)) {
60 60
 		global $current_language;
61 61
 		$mod_strings = return_module_language($current_language, $mod);
62 62
 	} else {
63 63
 		global $mod_strings;
64 64
 	}
65
-	global $app_strings,$current_user;
65
+	global $app_strings, $current_user;
66 66
 	
67 67
 	$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
68 68
 	$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
 	return $the_form;	
92 92
 }
93 93
 
94
-function getFormBody($prefix, $mod='',$formname='', $size='30',$script=true) {
95
-	if(!ACLController::checkAccess('ProspectLists', 'edit', true)){
94
+function getFormBody($prefix, $mod = '', $formname = '', $size = '30', $script = true) {
95
+	if (!ACLController::checkAccess('ProspectLists', 'edit', true)) {
96 96
 		return '';
97 97
 	}
98 98
 	global $mod_strings;
99 99
 	$temp_strings = $mod_strings;
100
-	if(!empty($mod)){
100
+	if (!empty($mod)) {
101 101
 		global $current_language;
102 102
 		$mod_strings = return_module_language($current_language, $mod);
103 103
 	}
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
112 112
 	$user_id = $current_user->id;
113 113
 
114
-	$list_options=get_select_options_with_id($app_list_strings['prospect_list_type_dom'], 'default');
114
+	$list_options = get_select_options_with_id($app_list_strings['prospect_list_type_dom'], 'default');
115 115
 	
116 116
 	$lbl_prospect_list_name = $mod_strings['LBL_PROSPECT_LIST_NAME'];
117 117
 	$lbl_list_type = $mod_strings['LBL_LIST_TYPE'];
@@ -130,34 +130,34 @@  discard block
 block discarded – undo
130 130
 	$javascript->setFormName($formname);
131 131
 	$javascript->setSugarBean(new ProspectList());
132 132
 	$javascript->addRequiredFields($prefix);
133
-	$form .=$javascript->getScript();
133
+	$form .= $javascript->getScript();
134 134
 	$mod_strings = $temp_strings;
135 135
 	return $form;
136 136
 }
137 137
 
138
-	function handleSave($prefix,$redirect=true, $useRequired=false){
138
+	function handleSave($prefix, $redirect = true, $useRequired = false) {
139 139
 		
140 140
 		
141 141
 		require_once('include/formbase.php');
142 142
 	
143 143
 		
144 144
 		$focus = new ProspectList();
145
-		if($useRequired &&  !checkRequired($prefix, array_keys($focus->required_fields))){
145
+		if ($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))) {
146 146
 			return null;
147 147
 		}
148 148
 		$focus = populateFromPost($prefix, $focus);
149
-		if(!$focus->ACLAccess('Save')){
149
+		if (!$focus->ACLAccess('Save')) {
150 150
 			ACLController::displayNoAccess(true);
151 151
 			sugar_cleanup(true);
152 152
 		}
153
-		if(empty($focus->name)){
153
+		if (empty($focus->name)) {
154 154
 			return null;
155 155
 		}	
156
-        if ( !isset($focus->assigned_user_id) || $focus->assigned_user_id == '' )
156
+        if (!isset($focus->assigned_user_id) || $focus->assigned_user_id == '')
157 157
             $focus->assigned_user_id = $GLOBALS['current_user']->id;
158 158
 	
159 159
 		$return_id = $focus->save();
160
-		if($redirect){
160
+		if ($redirect) {
161 161
 			$GLOBALS['log']->debug("Saved record with id of ".$return_id);
162 162
 			handleRedirect($return_id, "ProspectLists");
163 163
 		} else { 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
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.
@@ -153,8 +155,9 @@  discard block
 block discarded – undo
153 155
 		if(empty($focus->name)){
154 156
 			return null;
155 157
 		}	
156
-        if ( !isset($focus->assigned_user_id) || $focus->assigned_user_id == '' )
157
-            $focus->assigned_user_id = $GLOBALS['current_user']->id;
158
+        if ( !isset($focus->assigned_user_id) || $focus->assigned_user_id == '' ) {
159
+                    $focus->assigned_user_id = $GLOBALS['current_user']->id;
160
+        }
158 161
 	
159 162
 		$return_id = $focus->save();
160 163
 		if($redirect){
Please login to merge, or discard this patch.
modules/ProspectLists/SubPanelView.php 3 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
 $button  = "<form action='index.php' method='post' name='ProspectListForm' id='ProspectListForm'>\n";
68 68
 $button .= "<input type='hidden' name='module' value='ProspectLists'>\n";
69 69
 if ($currentModule == 'Campaigns') {
70
-	$button .= "<input type='hidden' name='campaign_id' value='$focus->id'>\n";
71
-	$button .= "<input type='hidden' name='record' value='$focus->id'>\n";
72
-	$button .= "<input type='hidden' name='campaign_name' value=\"$focus->name\">\n";
70
+    $button .= "<input type='hidden' name='campaign_id' value='$focus->id'>\n";
71
+    $button .= "<input type='hidden' name='record' value='$focus->id'>\n";
72
+    $button .= "<input type='hidden' name='campaign_name' value=\"$focus->name\">\n";
73 73
 }
74 74
 $button .= "<input type='hidden' name='prospect_list_id' value=''>\n";
75 75
 $button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
@@ -80,28 +80,28 @@  discard block
 block discarded – undo
80 80
 $button .= "<input title='".$app_strings['LBL_NEW_BUTTON_TITLE']."' accessyKey='".$app_strings['LBL_NEW_BUTTON_KEY']."' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value='  ".$app_strings['LBL_NEW_BUTTON_LABEL']."  '>\n";
81 81
 if ($currentModule == 'Campaigns')
82 82
 {
83
-	///////////////////////////////////////
84
-	///
85
-	/// SETUP PARENT POPUP
83
+    ///////////////////////////////////////
84
+    ///
85
+    /// SETUP PARENT POPUP
86 86
 	
87
-	$popup_request_data = array(
88
-		'call_back_function' => 'set_return_prospect_list_and_save',
89
-		'form_name' => 'ProspectListForm',
90
-		'field_to_name_array' => array(
91
-			'id' => 'prospect_list_id',
92
-			),
93
-		);
87
+    $popup_request_data = array(
88
+        'call_back_function' => 'set_return_prospect_list_and_save',
89
+        'form_name' => 'ProspectListForm',
90
+        'field_to_name_array' => array(
91
+            'id' => 'prospect_list_id',
92
+            ),
93
+        );
94 94
 	
95
-	$json = getJSONobj();
96
-	$encoded_popup_request_data = $json->encode($popup_request_data);
95
+    $json = getJSONobj();
96
+    $encoded_popup_request_data = $json->encode($popup_request_data);
97 97
 	
98
-	//
99
-	///////////////////////////////////////
98
+    //
99
+    ///////////////////////////////////////
100 100
 	
101
-	$button .= "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE']
102
-		." 'accessyKey='".$app_strings['LBL_SELECT_BUTTON_KEY']
103
-		."' type='button' class='button' value='  ".$app_strings['LBL_SELECT_BUTTON_LABEL']
104
-		."  ' name='button' onclick='open_popup(\"ProspectLists\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n";
101
+    $button .= "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE']
102
+        ." 'accessyKey='".$app_strings['LBL_SELECT_BUTTON_KEY']
103
+        ."' type='button' class='button' value='  ".$app_strings['LBL_SELECT_BUTTON_LABEL']
104
+        ."  ' name='button' onclick='open_popup(\"ProspectLists\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n";
105 105
 //		."  ' name='button' onclick='window.open(\"index.php?module=ProspectLists&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'>\n";
106 106
 }
107 107
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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.
@@ -111,11 +111,11 @@  discard block
 block discarded – undo
111 111
 $ListView->initNewXTemplate('modules/ProspectLists/SubPanelView.html', $current_module_strings);
112 112
 
113 113
 $ListView->xTemplateAssign("CAMPAIGN_RECORD", $focus->id);
114
-$ListView->xTemplateAssign("EDIT_INLINE_PNG",  SugarThemeRegistry::current()->getImage('edit_inline','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_EDIT']));
115
-$ListView->xTemplateAssign("REMOVE_INLINE_PNG",  SugarThemeRegistry::current()->getImage('delete_inline','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_REMOVE']));
114
+$ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
115
+$ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE']));
116 116
 
117 117
 $ListView->xTemplateAssign("RETURN_URL", "&return_module=".$currentModule."&return_action=DetailView&return_id=".$focus->id);
118
-$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME'] );
118
+$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME']);
119 119
 $ListView->setHeaderText($button);
120 120
 $ListView->processListView($focus_list, "main", "PROSPECT_LIST");
121 121
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
modules/AOS_Products/metadata/subpaneldefs.php 3 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -40,24 +40,24 @@
 block discarded – undo
40 40
 
41 41
 
42 42
 $layout_defs['AOS_Products'] = array(
43
-	// list of what Subpanels to show in the DetailView
44
-	'subpanel_setup' => array(
43
+    // list of what Subpanels to show in the DetailView
44
+    'subpanel_setup' => array(
45 45
 
46
-		'aos_products_purchases' => array(
47
-			'order' => 100,
48
-			'module' => 'AOS_Quotes',
49
-			'subpanel_name' => 'ForProductPurchases',
50
-			'sort_order' => 'asc',
51
-			'sort_by' => 'id',
52
-			'title_key' => 'LBL_CUSTOMERS_PURCHASED_PRODUCTS_SUBPANEL_TITLE',
53
-			//'get_subpanel_data' => 'aos_products_aos_quotes_1',
54
-			'get_subpanel_data' => 'function:getCustomersPurchasedProductsQuery',
55
-			'top_buttons' =>
56
-			array(
57
-			),
58
-		),
46
+        'aos_products_purchases' => array(
47
+            'order' => 100,
48
+            'module' => 'AOS_Quotes',
49
+            'subpanel_name' => 'ForProductPurchases',
50
+            'sort_order' => 'asc',
51
+            'sort_by' => 'id',
52
+            'title_key' => 'LBL_CUSTOMERS_PURCHASED_PRODUCTS_SUBPANEL_TITLE',
53
+            //'get_subpanel_data' => 'aos_products_aos_quotes_1',
54
+            'get_subpanel_data' => 'function:getCustomersPurchasedProductsQuery',
55
+            'top_buttons' =>
56
+            array(
57
+            ),
58
+        ),
59 59
 
60
-	),
60
+    ),
61 61
 );
62 62
 
63 63
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
modules/AOS_Products/metadata/dashletviewdefs.php 3 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -30,27 +30,27 @@
 block discarded – undo
30 30
 global $current_user;
31 31
 
32 32
 $dashletData['AOS_ProductsDashlet']['searchFields'] = array('date_entered'     => array('default' => ''),
33
-                                                          'date_modified'    => array('default' => ''),
33
+                                                            'date_modified'    => array('default' => ''),
34 34
 
35 35
 
36 36
 
37
-                                                          'assigned_user_id' => array('type'    => 'assigned_user_name', 
38
-                                                                                      'default' => $current_user->name));
37
+                                                            'assigned_user_id' => array('type'    => 'assigned_user_name', 
38
+                                                                                        'default' => $current_user->name));
39 39
 $dashletData['AOS_ProductsDashlet']['columns'] =  array(   'name' => array('width'   => '40', 
40
-                                                                      'label'   => 'LBL_LIST_NAME',
41
-                                                                      'link'    => true,
42
-                                                                      'default' => true), 
43
-                                                      'date_entered' => array('width'   => '15', 
44
-                                                                              'label'   => 'LBL_DATE_ENTERED',
45
-                                                                              'default' => true),
46
-                                                      'date_modified' => array('width'   => '15', 
47
-                                                                              'label'   => 'LBL_DATE_MODIFIED'),    
48
-                                                      'created_by' => array('width'   => '8', 
40
+                                                                        'label'   => 'LBL_LIST_NAME',
41
+                                                                        'link'    => true,
42
+                                                                        'default' => true), 
43
+                                                        'date_entered' => array('width'   => '15', 
44
+                                                                                'label'   => 'LBL_DATE_ENTERED',
45
+                                                                                'default' => true),
46
+                                                        'date_modified' => array('width'   => '15', 
47
+                                                                                'label'   => 'LBL_DATE_MODIFIED'),    
48
+                                                        'created_by' => array('width'   => '8', 
49 49
                                                                             'label'   => 'LBL_CREATED'),
50
-                                                      'assigned_user_name' => array('width'   => '8', 
51
-                                                                                     'label'   => 'LBL_LIST_ASSIGNED_USER'),
50
+                                                        'assigned_user_name' => array('width'   => '8', 
51
+                                                                                        'label'   => 'LBL_LIST_ASSIGNED_USER'),
52 52
 
53 53
 
54 54
 
55 55
 
56
-                                               );
56
+                                                );
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
  * Products, Quotations & Invoices modules.
5 5
  * Extensions to SugarCRM
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
                                                           'assigned_user_id' => array('type'    => 'assigned_user_name', 
38 38
                                                                                       'default' => $current_user->name));
39
-$dashletData['AOS_ProductsDashlet']['columns'] =  array(   'name' => array('width'   => '40', 
39
+$dashletData['AOS_ProductsDashlet']['columns'] = array('name' => array('width'   => '40', 
40 40
                                                                       'label'   => 'LBL_LIST_NAME',
41 41
                                                                       'link'    => true,
42 42
                                                                       'default' => true), 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
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
  * Products, Quotations & Invoices modules.
5 7
  * Extensions to SugarCRM
Please login to merge, or discard this patch.
modules/AOS_Products/metadata/editviewdefs.php 2 patches
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -2,129 +2,129 @@
 block discarded – undo
2 2
 $module_name = 'AOS_Products';
3 3
 $viewdefs [$module_name] = 
4 4
 array (
5
-  'EditView' => 
6
-  array (
5
+    'EditView' => 
6
+    array (
7 7
     'templateMeta' => 
8 8
     array (
9
-      'maxColumns' => '2',
10
-      'widths' => 
11
-      array (
9
+        'maxColumns' => '2',
10
+        'widths' => 
11
+        array (
12 12
         0 => 
13 13
         array (
14
-          'label' => '10',
15
-          'field' => '30',
14
+            'label' => '10',
15
+            'field' => '30',
16 16
         ),
17 17
         1 => 
18 18
         array (
19
-          'label' => '10',
20
-          'field' => '30',
19
+            'label' => '10',
20
+            'field' => '30',
21
+        ),
21 22
         ),
22
-      ),
23
-      'form' => 
24
-      array (
23
+        'form' => 
24
+        array (
25 25
         'enctype' => 'multipart/form-data',
26 26
         'headerTpl' => 'modules/AOS_Products/tpls/EditViewHeader.tpl',
27
-      ),
28
-      'includes' => 
29
-      array (
27
+        ),
28
+        'includes' => 
29
+        array (
30 30
         0 => 
31 31
         array (
32
-          'file' => 'modules/AOS_Products/js/products.js',
32
+            'file' => 'modules/AOS_Products/js/products.js',
33 33
         ),
34
-      ),
35
-      'useTabs' => false,
36
-      'tabDefs' => 
37
-      array (
34
+        ),
35
+        'useTabs' => false,
36
+        'tabDefs' => 
37
+        array (
38 38
         'DEFAULT' => 
39 39
         array (
40
-          'newTab' => false,
41
-          'panelDefault' => 'expanded',
40
+            'newTab' => false,
41
+            'panelDefault' => 'expanded',
42
+        ),
42 43
         ),
43
-      ),
44 44
     ),
45 45
     'panels' => 
46 46
     array (
47
-      'default' => 
48
-      array (
47
+        'default' => 
48
+        array (
49 49
         0 => 
50 50
         array (
51
-          0 => 
52
-          array (
51
+            0 => 
52
+            array (
53 53
             'name' => 'name',
54 54
             'label' => 'LBL_NAME',
55
-          ),
56
-          1 => 
57
-          array (
55
+            ),
56
+            1 => 
57
+            array (
58 58
             'name' => 'part_number',
59 59
             'label' => 'LBL_PART_NUMBER',
60
-          ),
60
+            ),
61 61
         ),
62 62
         1 => 
63 63
         array (
64
-          0 => 
65
-          array (
64
+            0 => 
65
+            array (
66 66
             'name' => 'aos_product_category_name',
67 67
             'label' => 'LBL_AOS_PRODUCT_CATEGORYS_NAME',
68
-          ),
69
-          1 => 
70
-          array (
68
+            ),
69
+            1 => 
70
+            array (
71 71
             'name' => 'type',
72 72
             'label' => 'LBL_TYPE',
73
-          ),
73
+            ),
74 74
         ),
75 75
         2 => 
76 76
         array (
77
-          0 => 
78
-          array (
77
+            0 => 
78
+            array (
79 79
             'name' => 'currency_id',
80 80
             'studio' => 'visible',
81 81
             'label' => 'LBL_CURRENCY',
82
-          ),
82
+            ),
83 83
         ),
84 84
         3 => 
85 85
         array (
86
-          0 => 
87
-          array (
86
+            0 => 
87
+            array (
88 88
             'name' => 'cost',
89 89
             'label' => 'LBL_COST',
90
-          ),
91
-          1 => 
92
-          array (
90
+            ),
91
+            1 => 
92
+            array (
93 93
             'name' => 'price',
94 94
             'label' => 'LBL_PRICE',
95
-          ),
95
+            ),
96 96
         ),
97 97
         4 => 
98 98
         array (
99
-          0 => 
100
-          array (
99
+            0 => 
100
+            array (
101 101
             'name' => 'contact',
102 102
             'label' => 'LBL_CONTACT',
103
-          ),
104
-          1 => 
105
-          array (
103
+            ),
104
+            1 => 
105
+            array (
106 106
             'name' => 'url',
107 107
             'label' => 'LBL_URL',
108
-          ),
108
+            ),
109 109
         ),
110 110
         5 => 
111 111
         array (
112
-          0 => 
113
-          array (
112
+            0 => 
113
+            array (
114 114
             'name' => 'description',
115 115
             'label' => 'LBL_DESCRIPTION',
116
-          ),
116
+            ),
117 117
         ),
118 118
         6 => 
119 119
         array (
120
-          0 => 
121
-          array (
120
+            0 => 
121
+            array (
122 122
             'name' => 'product_image',
123 123
             'customCode' => '{$PRODUCT_IMAGE}',
124
-          ),
124
+            ),
125
+        ),
125 126
         ),
126
-      ),
127 127
     ),
128
-  ),
128
+    ),
129 129
 );
130 130
 ?>
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -1,124 +1,124 @@
 block discarded – undo
1 1
 <?php
2 2
 $module_name = 'AOS_Products';
3 3
 $viewdefs [$module_name] = 
4
-array (
4
+array(
5 5
   'EditView' => 
6
-  array (
6
+  array(
7 7
     'templateMeta' => 
8
-    array (
8
+    array(
9 9
       'maxColumns' => '2',
10 10
       'widths' => 
11
-      array (
11
+      array(
12 12
         0 => 
13
-        array (
13
+        array(
14 14
           'label' => '10',
15 15
           'field' => '30',
16 16
         ),
17 17
         1 => 
18
-        array (
18
+        array(
19 19
           'label' => '10',
20 20
           'field' => '30',
21 21
         ),
22 22
       ),
23 23
       'form' => 
24
-      array (
24
+      array(
25 25
         'enctype' => 'multipart/form-data',
26 26
         'headerTpl' => 'modules/AOS_Products/tpls/EditViewHeader.tpl',
27 27
       ),
28 28
       'includes' => 
29
-      array (
29
+      array(
30 30
         0 => 
31
-        array (
31
+        array(
32 32
           'file' => 'modules/AOS_Products/js/products.js',
33 33
         ),
34 34
       ),
35 35
       'useTabs' => false,
36 36
       'tabDefs' => 
37
-      array (
37
+      array(
38 38
         'DEFAULT' => 
39
-        array (
39
+        array(
40 40
           'newTab' => false,
41 41
           'panelDefault' => 'expanded',
42 42
         ),
43 43
       ),
44 44
     ),
45 45
     'panels' => 
46
-    array (
46
+    array(
47 47
       'default' => 
48
-      array (
48
+      array(
49 49
         0 => 
50
-        array (
50
+        array(
51 51
           0 => 
52
-          array (
52
+          array(
53 53
             'name' => 'name',
54 54
             'label' => 'LBL_NAME',
55 55
           ),
56 56
           1 => 
57
-          array (
57
+          array(
58 58
             'name' => 'part_number',
59 59
             'label' => 'LBL_PART_NUMBER',
60 60
           ),
61 61
         ),
62 62
         1 => 
63
-        array (
63
+        array(
64 64
           0 => 
65
-          array (
65
+          array(
66 66
             'name' => 'aos_product_category_name',
67 67
             'label' => 'LBL_AOS_PRODUCT_CATEGORYS_NAME',
68 68
           ),
69 69
           1 => 
70
-          array (
70
+          array(
71 71
             'name' => 'type',
72 72
             'label' => 'LBL_TYPE',
73 73
           ),
74 74
         ),
75 75
         2 => 
76
-        array (
76
+        array(
77 77
           0 => 
78
-          array (
78
+          array(
79 79
             'name' => 'currency_id',
80 80
             'studio' => 'visible',
81 81
             'label' => 'LBL_CURRENCY',
82 82
           ),
83 83
         ),
84 84
         3 => 
85
-        array (
85
+        array(
86 86
           0 => 
87
-          array (
87
+          array(
88 88
             'name' => 'cost',
89 89
             'label' => 'LBL_COST',
90 90
           ),
91 91
           1 => 
92
-          array (
92
+          array(
93 93
             'name' => 'price',
94 94
             'label' => 'LBL_PRICE',
95 95
           ),
96 96
         ),
97 97
         4 => 
98
-        array (
98
+        array(
99 99
           0 => 
100
-          array (
100
+          array(
101 101
             'name' => 'contact',
102 102
             'label' => 'LBL_CONTACT',
103 103
           ),
104 104
           1 => 
105
-          array (
105
+          array(
106 106
             'name' => 'url',
107 107
             'label' => 'LBL_URL',
108 108
           ),
109 109
         ),
110 110
         5 => 
111
-        array (
111
+        array(
112 112
           0 => 
113
-          array (
113
+          array(
114 114
             'name' => 'description',
115 115
             'label' => 'LBL_DESCRIPTION',
116 116
           ),
117 117
         ),
118 118
         6 => 
119
-        array (
119
+        array(
120 120
           0 => 
121
-          array (
121
+          array(
122 122
             'name' => 'product_image',
123 123
             'customCode' => '{$PRODUCT_IMAGE}',
124 124
           ),
Please login to merge, or discard this patch.
modules/AOS_Products/metadata/popupdefs.php 2 patches
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -4,94 +4,94 @@
 block discarded – undo
4 4
     'varName' => 'AOS_Products',
5 5
     'orderBy' => 'aos_products.name',
6 6
     'whereClauses' => array (
7
-  'name' => 'aos_products.name',
8
-  'part_number' => 'aos_products.part_number',
9
-  'cost' => 'aos_products.cost',
10
-  'price' => 'aos_products.price',
11
-  'created_by' => 'aos_products.created_by',
7
+    'name' => 'aos_products.name',
8
+    'part_number' => 'aos_products.part_number',
9
+    'cost' => 'aos_products.cost',
10
+    'price' => 'aos_products.price',
11
+    'created_by' => 'aos_products.created_by',
12 12
 ),
13 13
     'searchInputs' => array (
14
-  1 => 'name',
15
-  4 => 'part_number',
16
-  5 => 'cost',
17
-  6 => 'price',
18
-  7 => 'created_by',
14
+    1 => 'name',
15
+    4 => 'part_number',
16
+    5 => 'cost',
17
+    6 => 'price',
18
+    7 => 'created_by',
19 19
 ),
20 20
     'searchdefs' => array (
21
-  'name' => 
22
-  array (
21
+    'name' => 
22
+    array (
23 23
     'name' => 'name',
24 24
     'width' => '10%',
25
-  ),
26
-  'part_number' => 
27
-  array (
25
+    ),
26
+    'part_number' => 
27
+    array (
28 28
     'name' => 'part_number',
29 29
     'width' => '10%',
30
-  ),
31
-  'cost' => 
32
-  array (
30
+    ),
31
+    'cost' => 
32
+    array (
33 33
     'name' => 'cost',
34 34
     'width' => '10%',
35
-  ),
36
-  'price' => 
37
-  array (
35
+    ),
36
+    'price' => 
37
+    array (
38 38
     'name' => 'price',
39 39
     'width' => '10%',
40
-  ),
41
-  'created_by' => 
42
-  array (
40
+    ),
41
+    'created_by' => 
42
+    array (
43 43
     'name' => 'created_by',
44 44
     'label' => 'LBL_CREATED',
45 45
     'type' => 'enum',
46 46
     'function' => 
47 47
     array (
48
-      'name' => 'get_user_array',
49
-      'params' => 
50
-      array (
48
+        'name' => 'get_user_array',
49
+        'params' => 
50
+        array (
51 51
         0 => false,
52
-      ),
52
+        ),
53 53
     ),
54 54
     'width' => '10%',
55
-  ),
55
+    ),
56 56
 ),
57 57
     'listviewdefs' => array (
58
-  'NAME' => 
59
-  array (
58
+    'NAME' => 
59
+    array (
60 60
     'width' => '25%',
61 61
     'label' => 'LBL_NAME',
62 62
     'default' => true,
63 63
     'link' => true,
64 64
     'name' => 'name',
65
-  ),
66
-  'PART_NUMBER' => 
67
-  array (
65
+    ),
66
+    'PART_NUMBER' => 
67
+    array (
68 68
     'width' => '10%',
69 69
     'label' => 'LBL_PART_NUMBER',
70 70
     'default' => true,
71 71
     'name' => 'part_number',
72
-  ),
73
-  'COST' => 
74
-  array (
72
+    ),
73
+    'COST' => 
74
+    array (
75 75
     'width' => '10%',
76 76
     'label' => 'LBL_COST',
77 77
     'default' => true,
78 78
     'name' => 'cost',
79
-  ),
80
-  'PRICE' => 
81
-  array (
79
+    ),
80
+    'PRICE' => 
81
+    array (
82 82
     'width' => '10%',
83 83
     'label' => 'LBL_PRICE',
84 84
     'default' => true,
85 85
     'name' => 'price',
86
-  ),
87
-  'CURRENCY_ID' =>
88
-  array (
86
+    ),
87
+    'CURRENCY_ID' =>
88
+    array (
89 89
     'type' => 'id',
90 90
     'studio' => 'visible',
91 91
     'label' => 'LBL_CURRENCY',
92 92
     'width' => '10%',
93 93
     'default' => false,
94 94
     'name' => 'currency_id',
95
-  ),
95
+    ),
96 96
 ),
97 97
 );
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,62 +1,62 @@  discard block
 block discarded – undo
1 1
 <?php
2
-$popupMeta = array (
2
+$popupMeta = array(
3 3
     'moduleMain' => 'AOS_Products',
4 4
     'varName' => 'AOS_Products',
5 5
     'orderBy' => 'aos_products.name',
6
-    'whereClauses' => array (
6
+    'whereClauses' => array(
7 7
   'name' => 'aos_products.name',
8 8
   'part_number' => 'aos_products.part_number',
9 9
   'cost' => 'aos_products.cost',
10 10
   'price' => 'aos_products.price',
11 11
   'created_by' => 'aos_products.created_by',
12 12
 ),
13
-    'searchInputs' => array (
13
+    'searchInputs' => array(
14 14
   1 => 'name',
15 15
   4 => 'part_number',
16 16
   5 => 'cost',
17 17
   6 => 'price',
18 18
   7 => 'created_by',
19 19
 ),
20
-    'searchdefs' => array (
20
+    'searchdefs' => array(
21 21
   'name' => 
22
-  array (
22
+  array(
23 23
     'name' => 'name',
24 24
     'width' => '10%',
25 25
   ),
26 26
   'part_number' => 
27
-  array (
27
+  array(
28 28
     'name' => 'part_number',
29 29
     'width' => '10%',
30 30
   ),
31 31
   'cost' => 
32
-  array (
32
+  array(
33 33
     'name' => 'cost',
34 34
     'width' => '10%',
35 35
   ),
36 36
   'price' => 
37
-  array (
37
+  array(
38 38
     'name' => 'price',
39 39
     'width' => '10%',
40 40
   ),
41 41
   'created_by' => 
42
-  array (
42
+  array(
43 43
     'name' => 'created_by',
44 44
     'label' => 'LBL_CREATED',
45 45
     'type' => 'enum',
46 46
     'function' => 
47
-    array (
47
+    array(
48 48
       'name' => 'get_user_array',
49 49
       'params' => 
50
-      array (
50
+      array(
51 51
         0 => false,
52 52
       ),
53 53
     ),
54 54
     'width' => '10%',
55 55
   ),
56 56
 ),
57
-    'listviewdefs' => array (
57
+    'listviewdefs' => array(
58 58
   'NAME' => 
59
-  array (
59
+  array(
60 60
     'width' => '25%',
61 61
     'label' => 'LBL_NAME',
62 62
     'default' => true,
@@ -64,28 +64,28 @@  discard block
 block discarded – undo
64 64
     'name' => 'name',
65 65
   ),
66 66
   'PART_NUMBER' => 
67
-  array (
67
+  array(
68 68
     'width' => '10%',
69 69
     'label' => 'LBL_PART_NUMBER',
70 70
     'default' => true,
71 71
     'name' => 'part_number',
72 72
   ),
73 73
   'COST' => 
74
-  array (
74
+  array(
75 75
     'width' => '10%',
76 76
     'label' => 'LBL_COST',
77 77
     'default' => true,
78 78
     'name' => 'cost',
79 79
   ),
80 80
   'PRICE' => 
81
-  array (
81
+  array(
82 82
     'width' => '10%',
83 83
     'label' => 'LBL_PRICE',
84 84
     'default' => true,
85 85
     'name' => 'price',
86 86
   ),
87 87
   'CURRENCY_ID' =>
88
-  array (
88
+  array(
89 89
     'type' => 'id',
90 90
     'studio' => 'visible',
91 91
     'label' => 'LBL_CURRENCY',
Please login to merge, or discard this patch.
modules/AOS_Products/metadata/searchdefs.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -2,71 +2,71 @@
 block discarded – undo
2 2
 $module_name = 'AOS_Products';
3 3
 $searchdefs [$module_name] = 
4 4
 array (
5
-  'layout' => 
6
-  array (
5
+    'layout' => 
6
+    array (
7 7
     'basic_search' => 
8 8
     array (
9
-      0 => 'name',
10
-      1 => 
11
-      array (
9
+        0 => 'name',
10
+        1 => 
11
+        array (
12 12
         'name' => 'current_user_only',
13 13
         'label' => 'LBL_CURRENT_USER_FILTER',
14 14
         'type' => 'bool',
15
-      ),
15
+        ),
16 16
         'favorites_only' => array ('name' => 'favorites_only','label' => 'LBL_FAVORITES_FILTER','type' => 'bool',),
17 17
     ),
18 18
     'advanced_search' => 
19 19
     array (
20
-      'name' => 
21
-      array (
20
+        'name' => 
21
+        array (
22 22
         'name' => 'name',
23 23
         'default' => true,
24 24
         'width' => '10%',
25
-      ),
26
-      'part_number' => 
27
-      array (
25
+        ),
26
+        'part_number' => 
27
+        array (
28 28
         'name' => 'part_number',
29 29
         'default' => true,
30 30
         'width' => '10%',
31
-      ),
32
-      'cost' => 
33
-      array (
31
+        ),
32
+        'cost' => 
33
+        array (
34 34
         'name' => 'cost',
35 35
         'default' => true,
36 36
         'width' => '10%',
37
-      ),
38
-      'price' => 
39
-      array (
37
+        ),
38
+        'price' => 
39
+        array (
40 40
         'name' => 'price',
41 41
         'default' => true,
42 42
         'width' => '10%',
43
-      ),
44
-      'created_by' => 
45
-      array (
43
+        ),
44
+        'created_by' => 
45
+        array (
46 46
         'name' => 'created_by',
47 47
         'label' => 'LBL_CREATED',
48 48
         'type' => 'enum',
49 49
         'function' => 
50 50
         array (
51
-          'name' => 'get_user_array',
52
-          'params' => 
53
-          array (
51
+            'name' => 'get_user_array',
52
+            'params' => 
53
+            array (
54 54
             0 => false,
55
-          ),
55
+            ),
56 56
         ),
57 57
         'default' => true,
58 58
         'width' => '10%',
59
-      ),
59
+        ),
60
+    ),
60 61
     ),
61
-  ),
62
-  'templateMeta' => 
63
-  array (
62
+    'templateMeta' => 
63
+    array (
64 64
     'maxColumns' => '3',
65 65
     'widths' => 
66 66
     array (
67
-      'label' => '10',
68
-      'field' => '30',
67
+        'label' => '10',
68
+        'field' => '30',
69
+    ),
69 70
     ),
70
-  ),
71 71
 );
72 72
 ?>
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,56 +1,56 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $module_name = 'AOS_Products';
3 3
 $searchdefs [$module_name] = 
4
-array (
4
+array(
5 5
   'layout' => 
6
-  array (
6
+  array(
7 7
     'basic_search' => 
8
-    array (
8
+    array(
9 9
       0 => 'name',
10 10
       1 => 
11
-      array (
11
+      array(
12 12
         'name' => 'current_user_only',
13 13
         'label' => 'LBL_CURRENT_USER_FILTER',
14 14
         'type' => 'bool',
15 15
       ),
16
-        'favorites_only' => array ('name' => 'favorites_only','label' => 'LBL_FAVORITES_FILTER','type' => 'bool',),
16
+        'favorites_only' => array('name' => 'favorites_only', 'label' => 'LBL_FAVORITES_FILTER', 'type' => 'bool',),
17 17
     ),
18 18
     'advanced_search' => 
19
-    array (
19
+    array(
20 20
       'name' => 
21
-      array (
21
+      array(
22 22
         'name' => 'name',
23 23
         'default' => true,
24 24
         'width' => '10%',
25 25
       ),
26 26
       'part_number' => 
27
-      array (
27
+      array(
28 28
         'name' => 'part_number',
29 29
         'default' => true,
30 30
         'width' => '10%',
31 31
       ),
32 32
       'cost' => 
33
-      array (
33
+      array(
34 34
         'name' => 'cost',
35 35
         'default' => true,
36 36
         'width' => '10%',
37 37
       ),
38 38
       'price' => 
39
-      array (
39
+      array(
40 40
         'name' => 'price',
41 41
         'default' => true,
42 42
         'width' => '10%',
43 43
       ),
44 44
       'created_by' => 
45
-      array (
45
+      array(
46 46
         'name' => 'created_by',
47 47
         'label' => 'LBL_CREATED',
48 48
         'type' => 'enum',
49 49
         'function' => 
50
-        array (
50
+        array(
51 51
           'name' => 'get_user_array',
52 52
           'params' => 
53
-          array (
53
+          array(
54 54
             0 => false,
55 55
           ),
56 56
         ),
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
     ),
61 61
   ),
62 62
   'templateMeta' => 
63
-  array (
63
+  array(
64 64
     'maxColumns' => '3',
65 65
     'widths' => 
66
-    array (
66
+    array(
67 67
       'label' => '10',
68 68
       'field' => '30',
69 69
     ),
Please login to merge, or discard this patch.