]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/SugarObjects/templates/person/vardefs.php
Release 6.2.3
[Github/sugarcrm.git] / include / SugarObjects / templates / person / vardefs.php
1 <?php
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
5  * 
6  * This program is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  * 
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
16  * details.
17  * 
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  * 
23  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25  * 
26  * The interactive user interfaces in modified source and object code versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  * 
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the "Powered by
32  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33  * technical reasons, the Appropriate Legal Notices must display the words
34  * "Powered by SugarCRM".
35  ********************************************************************************/
36
37 $vardefs =array(
38 'fields'=> array(
39 'salutation' =>
40                 array (
41                         'name' => 'salutation',
42                         'vname' => 'LBL_SALUTATION',
43                         'type' => 'enum',
44                         'options' => 'salutation_dom',
45                         'massupdate' => false,
46                         'len' => '255',
47                         'comment' => 'Contact salutation (e.g., Mr, Ms)'            
48                 ),
49 'first_name' =>
50                 array (
51                         'name' => 'first_name',
52                         'vname' => 'LBL_FIRST_NAME',
53                         'type' => 'varchar',
54                         'len' => '100',
55                         'unified_search' => true,
56                         'comment' => 'First name of the contact',
57             'merge_filter' => 'selected',     
58             
59                 ),
60         'last_name' =>
61                 array (
62                         'name' => 'last_name',
63                         'vname' => 'LBL_LAST_NAME',
64                         'type' => 'varchar',
65                         'len' => '100',
66                         'unified_search' => true, 
67                         'comment' => 'Last name of the contact',
68             'merge_filter' => 'selected',
69             'required'=>true,
70             'importable' => 'required',
71                 ),
72         'name' =>
73                 array (
74                         'name' => 'name',
75                         'rname' => 'name',
76                         'vname' => 'LBL_NAME',
77                         'type' => 'name',
78                         'link' => true, // bug 39288 
79                         'fields' => array('first_name', 'last_name'),
80                         'sort_on' => 'last_name',
81                         'source' => 'non-db',
82                         'group'=>'last_name',
83                         'len' => '255',
84                         'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
85             'importable' => 'false',
86                 ),
87         'full_name' =>
88                 array (
89                         'name' => 'full_name',
90                         'rname' => 'full_name',
91                         'vname' => 'LBL_NAME',
92                         'type' => 'fullname',
93                         'fields' => array('first_name', 'last_name'),
94                         'sort_on' => 'last_name',
95                         'source' => 'non-db',
96                         'group'=>'last_name',
97                         'len' => '510',
98                         'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
99                         'studio' => array('listview' => false),
100                 ),
101         'title' =>
102                 array (
103                         'name' => 'title',
104                         'vname' => 'LBL_TITLE',
105                         'type' => 'varchar',
106                         'len' => '100',
107                         'comment' => 'The title of the contact'
108                 ),
109         'department' =>
110                 array (
111                         'name' => 'department',
112                         'vname' => 'LBL_DEPARTMENT',
113                         'type' => 'varchar',
114                         'len' => '255',
115                         'comment' => 'The department of the contact',
116             'merge_filter' => 'enabled',
117                 ),
118                 'do_not_call' =>
119                 array (
120                         'name' => 'do_not_call',
121                         'vname' => 'LBL_DO_NOT_CALL',
122                         'type' => 'bool',
123                         'default' => '0',
124                         'audited'=>true,
125                         'comment' => 'An indicator of whether contact can be called'
126                 ),
127         'phone_home' =>
128                 array (
129                         'name' => 'phone_home',
130                         'vname' => 'LBL_HOME_PHONE',
131                         'type' => 'phone',
132                         'dbType' => 'varchar',
133                         'len' => 100,
134                         'unified_search' => true, 
135                         'comment' => 'Home phone number of the contact',
136             'merge_filter' => 'enabled',
137                 ),
138         'phone_mobile' =>
139                 array (
140                         'name' => 'phone_mobile',
141                         'vname' => 'LBL_MOBILE_PHONE',
142                         'type' => 'phone',
143                         'dbType' => 'varchar',
144                         'len' => 100,
145                         'unified_search' => true,
146                         'comment' => 'Mobile phone number of the contact',
147             'merge_filter' => 'enabled',
148                 ),
149         'phone_work' =>
150                 array (
151                         'name' => 'phone_work',
152                         'vname' => 'LBL_OFFICE_PHONE',
153                         'type' => 'phone',
154                         'dbType' => 'varchar',
155                         'len' => 100,
156                         'audited'=>true,
157                         'unified_search' => true,
158                         'comment' => 'Work phone number of the contact',
159             'merge_filter' => 'enabled',
160                 ),
161         'phone_other' =>
162                 array (
163                         'name' => 'phone_other',
164                         'vname' => 'LBL_OTHER_PHONE',
165                         'type' => 'phone',
166                         'dbType' => 'varchar',
167                         'len' => 100,
168                         'unified_search' => true,
169                         'comment' => 'Other phone number for the contact',
170             'merge_filter' => 'enabled',
171                 ),
172         'phone_fax' =>
173                 array (
174                         'name' => 'phone_fax',
175                         'vname' => 'LBL_FAX_PHONE',
176                         'type' => 'phone',
177                         'dbType' => 'varchar',
178                         'len' => 100,
179                         'unified_search' => true,
180                         'comment' => 'Contact fax number',
181             'merge_filter' => 'enabled',
182                 ),
183         'email1' => 
184                 array(
185                         'name'          => 'email1',
186                         'vname'         => 'LBL_EMAIL_ADDRESS',
187                         'type'          => 'varchar',
188                         'function'      => array(
189                                 'name'          => 'getEmailAddressWidget',
190                                 'returns'       => 'html'),
191                         'source'        => 'non-db',
192                         'group'=>'email1',
193             'merge_filter' => 'enabled',
194                     'studio' => array('editField' => true, 'searchview' => false), // bug 46859 
195                         
196                 ),
197         'email2' => 
198                 array(
199                         'name'          => 'email2',
200                         'vname'         => 'LBL_OTHER_EMAIL_ADDRESS',
201                         'type'          => 'varchar',
202                         'function'      => array(
203                                 'name'          => 'getEmailAddressWidget',
204                                 'returns'       => 'html'),
205                         'source'        => 'non-db',
206                         'group'=>'email2',
207             'merge_filter' => 'enabled',
208                     'studio' => 'false',
209                 ),
210     'invalid_email' => 
211                 array(
212                         'name'          => 'invalid_email',
213                         'vname'     => 'LBL_INVALID_EMAIL',
214                         'source'        => 'non-db',
215                         'type'          => 'bool',
216                     'massupdate' => false,
217                     'studio' => 'false',
218                 ),    
219     'email_opt_out' => 
220                 array(
221                         'name'          => 'email_opt_out',
222                         'vname'     => 'LBL_EMAIL_OPT_OUT',
223                         'source'        => 'non-db',
224                         'type'          => 'bool',
225                     'massupdate' => false,
226                         'studio'=>'false',
227                 ),
228         'primary_address_street' =>
229                 array (
230                         'name' => 'primary_address_street',
231                         'vname' => 'LBL_PRIMARY_ADDRESS_STREET',
232                         'type' => 'varchar',
233                         'len' => '150',
234                         'group'=>'primary_address',
235                         'comment' => 'Street address for primary address',
236             'merge_filter' => 'enabled',
237                 ),
238         'primary_address_street_2' =>
239                 array (
240                         'name' => 'primary_address_street_2',
241                         'vname' => 'LBL_PRIMARY_ADDRESS_STREET_2',
242                         'type' => 'varchar',
243                         'len' => '150',
244                         'source' => 'non-db',
245                 ),
246         'primary_address_street_3' =>
247                 array (
248                         'name' => 'primary_address_street_3',
249                         'vname' => 'LBL_PRIMARY_ADDRESS_STREET_3',
250                         'type' => 'varchar',
251                         'len' => '150',
252                         'source' => 'non-db',
253                 ),              
254         'primary_address_city' =>
255                 array (
256                         'name' => 'primary_address_city',
257                         'vname' => 'LBL_PRIMARY_ADDRESS_CITY',
258                         'type' => 'varchar',
259                         'len' => '100',
260                         'group'=>'primary_address',
261                         'comment' => 'City for primary address',
262             'merge_filter' => 'enabled',
263                 ),
264         'primary_address_state' =>
265                 array (
266                         'name' => 'primary_address_state',
267                         'vname' => 'LBL_PRIMARY_ADDRESS_STATE',
268                         'type' => 'varchar',
269                         'len' => '100',
270                         'group'=>'primary_address',
271                         'comment' => 'State for primary address',
272             'merge_filter' => 'enabled',
273                 ),
274         'primary_address_postalcode' =>
275                 array (
276                         'name' => 'primary_address_postalcode',
277                         'vname' => 'LBL_PRIMARY_ADDRESS_POSTALCODE',
278                         'type' => 'varchar',
279                         'len' => '20',
280                         'group'=>'primary_address',
281                         'comment' => 'Postal code for primary address',
282             'merge_filter' => 'enabled',
283             
284                 ),
285         'primary_address_country' =>
286                 array (
287                         'name' => 'primary_address_country',
288                         'vname' => 'LBL_PRIMARY_ADDRESS_COUNTRY',
289                         'type' => 'varchar',
290                         'group'=>'primary_address',
291                         'comment' => 'Country for primary address',
292             'merge_filter' => 'enabled',
293                 ),
294         'alt_address_street' =>
295                 array (
296                         'name' => 'alt_address_street',
297                         'vname' => 'LBL_ALT_ADDRESS_STREET',
298                         'type' => 'varchar',
299                         'len' => '150',
300                         'group'=>'alt_address',
301                         'comment' => 'Street address for alternate address',
302             'merge_filter' => 'enabled',
303                 ),
304         'alt_address_street_2' =>
305                 array (
306                         'name' => 'alt_address_street_2',
307                         'vname' => 'LBL_ALT_ADDRESS_STREET_2',
308                         'type' => 'varchar',
309                         'len' => '150',
310                         'source' => 'non-db',
311                 ),
312         'alt_address_street_3' =>
313                 array (
314                         'name' => 'alt_address_street_3',
315                         'vname' => 'LBL_ALT_ADDRESS_STREET_3',
316                         'type' => 'varchar',
317                         'len' => '150',
318                         'source' => 'non-db',
319                 ),                      
320         'alt_address_city' =>
321                 array (
322                         'name' => 'alt_address_city',
323                         'vname' => 'LBL_ALT_ADDRESS_CITY',
324                         'type' => 'varchar',
325                         'len' => '100',
326                         'group'=>'alt_address',
327                         'comment' => 'City for alternate address',
328             'merge_filter' => 'enabled',
329                 ),
330         'alt_address_state' =>
331                 array (
332                         'name' => 'alt_address_state',
333                         'vname' => 'LBL_ALT_ADDRESS_STATE',
334                         'type' => 'varchar',
335                         'len' => '100',
336                         'group'=>'alt_address',
337                         'comment' => 'State for alternate address',
338             'merge_filter' => 'enabled',
339                 ),
340         'alt_address_postalcode' =>
341                 array (
342                         'name' => 'alt_address_postalcode',
343                         'vname' => 'LBL_ALT_ADDRESS_POSTALCODE',
344                         'type' => 'varchar',
345                         'len' => '20',
346                         'group'=>'alt_address',
347                         'comment' => 'Postal code for alternate address',
348             'merge_filter' => 'enabled',
349                 ),
350         'alt_address_country' =>
351                 array (
352                         'name' => 'alt_address_country',
353                         'vname' => 'LBL_ALT_ADDRESS_COUNTRY',
354                         'type' => 'varchar',
355                         'group'=>'alt_address',
356                         'comment' => 'Country for alternate address',
357             'merge_filter' => 'enabled',
358                 ),
359                 'assistant' =>
360                 array (
361                         'name' => 'assistant',
362                         'vname' => 'LBL_ASSISTANT',
363                         'type' => 'varchar',
364                         'len' => '75',
365                         'unified_search' => true,
366                         'comment' => 'Name of the assistant of the contact',
367             'merge_filter' => 'enabled',
368                 ),
369         'assistant_phone' =>
370                 array (
371                         'name' => 'assistant_phone',
372                         'vname' => 'LBL_ASSISTANT_PHONE',
373                         'type' => 'phone',
374                         'dbType' => 'varchar',
375                         'len' => 100,
376                         'group'=>'assistant',
377                         'unified_search' => true,
378                         'comment' => 'Phone number of the assistant of the contact',
379             'merge_filter' => 'enabled',
380                 ),
381         'email_addresses_primary' => 
382                 array (
383             'name' => 'email_addresses_primary',
384             'type' => 'link',
385             'relationship' => strtolower($object_name).'_email_addresses_primary',
386             'source' => 'non-db',
387             'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
388             'duplicate_merge' => 'disabled',
389                 ),
390     'email_addresses' =>
391                 array (
392             'name' => 'email_addresses',
393             'type' => 'link',
394             'relationship' => strtolower($object_name).'_email_addresses',
395             'source' => 'non-db',
396             'vname' => 'LBL_EMAIL_ADDRESSES',
397             'reportable'=>false,
398             'unified_search' => true,
399             'rel_fields' => array('primary_address' => array('type'=>'bool')),
400         ),
401 ), 
402 'relationships'=>array(
403     strtolower($module).'_email_addresses' => 
404     array(
405         'lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
406         'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
407         'relationship_type'=>'many-to-many',
408         'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id', 
409         'relationship_role_column'=>'bean_module',
410         'relationship_role_column_value'=>$module
411     ),
412     strtolower($module).'_email_addresses_primary' => 
413     array('lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
414         'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
415         'relationship_type'=>'many-to-many',
416         'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id', 
417         'relationship_role_column'=>'primary_address', 
418         'relationship_role_column_value'=>'1'
419     ),
420 )
421 );
422 ?>