]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/SugarObjects/templates/person/vardefs.php
Release 6.2.0
[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                         'fields' => array('first_name', 'last_name'),
79                         'sort_on' => 'last_name',
80                         'source' => 'non-db',
81                         'group'=>'last_name',
82                         'len' => '255',
83                         'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
84             'importable' => 'false',
85                 ),
86         'full_name' =>
87                 array (
88                         'name' => 'full_name',
89                         'rname' => 'full_name',
90                         'vname' => 'LBL_NAME',
91                         'type' => 'fullname',
92                         'fields' => array('first_name', 'last_name'),
93                         'sort_on' => 'last_name',
94                         'source' => 'non-db',
95                         'group'=>'last_name',
96                         'len' => '510',
97                         'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
98                         'studio' => array('listview' => false),
99                 ),
100         'title' =>
101                 array (
102                         'name' => 'title',
103                         'vname' => 'LBL_TITLE',
104                         'type' => 'varchar',
105                         'len' => '100',
106                         'comment' => 'The title of the contact'
107                 ),
108         'department' =>
109                 array (
110                         'name' => 'department',
111                         'vname' => 'LBL_DEPARTMENT',
112                         'type' => 'varchar',
113                         'len' => '255',
114                         'comment' => 'The department of the contact',
115             'merge_filter' => 'enabled',
116                 ),
117                 'do_not_call' =>
118                 array (
119                         'name' => 'do_not_call',
120                         'vname' => 'LBL_DO_NOT_CALL',
121                         'type' => 'bool',
122                         'default' => '0',
123                         'audited'=>true,
124                         'comment' => 'An indicator of whether contact can be called'
125                 ),
126         'phone_home' =>
127                 array (
128                         'name' => 'phone_home',
129                         'vname' => 'LBL_HOME_PHONE',
130                         'type' => 'phone',
131                         'dbType' => 'varchar',
132                         'len' => 100,
133                         'unified_search' => true, 
134                         'comment' => 'Home phone number of the contact',
135             'merge_filter' => 'enabled',
136                 ),
137         'phone_mobile' =>
138                 array (
139                         'name' => 'phone_mobile',
140                         'vname' => 'LBL_MOBILE_PHONE',
141                         'type' => 'phone',
142                         'dbType' => 'varchar',
143                         'len' => 100,
144                         'unified_search' => true,
145                         'comment' => 'Mobile phone number of the contact',
146             'merge_filter' => 'enabled',
147                 ),
148         'phone_work' =>
149                 array (
150                         'name' => 'phone_work',
151                         'vname' => 'LBL_OFFICE_PHONE',
152                         'type' => 'phone',
153                         'dbType' => 'varchar',
154                         'len' => 100,
155                         'audited'=>true,
156                         'unified_search' => true,
157                         'comment' => 'Work phone number of the contact',
158             'merge_filter' => 'enabled',
159                 ),
160         'phone_other' =>
161                 array (
162                         'name' => 'phone_other',
163                         'vname' => 'LBL_OTHER_PHONE',
164                         'type' => 'phone',
165                         'dbType' => 'varchar',
166                         'len' => 100,
167                         'unified_search' => true,
168                         'comment' => 'Other phone number for the contact',
169             'merge_filter' => 'enabled',
170                 ),
171         'phone_fax' =>
172                 array (
173                         'name' => 'phone_fax',
174                         'vname' => 'LBL_FAX_PHONE',
175                         'type' => 'phone',
176                         'dbType' => 'varchar',
177                         'len' => 100,
178                         'unified_search' => true,
179                         'comment' => 'Contact fax number',
180             'merge_filter' => 'enabled',
181                 ),
182         'email1' => 
183                 array(
184                         'name'          => 'email1',
185                         'vname'         => 'LBL_EMAIL_ADDRESS',
186                         'type'          => 'varchar',
187                         'function'      => array(
188                                 'name'          => 'getEmailAddressWidget',
189                                 'returns'       => 'html'),
190                         'source'        => 'non-db',
191                         'group'=>'email1',
192             'merge_filter' => 'enabled',
193                     'studio' => array('editField' => true),
194                 ),
195         'email2' => 
196                 array(
197                         'name'          => 'email2',
198                         'vname'         => 'LBL_OTHER_EMAIL_ADDRESS',
199                         'type'          => 'varchar',
200                         'function'      => array(
201                                 'name'          => 'getEmailAddressWidget',
202                                 'returns'       => 'html'),
203                         'source'        => 'non-db',
204                         'group'=>'email2',
205             'merge_filter' => 'enabled',
206                     'studio' => 'false',
207                 ),
208     'invalid_email' => 
209                 array(
210                         'name'          => 'invalid_email',
211                         'vname'     => 'LBL_INVALID_EMAIL',
212                         'source'        => 'non-db',
213                         'type'          => 'bool',
214                     'massupdate' => false,
215                     'studio' => 'false',
216                 ),    
217     'email_opt_out' => 
218                 array(
219                         'name'          => 'email_opt_out',
220                         'vname'     => 'LBL_EMAIL_OPT_OUT',
221                         'source'        => 'non-db',
222                         'type'          => 'bool',
223                     'massupdate' => false,
224                         'studio'=>'false',
225                 ),
226         'primary_address_street' =>
227                 array (
228                         'name' => 'primary_address_street',
229                         'vname' => 'LBL_PRIMARY_ADDRESS_STREET',
230                         'type' => 'varchar',
231                         'len' => '150',
232                         'group'=>'primary_address',
233                         'comment' => 'Street address for primary address',
234             'merge_filter' => 'enabled',
235                 ),
236         'primary_address_street_2' =>
237                 array (
238                         'name' => 'primary_address_street_2',
239                         'vname' => 'LBL_PRIMARY_ADDRESS_STREET_2',
240                         'type' => 'varchar',
241                         'len' => '150',
242                         'source' => 'non-db',
243                 ),
244         'primary_address_street_3' =>
245                 array (
246                         'name' => 'primary_address_street_3',
247                         'vname' => 'LBL_PRIMARY_ADDRESS_STREET_3',
248                         'type' => 'varchar',
249                         'len' => '150',
250                         'source' => 'non-db',
251                 ),              
252         'primary_address_city' =>
253                 array (
254                         'name' => 'primary_address_city',
255                         'vname' => 'LBL_PRIMARY_ADDRESS_CITY',
256                         'type' => 'varchar',
257                         'len' => '100',
258                         'group'=>'primary_address',
259                         'comment' => 'City for primary address',
260             'merge_filter' => 'enabled',
261                 ),
262         'primary_address_state' =>
263                 array (
264                         'name' => 'primary_address_state',
265                         'vname' => 'LBL_PRIMARY_ADDRESS_STATE',
266                         'type' => 'varchar',
267                         'len' => '100',
268                         'group'=>'primary_address',
269                         'comment' => 'State for primary address',
270             'merge_filter' => 'enabled',
271                 ),
272         'primary_address_postalcode' =>
273                 array (
274                         'name' => 'primary_address_postalcode',
275                         'vname' => 'LBL_PRIMARY_ADDRESS_POSTALCODE',
276                         'type' => 'varchar',
277                         'len' => '20',
278                         'group'=>'primary_address',
279                         'comment' => 'Postal code for primary address',
280             'merge_filter' => 'enabled',
281             
282                 ),
283         'primary_address_country' =>
284                 array (
285                         'name' => 'primary_address_country',
286                         'vname' => 'LBL_PRIMARY_ADDRESS_COUNTRY',
287                         'type' => 'varchar',
288                         'group'=>'primary_address',
289                         'comment' => 'Country for primary address',
290             'merge_filter' => 'enabled',
291                 ),
292         'alt_address_street' =>
293                 array (
294                         'name' => 'alt_address_street',
295                         'vname' => 'LBL_ALT_ADDRESS_STREET',
296                         'type' => 'varchar',
297                         'len' => '150',
298                         'group'=>'alt_address',
299                         'comment' => 'Street address for alternate address',
300             'merge_filter' => 'enabled',
301                 ),
302         'alt_address_street_2' =>
303                 array (
304                         'name' => 'alt_address_street_2',
305                         'vname' => 'LBL_ALT_ADDRESS_STREET_2',
306                         'type' => 'varchar',
307                         'len' => '150',
308                         'source' => 'non-db',
309                 ),
310         'alt_address_street_3' =>
311                 array (
312                         'name' => 'alt_address_street_3',
313                         'vname' => 'LBL_ALT_ADDRESS_STREET_3',
314                         'type' => 'varchar',
315                         'len' => '150',
316                         'source' => 'non-db',
317                 ),                      
318         'alt_address_city' =>
319                 array (
320                         'name' => 'alt_address_city',
321                         'vname' => 'LBL_ALT_ADDRESS_CITY',
322                         'type' => 'varchar',
323                         'len' => '100',
324                         'group'=>'alt_address',
325                         'comment' => 'City for alternate address',
326             'merge_filter' => 'enabled',
327                 ),
328         'alt_address_state' =>
329                 array (
330                         'name' => 'alt_address_state',
331                         'vname' => 'LBL_ALT_ADDRESS_STATE',
332                         'type' => 'varchar',
333                         'len' => '100',
334                         'group'=>'alt_address',
335                         'comment' => 'State for alternate address',
336             'merge_filter' => 'enabled',
337                 ),
338         'alt_address_postalcode' =>
339                 array (
340                         'name' => 'alt_address_postalcode',
341                         'vname' => 'LBL_ALT_ADDRESS_POSTALCODE',
342                         'type' => 'varchar',
343                         'len' => '20',
344                         'group'=>'alt_address',
345                         'comment' => 'Postal code for alternate address',
346             'merge_filter' => 'enabled',
347                 ),
348         'alt_address_country' =>
349                 array (
350                         'name' => 'alt_address_country',
351                         'vname' => 'LBL_ALT_ADDRESS_COUNTRY',
352                         'type' => 'varchar',
353                         'group'=>'alt_address',
354                         'comment' => 'Country for alternate address',
355             'merge_filter' => 'enabled',
356                 ),
357                 'assistant' =>
358                 array (
359                         'name' => 'assistant',
360                         'vname' => 'LBL_ASSISTANT',
361                         'type' => 'varchar',
362                         'len' => '75',
363                         'unified_search' => true,
364                         'comment' => 'Name of the assistant of the contact',
365             'merge_filter' => 'enabled',
366                 ),
367         'assistant_phone' =>
368                 array (
369                         'name' => 'assistant_phone',
370                         'vname' => 'LBL_ASSISTANT_PHONE',
371                         'type' => 'phone',
372                         'dbType' => 'varchar',
373                         'len' => 100,
374                         'group'=>'assistant',
375                         'unified_search' => true,
376                         'comment' => 'Phone number of the assistant of the contact',
377             'merge_filter' => 'enabled',
378                 ),
379         'email_addresses_primary' => 
380                 array (
381             'name' => 'email_addresses_primary',
382             'type' => 'link',
383             'relationship' => strtolower($object_name).'_email_addresses_primary',
384             'source' => 'non-db',
385             'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
386             'duplicate_merge' => 'disabled',
387                 ),
388     'email_addresses' =>
389                 array (
390             'name' => 'email_addresses',
391             'type' => 'link',
392             'relationship' => strtolower($object_name).'_email_addresses',
393             'source' => 'non-db',
394             'vname' => 'LBL_EMAIL_ADDRESSES',
395             'reportable'=>false,
396             'unified_search' => true,
397             'rel_fields' => array('primary_address' => array('type'=>'bool')),
398         ),
399 ), 
400 'relationships'=>array(
401     strtolower($module).'_email_addresses' => 
402     array(
403         'lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
404         'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
405         'relationship_type'=>'many-to-many',
406         'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id', 
407         'relationship_role_column'=>'bean_module',
408         'relationship_role_column_value'=>$module
409     ),
410     strtolower($module).'_email_addresses_primary' => 
411     array('lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
412         'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
413         'relationship_type'=>'many-to-many',
414         'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id', 
415         'relationship_role_column'=>'primary_address', 
416         'relationship_role_column_value'=>'1'
417     ),
418 )
419 );
420 ?>