@@ -40,150 +40,150 @@ discard block |
||
40 | 40 | |
41 | 41 | $viewdefs ['Calls'] = |
42 | 42 | array ( |
43 | - 'DetailView' => |
|
44 | - array ( |
|
43 | + 'DetailView' => |
|
44 | + array ( |
|
45 | 45 | 'templateMeta' => |
46 | 46 | array ( |
47 | - 'form' => |
|
48 | - array ( |
|
47 | + 'form' => |
|
48 | + array ( |
|
49 | 49 | 'buttons' => |
50 | 50 | array ( |
51 | - 0 => 'EDIT', |
|
52 | - 1 => 'DUPLICATE', |
|
53 | - 2 => 'DELETE', |
|
54 | - 3 => |
|
55 | - array ( |
|
51 | + 0 => 'EDIT', |
|
52 | + 1 => 'DUPLICATE', |
|
53 | + 2 => 'DELETE', |
|
54 | + 3 => |
|
55 | + array ( |
|
56 | 56 | 'customCode' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")} <input type="hidden" name="isSaveAndNew" value="false"> <input type="hidden" name="status" value=""> <input type="hidden" name="isSaveFromDetailView" value="true"> <input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" class="button" onclick="this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'" id="close_create_button" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" type="submit">{/if}', |
57 | 57 | 'sugar_html' => |
58 | 58 | array ( |
59 | - 'type' => 'submit', |
|
60 | - 'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}', |
|
61 | - 'htmlOptions' => |
|
62 | - array ( |
|
59 | + 'type' => 'submit', |
|
60 | + 'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}', |
|
61 | + 'htmlOptions' => |
|
62 | + array ( |
|
63 | 63 | 'title' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}', |
64 | 64 | 'class' => 'button', |
65 | 65 | 'onclick' => 'this.form.isSaveFromDetailView.value=true; this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'', |
66 | 66 | 'name' => 'button', |
67 | 67 | 'id' => 'close_create_button', |
68 | - ), |
|
69 | - 'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}', |
|
68 | + ), |
|
69 | + 'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}', |
|
70 | + ), |
|
70 | 71 | ), |
71 | - ), |
|
72 | - 4 => |
|
73 | - array ( |
|
72 | + 4 => |
|
73 | + array ( |
|
74 | 74 | 'customCode' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")} <input type="hidden" name="isSave" value="false"> <input title="{$APP.LBL_CLOSE_BUTTON_TITLE}" accesskey="{$APP.LBL_CLOSE_BUTTON_KEY}" class="button" onclick="this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'" id="close_button" name="button1" value="{$APP.LBL_CLOSE_BUTTON_TITLE}" type="submit">{/if}', |
75 | 75 | 'sugar_html' => |
76 | 76 | array ( |
77 | - 'type' => 'submit', |
|
78 | - 'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}', |
|
79 | - 'htmlOptions' => |
|
80 | - array ( |
|
77 | + 'type' => 'submit', |
|
78 | + 'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}', |
|
79 | + 'htmlOptions' => |
|
80 | + array ( |
|
81 | 81 | 'title' => '{$APP.LBL_CLOSE_BUTTON_TITLE}', |
82 | 82 | 'accesskey' => '{$APP.LBL_CLOSE_BUTTON_KEY}', |
83 | 83 | 'class' => 'button', |
84 | 84 | 'onclick' => 'this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\';this.form.isSaveFromDetailView.value=true', |
85 | 85 | 'name' => 'button1', |
86 | 86 | 'id' => 'close_button', |
87 | - ), |
|
88 | - 'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}', |
|
87 | + ), |
|
88 | + 'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}', |
|
89 | + ), |
|
89 | 90 | ), |
90 | - ), |
|
91 | - 'SA_RESCHEDULE' => |
|
92 | - array ( |
|
91 | + 'SA_RESCHEDULE' => |
|
92 | + array ( |
|
93 | 93 | 'customCode' => '{if $fields.status.value != "Held"} <input title="{$MOD.LBL_RESCHEDULE}" class="button" onclick="get_form();" name="Reschedule" id="reschedule_button" value="{$MOD.LBL_RESCHEDULE}" type="button">{/if}', |
94 | - ), |
|
94 | + ), |
|
95 | 95 | ), |
96 | 96 | 'hidden' => |
97 | 97 | array ( |
98 | - 0 => '<input type="hidden" name="isSaveAndNew">', |
|
99 | - 1 => '<input type="hidden" name="status">', |
|
100 | - 2 => '<input type="hidden" name="isSaveFromDetailView">', |
|
101 | - 3 => '<input type="hidden" name="isSave">', |
|
98 | + 0 => '<input type="hidden" name="isSaveAndNew">', |
|
99 | + 1 => '<input type="hidden" name="status">', |
|
100 | + 2 => '<input type="hidden" name="isSaveFromDetailView">', |
|
101 | + 3 => '<input type="hidden" name="isSave">', |
|
102 | 102 | ), |
103 | 103 | 'headerTpl' => 'modules/Calls/tpls/detailHeader.tpl', |
104 | - ), |
|
105 | - 'maxColumns' => '2', |
|
106 | - 'widths' => |
|
107 | - array ( |
|
104 | + ), |
|
105 | + 'maxColumns' => '2', |
|
106 | + 'widths' => |
|
107 | + array ( |
|
108 | 108 | 0 => |
109 | 109 | array ( |
110 | - 'label' => '10', |
|
111 | - 'field' => '30', |
|
110 | + 'label' => '10', |
|
111 | + 'field' => '30', |
|
112 | 112 | ), |
113 | 113 | 1 => |
114 | 114 | array ( |
115 | - 'label' => '10', |
|
116 | - 'field' => '30', |
|
115 | + 'label' => '10', |
|
116 | + 'field' => '30', |
|
117 | 117 | ), |
118 | - ), |
|
119 | - 'useTabs' => true, |
|
120 | - 'includes' => |
|
121 | - array ( |
|
118 | + ), |
|
119 | + 'useTabs' => true, |
|
120 | + 'includes' => |
|
121 | + array ( |
|
122 | 122 | 'SA_RESCHEDULE' => |
123 | 123 | array ( |
124 | - 'file' => 'modules/Calls_Reschedule/reschedule_form.js', |
|
124 | + 'file' => 'modules/Calls_Reschedule/reschedule_form.js', |
|
125 | + ), |
|
126 | + array('file' => 'modules/Reminders/Reminders.js'), |
|
125 | 127 | ), |
126 | - array('file' => 'modules/Reminders/Reminders.js'), |
|
127 | - ), |
|
128 | - 'tabDefs' => |
|
129 | - array ( |
|
128 | + 'tabDefs' => |
|
129 | + array ( |
|
130 | 130 | 'LBL_CALL_INFORMATION' => |
131 | 131 | array ( |
132 | - 'newTab' => true, |
|
133 | - 'panelDefault' => 'expanded', |
|
132 | + 'newTab' => true, |
|
133 | + 'panelDefault' => 'expanded', |
|
134 | 134 | ), |
135 | 135 | 'LBL_RESCHEDULE_PANEL' => |
136 | 136 | array ( |
137 | - 'newTab' => true, |
|
138 | - 'panelDefault' => 'expanded', |
|
137 | + 'newTab' => true, |
|
138 | + 'panelDefault' => 'expanded', |
|
139 | 139 | ), |
140 | 140 | 'LBL_PANEL_ASSIGNMENT' => |
141 | 141 | array ( |
142 | - 'newTab' => true, |
|
143 | - 'panelDefault' => 'expanded', |
|
142 | + 'newTab' => true, |
|
143 | + 'panelDefault' => 'expanded', |
|
144 | + ), |
|
144 | 145 | ), |
145 | - ), |
|
146 | 146 | ), |
147 | 147 | 'panels' => |
148 | 148 | array ( |
149 | - 'lbl_call_information' => |
|
150 | - array ( |
|
149 | + 'lbl_call_information' => |
|
150 | + array ( |
|
151 | 151 | 0 => |
152 | 152 | array ( |
153 | - 0 => |
|
154 | - array ( |
|
153 | + 0 => |
|
154 | + array ( |
|
155 | 155 | 'name' => 'name', |
156 | 156 | 'label' => 'LBL_SUBJECT', |
157 | - ), |
|
158 | - 1 => |
|
159 | - array ( |
|
157 | + ), |
|
158 | + 1 => |
|
159 | + array ( |
|
160 | 160 | 'name' => 'direction', |
161 | 161 | 'customCode' => '{$fields.direction.options[$fields.direction.value]} {$fields.status.options[$fields.status.value]}', |
162 | 162 | 'label' => 'LBL_STATUS', |
163 | - ), |
|
163 | + ), |
|
164 | 164 | ), |
165 | 165 | 1 => |
166 | 166 | array ( |
167 | - 0 => |
|
168 | - array ( |
|
167 | + 0 => |
|
168 | + array ( |
|
169 | 169 | 'name' => 'date_start', |
170 | 170 | 'customCode' => '{$fields.date_start.value} {$fields.time_start.value} ', |
171 | 171 | 'label' => 'LBL_DATE_TIME', |
172 | - ), |
|
173 | - 1 => |
|
174 | - array ( |
|
172 | + ), |
|
173 | + 1 => |
|
174 | + array ( |
|
175 | 175 | 'name' => 'parent_name', |
176 | 176 | 'customLabel' => '{sugar_translate label=\'LBL_MODULE_NAME\' module=$fields.parent_type.value}', |
177 | - ), |
|
177 | + ), |
|
178 | 178 | ), |
179 | 179 | 2 => |
180 | 180 | array ( |
181 | - 0 => |
|
182 | - array ( |
|
181 | + 0 => |
|
182 | + array ( |
|
183 | 183 | 'name' => 'duration_hours', |
184 | 184 | 'customCode' => '{$fields.duration_hours.value}{$MOD.LBL_HOURS_ABBREV} {$fields.duration_minutes.value}{$MOD.LBL_MINSS_ABBREV} ', |
185 | 185 | 'label' => 'LBL_DURATION', |
186 | - ), |
|
186 | + ), |
|
187 | 187 | // 1 => |
188 | 188 | // array ( |
189 | 189 | // 'name' => 'reminder_time', |
@@ -197,55 +197,55 @@ discard block |
||
197 | 197 | ), |
198 | 198 | 3 => |
199 | 199 | array ( |
200 | - 0 => |
|
201 | - array ( |
|
200 | + 0 => |
|
201 | + array ( |
|
202 | 202 | 'name' => 'description', |
203 | 203 | 'comment' => 'Full text of the note', |
204 | 204 | 'label' => 'LBL_DESCRIPTION', |
205 | - ), |
|
205 | + ), |
|
206 | 206 | ), |
207 | 207 | 4 => |
208 | 208 | array ( |
209 | - 0 => |
|
210 | - array ( |
|
209 | + 0 => |
|
210 | + array ( |
|
211 | 211 | 'name' => 'assigned_user_name', |
212 | 212 | 'customCode' => '{$fields.assigned_user_name.value}', |
213 | 213 | 'label' => 'LBL_ASSIGNED_TO', |
214 | - ), |
|
214 | + ), |
|
215 | 215 | ), |
216 | - ), |
|
217 | - 'lbl_reschedule_panel' => |
|
218 | - array ( |
|
216 | + ), |
|
217 | + 'lbl_reschedule_panel' => |
|
218 | + array ( |
|
219 | 219 | 0 => |
220 | 220 | array ( |
221 | - 0 => |
|
222 | - array ( |
|
221 | + 0 => |
|
222 | + array ( |
|
223 | 223 | 'name' => 'reschedule_history', |
224 | 224 | 'comment' => 'Call duration, minutes portion', |
225 | 225 | 'label' => 'LBL_RESCHEDULE_HISTORY', |
226 | - ), |
|
227 | - 1 => '', |
|
226 | + ), |
|
227 | + 1 => '', |
|
228 | + ), |
|
228 | 229 | ), |
229 | - ), |
|
230 | - 'LBL_PANEL_ASSIGNMENT' => |
|
231 | - array ( |
|
230 | + 'LBL_PANEL_ASSIGNMENT' => |
|
231 | + array ( |
|
232 | 232 | 0 => |
233 | 233 | array ( |
234 | - 0 => |
|
235 | - array ( |
|
234 | + 0 => |
|
235 | + array ( |
|
236 | 236 | 'name' => 'date_entered', |
237 | 237 | 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value} ', |
238 | 238 | 'label' => 'LBL_DATE_ENTERED', |
239 | - ), |
|
240 | - 1 => |
|
241 | - array ( |
|
239 | + ), |
|
240 | + 1 => |
|
241 | + array ( |
|
242 | 242 | 'name' => 'date_modified', |
243 | 243 | 'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value} ', |
244 | 244 | 'label' => 'LBL_DATE_MODIFIED', |
245 | - ), |
|
245 | + ), |
|
246 | 246 | ), |
247 | - ), |
|
247 | + ), |
|
248 | + ), |
|
248 | 249 | ), |
249 | - ), |
|
250 | 250 | ); |
251 | 251 | ?> |
@@ -39,27 +39,27 @@ discard block |
||
39 | 39 | |
40 | 40 | |
41 | 41 | $viewdefs ['Calls'] = |
42 | -array ( |
|
42 | +array( |
|
43 | 43 | 'DetailView' => |
44 | - array ( |
|
44 | + array( |
|
45 | 45 | 'templateMeta' => |
46 | - array ( |
|
46 | + array( |
|
47 | 47 | 'form' => |
48 | - array ( |
|
48 | + array( |
|
49 | 49 | 'buttons' => |
50 | - array ( |
|
50 | + array( |
|
51 | 51 | 0 => 'EDIT', |
52 | 52 | 1 => 'DUPLICATE', |
53 | 53 | 2 => 'DELETE', |
54 | 54 | 3 => |
55 | - array ( |
|
55 | + array( |
|
56 | 56 | 'customCode' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")} <input type="hidden" name="isSaveAndNew" value="false"> <input type="hidden" name="status" value=""> <input type="hidden" name="isSaveFromDetailView" value="true"> <input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" class="button" onclick="this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'" id="close_create_button" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" type="submit">{/if}', |
57 | 57 | 'sugar_html' => |
58 | - array ( |
|
58 | + array( |
|
59 | 59 | 'type' => 'submit', |
60 | 60 | 'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}', |
61 | 61 | 'htmlOptions' => |
62 | - array ( |
|
62 | + array( |
|
63 | 63 | 'title' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}', |
64 | 64 | 'class' => 'button', |
65 | 65 | 'onclick' => 'this.form.isSaveFromDetailView.value=true; this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'', |
@@ -70,14 +70,14 @@ discard block |
||
70 | 70 | ), |
71 | 71 | ), |
72 | 72 | 4 => |
73 | - array ( |
|
73 | + array( |
|
74 | 74 | 'customCode' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")} <input type="hidden" name="isSave" value="false"> <input title="{$APP.LBL_CLOSE_BUTTON_TITLE}" accesskey="{$APP.LBL_CLOSE_BUTTON_KEY}" class="button" onclick="this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'" id="close_button" name="button1" value="{$APP.LBL_CLOSE_BUTTON_TITLE}" type="submit">{/if}', |
75 | 75 | 'sugar_html' => |
76 | - array ( |
|
76 | + array( |
|
77 | 77 | 'type' => 'submit', |
78 | 78 | 'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}', |
79 | 79 | 'htmlOptions' => |
80 | - array ( |
|
80 | + array( |
|
81 | 81 | 'title' => '{$APP.LBL_CLOSE_BUTTON_TITLE}', |
82 | 82 | 'accesskey' => '{$APP.LBL_CLOSE_BUTTON_KEY}', |
83 | 83 | 'class' => 'button', |
@@ -89,12 +89,12 @@ discard block |
||
89 | 89 | ), |
90 | 90 | ), |
91 | 91 | 'SA_RESCHEDULE' => |
92 | - array ( |
|
92 | + array( |
|
93 | 93 | 'customCode' => '{if $fields.status.value != "Held"} <input title="{$MOD.LBL_RESCHEDULE}" class="button" onclick="get_form();" name="Reschedule" id="reschedule_button" value="{$MOD.LBL_RESCHEDULE}" type="button">{/if}', |
94 | 94 | ), |
95 | 95 | ), |
96 | 96 | 'hidden' => |
97 | - array ( |
|
97 | + array( |
|
98 | 98 | 0 => '<input type="hidden" name="isSaveAndNew">', |
99 | 99 | 1 => '<input type="hidden" name="status">', |
100 | 100 | 2 => '<input type="hidden" name="isSaveFromDetailView">', |
@@ -104,82 +104,82 @@ discard block |
||
104 | 104 | ), |
105 | 105 | 'maxColumns' => '2', |
106 | 106 | 'widths' => |
107 | - array ( |
|
107 | + array( |
|
108 | 108 | 0 => |
109 | - array ( |
|
109 | + array( |
|
110 | 110 | 'label' => '10', |
111 | 111 | 'field' => '30', |
112 | 112 | ), |
113 | 113 | 1 => |
114 | - array ( |
|
114 | + array( |
|
115 | 115 | 'label' => '10', |
116 | 116 | 'field' => '30', |
117 | 117 | ), |
118 | 118 | ), |
119 | 119 | 'useTabs' => true, |
120 | 120 | 'includes' => |
121 | - array ( |
|
121 | + array( |
|
122 | 122 | 'SA_RESCHEDULE' => |
123 | - array ( |
|
123 | + array( |
|
124 | 124 | 'file' => 'modules/Calls_Reschedule/reschedule_form.js', |
125 | 125 | ), |
126 | 126 | array('file' => 'modules/Reminders/Reminders.js'), |
127 | 127 | ), |
128 | 128 | 'tabDefs' => |
129 | - array ( |
|
129 | + array( |
|
130 | 130 | 'LBL_CALL_INFORMATION' => |
131 | - array ( |
|
131 | + array( |
|
132 | 132 | 'newTab' => true, |
133 | 133 | 'panelDefault' => 'expanded', |
134 | 134 | ), |
135 | 135 | 'LBL_RESCHEDULE_PANEL' => |
136 | - array ( |
|
136 | + array( |
|
137 | 137 | 'newTab' => true, |
138 | 138 | 'panelDefault' => 'expanded', |
139 | 139 | ), |
140 | 140 | 'LBL_PANEL_ASSIGNMENT' => |
141 | - array ( |
|
141 | + array( |
|
142 | 142 | 'newTab' => true, |
143 | 143 | 'panelDefault' => 'expanded', |
144 | 144 | ), |
145 | 145 | ), |
146 | 146 | ), |
147 | 147 | 'panels' => |
148 | - array ( |
|
148 | + array( |
|
149 | 149 | 'lbl_call_information' => |
150 | - array ( |
|
150 | + array( |
|
151 | 151 | 0 => |
152 | - array ( |
|
152 | + array( |
|
153 | 153 | 0 => |
154 | - array ( |
|
154 | + array( |
|
155 | 155 | 'name' => 'name', |
156 | 156 | 'label' => 'LBL_SUBJECT', |
157 | 157 | ), |
158 | 158 | 1 => |
159 | - array ( |
|
159 | + array( |
|
160 | 160 | 'name' => 'direction', |
161 | 161 | 'customCode' => '{$fields.direction.options[$fields.direction.value]} {$fields.status.options[$fields.status.value]}', |
162 | 162 | 'label' => 'LBL_STATUS', |
163 | 163 | ), |
164 | 164 | ), |
165 | 165 | 1 => |
166 | - array ( |
|
166 | + array( |
|
167 | 167 | 0 => |
168 | - array ( |
|
168 | + array( |
|
169 | 169 | 'name' => 'date_start', |
170 | 170 | 'customCode' => '{$fields.date_start.value} {$fields.time_start.value} ', |
171 | 171 | 'label' => 'LBL_DATE_TIME', |
172 | 172 | ), |
173 | 173 | 1 => |
174 | - array ( |
|
174 | + array( |
|
175 | 175 | 'name' => 'parent_name', |
176 | 176 | 'customLabel' => '{sugar_translate label=\'LBL_MODULE_NAME\' module=$fields.parent_type.value}', |
177 | 177 | ), |
178 | 178 | ), |
179 | 179 | 2 => |
180 | - array ( |
|
180 | + array( |
|
181 | 181 | 0 => |
182 | - array ( |
|
182 | + array( |
|
183 | 183 | 'name' => 'duration_hours', |
184 | 184 | 'customCode' => '{$fields.duration_hours.value}{$MOD.LBL_HOURS_ABBREV} {$fields.duration_minutes.value}{$MOD.LBL_MINSS_ABBREV} ', |
185 | 185 | 'label' => 'LBL_DURATION', |
@@ -196,18 +196,18 @@ discard block |
||
196 | 196 | ), |
197 | 197 | ), |
198 | 198 | 3 => |
199 | - array ( |
|
199 | + array( |
|
200 | 200 | 0 => |
201 | - array ( |
|
201 | + array( |
|
202 | 202 | 'name' => 'description', |
203 | 203 | 'comment' => 'Full text of the note', |
204 | 204 | 'label' => 'LBL_DESCRIPTION', |
205 | 205 | ), |
206 | 206 | ), |
207 | 207 | 4 => |
208 | - array ( |
|
208 | + array( |
|
209 | 209 | 0 => |
210 | - array ( |
|
210 | + array( |
|
211 | 211 | 'name' => 'assigned_user_name', |
212 | 212 | 'customCode' => '{$fields.assigned_user_name.value}', |
213 | 213 | 'label' => 'LBL_ASSIGNED_TO', |
@@ -215,11 +215,11 @@ discard block |
||
215 | 215 | ), |
216 | 216 | ), |
217 | 217 | 'lbl_reschedule_panel' => |
218 | - array ( |
|
218 | + array( |
|
219 | 219 | 0 => |
220 | - array ( |
|
220 | + array( |
|
221 | 221 | 0 => |
222 | - array ( |
|
222 | + array( |
|
223 | 223 | 'name' => 'reschedule_history', |
224 | 224 | 'comment' => 'Call duration, minutes portion', |
225 | 225 | 'label' => 'LBL_RESCHEDULE_HISTORY', |
@@ -228,17 +228,17 @@ discard block |
||
228 | 228 | ), |
229 | 229 | ), |
230 | 230 | 'LBL_PANEL_ASSIGNMENT' => |
231 | - array ( |
|
231 | + array( |
|
232 | 232 | 0 => |
233 | - array ( |
|
233 | + array( |
|
234 | 234 | 0 => |
235 | - array ( |
|
235 | + array( |
|
236 | 236 | 'name' => 'date_entered', |
237 | 237 | 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value} ', |
238 | 238 | 'label' => 'LBL_DATE_ENTERED', |
239 | 239 | ), |
240 | 240 | 1 => |
241 | - array ( |
|
241 | + array( |
|
242 | 242 | 'name' => 'date_modified', |
243 | 243 | 'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value} ', |
244 | 244 | 'label' => 'LBL_DATE_MODIFIED', |
@@ -39,117 +39,117 @@ discard block |
||
39 | 39 | |
40 | 40 | $viewdefs ['Calls'] = |
41 | 41 | array ( |
42 | - 'QuickCreate' => |
|
43 | - array ( |
|
42 | + 'QuickCreate' => |
|
43 | + array ( |
|
44 | 44 | 'templateMeta' => |
45 | 45 | array ( |
46 | 46 | 'includes' => array( |
47 | 47 | array('file' => 'modules/Reminders/Reminders.js'), |
48 | 48 | ), |
49 | - 'maxColumns' => '2', |
|
50 | - 'form' => |
|
51 | - array ( |
|
49 | + 'maxColumns' => '2', |
|
50 | + 'form' => |
|
51 | + array ( |
|
52 | 52 | 'hidden' => |
53 | 53 | array ( |
54 | - 0 => '<input type="hidden" name="isSaveAndNew" value="false">', |
|
55 | - 1 => '<input type="hidden" name="send_invites">', |
|
56 | - 2 => '<input type="hidden" name="user_invitees">', |
|
57 | - 3 => '<input type="hidden" name="lead_invitees">', |
|
58 | - 4 => '<input type="hidden" name="contact_invitees">', |
|
54 | + 0 => '<input type="hidden" name="isSaveAndNew" value="false">', |
|
55 | + 1 => '<input type="hidden" name="send_invites">', |
|
56 | + 2 => '<input type="hidden" name="user_invitees">', |
|
57 | + 3 => '<input type="hidden" name="lead_invitees">', |
|
58 | + 4 => '<input type="hidden" name="contact_invitees">', |
|
59 | 59 | ), |
60 | 60 | 'buttons' => |
61 | 61 | array ( |
62 | - 0 => |
|
63 | - array ( |
|
62 | + 0 => |
|
63 | + array ( |
|
64 | 64 | 'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="SUGAR.calls.fill_invitees();this.form.action.value=\'Save\'; this.form.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}this.form.return_id.value=\'\'; {/if}return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">', |
65 | - ), |
|
66 | - 1 => 'CANCEL', |
|
67 | - 2 => |
|
68 | - array ( |
|
65 | + ), |
|
66 | + 1 => 'CANCEL', |
|
67 | + 2 => |
|
68 | + array ( |
|
69 | 69 | 'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" class="button" onclick="this.form.send_invites.value=\'1\';SUGAR.calls.fill_invitees();this.form.action.value=\'Save\';this.form.return_action.value=\'EditView\';this.form.return_module.value=\'{$smarty.request.return_module}\';return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">', |
70 | - ), |
|
71 | - 3 => |
|
72 | - array ( |
|
70 | + ), |
|
71 | + 3 => |
|
72 | + array ( |
|
73 | 73 | 'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" class="button" onclick="SUGAR.calls.fill_invitees(); this.form.status.value=\'Held\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Calls\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}', |
74 | - ), |
|
74 | + ), |
|
75 | + ), |
|
75 | 76 | ), |
76 | - ), |
|
77 | - 'widths' => |
|
78 | - array ( |
|
77 | + 'widths' => |
|
78 | + array ( |
|
79 | 79 | 0 => |
80 | 80 | array ( |
81 | - 'label' => '10', |
|
82 | - 'field' => '30', |
|
81 | + 'label' => '10', |
|
82 | + 'field' => '30', |
|
83 | 83 | ), |
84 | 84 | 1 => |
85 | 85 | array ( |
86 | - 'label' => '10', |
|
87 | - 'field' => '30', |
|
86 | + 'label' => '10', |
|
87 | + 'field' => '30', |
|
88 | + ), |
|
88 | 89 | ), |
89 | - ), |
|
90 | - 'javascript' => '<script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>'. |
|
90 | + 'javascript' => '<script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>'. |
|
91 | 91 | '{sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"}' . |
92 | 92 | '<script>toggle_portal_flag();function toggle_portal_flag() {literal} { {/literal} {$TOGGLE_JS} {literal} } {/literal} </script>', |
93 | 93 | |
94 | - 'useTabs' => false, |
|
94 | + 'useTabs' => false, |
|
95 | 95 | ), |
96 | 96 | 'panels' => |
97 | 97 | array ( |
98 | - 'default' => |
|
99 | - array ( |
|
98 | + 'default' => |
|
100 | 99 | array ( |
101 | - array ( |
|
100 | + array ( |
|
101 | + array ( |
|
102 | 102 | 'name' => 'name', |
103 | 103 | 'displayParams' => |
104 | 104 | array ( |
105 | - 'required' => true, |
|
105 | + 'required' => true, |
|
106 | + ), |
|
106 | 107 | ), |
107 | - ), |
|
108 | - array ( |
|
108 | + array ( |
|
109 | 109 | 'name' => 'status', |
110 | 110 | 'displayParams' => |
111 | 111 | array ( |
112 | - 'required' => true, |
|
112 | + 'required' => true, |
|
113 | 113 | ), |
114 | 114 | 'fields' => |
115 | 115 | array ( |
116 | - array ( |
|
116 | + array ( |
|
117 | 117 | 'name' => 'direction', |
118 | - ), |
|
119 | - array ( |
|
118 | + ), |
|
119 | + array ( |
|
120 | 120 | 'name' => 'status', |
121 | - ), |
|
121 | + ), |
|
122 | + ), |
|
122 | 123 | ), |
123 | - ), |
|
124 | 124 | ), |
125 | 125 | |
126 | 126 | array ( |
127 | - array ( |
|
127 | + array ( |
|
128 | 128 | 'name' => 'date_start', |
129 | 129 | 'type' => 'datetimecombo', |
130 | 130 | 'displayParams' => |
131 | 131 | array ( |
132 | - 'required' => true, |
|
133 | - 'updateCallback' => 'SugarWidgetScheduler.update_time();', |
|
132 | + 'required' => true, |
|
133 | + 'updateCallback' => 'SugarWidgetScheduler.update_time();', |
|
134 | 134 | ), |
135 | 135 | 'label' => 'LBL_DATE_TIME', |
136 | - ), |
|
137 | - array ( |
|
136 | + ), |
|
137 | + array ( |
|
138 | 138 | 'name' => 'parent_name', |
139 | 139 | 'label' => 'LBL_LIST_RELATED_TO', |
140 | - ), |
|
140 | + ), |
|
141 | 141 | ), |
142 | 142 | |
143 | 143 | array ( |
144 | - array ( |
|
144 | + array ( |
|
145 | 145 | 'name' => 'duration_hours', |
146 | 146 | 'label' => 'LBL_DURATION', |
147 | 147 | 'customCode' => '{literal}<script type="text/javascript">function isValidDuration() { form = document.getElementById(\'EditView\'); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { alert(\'{/literal}{$MOD.NOTICE_DURATION_TIME}{literal}\'); return false; } return true; }</script>{/literal}<input id="duration_hours" name="duration_hours" tabindex="1" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value} <span class="dateFormat">{$MOD.LBL_HOURS_MINUTES}', |
148 | 148 | 'displayParams' => |
149 | 149 | array ( |
150 | - 'required' => true, |
|
150 | + 'required' => true, |
|
151 | + ), |
|
151 | 152 | ), |
152 | - ), |
|
153 | 153 | // array( |
154 | 154 | // 'name' => 'reminder_time', |
155 | 155 | // 'customCode' => '{include file="modules/Meetings/tpls/reminders.tpl"}', |
@@ -164,21 +164,21 @@ discard block |
||
164 | 164 | ), |
165 | 165 | |
166 | 166 | array ( |
167 | - array ( |
|
167 | + array ( |
|
168 | 168 | 'name' => 'assigned_user_name', |
169 | 169 | 'label' => 'LBL_ASSIGNED_TO_NAME', |
170 | - ), |
|
170 | + ), |
|
171 | 171 | ), |
172 | 172 | |
173 | 173 | array ( |
174 | - array ( |
|
174 | + array ( |
|
175 | 175 | 'name' => 'description', |
176 | 176 | 'comment' => 'Full text of the note', |
177 | 177 | 'label' => 'LBL_DESCRIPTION', |
178 | - ), |
|
178 | + ), |
|
179 | + ), |
|
179 | 180 | ), |
180 | - ), |
|
181 | 181 | ), |
182 | - ), |
|
182 | + ), |
|
183 | 183 | ); |
184 | 184 | ?> |
@@ -38,19 +38,19 @@ discard block |
||
38 | 38 | ********************************************************************************/ |
39 | 39 | |
40 | 40 | $viewdefs ['Calls'] = |
41 | -array ( |
|
41 | +array( |
|
42 | 42 | 'QuickCreate' => |
43 | - array ( |
|
43 | + array( |
|
44 | 44 | 'templateMeta' => |
45 | - array ( |
|
45 | + array( |
|
46 | 46 | 'includes' => array( |
47 | 47 | array('file' => 'modules/Reminders/Reminders.js'), |
48 | 48 | ), |
49 | 49 | 'maxColumns' => '2', |
50 | 50 | 'form' => |
51 | - array ( |
|
51 | + array( |
|
52 | 52 | 'hidden' => |
53 | - array ( |
|
53 | + array( |
|
54 | 54 | 0 => '<input type="hidden" name="isSaveAndNew" value="false">', |
55 | 55 | 1 => '<input type="hidden" name="send_invites">', |
56 | 56 | 2 => '<input type="hidden" name="user_invitees">', |
@@ -58,95 +58,95 @@ discard block |
||
58 | 58 | 4 => '<input type="hidden" name="contact_invitees">', |
59 | 59 | ), |
60 | 60 | 'buttons' => |
61 | - array ( |
|
61 | + array( |
|
62 | 62 | 0 => |
63 | - array ( |
|
63 | + array( |
|
64 | 64 | 'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="SUGAR.calls.fill_invitees();this.form.action.value=\'Save\'; this.form.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}this.form.return_id.value=\'\'; {/if}return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">', |
65 | 65 | ), |
66 | 66 | 1 => 'CANCEL', |
67 | 67 | 2 => |
68 | - array ( |
|
68 | + array( |
|
69 | 69 | 'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" class="button" onclick="this.form.send_invites.value=\'1\';SUGAR.calls.fill_invitees();this.form.action.value=\'Save\';this.form.return_action.value=\'EditView\';this.form.return_module.value=\'{$smarty.request.return_module}\';return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">', |
70 | 70 | ), |
71 | 71 | 3 => |
72 | - array ( |
|
72 | + array( |
|
73 | 73 | 'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" class="button" onclick="SUGAR.calls.fill_invitees(); this.form.status.value=\'Held\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Calls\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}', |
74 | 74 | ), |
75 | 75 | ), |
76 | 76 | ), |
77 | 77 | 'widths' => |
78 | - array ( |
|
78 | + array( |
|
79 | 79 | 0 => |
80 | - array ( |
|
80 | + array( |
|
81 | 81 | 'label' => '10', |
82 | 82 | 'field' => '30', |
83 | 83 | ), |
84 | 84 | 1 => |
85 | - array ( |
|
85 | + array( |
|
86 | 86 | 'label' => '10', |
87 | 87 | 'field' => '30', |
88 | 88 | ), |
89 | 89 | ), |
90 | 90 | 'javascript' => '<script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>'. |
91 | - '{sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"}' . |
|
91 | + '{sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"}'. |
|
92 | 92 | '<script>toggle_portal_flag();function toggle_portal_flag() {literal} { {/literal} {$TOGGLE_JS} {literal} } {/literal} </script>', |
93 | 93 | |
94 | 94 | 'useTabs' => false, |
95 | 95 | ), |
96 | 96 | 'panels' => |
97 | - array ( |
|
97 | + array( |
|
98 | 98 | 'default' => |
99 | - array ( |
|
100 | - array ( |
|
101 | - array ( |
|
99 | + array( |
|
100 | + array( |
|
101 | + array( |
|
102 | 102 | 'name' => 'name', |
103 | 103 | 'displayParams' => |
104 | - array ( |
|
104 | + array( |
|
105 | 105 | 'required' => true, |
106 | 106 | ), |
107 | 107 | ), |
108 | - array ( |
|
108 | + array( |
|
109 | 109 | 'name' => 'status', |
110 | 110 | 'displayParams' => |
111 | - array ( |
|
111 | + array( |
|
112 | 112 | 'required' => true, |
113 | 113 | ), |
114 | 114 | 'fields' => |
115 | - array ( |
|
116 | - array ( |
|
115 | + array( |
|
116 | + array( |
|
117 | 117 | 'name' => 'direction', |
118 | 118 | ), |
119 | - array ( |
|
119 | + array( |
|
120 | 120 | 'name' => 'status', |
121 | 121 | ), |
122 | 122 | ), |
123 | 123 | ), |
124 | 124 | ), |
125 | 125 | |
126 | - array ( |
|
127 | - array ( |
|
126 | + array( |
|
127 | + array( |
|
128 | 128 | 'name' => 'date_start', |
129 | 129 | 'type' => 'datetimecombo', |
130 | 130 | 'displayParams' => |
131 | - array ( |
|
131 | + array( |
|
132 | 132 | 'required' => true, |
133 | 133 | 'updateCallback' => 'SugarWidgetScheduler.update_time();', |
134 | 134 | ), |
135 | 135 | 'label' => 'LBL_DATE_TIME', |
136 | 136 | ), |
137 | - array ( |
|
137 | + array( |
|
138 | 138 | 'name' => 'parent_name', |
139 | 139 | 'label' => 'LBL_LIST_RELATED_TO', |
140 | 140 | ), |
141 | 141 | ), |
142 | 142 | |
143 | - array ( |
|
144 | - array ( |
|
143 | + array( |
|
144 | + array( |
|
145 | 145 | 'name' => 'duration_hours', |
146 | 146 | 'label' => 'LBL_DURATION', |
147 | 147 | 'customCode' => '{literal}<script type="text/javascript">function isValidDuration() { form = document.getElementById(\'EditView\'); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { alert(\'{/literal}{$MOD.NOTICE_DURATION_TIME}{literal}\'); return false; } return true; }</script>{/literal}<input id="duration_hours" name="duration_hours" tabindex="1" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value} <span class="dateFormat">{$MOD.LBL_HOURS_MINUTES}', |
148 | 148 | 'displayParams' => |
149 | - array ( |
|
149 | + array( |
|
150 | 150 | 'required' => true, |
151 | 151 | ), |
152 | 152 | ), |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | // 'customCode' => '{include file="modules/Meetings/tpls/reminders.tpl"}', |
156 | 156 | // 'label' => 'LBL_REMINDER', |
157 | 157 | // ), |
158 | - array ( |
|
158 | + array( |
|
159 | 159 | 'name' => 'reminders', |
160 | 160 | 'customCode' => '{include file="modules/Reminders/tpls/reminders.tpl"}', |
161 | 161 | 'label' => 'LBL_REMINDERS', |
@@ -163,15 +163,15 @@ discard block |
||
163 | 163 | |
164 | 164 | ), |
165 | 165 | |
166 | - array ( |
|
167 | - array ( |
|
166 | + array( |
|
167 | + array( |
|
168 | 168 | 'name' => 'assigned_user_name', |
169 | 169 | 'label' => 'LBL_ASSIGNED_TO_NAME', |
170 | 170 | ), |
171 | 171 | ), |
172 | 172 | |
173 | - array ( |
|
174 | - array ( |
|
173 | + array( |
|
174 | + array( |
|
175 | 175 | 'name' => 'description', |
176 | 176 | 'comment' => 'Full text of the note', |
177 | 177 | 'label' => 'LBL_DESCRIPTION', |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | |
40 | 40 | $listViewDefs ['Calls'] = |
41 | 41 | array ( |
42 | - 'SET_COMPLETE' => |
|
43 | - array ( |
|
42 | + 'SET_COMPLETE' => |
|
43 | + array ( |
|
44 | 44 | 'width' => '1%', |
45 | 45 | 'label' => 'LBL_LIST_CLOSE', |
46 | 46 | 'link' => true, |
@@ -48,25 +48,25 @@ discard block |
||
48 | 48 | 'default' => true, |
49 | 49 | 'related_fields' => |
50 | 50 | array ( |
51 | - 0 => 'status', |
|
51 | + 0 => 'status', |
|
52 | + ), |
|
52 | 53 | ), |
53 | - ), |
|
54 | - 'DIRECTION' => |
|
55 | - array ( |
|
54 | + 'DIRECTION' => |
|
55 | + array ( |
|
56 | 56 | 'width' => '10%', |
57 | 57 | 'label' => 'LBL_LIST_DIRECTION', |
58 | 58 | 'link' => false, |
59 | 59 | 'default' => true, |
60 | - ), |
|
61 | - 'NAME' => |
|
62 | - array ( |
|
60 | + ), |
|
61 | + 'NAME' => |
|
62 | + array ( |
|
63 | 63 | 'width' => '40%', |
64 | 64 | 'label' => 'LBL_LIST_SUBJECT', |
65 | 65 | 'link' => true, |
66 | 66 | 'default' => true, |
67 | - ), |
|
68 | - 'CONTACT_NAME' => |
|
69 | - array ( |
|
67 | + ), |
|
68 | + 'CONTACT_NAME' => |
|
69 | + array ( |
|
70 | 70 | 'width' => '20%', |
71 | 71 | 'label' => 'LBL_LIST_CONTACT', |
72 | 72 | 'link' => true, |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | 'module' => 'Contacts', |
75 | 75 | 'default' => true, |
76 | 76 | 'ACLTag' => 'CONTACT', |
77 | - ), |
|
78 | - 'PARENT_NAME' => |
|
79 | - array ( |
|
77 | + ), |
|
78 | + 'PARENT_NAME' => |
|
79 | + array ( |
|
80 | 80 | 'width' => '20%', |
81 | 81 | 'label' => 'LBL_LIST_RELATED_TO', |
82 | 82 | 'dynamic_module' => 'PARENT_TYPE', |
@@ -87,40 +87,40 @@ discard block |
||
87 | 87 | 'ACLTag' => 'PARENT', |
88 | 88 | 'related_fields' => |
89 | 89 | array ( |
90 | - 0 => 'parent_id', |
|
91 | - 1 => 'parent_type', |
|
90 | + 0 => 'parent_id', |
|
91 | + 1 => 'parent_type', |
|
92 | + ), |
|
92 | 93 | ), |
93 | - ), |
|
94 | - 'DATE_START' => |
|
95 | - array ( |
|
94 | + 'DATE_START' => |
|
95 | + array ( |
|
96 | 96 | 'width' => '15%', |
97 | 97 | 'label' => 'LBL_LIST_DATE', |
98 | 98 | 'link' => false, |
99 | 99 | 'default' => true, |
100 | 100 | 'related_fields' => |
101 | 101 | array ( |
102 | - 0 => 'time_start', |
|
102 | + 0 => 'time_start', |
|
103 | + ), |
|
103 | 104 | ), |
104 | - ), |
|
105 | - 'ASSIGNED_USER_NAME' => |
|
106 | - array ( |
|
105 | + 'ASSIGNED_USER_NAME' => |
|
106 | + array ( |
|
107 | 107 | 'width' => '2%', |
108 | 108 | 'label' => 'LBL_LIST_ASSIGNED_TO_NAME', |
109 | 109 | 'module' => 'Employees', |
110 | 110 | 'id' => 'ASSIGNED_USER_ID', |
111 | 111 | 'default' => true, |
112 | - ), |
|
113 | - 'STATUS' => |
|
114 | - array ( |
|
112 | + ), |
|
113 | + 'STATUS' => |
|
114 | + array ( |
|
115 | 115 | 'width' => '10%', |
116 | 116 | 'label' => 'LBL_STATUS', |
117 | 117 | 'link' => false, |
118 | 118 | 'default' => false, |
119 | - ), |
|
120 | - 'DATE_ENTERED' => array ( |
|
119 | + ), |
|
120 | + 'DATE_ENTERED' => array ( |
|
121 | 121 | 'width' => '10%', |
122 | 122 | 'label' => 'LBL_DATE_ENTERED', |
123 | 123 | 'default' => true |
124 | - ), |
|
124 | + ), |
|
125 | 125 | ); |
126 | 126 | ?> |
@@ -38,35 +38,35 @@ discard block |
||
38 | 38 | ********************************************************************************/ |
39 | 39 | |
40 | 40 | $listViewDefs ['Calls'] = |
41 | -array ( |
|
41 | +array( |
|
42 | 42 | 'SET_COMPLETE' => |
43 | - array ( |
|
43 | + array( |
|
44 | 44 | 'width' => '1%', |
45 | 45 | 'label' => 'LBL_LIST_CLOSE', |
46 | 46 | 'link' => true, |
47 | 47 | 'sortable' => false, |
48 | 48 | 'default' => true, |
49 | 49 | 'related_fields' => |
50 | - array ( |
|
50 | + array( |
|
51 | 51 | 0 => 'status', |
52 | 52 | ), |
53 | 53 | ), |
54 | 54 | 'DIRECTION' => |
55 | - array ( |
|
55 | + array( |
|
56 | 56 | 'width' => '10%', |
57 | 57 | 'label' => 'LBL_LIST_DIRECTION', |
58 | 58 | 'link' => false, |
59 | 59 | 'default' => true, |
60 | 60 | ), |
61 | 61 | 'NAME' => |
62 | - array ( |
|
62 | + array( |
|
63 | 63 | 'width' => '40%', |
64 | 64 | 'label' => 'LBL_LIST_SUBJECT', |
65 | 65 | 'link' => true, |
66 | 66 | 'default' => true, |
67 | 67 | ), |
68 | 68 | 'CONTACT_NAME' => |
69 | - array ( |
|
69 | + array( |
|
70 | 70 | 'width' => '20%', |
71 | 71 | 'label' => 'LBL_LIST_CONTACT', |
72 | 72 | 'link' => true, |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | 'ACLTag' => 'CONTACT', |
77 | 77 | ), |
78 | 78 | 'PARENT_NAME' => |
79 | - array ( |
|
79 | + array( |
|
80 | 80 | 'width' => '20%', |
81 | 81 | 'label' => 'LBL_LIST_RELATED_TO', |
82 | 82 | 'dynamic_module' => 'PARENT_TYPE', |
@@ -86,24 +86,24 @@ discard block |
||
86 | 86 | 'sortable' => false, |
87 | 87 | 'ACLTag' => 'PARENT', |
88 | 88 | 'related_fields' => |
89 | - array ( |
|
89 | + array( |
|
90 | 90 | 0 => 'parent_id', |
91 | 91 | 1 => 'parent_type', |
92 | 92 | ), |
93 | 93 | ), |
94 | 94 | 'DATE_START' => |
95 | - array ( |
|
95 | + array( |
|
96 | 96 | 'width' => '15%', |
97 | 97 | 'label' => 'LBL_LIST_DATE', |
98 | 98 | 'link' => false, |
99 | 99 | 'default' => true, |
100 | 100 | 'related_fields' => |
101 | - array ( |
|
101 | + array( |
|
102 | 102 | 0 => 'time_start', |
103 | 103 | ), |
104 | 104 | ), |
105 | 105 | 'ASSIGNED_USER_NAME' => |
106 | - array ( |
|
106 | + array( |
|
107 | 107 | 'width' => '2%', |
108 | 108 | 'label' => 'LBL_LIST_ASSIGNED_TO_NAME', |
109 | 109 | 'module' => 'Employees', |
@@ -111,13 +111,13 @@ discard block |
||
111 | 111 | 'default' => true, |
112 | 112 | ), |
113 | 113 | 'STATUS' => |
114 | - array ( |
|
114 | + array( |
|
115 | 115 | 'width' => '10%', |
116 | 116 | 'label' => 'LBL_STATUS', |
117 | 117 | 'link' => false, |
118 | 118 | 'default' => false, |
119 | 119 | ), |
120 | - 'DATE_ENTERED' => array ( |
|
120 | + 'DATE_ENTERED' => array( |
|
121 | 121 | 'width' => '10%', |
122 | 122 | 'label' => 'LBL_DATE_ENTERED', |
123 | 123 | 'default' => true |
@@ -44,46 +44,46 @@ |
||
44 | 44 | |
45 | 45 | class CallsViewEdit extends ViewEdit |
46 | 46 | { |
47 | - /** |
|
48 | - * @see SugarView::preDisplay() |
|
49 | - */ |
|
50 | - public function preDisplay() |
|
51 | - { |
|
52 | - if($_REQUEST['module'] != 'Calls' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) { |
|
53 | - $this->bean->status = ''; |
|
54 | - } //if |
|
47 | + /** |
|
48 | + * @see SugarView::preDisplay() |
|
49 | + */ |
|
50 | + public function preDisplay() |
|
51 | + { |
|
52 | + if($_REQUEST['module'] != 'Calls' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) { |
|
53 | + $this->bean->status = ''; |
|
54 | + } //if |
|
55 | 55 | if(!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'Held')) { |
56 | - $this->bean->status = 'Held'; |
|
57 | - } |
|
58 | - parent::preDisplay(); |
|
59 | - } |
|
56 | + $this->bean->status = 'Held'; |
|
57 | + } |
|
58 | + parent::preDisplay(); |
|
59 | + } |
|
60 | 60 | |
61 | - /** |
|
62 | - * @see SugarView::display() |
|
63 | - */ |
|
64 | - public function display() |
|
65 | - { |
|
66 | - global $json; |
|
61 | + /** |
|
62 | + * @see SugarView::display() |
|
63 | + */ |
|
64 | + public function display() |
|
65 | + { |
|
66 | + global $json; |
|
67 | 67 | $json = getJSONobj(); |
68 | 68 | $json_config = new json_config(); |
69 | - if (isset($this->bean->json_id) && !empty ($this->bean->json_id)) { |
|
70 | - $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->json_id); |
|
69 | + if (isset($this->bean->json_id) && !empty ($this->bean->json_id)) { |
|
70 | + $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->json_id); |
|
71 | 71 | |
72 | - } else { |
|
73 | - $this->bean->json_id = $this->bean->id; |
|
74 | - $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->id); |
|
72 | + } else { |
|
73 | + $this->bean->json_id = $this->bean->id; |
|
74 | + $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->id); |
|
75 | 75 | |
76 | - } |
|
77 | - $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript); |
|
76 | + } |
|
77 | + $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript); |
|
78 | 78 | |
79 | - $this->ss->assign('remindersData', Reminder::loadRemindersData('Calls', $this->bean->id, $this->ev->isDuplicate)); |
|
80 | - $this->ss->assign('remindersDataJson', Reminder::loadRemindersDataJson('Calls', $this->bean->id, $this->ev->isDuplicate)); |
|
81 | - $this->ss->assign('remindersDefaultValuesDataJson', Reminder::loadRemindersDefaultValuesDataJson()); |
|
82 | - $this->ss->assign('remindersDisabled', json_encode(false)); |
|
79 | + $this->ss->assign('remindersData', Reminder::loadRemindersData('Calls', $this->bean->id, $this->ev->isDuplicate)); |
|
80 | + $this->ss->assign('remindersDataJson', Reminder::loadRemindersDataJson('Calls', $this->bean->id, $this->ev->isDuplicate)); |
|
81 | + $this->ss->assign('remindersDefaultValuesDataJson', Reminder::loadRemindersDefaultValuesDataJson()); |
|
82 | + $this->ss->assign('remindersDisabled', json_encode(false)); |
|
83 | 83 | |
84 | - if($this->ev->isDuplicate){ |
|
85 | - $this->bean->status = $this->bean->getDefaultStatus(); |
|
86 | - } //if |
|
87 | - parent::display(); |
|
88 | - } |
|
84 | + if($this->ev->isDuplicate){ |
|
85 | + $this->bean->status = $this->bean->getDefaultStatus(); |
|
86 | + } //if |
|
87 | + parent::display(); |
|
88 | + } |
|
89 | 89 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | |
4 | 4 | /********************************************************************************* |
5 | 5 | * SugarCRM Community Edition is a customer relationship management program developed by |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function preDisplay() |
51 | 51 | { |
52 | - if($_REQUEST['module'] != 'Calls' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) { |
|
52 | + if ($_REQUEST['module'] != 'Calls' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) { |
|
53 | 53 | $this->bean->status = ''; |
54 | 54 | } //if |
55 | - if(!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'Held')) { |
|
55 | + if (!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'Held')) { |
|
56 | 56 | $this->bean->status = 'Held'; |
57 | 57 | } |
58 | 58 | parent::preDisplay(); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $this->ss->assign('remindersDefaultValuesDataJson', Reminder::loadRemindersDefaultValuesDataJson()); |
82 | 82 | $this->ss->assign('remindersDisabled', json_encode(false)); |
83 | 83 | |
84 | - if($this->ev->isDuplicate){ |
|
84 | + if ($this->ev->isDuplicate) { |
|
85 | 85 | $this->bean->status = $this->bean->getDefaultStatus(); |
86 | 86 | } //if |
87 | 87 | parent::display(); |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | |
4 | 6 | /********************************************************************************* |
5 | 7 | * SugarCRM Community Edition is a customer relationship management program developed by |
@@ -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,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | parent::process(); |
55 | 55 | |
56 | - if($this->viaAJAX) { // override for ajax call |
|
56 | + if ($this->viaAJAX) { // override for ajax call |
|
57 | 57 | $this->ss->assign('saveOnclick', "onclick='if(check_form(\"accountsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"accounts\"); else return false;'"); |
58 | 58 | $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_accounts\")';"); |
59 | 59 | } |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -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. |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | |
44 | 44 | |
45 | - global $json,$current_user; |
|
45 | + global $json, $current_user; |
|
46 | 46 | |
47 | 47 | |
48 | 48 | if ($_REQUEST['object_type'] == "Meeting") |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -50,8 +52,7 @@ discard block |
||
50 | 52 | $focus = new Meeting(); |
51 | 53 | $focus->id = $_REQUEST['object_id']; |
52 | 54 | $test = $focus->set_accept_status($current_user, $_REQUEST['accept_status']); |
53 | - } |
|
54 | - else if ($_REQUEST['object_type'] == "Call") |
|
55 | + } else if ($_REQUEST['object_type'] == "Call") |
|
55 | 56 | { |
56 | 57 | $focus = new Call(); |
57 | 58 | $focus->id = $_REQUEST['object_id']; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $recipients = $this->getRecipients($id,'Meetings'); |
99 | 99 | $bean = new Meeting(); |
100 | 100 | $bean->retrieve($id); |
101 | - if ( $this->sendReminders($bean, $admin, $recipients) ) { |
|
101 | + if ( $this->sendReminders($bean, $admin, $recipients) ) { |
|
102 | 102 | $bean->email_reminder_sent = 1; |
103 | 103 | $bean->save(); |
104 | 104 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | * @param SugarBean $bean |
199 | 199 | * @param User $user |
200 | 200 | * @return XTemplate |
201 | - */ |
|
201 | + */ |
|
202 | 202 | protected function setReminderBody(XTemplate $xtpl, SugarBean $bean, User $user) |
203 | 203 | { |
204 | 204 |
@@ -71,13 +71,13 @@ discard block |
||
71 | 71 | public function __construct() |
72 | 72 | { |
73 | 73 | $max_time = 0; |
74 | - if(isset($GLOBALS['app_list_strings']['reminder_time_options'])){ |
|
75 | - foreach($GLOBALS['app_list_strings']['reminder_time_options'] as $seconds => $value ) { |
|
76 | - if ( $seconds > $max_time ) { |
|
74 | + if (isset($GLOBALS['app_list_strings']['reminder_time_options'])) { |
|
75 | + foreach ($GLOBALS['app_list_strings']['reminder_time_options'] as $seconds => $value) { |
|
76 | + if ($seconds > $max_time) { |
|
77 | 77 | $max_time = $seconds; |
78 | 78 | } |
79 | 79 | } |
80 | - }else{ |
|
80 | + } else { |
|
81 | 81 | $max_time = 8400; |
82 | 82 | } |
83 | 83 | $this->now = $GLOBALS['timedate']->nowDb(); |
@@ -97,22 +97,22 @@ discard block |
||
97 | 97 | Reminder::sendEmailReminders($this, $admin); |
98 | 98 | |
99 | 99 | $meetings = $this->getMeetingsForRemind(); |
100 | - foreach($meetings as $id ) { |
|
101 | - $recipients = $this->getRecipients($id,'Meetings'); |
|
100 | + foreach ($meetings as $id) { |
|
101 | + $recipients = $this->getRecipients($id, 'Meetings'); |
|
102 | 102 | $bean = new Meeting(); |
103 | 103 | $bean->retrieve($id); |
104 | - if ( $this->sendReminders($bean, $admin, $recipients) ) { |
|
104 | + if ($this->sendReminders($bean, $admin, $recipients)) { |
|
105 | 105 | $bean->email_reminder_sent = 1; |
106 | 106 | $bean->save(); |
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | 110 | $calls = $this->getCallsForRemind(); |
111 | - foreach($calls as $id ) { |
|
112 | - $recipients = $this->getRecipients($id,'Calls'); |
|
111 | + foreach ($calls as $id) { |
|
112 | + $recipients = $this->getRecipients($id, 'Calls'); |
|
113 | 113 | $bean = new Call(); |
114 | 114 | $bean->retrieve($id); |
115 | - if ( $this->sendReminders($bean, $admin, $recipients) ) { |
|
115 | + if ($this->sendReminders($bean, $admin, $recipients)) { |
|
116 | 116 | $bean->email_reminder_sent = 1; |
117 | 117 | $bean->save(); |
118 | 118 | } |
@@ -170,9 +170,9 @@ discard block |
||
170 | 170 | $xtpl = new XTemplate(get_notify_template_file($current_language)); |
171 | 171 | $xtpl = $this->setReminderBody($xtpl, $bean, $user); |
172 | 172 | |
173 | - $template_name = $GLOBALS['beanList'][$bean->module_dir] . 'Reminder'; |
|
173 | + $template_name = $GLOBALS['beanList'][$bean->module_dir].'Reminder'; |
|
174 | 174 | $xtpl->parse($template_name); |
175 | - $xtpl->parse($template_name . "_Subject"); |
|
175 | + $xtpl->parse($template_name."_Subject"); |
|
176 | 176 | |
177 | 177 | $tempBody = from_html(trim($xtpl->text($template_name))); |
178 | 178 | $mail->msgHTML($tempBody); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $tempBody = preg_replace('/<a href=([\"\']?)(.*?)\1>(.*?)<\/a>/', "\\3 [\\2]", $tempBody); |
181 | 181 | |
182 | 182 | $mail->AltBody = strip_tags($tempBody); |
183 | - $mail->Subject = strip_tags(from_html($xtpl->text($template_name . "_Subject"))); |
|
183 | + $mail->Subject = strip_tags(from_html($xtpl->text($template_name."_Subject"))); |
|
184 | 184 | |
185 | 185 | $oe = new OutboundEmail(); |
186 | 186 | $oe = $oe->getSystemMailerSettings(); |
@@ -215,9 +215,9 @@ discard block |
||
215 | 215 | $object = strtoupper($bean->object_name); |
216 | 216 | |
217 | 217 | $xtpl->assign("{$object}_SUBJECT", $bean->name); |
218 | - $date = $GLOBALS['timedate']->fromUser($bean->date_start,$GLOBALS['current_user']); |
|
218 | + $date = $GLOBALS['timedate']->fromUser($bean->date_start, $GLOBALS['current_user']); |
|
219 | 219 | $xtpl->assign("{$object}_STARTDATE", $GLOBALS['timedate']->asUser($date, $user)." ".TimeDate::userTimezoneSuffix($date, $user)); |
220 | - if ( isset($bean->location) ) { |
|
220 | + if (isset($bean->location)) { |
|
221 | 221 | $xtpl->assign("{$object}_LOCATION", $bean->location); |
222 | 222 | } |
223 | 223 | $xtpl->assign("{$object}_CREATED_BY", $user->full_name); |
@@ -244,10 +244,10 @@ discard block |
||
244 | 244 | "; |
245 | 245 | $re = $db->query($query); |
246 | 246 | $meetings = array(); |
247 | - while($row = $db->fetchByAssoc($re) ) { |
|
248 | - $remind_ts = $GLOBALS['timedate']->fromDb($db->fromConvert($row['date_start'],'datetime'))->modify("-{$row['email_reminder_time']} seconds")->ts; |
|
247 | + while ($row = $db->fetchByAssoc($re)) { |
|
248 | + $remind_ts = $GLOBALS['timedate']->fromDb($db->fromConvert($row['date_start'], 'datetime'))->modify("-{$row['email_reminder_time']} seconds")->ts; |
|
249 | 249 | $now_ts = $GLOBALS['timedate']->getNow()->ts; |
250 | - if ( $now_ts >= $remind_ts ) { |
|
250 | + if ($now_ts >= $remind_ts) { |
|
251 | 251 | $meetings[] = $row['id']; |
252 | 252 | } |
253 | 253 | } |
@@ -272,10 +272,10 @@ discard block |
||
272 | 272 | "; |
273 | 273 | $re = $db->query($query); |
274 | 274 | $calls = array(); |
275 | - while($row = $db->fetchByAssoc($re) ) { |
|
276 | - $remind_ts = $GLOBALS['timedate']->fromDb($db->fromConvert($row['date_start'],'datetime'))->modify("-{$row['email_reminder_time']} seconds")->ts; |
|
275 | + while ($row = $db->fetchByAssoc($re)) { |
|
276 | + $remind_ts = $GLOBALS['timedate']->fromDb($db->fromConvert($row['date_start'], 'datetime'))->modify("-{$row['email_reminder_time']} seconds")->ts; |
|
277 | 277 | $now_ts = $GLOBALS['timedate']->getNow()->ts; |
278 | - if ( $now_ts >= $remind_ts ) { |
|
278 | + if ($now_ts >= $remind_ts) { |
|
279 | 279 | $calls[] = $row['id']; |
280 | 280 | } |
281 | 281 | } |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | { |
293 | 293 | global $db; |
294 | 294 | |
295 | - switch($module ) { |
|
295 | + switch ($module) { |
|
296 | 296 | case "Meetings": |
297 | 297 | $field_part = "meeting"; |
298 | 298 | break; |
@@ -308,10 +308,10 @@ discard block |
||
308 | 308 | $query = "SELECT user_id FROM {$field_part}s_users WHERE {$field_part}_id = '{$id}' AND accept_status != 'decline' AND deleted = 0 |
309 | 309 | "; |
310 | 310 | $re = $db->query($query); |
311 | - while($row = $db->fetchByAssoc($re) ) { |
|
311 | + while ($row = $db->fetchByAssoc($re)) { |
|
312 | 312 | $user = new User(); |
313 | 313 | $user->retrieve($row['user_id']); |
314 | - if ( !empty($user->email1) ) { |
|
314 | + if (!empty($user->email1)) { |
|
315 | 315 | $arr = array( |
316 | 316 | 'type' => 'Users', |
317 | 317 | 'name' => $user->full_name, |
@@ -323,10 +323,10 @@ discard block |
||
323 | 323 | // fetch contacts |
324 | 324 | $query = "SELECT contact_id FROM {$field_part}s_contacts WHERE {$field_part}_id = '{$id}' AND accept_status != 'decline' AND deleted = 0"; |
325 | 325 | $re = $db->query($query); |
326 | - while($row = $db->fetchByAssoc($re) ) { |
|
326 | + while ($row = $db->fetchByAssoc($re)) { |
|
327 | 327 | $contact = new Contact(); |
328 | 328 | $contact->retrieve($row['contact_id']); |
329 | - if ( !empty($contact->email1) ) { |
|
329 | + if (!empty($contact->email1)) { |
|
330 | 330 | $arr = array( |
331 | 331 | 'type' => 'Contacts', |
332 | 332 | 'name' => $contact->full_name, |
@@ -338,10 +338,10 @@ discard block |
||
338 | 338 | // fetch leads |
339 | 339 | $query = "SELECT lead_id FROM {$field_part}s_leads WHERE {$field_part}_id = '{$id}' AND accept_status != 'decline' AND deleted = 0"; |
340 | 340 | $re = $db->query($query); |
341 | - while($row = $db->fetchByAssoc($re) ) { |
|
341 | + while ($row = $db->fetchByAssoc($re)) { |
|
342 | 342 | $lead = new Lead(); |
343 | 343 | $lead->retrieve($row['lead_id']); |
344 | - if ( !empty($lead->email1) ) { |
|
344 | + if (!empty($lead->email1)) { |
|
345 | 345 | $arr = array( |
346 | 346 | 'type' => 'Leads', |
347 | 347 | 'name' => $lead->full_name, |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $max_time = $seconds; |
78 | 78 | } |
79 | 79 | } |
80 | - }else{ |
|
80 | + } else{ |
|
81 | 81 | $max_time = 8400; |
82 | 82 | } |
83 | 83 | $this->now = $GLOBALS['timedate']->nowDb(); |
@@ -132,19 +132,16 @@ discard block |
||
132 | 132 | { |
133 | 133 | if (empty($_SESSION['authenticated_user_language'])) { |
134 | 134 | $current_language = $GLOBALS['sugar_config']['default_language']; |
135 | - } |
|
136 | - else { |
|
135 | + } else { |
|
137 | 136 | $current_language = $_SESSION['authenticated_user_language']; |
138 | 137 | } |
139 | 138 | |
140 | 139 | if (!empty($bean->created_by)) { |
141 | 140 | $user_id = $bean->created_by; |
142 | - } |
|
143 | - else { |
|
141 | + } else { |
|
144 | 142 | if (!empty($bean->assigned_user_id)) { |
145 | 143 | $user_id = $bean->assigned_user_id; |
146 | - } |
|
147 | - else { |
|
144 | + } else { |
|
148 | 145 | $user_id = $GLOBALS['current_user']->id; |
149 | 146 | } |
150 | 147 | } |
@@ -158,8 +155,7 @@ discard block |
||
158 | 155 | if (empty($admin->settings['notify_send_from_assigning_user'])) { |
159 | 156 | $from_address = $admin->settings['notify_fromaddress']; |
160 | 157 | $from_name = $admin->settings['notify_fromname'] ? "" : $admin->settings['notify_fromname']; |
161 | - } |
|
162 | - else { |
|
158 | + } else { |
|
163 | 159 | $from_address = $user->emailAddress->getReplyToAddress($user); |
164 | 160 | $from_name = $user->full_name; |
165 | 161 | } |
@@ -40,13 +40,13 @@ discard block |
||
40 | 40 | |
41 | 41 | |
42 | 42 | function additionalDetailsLead($fields) { |
43 | - static $mod_strings; |
|
44 | - if(empty($mod_strings)) { |
|
45 | - global $current_language; |
|
46 | - $mod_strings = return_module_language($current_language, 'Leads'); |
|
47 | - } |
|
43 | + static $mod_strings; |
|
44 | + if(empty($mod_strings)) { |
|
45 | + global $current_language; |
|
46 | + $mod_strings = return_module_language($current_language, 'Leads'); |
|
47 | + } |
|
48 | 48 | |
49 | - $overlib_string = ''; |
|
49 | + $overlib_string = ''; |
|
50 | 50 | if(!empty($fields['ID'])) { |
51 | 51 | $overlib_string .= '<input type="hidden" value="'. $fields['ID']; |
52 | 52 | $overlib_string .= '">'; |
@@ -55,39 +55,39 @@ discard block |
||
55 | 55 | $overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName=' . SugarThemeRegistry::current()->name .'&imageName=Leads.gif"/> '.$mod_strings['LBL_CONTACT'].'</h2>'; |
56 | 56 | |
57 | 57 | if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) || |
58 | - !empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) || |
|
59 | - !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) |
|
60 | - $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
61 | - if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
62 | - if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
63 | - if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
64 | - if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
65 | - if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
66 | - if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) |
|
67 | - $overlib_string .= '<br>'; |
|
68 | - if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
69 | - if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
70 | - if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
71 | - if(!empty($fields['LEAD_SOURCE'])) $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>'; |
|
58 | + !empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) || |
|
59 | + !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) |
|
60 | + $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
61 | + if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
62 | + if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
63 | + if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
64 | + if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
65 | + if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
66 | + if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) |
|
67 | + $overlib_string .= '<br>'; |
|
68 | + if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
69 | + if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
70 | + if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
71 | + if(!empty($fields['LEAD_SOURCE'])) $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>'; |
|
72 | 72 | |
73 | - if(!empty($fields['EMAIL2'])) |
|
74 | - $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . |
|
75 | - "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" . |
|
76 | - "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" . |
|
77 | - "={$fields['FIRST_NAME']} {$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" . |
|
78 | - "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") . |
|
79 | - "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>"; |
|
73 | + if(!empty($fields['EMAIL2'])) |
|
74 | + $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . |
|
75 | + "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" . |
|
76 | + "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" . |
|
77 | + "={$fields['FIRST_NAME']} {$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" . |
|
78 | + "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") . |
|
79 | + "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>"; |
|
80 | 80 | |
81 | - if(!empty($fields['DESCRIPTION'])) { |
|
82 | - $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
|
83 | - if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
84 | - } |
|
81 | + if(!empty($fields['DESCRIPTION'])) { |
|
82 | + $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
|
83 | + if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
84 | + } |
|
85 | 85 | |
86 | - return array('fieldToAddTo' => 'NAME', |
|
87 | - 'string' => $overlib_string, |
|
88 | - 'editLink' => "index.php?action=EditView&module=Leads&return_module=Leads&record={$fields['ID']}", |
|
89 | - 'viewLink' => "index.php?action=DetailView&module=Leads&return_module=Leads&record={$fields['ID']}"); |
|
86 | + return array('fieldToAddTo' => 'NAME', |
|
87 | + 'string' => $overlib_string, |
|
88 | + 'editLink' => "index.php?action=EditView&module=Leads&return_module=Leads&record={$fields['ID']}", |
|
89 | + 'viewLink' => "index.php?action=DetailView&module=Leads&return_module=Leads&record={$fields['ID']}"); |
|
90 | 90 | } |
91 | 91 | |
92 | - ?> |
|
92 | + ?> |
|
93 | 93 |
@@ -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. |
@@ -41,46 +41,46 @@ discard block |
||
41 | 41 | |
42 | 42 | function additionalDetailsLead($fields) { |
43 | 43 | static $mod_strings; |
44 | - if(empty($mod_strings)) { |
|
44 | + if (empty($mod_strings)) { |
|
45 | 45 | global $current_language; |
46 | 46 | $mod_strings = return_module_language($current_language, 'Leads'); |
47 | 47 | } |
48 | 48 | |
49 | 49 | $overlib_string = ''; |
50 | - if(!empty($fields['ID'])) { |
|
51 | - $overlib_string .= '<input type="hidden" value="'. $fields['ID']; |
|
50 | + if (!empty($fields['ID'])) { |
|
51 | + $overlib_string .= '<input type="hidden" value="'.$fields['ID']; |
|
52 | 52 | $overlib_string .= '">'; |
53 | 53 | } |
54 | 54 | |
55 | - $overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName=' . SugarThemeRegistry::current()->name .'&imageName=Leads.gif"/> '.$mod_strings['LBL_CONTACT'].'</h2>'; |
|
55 | + $overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName='.SugarThemeRegistry::current()->name.'&imageName=Leads.gif"/> '.$mod_strings['LBL_CONTACT'].'</h2>'; |
|
56 | 56 | |
57 | - if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) || |
|
57 | + if (!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) || |
|
58 | 58 | !empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) || |
59 | 59 | !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) |
60 | - $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
61 | - if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
62 | - if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
63 | - if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
64 | - if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
65 | - if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
66 | - if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) |
|
60 | + $overlib_string .= '<b>'.$mod_strings['LBL_PRIMARY_ADDRESS'].'</b><br>'; |
|
61 | + if (!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'].'<br>'; |
|
62 | + if (!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'].', '; |
|
63 | + if (!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'].' '; |
|
64 | + if (!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'].' '; |
|
65 | + if (!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'].'<br>'; |
|
66 | + if (strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) |
|
67 | 67 | $overlib_string .= '<br>'; |
68 | - if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
69 | - if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
70 | - if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
71 | - if(!empty($fields['LEAD_SOURCE'])) $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>'; |
|
68 | + if (!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'.$mod_strings['LBL_MOBILE_PHONE'].'</b> <span class="phone">'.$fields['PHONE_MOBILE'].'</span><br>'; |
|
69 | + if (!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'.$mod_strings['LBL_HOME_PHONE'].'</b> <span class="phone">'.$fields['PHONE_HOME'].'</span><br>'; |
|
70 | + if (!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'.$mod_strings['LBL_OTHER_PHONE'].'</b> <span class="phone">'.$fields['PHONE_OTHER'].'</span><br>'; |
|
71 | + if (!empty($fields['LEAD_SOURCE'])) $overlib_string .= '<b>'.$mod_strings['LBL_LEAD_SOURCE'].'</b> '.$fields['LEAD_SOURCE'].'<br>'; |
|
72 | 72 | |
73 | - if(!empty($fields['EMAIL2'])) |
|
74 | - $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . |
|
75 | - "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" . |
|
76 | - "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" . |
|
77 | - "={$fields['FIRST_NAME']} {$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" . |
|
78 | - "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") . |
|
73 | + if (!empty($fields['EMAIL2'])) |
|
74 | + $overlib_string .= '<b>'.$mod_strings['LBL_OTHER_EMAIL_ADDRESS'].'</b> '. |
|
75 | + "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&". |
|
76 | + "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names". |
|
77 | + "={$fields['FIRST_NAME']} {$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&". |
|
78 | + "to_email_addrs=".urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>"). |
|
79 | 79 | "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>"; |
80 | 80 | |
81 | - if(!empty($fields['DESCRIPTION'])) { |
|
82 | - $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
|
83 | - if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
81 | + if (!empty($fields['DESCRIPTION'])) { |
|
82 | + $overlib_string .= '<b>'.$mod_strings['LBL_DESCRIPTION'].'</b> '.substr($fields['DESCRIPTION'], 0, 300); |
|
83 | + if (strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | return array('fieldToAddTo' => 'NAME', |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -56,31 +58,54 @@ discard block |
||
56 | 58 | |
57 | 59 | if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) || |
58 | 60 | !empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) || |
59 | - !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) |
|
60 | - $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
61 | - if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
62 | - if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
63 | - if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
64 | - if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
65 | - if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
66 | - if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) |
|
67 | - $overlib_string .= '<br>'; |
|
68 | - if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
69 | - if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
70 | - if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
71 | - if(!empty($fields['LEAD_SOURCE'])) $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>'; |
|
61 | + !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) { |
|
62 | + $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
63 | + } |
|
64 | + if(!empty($fields['PRIMARY_ADDRESS_STREET'])) { |
|
65 | + $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
66 | + } |
|
67 | + if(!empty($fields['PRIMARY_ADDRESS_CITY'])) { |
|
68 | + $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
69 | + } |
|
70 | + if(!empty($fields['PRIMARY_ADDRESS_STATE'])) { |
|
71 | + $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
72 | + } |
|
73 | + if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) { |
|
74 | + $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
75 | + } |
|
76 | + if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) { |
|
77 | + $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
78 | + } |
|
79 | + if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) { |
|
80 | + $overlib_string .= '<br>'; |
|
81 | + } |
|
82 | + if(!empty($fields['PHONE_MOBILE'])) { |
|
83 | + $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
84 | + } |
|
85 | + if(!empty($fields['PHONE_HOME'])) { |
|
86 | + $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
87 | + } |
|
88 | + if(!empty($fields['PHONE_OTHER'])) { |
|
89 | + $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
90 | + } |
|
91 | + if(!empty($fields['LEAD_SOURCE'])) { |
|
92 | + $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>'; |
|
93 | + } |
|
72 | 94 | |
73 | - if(!empty($fields['EMAIL2'])) |
|
74 | - $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . |
|
95 | + if(!empty($fields['EMAIL2'])) { |
|
96 | + $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . |
|
75 | 97 | "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" . |
76 | 98 | "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" . |
77 | 99 | "={$fields['FIRST_NAME']} {$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" . |
78 | 100 | "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") . |
79 | 101 | "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>"; |
102 | + } |
|
80 | 103 | |
81 | 104 | if(!empty($fields['DESCRIPTION'])) { |
82 | 105 | $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
83 | - if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
106 | + if(strlen($fields['DESCRIPTION']) > 300) { |
|
107 | + $overlib_string .= '...'; |
|
108 | + } |
|
84 | 109 | } |
85 | 110 | |
86 | 111 | return array('fieldToAddTo' => 'NAME', |
@@ -46,13 +46,13 @@ discard block |
||
46 | 46 | 'form'=>array( |
47 | 47 | 'hidden'=>array( |
48 | 48 | '<input type="hidden" name="opportunity_id" value="{$smarty.request.opportunity_id}">', |
49 | - '<input type="hidden" name="case_id" value="{$smarty.request.case_id}">', |
|
50 | - '<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">', |
|
51 | - '<input type="hidden" name="email_id" value="{$smarty.request.email_id}">', |
|
52 | - '<input type="hidden" name="inbound_email_id" value="{$smarty.request.inbound_email_id}">' |
|
49 | + '<input type="hidden" name="case_id" value="{$smarty.request.case_id}">', |
|
50 | + '<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">', |
|
51 | + '<input type="hidden" name="email_id" value="{$smarty.request.email_id}">', |
|
52 | + '<input type="hidden" name="inbound_email_id" value="{$smarty.request.inbound_email_id}">' |
|
53 | 53 | ) |
54 | 54 | ), |
55 | - 'maxColumns' => '2', |
|
55 | + 'maxColumns' => '2', |
|
56 | 56 | 'widths' => array( |
57 | 57 | array('label' => '10', 'field' => '30'), |
58 | 58 | array('label' => '10', 'field' => '30'), |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | 'copyData' => true, |
106 | 106 | 'required' => true, |
107 | 107 | 'select' => "account_name", |
108 | - 'default_action' => 'create', |
|
108 | + 'default_action' => 'create', |
|
109 | 109 | 'relationship' => 'accounts_contacts', |
110 | 110 | 'templateMeta' => array( |
111 | 111 | 'form'=>array( |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
230 | 230 | ), |
231 | 231 | array ( |
232 | - 'date_start', |
|
232 | + 'date_start', |
|
233 | 233 | array ( |
234 | 234 | 'name' => 'duration_hours', |
235 | 235 | 'label' => 'LBL_DURATION', |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | <span class="dateFormat">{sugar_translate label="LBL_HOURS_MINUTES" module="Calls"}', |
251 | 251 | 'displayParams' => |
252 | 252 | array ( |
253 | - 'required' => true, |
|
253 | + 'required' => true, |
|
254 | 254 | ), |
255 | 255 | ), |
256 | 256 | ), |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
289 | 289 | ), |
290 | 290 | array ( |
291 | - 'date_start', |
|
292 | - array ( |
|
291 | + 'date_start', |
|
292 | + array ( |
|
293 | 293 | 'name' => 'duration_hours', |
294 | 294 | 'label' => 'LBL_DURATION', |
295 | 295 | 'customCode' => '{literal} |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | <span class="dateFormat">{sugar_translate label="LBL_HOURS_MINUTES" module="Calls"}', |
310 | 310 | 'displayParams' => |
311 | 311 | array ( |
312 | - 'required' => true, |
|
312 | + 'required' => true, |
|
313 | 313 | ), |
314 | 314 | ), |
315 | 315 | ), |
@@ -344,8 +344,8 @@ discard block |
||
344 | 344 | array ( |
345 | 345 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
346 | 346 | ), |
347 | - array ( |
|
348 | - 'status', 'priority' |
|
347 | + array ( |
|
348 | + 'status', 'priority' |
|
349 | 349 | ), |
350 | 350 | |
351 | 351 | array ( |
@@ -58,40 +58,40 @@ discard block |
||
58 | 58 | array('label' => '10', 'field' => '30'), |
59 | 59 | ), |
60 | 60 | ), |
61 | - 'panels' =>array ( |
|
62 | - 'LNK_NEW_CONTACT' => array ( |
|
63 | - array ( |
|
64 | - array ( |
|
61 | + 'panels' =>array( |
|
62 | + 'LNK_NEW_CONTACT' => array( |
|
63 | + array( |
|
64 | + array( |
|
65 | 65 | 'name' => 'first_name', |
66 | 66 | 'customCode' => '{html_options name="Contactssalutation" options=$fields.salutation.options selected=$fields.salutation.value} <input name="Contactsfirst_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">', |
67 | 67 | ), |
68 | 68 | 'title', |
69 | 69 | ), |
70 | - array ( |
|
70 | + array( |
|
71 | 71 | 'last_name', |
72 | 72 | 'department', |
73 | 73 | ), |
74 | - array ( |
|
74 | + array( |
|
75 | 75 | array('name' => 'primary_address_street', 'label' => 'LBL_PRIMARY_ADDRESS'), |
76 | 76 | 'phone_work', |
77 | 77 | ), |
78 | - array ( |
|
78 | + array( |
|
79 | 79 | array('name'=>'primary_address_city', 'label' => 'LBL_CITY'), |
80 | 80 | 'phone_mobile', |
81 | 81 | ), |
82 | - array ( |
|
82 | + array( |
|
83 | 83 | array('name'=>'primary_address_state', 'label' => 'LBL_STATE'), |
84 | 84 | 'phone_other', |
85 | 85 | ), |
86 | - array ( |
|
86 | + array( |
|
87 | 87 | array('name'=>'primary_address_postalcode', 'label' => 'LBL_POSTAL_CODE'), |
88 | 88 | 'phone_fax', |
89 | 89 | ), |
90 | - array ( |
|
90 | + array( |
|
91 | 91 | array('name'=>'primary_address_country', 'label' => 'LBL_COUNTRY'), |
92 | 92 | 'lead_source', |
93 | 93 | ), |
94 | - array ( |
|
94 | + array( |
|
95 | 95 | 'email1', |
96 | 96 | |
97 | 97 | ), |
@@ -123,13 +123,13 @@ discard block |
||
123 | 123 | array('label' => '10', 'field' => '30'), |
124 | 124 | ), |
125 | 125 | ), |
126 | - 'panels' =>array ( |
|
127 | - 'LNK_NEW_ACCOUNT' => array ( |
|
128 | - array ( |
|
126 | + 'panels' =>array( |
|
127 | + 'LNK_NEW_ACCOUNT' => array( |
|
128 | + array( |
|
129 | 129 | 'name', |
130 | 130 | 'phone_office', |
131 | 131 | ), |
132 | - array ( |
|
132 | + array( |
|
133 | 133 | 'website', |
134 | 134 | ), |
135 | 135 | array( |
@@ -152,21 +152,21 @@ discard block |
||
152 | 152 | array('label' => '10', 'field' => '30'), |
153 | 153 | ), |
154 | 154 | ), |
155 | - 'panels' =>array ( |
|
156 | - 'LNK_NEW_OPPORTUNITY' => array ( |
|
157 | - array ( |
|
155 | + 'panels' =>array( |
|
156 | + 'LNK_NEW_OPPORTUNITY' => array( |
|
157 | + array( |
|
158 | 158 | 'name', |
159 | 159 | 'currency_id' |
160 | 160 | ), |
161 | - array ( |
|
161 | + array( |
|
162 | 162 | 'sales_stage', |
163 | 163 | 'amount' |
164 | 164 | ), |
165 | - array ( |
|
165 | + array( |
|
166 | 166 | 'date_closed', |
167 | 167 | '' |
168 | 168 | ), |
169 | - array ( |
|
169 | + array( |
|
170 | 170 | 'description' |
171 | 171 | ), |
172 | 172 | ) |
@@ -191,13 +191,13 @@ discard block |
||
191 | 191 | array('label' => '10', 'field' => '30'), |
192 | 192 | ), |
193 | 193 | ), |
194 | - 'panels' =>array ( |
|
195 | - 'LNK_NEW_NOTE' => array ( |
|
196 | - array ( |
|
194 | + 'panels' =>array( |
|
195 | + 'LNK_NEW_NOTE' => array( |
|
196 | + array( |
|
197 | 197 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
198 | 198 | ), |
199 | - array ( |
|
200 | - array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90) ), |
|
199 | + array( |
|
200 | + array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90)), |
|
201 | 201 | ), |
202 | 202 | ) |
203 | 203 | ), |
@@ -223,14 +223,14 @@ discard block |
||
223 | 223 | array('label' => '10', 'field' => '30'), |
224 | 224 | ), |
225 | 225 | ), |
226 | - 'panels' =>array ( |
|
227 | - 'LNK_NEW_CALL' => array ( |
|
228 | - array ( |
|
226 | + 'panels' =>array( |
|
227 | + 'LNK_NEW_CALL' => array( |
|
228 | + array( |
|
229 | 229 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
230 | 230 | ), |
231 | - array ( |
|
231 | + array( |
|
232 | 232 | 'date_start', |
233 | - array ( |
|
233 | + array( |
|
234 | 234 | 'name' => 'duration_hours', |
235 | 235 | 'label' => 'LBL_DURATION', |
236 | 236 | 'customCode' => '{literal} |
@@ -249,13 +249,13 @@ discard block |
||
249 | 249 | {html_options name="Callsduration_minutes" options=$minutes_values selected=$fields.duration_minutes.value} |
250 | 250 | <span class="dateFormat">{sugar_translate label="LBL_HOURS_MINUTES" module="Calls"}', |
251 | 251 | 'displayParams' => |
252 | - array ( |
|
252 | + array( |
|
253 | 253 | 'required' => true, |
254 | 254 | ), |
255 | 255 | ), |
256 | 256 | ), |
257 | - array ( |
|
258 | - array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90) ), |
|
257 | + array( |
|
258 | + array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90)), |
|
259 | 259 | ), |
260 | 260 | ) |
261 | 261 | ), |
@@ -282,14 +282,14 @@ discard block |
||
282 | 282 | array('label' => '10', 'field' => '30'), |
283 | 283 | ), |
284 | 284 | ), |
285 | - 'panels' =>array ( |
|
286 | - 'LNK_NEW_MEETING' => array ( |
|
287 | - array ( |
|
285 | + 'panels' =>array( |
|
286 | + 'LNK_NEW_MEETING' => array( |
|
287 | + array( |
|
288 | 288 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
289 | 289 | ), |
290 | - array ( |
|
290 | + array( |
|
291 | 291 | 'date_start', |
292 | - array ( |
|
292 | + array( |
|
293 | 293 | 'name' => 'duration_hours', |
294 | 294 | 'label' => 'LBL_DURATION', |
295 | 295 | 'customCode' => '{literal} |
@@ -308,13 +308,13 @@ discard block |
||
308 | 308 | {html_options name="Meetingsduration_minutes" options=$minutes_values selected=$fields.duration_minutes.value} |
309 | 309 | <span class="dateFormat">{sugar_translate label="LBL_HOURS_MINUTES" module="Calls"}', |
310 | 310 | 'displayParams' => |
311 | - array ( |
|
311 | + array( |
|
312 | 312 | 'required' => true, |
313 | 313 | ), |
314 | 314 | ), |
315 | 315 | ), |
316 | - array ( |
|
317 | - array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90) ), |
|
316 | + array( |
|
317 | + array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90)), |
|
318 | 318 | ), |
319 | 319 | ) |
320 | 320 | ), |
@@ -339,17 +339,17 @@ discard block |
||
339 | 339 | array('label' => '10', 'field' => '30'), |
340 | 340 | ), |
341 | 341 | ), |
342 | - 'panels' =>array ( |
|
343 | - 'LNK_NEW_TASK' => array ( |
|
344 | - array ( |
|
342 | + 'panels' =>array( |
|
343 | + 'LNK_NEW_TASK' => array( |
|
344 | + array( |
|
345 | 345 | array('name'=>'name', 'displayParams'=>array('size'=>90)), |
346 | 346 | ), |
347 | - array ( |
|
347 | + array( |
|
348 | 348 | 'status', 'priority' |
349 | 349 | ), |
350 | 350 | |
351 | - array ( |
|
352 | - array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90) ), |
|
351 | + array( |
|
352 | + array('name' => 'description', 'displayParams' => array('rows'=>10, 'cols'=>90)), |
|
353 | 353 | ), |
354 | 354 | ) |
355 | 355 | ), |