@@ -39,31 +39,31 @@ |
||
| 39 | 39 | |
| 40 | 40 | |
| 41 | 41 | $searchdefs['Prospects'] = array( |
| 42 | - 'templateMeta' => array( |
|
| 43 | - 'maxColumns' => '3', |
|
| 42 | + 'templateMeta' => array( |
|
| 43 | + 'maxColumns' => '3', |
|
| 44 | 44 | 'maxColumnsBasic' => '4', |
| 45 | 45 | 'widths' => array('label' => '10', 'field' => '30'), |
| 46 | - ), |
|
| 46 | + ), |
|
| 47 | 47 | 'layout' => array( |
| 48 | - 'basic_search' => array( |
|
| 49 | - array('name'=>'search_name','label' =>'LBL_NAME', 'type' => 'name'), |
|
| 50 | - array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'), |
|
| 48 | + 'basic_search' => array( |
|
| 49 | + array('name'=>'search_name','label' =>'LBL_NAME', 'type' => 'name'), |
|
| 50 | + array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'), |
|
| 51 | 51 | |
| 52 | - ), |
|
| 53 | - 'advanced_search' => array( |
|
| 54 | - 'first_name', |
|
| 55 | - 'last_name', |
|
| 56 | - array('name' => 'phone', 'label' =>'LBL_ANY_PHONE', 'type' => 'name'), |
|
| 57 | - array('name' => 'email', 'label' =>'LBL_ANY_EMAIL', 'type' => 'name'), |
|
| 58 | - 'assistant', |
|
| 59 | - 'do_not_call', |
|
| 60 | - array('name' => 'address_street', 'label'=>'LBL_ANY_ADDRESS', 'type' => 'name'), |
|
| 61 | - array('name' => 'address_state', 'label' =>'LBL_STATE', 'type' => 'name'), |
|
| 62 | - array('name' => 'address_postalcode', 'label' =>'LBL_POSTAL_CODE', 'type' => 'name'), |
|
| 63 | - array('name' => 'primary_address_country', 'label' =>'LBL_COUNTRY', 'type' => 'name', 'options' => 'countries_dom', ), |
|
| 64 | - array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))), |
|
| 52 | + ), |
|
| 53 | + 'advanced_search' => array( |
|
| 54 | + 'first_name', |
|
| 55 | + 'last_name', |
|
| 56 | + array('name' => 'phone', 'label' =>'LBL_ANY_PHONE', 'type' => 'name'), |
|
| 57 | + array('name' => 'email', 'label' =>'LBL_ANY_EMAIL', 'type' => 'name'), |
|
| 58 | + 'assistant', |
|
| 59 | + 'do_not_call', |
|
| 60 | + array('name' => 'address_street', 'label'=>'LBL_ANY_ADDRESS', 'type' => 'name'), |
|
| 61 | + array('name' => 'address_state', 'label' =>'LBL_STATE', 'type' => 'name'), |
|
| 62 | + array('name' => 'address_postalcode', 'label' =>'LBL_POSTAL_CODE', 'type' => 'name'), |
|
| 63 | + array('name' => 'primary_address_country', 'label' =>'LBL_COUNTRY', 'type' => 'name', 'options' => 'countries_dom', ), |
|
| 64 | + array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))), |
|
| 65 | 65 | |
| 66 | - ), |
|
| 67 | - ), |
|
| 68 | - ); |
|
| 66 | + ), |
|
| 67 | + ), |
|
| 68 | + ); |
|
| 69 | 69 | ?> |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | ), |
| 47 | 47 | 'layout' => array( |
| 48 | 48 | 'basic_search' => array( |
| 49 | - array('name'=>'search_name','label' =>'LBL_NAME', 'type' => 'name'), |
|
| 49 | + array('name'=>'search_name', 'label' =>'LBL_NAME', 'type' => 'name'), |
|
| 50 | 50 | array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'), |
| 51 | 51 | |
| 52 | 52 | ), |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | array('name' => 'address_street', 'label'=>'LBL_ANY_ADDRESS', 'type' => 'name'), |
| 61 | 61 | array('name' => 'address_state', 'label' =>'LBL_STATE', 'type' => 'name'), |
| 62 | 62 | array('name' => 'address_postalcode', 'label' =>'LBL_POSTAL_CODE', 'type' => 'name'), |
| 63 | - array('name' => 'primary_address_country', 'label' =>'LBL_COUNTRY', 'type' => 'name', 'options' => 'countries_dom', ), |
|
| 63 | + array('name' => 'primary_address_country', 'label' =>'LBL_COUNTRY', 'type' => 'name', 'options' => 'countries_dom',), |
|
| 64 | 64 | array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))), |
| 65 | 65 | |
| 66 | 66 | ), |
@@ -39,35 +39,35 @@ |
||
| 39 | 39 | ********************************************************************************/ |
| 40 | 40 | |
| 41 | 41 | $searchFields['Prospects'] = |
| 42 | - array ( |
|
| 43 | - 'first_name' => array( 'query_type'=>'default'), |
|
| 44 | - 'last_name'=> array('query_type'=>'default'), |
|
| 45 | - 'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name'),'force_unifiedsearch'=>true), |
|
| 46 | - 'do_not_call'=> array('query_type'=>'default', 'operator'=>'='), |
|
| 47 | - 'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','phone_home')), |
|
| 48 | - 'email'=> array( |
|
| 49 | - 'query_type' => 'default', |
|
| 50 | - 'operator' => 'subquery', |
|
| 51 | - 'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE', |
|
| 52 | - 'db_field' => array( |
|
| 53 | - 'id', |
|
| 54 | - ), |
|
| 55 | - ), |
|
| 56 | - 'assistant'=> array('query_type'=>'default'), |
|
| 57 | - 'address_street'=> array('query_type'=>'default','db_field'=>array('primary_address_street','alt_address_street')), |
|
| 58 | - 'address_city'=> array('query_type'=>'default','db_field'=>array('primary_address_city','alt_address_city')), |
|
| 59 | - 'address_state'=> array('query_type'=>'default','db_field'=>array('primary_address_state','alt_address_state')), |
|
| 60 | - 'address_postalcode'=> array('query_type'=>'default','db_field'=>array('primary_address_postalcode','alt_address_postalcode')), |
|
| 61 | - 'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')), |
|
| 62 | - 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
| 63 | - 'assigned_user_id'=> array('query_type'=>'default'), |
|
| 64 | - //Range Search Support |
|
| 65 | - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 66 | - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 67 | - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 68 | - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 69 | - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 70 | - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 71 | - //Range Search Support |
|
| 72 | - ); |
|
| 42 | + array ( |
|
| 43 | + 'first_name' => array( 'query_type'=>'default'), |
|
| 44 | + 'last_name'=> array('query_type'=>'default'), |
|
| 45 | + 'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name'),'force_unifiedsearch'=>true), |
|
| 46 | + 'do_not_call'=> array('query_type'=>'default', 'operator'=>'='), |
|
| 47 | + 'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','phone_home')), |
|
| 48 | + 'email'=> array( |
|
| 49 | + 'query_type' => 'default', |
|
| 50 | + 'operator' => 'subquery', |
|
| 51 | + 'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE', |
|
| 52 | + 'db_field' => array( |
|
| 53 | + 'id', |
|
| 54 | + ), |
|
| 55 | + ), |
|
| 56 | + 'assistant'=> array('query_type'=>'default'), |
|
| 57 | + 'address_street'=> array('query_type'=>'default','db_field'=>array('primary_address_street','alt_address_street')), |
|
| 58 | + 'address_city'=> array('query_type'=>'default','db_field'=>array('primary_address_city','alt_address_city')), |
|
| 59 | + 'address_state'=> array('query_type'=>'default','db_field'=>array('primary_address_state','alt_address_state')), |
|
| 60 | + 'address_postalcode'=> array('query_type'=>'default','db_field'=>array('primary_address_postalcode','alt_address_postalcode')), |
|
| 61 | + 'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')), |
|
| 62 | + 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
| 63 | + 'assigned_user_id'=> array('query_type'=>'default'), |
|
| 64 | + //Range Search Support |
|
| 65 | + 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 66 | + 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 67 | + 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 68 | + 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 69 | + 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 70 | + 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 71 | + //Range Search Support |
|
| 72 | + ); |
|
| 73 | 73 | ?> |
@@ -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. |
@@ -39,12 +39,12 @@ discard block |
||
| 39 | 39 | ********************************************************************************/ |
| 40 | 40 | |
| 41 | 41 | $searchFields['Prospects'] = |
| 42 | - array ( |
|
| 43 | - 'first_name' => array( 'query_type'=>'default'), |
|
| 42 | + array( |
|
| 43 | + 'first_name' => array('query_type'=>'default'), |
|
| 44 | 44 | 'last_name'=> array('query_type'=>'default'), |
| 45 | - 'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name'),'force_unifiedsearch'=>true), |
|
| 45 | + 'search_name'=> array('query_type'=>'default', 'db_field'=>array('first_name', 'last_name'), 'force_unifiedsearch'=>true), |
|
| 46 | 46 | 'do_not_call'=> array('query_type'=>'default', 'operator'=>'='), |
| 47 | - 'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','phone_home')), |
|
| 47 | + 'phone'=> array('query_type'=>'default', 'db_field'=>array('phone_mobile', 'phone_work', 'phone_other', 'phone_fax', 'phone_home')), |
|
| 48 | 48 | 'email'=> array( |
| 49 | 49 | 'query_type' => 'default', |
| 50 | 50 | 'operator' => 'subquery', |
@@ -54,20 +54,20 @@ discard block |
||
| 54 | 54 | ), |
| 55 | 55 | ), |
| 56 | 56 | 'assistant'=> array('query_type'=>'default'), |
| 57 | - 'address_street'=> array('query_type'=>'default','db_field'=>array('primary_address_street','alt_address_street')), |
|
| 58 | - 'address_city'=> array('query_type'=>'default','db_field'=>array('primary_address_city','alt_address_city')), |
|
| 59 | - 'address_state'=> array('query_type'=>'default','db_field'=>array('primary_address_state','alt_address_state')), |
|
| 60 | - 'address_postalcode'=> array('query_type'=>'default','db_field'=>array('primary_address_postalcode','alt_address_postalcode')), |
|
| 61 | - 'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')), |
|
| 62 | - 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
| 57 | + 'address_street'=> array('query_type'=>'default', 'db_field'=>array('primary_address_street', 'alt_address_street')), |
|
| 58 | + 'address_city'=> array('query_type'=>'default', 'db_field'=>array('primary_address_city', 'alt_address_city')), |
|
| 59 | + 'address_state'=> array('query_type'=>'default', 'db_field'=>array('primary_address_state', 'alt_address_state')), |
|
| 60 | + 'address_postalcode'=> array('query_type'=>'default', 'db_field'=>array('primary_address_postalcode', 'alt_address_postalcode')), |
|
| 61 | + 'address_country'=> array('query_type'=>'default', 'db_field'=>array('primary_address_country', 'alt_address_country')), |
|
| 62 | + 'current_user_only'=> array('query_type'=>'default', 'db_field'=>array('assigned_user_id'), 'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
| 63 | 63 | 'assigned_user_id'=> array('query_type'=>'default'), |
| 64 | 64 | //Range Search Support |
| 65 | - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 66 | - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 67 | - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 68 | - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 69 | - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 70 | - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 65 | + 'range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 66 | + 'start_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 67 | + 'end_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 68 | + 'range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 69 | + 'start_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 70 | + 'end_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
| 71 | 71 | //Range Search Support |
| 72 | 72 | ); |
| 73 | 73 | ?> |
@@ -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. |
@@ -39,188 +39,188 @@ |
||
| 39 | 39 | |
| 40 | 40 | $viewdefs ['Prospects'] = |
| 41 | 41 | array ( |
| 42 | - 'DetailView' => |
|
| 43 | - array ( |
|
| 42 | + 'DetailView' => |
|
| 43 | + array ( |
|
| 44 | 44 | 'templateMeta' => |
| 45 | 45 | array ( |
| 46 | - 'form' => |
|
| 47 | - array ( |
|
| 46 | + 'form' => |
|
| 47 | + array ( |
|
| 48 | 48 | 'buttons' => |
| 49 | 49 | array ( |
| 50 | - 0 => 'EDIT', |
|
| 51 | - 1 => 'DUPLICATE', |
|
| 52 | - 2 => 'DELETE', |
|
| 53 | - 3 => |
|
| 54 | - array ( |
|
| 50 | + 0 => 'EDIT', |
|
| 51 | + 1 => 'DUPLICATE', |
|
| 52 | + 2 => 'DELETE', |
|
| 53 | + 3 => |
|
| 54 | + array ( |
|
| 55 | 55 | 'customCode' => '<input title="{$MOD.LBL_CONVERT_BUTTON_TITLE}" class="button" onclick="this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\';this.form.module.value=\'Leads\';this.form.action.value=\'EditView\';" type="submit" name="CONVERT_LEAD_BTN" value="{$MOD.LBL_CONVERT_BUTTON_LABEL}"/>', |
| 56 | 56 | 'sugar_html' => |
| 57 | 57 | array ( |
| 58 | - 'type' => 'submit', |
|
| 59 | - 'value' => '{$MOD.LBL_CONVERT_BUTTON_LABEL}', |
|
| 60 | - 'htmlOptions' => |
|
| 61 | - array ( |
|
| 58 | + 'type' => 'submit', |
|
| 59 | + 'value' => '{$MOD.LBL_CONVERT_BUTTON_LABEL}', |
|
| 60 | + 'htmlOptions' => |
|
| 61 | + array ( |
|
| 62 | 62 | 'class' => 'button', |
| 63 | 63 | 'name' => 'CONVERT_LEAD_BTN', |
| 64 | 64 | 'id' => 'convert_target_button', |
| 65 | 65 | 'title' => '{$MOD.LBL_CONVERT_BUTTON_TITLE}', |
| 66 | 66 | 'onclick' => 'this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\';this.form.module.value=\'Leads\';this.form.action.value=\'EditView\';', |
| 67 | - ), |
|
| 67 | + ), |
|
| 68 | 68 | ), |
| 69 | - ), |
|
| 70 | - 4 => |
|
| 71 | - array ( |
|
| 69 | + ), |
|
| 70 | + 4 => |
|
| 71 | + array ( |
|
| 72 | 72 | 'customCode' => '<input title="{$APP.LBL_MANAGE_SUBSCRIPTIONS}" class="button" onclick="this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Subscriptions\'; this.form.module.value=\'Campaigns\';" type="submit" name="Manage Subscriptions" value="{$APP.LBL_MANAGE_SUBSCRIPTIONS}"/>', |
| 73 | 73 | 'sugar_html' => |
| 74 | 74 | array ( |
| 75 | - 'type' => 'submit', |
|
| 76 | - 'value' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}', |
|
| 77 | - 'htmlOptions' => |
|
| 78 | - array ( |
|
| 75 | + 'type' => 'submit', |
|
| 76 | + 'value' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}', |
|
| 77 | + 'htmlOptions' => |
|
| 78 | + array ( |
|
| 79 | 79 | 'class' => 'button', |
| 80 | 80 | 'id' => 'manage_subscriptions_button', |
| 81 | 81 | 'name' => 'Manage Subscriptions', |
| 82 | 82 | 'title' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}', |
| 83 | 83 | 'onclick' => 'this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Subscriptions\'; this.form.module.value=\'Campaigns\';', |
| 84 | - ), |
|
| 84 | + ), |
|
| 85 | + ), |
|
| 85 | 86 | ), |
| 86 | - ), |
|
| 87 | 87 | ), |
| 88 | 88 | 'hidden' => |
| 89 | 89 | array ( |
| 90 | - 0 => '<input type="hidden" name="prospect_id" value="{$fields.id.value}">', |
|
| 90 | + 0 => '<input type="hidden" name="prospect_id" value="{$fields.id.value}">', |
|
| 91 | 91 | ), |
| 92 | 92 | 'headerTpl' => 'modules/Prospects/tpls/DetailViewHeader.tpl', |
| 93 | - ), |
|
| 94 | - 'maxColumns' => '2', |
|
| 95 | - 'widths' => |
|
| 96 | - array ( |
|
| 93 | + ), |
|
| 94 | + 'maxColumns' => '2', |
|
| 95 | + 'widths' => |
|
| 96 | + array ( |
|
| 97 | 97 | 0 => |
| 98 | 98 | array ( |
| 99 | - 'label' => '10', |
|
| 100 | - 'field' => '30', |
|
| 99 | + 'label' => '10', |
|
| 100 | + 'field' => '30', |
|
| 101 | 101 | ), |
| 102 | 102 | 1 => |
| 103 | 103 | array ( |
| 104 | - 'label' => '10', |
|
| 105 | - 'field' => '30', |
|
| 104 | + 'label' => '10', |
|
| 105 | + 'field' => '30', |
|
| 106 | + ), |
|
| 106 | 107 | ), |
| 107 | - ), |
|
| 108 | - 'useTabs' => true, |
|
| 109 | - 'tabDefs' => |
|
| 110 | - array ( |
|
| 108 | + 'useTabs' => true, |
|
| 109 | + 'tabDefs' => |
|
| 110 | + array ( |
|
| 111 | 111 | 'LBL_PROSPECT_INFORMATION' => |
| 112 | 112 | array ( |
| 113 | - 'newTab' => true, |
|
| 114 | - 'panelDefault' => 'expanded', |
|
| 113 | + 'newTab' => true, |
|
| 114 | + 'panelDefault' => 'expanded', |
|
| 115 | 115 | ), |
| 116 | 116 | 'LBL_MORE_INFORMATION' => |
| 117 | 117 | array ( |
| 118 | - 'newTab' => true, |
|
| 119 | - 'panelDefault' => 'expanded', |
|
| 118 | + 'newTab' => true, |
|
| 119 | + 'panelDefault' => 'expanded', |
|
| 120 | 120 | ), |
| 121 | 121 | 'LBL_PANEL_ASSIGNMENT' => |
| 122 | 122 | array ( |
| 123 | - 'newTab' => true, |
|
| 124 | - 'panelDefault' => 'expanded', |
|
| 123 | + 'newTab' => true, |
|
| 124 | + 'panelDefault' => 'expanded', |
|
| 125 | + ), |
|
| 125 | 126 | ), |
| 126 | - ), |
|
| 127 | 127 | ), |
| 128 | 128 | 'panels' => |
| 129 | 129 | array ( |
| 130 | - 'lbl_prospect_information' => |
|
| 131 | - array ( |
|
| 130 | + 'lbl_prospect_information' => |
|
| 131 | + array ( |
|
| 132 | 132 | 0 => |
| 133 | 133 | array ( |
| 134 | - 0 => |
|
| 135 | - array ( |
|
| 134 | + 0 => |
|
| 135 | + array ( |
|
| 136 | 136 | 'name' => 'full_name', |
| 137 | - ), |
|
| 137 | + ), |
|
| 138 | 138 | ), |
| 139 | 139 | 1 => |
| 140 | 140 | array ( |
| 141 | - 0 => 'title', |
|
| 142 | - 1 => |
|
| 143 | - array ( |
|
| 141 | + 0 => 'title', |
|
| 142 | + 1 => |
|
| 143 | + array ( |
|
| 144 | 144 | 'name' => 'phone_work', |
| 145 | 145 | 'label' => 'LBL_OFFICE_PHONE', |
| 146 | - ), |
|
| 146 | + ), |
|
| 147 | 147 | ), |
| 148 | 148 | 2 => |
| 149 | 149 | array ( |
| 150 | - 0 => 'department', |
|
| 151 | - 1 => 'phone_mobile', |
|
| 150 | + 0 => 'department', |
|
| 151 | + 1 => 'phone_mobile', |
|
| 152 | 152 | ), |
| 153 | 153 | 3 => |
| 154 | 154 | array ( |
| 155 | - 0 => |
|
| 156 | - array ( |
|
| 155 | + 0 => |
|
| 156 | + array ( |
|
| 157 | 157 | 'name' => 'account_name', |
| 158 | - ), |
|
| 159 | - 1 => 'phone_fax', |
|
| 158 | + ), |
|
| 159 | + 1 => 'phone_fax', |
|
| 160 | 160 | ), |
| 161 | 161 | 4 => |
| 162 | 162 | array ( |
| 163 | - 0 => |
|
| 164 | - array ( |
|
| 163 | + 0 => |
|
| 164 | + array ( |
|
| 165 | 165 | 'name' => 'primary_address_street', |
| 166 | 166 | 'label' => 'LBL_PRIMARY_ADDRESS', |
| 167 | 167 | 'type' => 'address', |
| 168 | 168 | 'displayParams' => |
| 169 | 169 | array ( |
| 170 | - 'key' => 'primary', |
|
| 170 | + 'key' => 'primary', |
|
| 171 | + ), |
|
| 171 | 172 | ), |
| 172 | - ), |
|
| 173 | - 1 => |
|
| 174 | - array ( |
|
| 173 | + 1 => |
|
| 174 | + array ( |
|
| 175 | 175 | 'name' => 'alt_address_street', |
| 176 | 176 | 'label' => 'LBL_ALTERNATE_ADDRESS', |
| 177 | 177 | 'type' => 'address', |
| 178 | 178 | 'displayParams' => |
| 179 | 179 | array ( |
| 180 | - 'key' => 'alt', |
|
| 180 | + 'key' => 'alt', |
|
| 181 | + ), |
|
| 181 | 182 | ), |
| 182 | - ), |
|
| 183 | 183 | ), |
| 184 | 184 | 5 => |
| 185 | 185 | array ( |
| 186 | - 0 => 'email1', |
|
| 186 | + 0 => 'email1', |
|
| 187 | 187 | ), |
| 188 | 188 | 6 => |
| 189 | 189 | array ( |
| 190 | - 0 => 'description', |
|
| 190 | + 0 => 'description', |
|
| 191 | 191 | ), |
| 192 | 192 | 7 => |
| 193 | 193 | array ( |
| 194 | - 0 => 'assigned_user_name', |
|
| 194 | + 0 => 'assigned_user_name', |
|
| 195 | 195 | ), |
| 196 | - ), |
|
| 197 | - 'LBL_MORE_INFORMATION' => |
|
| 198 | - array ( |
|
| 196 | + ), |
|
| 197 | + 'LBL_MORE_INFORMATION' => |
|
| 198 | + array ( |
|
| 199 | 199 | 0 => |
| 200 | 200 | array ( |
| 201 | - 0 => 'email_opt_out', |
|
| 202 | - 1 => 'do_not_call', |
|
| 201 | + 0 => 'email_opt_out', |
|
| 202 | + 1 => 'do_not_call', |
|
| 203 | + ), |
|
| 203 | 204 | ), |
| 204 | - ), |
|
| 205 | - 'LBL_PANEL_ASSIGNMENT' => |
|
| 206 | - array ( |
|
| 205 | + 'LBL_PANEL_ASSIGNMENT' => |
|
| 206 | + array ( |
|
| 207 | 207 | 0 => |
| 208 | 208 | array ( |
| 209 | - 0 => |
|
| 210 | - array ( |
|
| 209 | + 0 => |
|
| 210 | + array ( |
|
| 211 | 211 | 'name' => 'modified_by_name', |
| 212 | 212 | 'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value} ', |
| 213 | 213 | 'label' => 'LBL_DATE_MODIFIED', |
| 214 | - ), |
|
| 215 | - 1 => |
|
| 216 | - array ( |
|
| 214 | + ), |
|
| 215 | + 1 => |
|
| 216 | + array ( |
|
| 217 | 217 | 'name' => 'created_by_name', |
| 218 | 218 | 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value} ', |
| 219 | 219 | 'label' => 'LBL_DATE_ENTERED', |
| 220 | - ), |
|
| 220 | + ), |
|
| 221 | 221 | ), |
| 222 | - ), |
|
| 222 | + ), |
|
| 223 | + ), |
|
| 223 | 224 | ), |
| 224 | - ), |
|
| 225 | 225 | ); |
| 226 | 226 | ?> |
@@ -38,27 +38,27 @@ discard block |
||
| 38 | 38 | ********************************************************************************/ |
| 39 | 39 | |
| 40 | 40 | $viewdefs ['Prospects'] = |
| 41 | -array ( |
|
| 41 | +array( |
|
| 42 | 42 | 'DetailView' => |
| 43 | - array ( |
|
| 43 | + array( |
|
| 44 | 44 | 'templateMeta' => |
| 45 | - array ( |
|
| 45 | + array( |
|
| 46 | 46 | 'form' => |
| 47 | - array ( |
|
| 47 | + array( |
|
| 48 | 48 | 'buttons' => |
| 49 | - array ( |
|
| 49 | + array( |
|
| 50 | 50 | 0 => 'EDIT', |
| 51 | 51 | 1 => 'DUPLICATE', |
| 52 | 52 | 2 => 'DELETE', |
| 53 | 53 | 3 => |
| 54 | - array ( |
|
| 54 | + array( |
|
| 55 | 55 | 'customCode' => '<input title="{$MOD.LBL_CONVERT_BUTTON_TITLE}" class="button" onclick="this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\';this.form.module.value=\'Leads\';this.form.action.value=\'EditView\';" type="submit" name="CONVERT_LEAD_BTN" value="{$MOD.LBL_CONVERT_BUTTON_LABEL}"/>', |
| 56 | 56 | 'sugar_html' => |
| 57 | - array ( |
|
| 57 | + array( |
|
| 58 | 58 | 'type' => 'submit', |
| 59 | 59 | 'value' => '{$MOD.LBL_CONVERT_BUTTON_LABEL}', |
| 60 | 60 | 'htmlOptions' => |
| 61 | - array ( |
|
| 61 | + array( |
|
| 62 | 62 | 'class' => 'button', |
| 63 | 63 | 'name' => 'CONVERT_LEAD_BTN', |
| 64 | 64 | 'id' => 'convert_target_button', |
@@ -68,14 +68,14 @@ discard block |
||
| 68 | 68 | ), |
| 69 | 69 | ), |
| 70 | 70 | 4 => |
| 71 | - array ( |
|
| 71 | + array( |
|
| 72 | 72 | 'customCode' => '<input title="{$APP.LBL_MANAGE_SUBSCRIPTIONS}" class="button" onclick="this.form.return_module.value=\'Prospects\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Subscriptions\'; this.form.module.value=\'Campaigns\';" type="submit" name="Manage Subscriptions" value="{$APP.LBL_MANAGE_SUBSCRIPTIONS}"/>', |
| 73 | 73 | 'sugar_html' => |
| 74 | - array ( |
|
| 74 | + array( |
|
| 75 | 75 | 'type' => 'submit', |
| 76 | 76 | 'value' => '{$APP.LBL_MANAGE_SUBSCRIPTIONS}', |
| 77 | 77 | 'htmlOptions' => |
| 78 | - array ( |
|
| 78 | + array( |
|
| 79 | 79 | 'class' => 'button', |
| 80 | 80 | 'id' => 'manage_subscriptions_button', |
| 81 | 81 | 'name' => 'Manage Subscriptions', |
@@ -86,134 +86,134 @@ discard block |
||
| 86 | 86 | ), |
| 87 | 87 | ), |
| 88 | 88 | 'hidden' => |
| 89 | - array ( |
|
| 89 | + array( |
|
| 90 | 90 | 0 => '<input type="hidden" name="prospect_id" value="{$fields.id.value}">', |
| 91 | 91 | ), |
| 92 | 92 | 'headerTpl' => 'modules/Prospects/tpls/DetailViewHeader.tpl', |
| 93 | 93 | ), |
| 94 | 94 | 'maxColumns' => '2', |
| 95 | 95 | 'widths' => |
| 96 | - array ( |
|
| 96 | + array( |
|
| 97 | 97 | 0 => |
| 98 | - array ( |
|
| 98 | + array( |
|
| 99 | 99 | 'label' => '10', |
| 100 | 100 | 'field' => '30', |
| 101 | 101 | ), |
| 102 | 102 | 1 => |
| 103 | - array ( |
|
| 103 | + array( |
|
| 104 | 104 | 'label' => '10', |
| 105 | 105 | 'field' => '30', |
| 106 | 106 | ), |
| 107 | 107 | ), |
| 108 | 108 | 'useTabs' => true, |
| 109 | 109 | 'tabDefs' => |
| 110 | - array ( |
|
| 110 | + array( |
|
| 111 | 111 | 'LBL_PROSPECT_INFORMATION' => |
| 112 | - array ( |
|
| 112 | + array( |
|
| 113 | 113 | 'newTab' => true, |
| 114 | 114 | 'panelDefault' => 'expanded', |
| 115 | 115 | ), |
| 116 | 116 | 'LBL_MORE_INFORMATION' => |
| 117 | - array ( |
|
| 117 | + array( |
|
| 118 | 118 | 'newTab' => true, |
| 119 | 119 | 'panelDefault' => 'expanded', |
| 120 | 120 | ), |
| 121 | 121 | 'LBL_PANEL_ASSIGNMENT' => |
| 122 | - array ( |
|
| 122 | + array( |
|
| 123 | 123 | 'newTab' => true, |
| 124 | 124 | 'panelDefault' => 'expanded', |
| 125 | 125 | ), |
| 126 | 126 | ), |
| 127 | 127 | ), |
| 128 | 128 | 'panels' => |
| 129 | - array ( |
|
| 129 | + array( |
|
| 130 | 130 | 'lbl_prospect_information' => |
| 131 | - array ( |
|
| 131 | + array( |
|
| 132 | 132 | 0 => |
| 133 | - array ( |
|
| 133 | + array( |
|
| 134 | 134 | 0 => |
| 135 | - array ( |
|
| 135 | + array( |
|
| 136 | 136 | 'name' => 'full_name', |
| 137 | 137 | ), |
| 138 | 138 | ), |
| 139 | 139 | 1 => |
| 140 | - array ( |
|
| 140 | + array( |
|
| 141 | 141 | 0 => 'title', |
| 142 | 142 | 1 => |
| 143 | - array ( |
|
| 143 | + array( |
|
| 144 | 144 | 'name' => 'phone_work', |
| 145 | 145 | 'label' => 'LBL_OFFICE_PHONE', |
| 146 | 146 | ), |
| 147 | 147 | ), |
| 148 | 148 | 2 => |
| 149 | - array ( |
|
| 149 | + array( |
|
| 150 | 150 | 0 => 'department', |
| 151 | 151 | 1 => 'phone_mobile', |
| 152 | 152 | ), |
| 153 | 153 | 3 => |
| 154 | - array ( |
|
| 154 | + array( |
|
| 155 | 155 | 0 => |
| 156 | - array ( |
|
| 156 | + array( |
|
| 157 | 157 | 'name' => 'account_name', |
| 158 | 158 | ), |
| 159 | 159 | 1 => 'phone_fax', |
| 160 | 160 | ), |
| 161 | 161 | 4 => |
| 162 | - array ( |
|
| 162 | + array( |
|
| 163 | 163 | 0 => |
| 164 | - array ( |
|
| 164 | + array( |
|
| 165 | 165 | 'name' => 'primary_address_street', |
| 166 | 166 | 'label' => 'LBL_PRIMARY_ADDRESS', |
| 167 | 167 | 'type' => 'address', |
| 168 | 168 | 'displayParams' => |
| 169 | - array ( |
|
| 169 | + array( |
|
| 170 | 170 | 'key' => 'primary', |
| 171 | 171 | ), |
| 172 | 172 | ), |
| 173 | 173 | 1 => |
| 174 | - array ( |
|
| 174 | + array( |
|
| 175 | 175 | 'name' => 'alt_address_street', |
| 176 | 176 | 'label' => 'LBL_ALTERNATE_ADDRESS', |
| 177 | 177 | 'type' => 'address', |
| 178 | 178 | 'displayParams' => |
| 179 | - array ( |
|
| 179 | + array( |
|
| 180 | 180 | 'key' => 'alt', |
| 181 | 181 | ), |
| 182 | 182 | ), |
| 183 | 183 | ), |
| 184 | 184 | 5 => |
| 185 | - array ( |
|
| 185 | + array( |
|
| 186 | 186 | 0 => 'email1', |
| 187 | 187 | ), |
| 188 | 188 | 6 => |
| 189 | - array ( |
|
| 189 | + array( |
|
| 190 | 190 | 0 => 'description', |
| 191 | 191 | ), |
| 192 | 192 | 7 => |
| 193 | - array ( |
|
| 193 | + array( |
|
| 194 | 194 | 0 => 'assigned_user_name', |
| 195 | 195 | ), |
| 196 | 196 | ), |
| 197 | 197 | 'LBL_MORE_INFORMATION' => |
| 198 | - array ( |
|
| 198 | + array( |
|
| 199 | 199 | 0 => |
| 200 | - array ( |
|
| 200 | + array( |
|
| 201 | 201 | 0 => 'email_opt_out', |
| 202 | 202 | 1 => 'do_not_call', |
| 203 | 203 | ), |
| 204 | 204 | ), |
| 205 | 205 | 'LBL_PANEL_ASSIGNMENT' => |
| 206 | - array ( |
|
| 206 | + array( |
|
| 207 | 207 | 0 => |
| 208 | - array ( |
|
| 208 | + array( |
|
| 209 | 209 | 0 => |
| 210 | - array ( |
|
| 210 | + array( |
|
| 211 | 211 | 'name' => 'modified_by_name', |
| 212 | 212 | 'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value} ', |
| 213 | 213 | 'label' => 'LBL_DATE_MODIFIED', |
| 214 | 214 | ), |
| 215 | 215 | 1 => |
| 216 | - array ( |
|
| 216 | + array( |
|
| 217 | 217 | 'name' => 'created_by_name', |
| 218 | 218 | 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value} ', |
| 219 | 219 | 'label' => 'LBL_DATE_ENTERED', |
@@ -46,121 +46,121 @@ |
||
| 46 | 46 | ********************************************************************************/ |
| 47 | 47 | |
| 48 | 48 | $viewdefs = array ( |
| 49 | - 'Prospects' => |
|
| 50 | - array ( |
|
| 49 | + 'Prospects' => |
|
| 50 | + array ( |
|
| 51 | 51 | 'QuickCreate' => |
| 52 | 52 | array ( |
| 53 | - 'templateMeta' => |
|
| 54 | - array ( |
|
| 53 | + 'templateMeta' => |
|
| 54 | + array ( |
|
| 55 | 55 | 'maxColumns' => '2', |
| 56 | 56 | 'widths' => |
| 57 | 57 | array ( |
| 58 | - 0 => |
|
| 59 | - array ( |
|
| 58 | + 0 => |
|
| 59 | + array ( |
|
| 60 | 60 | 'label' => '10', |
| 61 | 61 | 'field' => '30', |
| 62 | - ), |
|
| 63 | - 1 => |
|
| 64 | - array ( |
|
| 62 | + ), |
|
| 63 | + 1 => |
|
| 64 | + array ( |
|
| 65 | 65 | 'label' => '10', |
| 66 | 66 | 'field' => '30', |
| 67 | - ), |
|
| 67 | + ), |
|
| 68 | 68 | ), |
| 69 | - ), |
|
| 70 | - 'panels' => |
|
| 71 | - array ( |
|
| 69 | + ), |
|
| 70 | + 'panels' => |
|
| 71 | + array ( |
|
| 72 | 72 | 'LBL_PROSPECT_INFORMATION' => |
| 73 | 73 | array ( |
| 74 | - 0 => |
|
| 75 | - array ( |
|
| 76 | 74 | 0 => |
| 77 | 75 | array ( |
| 78 | - 'name' => 'first_name', |
|
| 76 | + 0 => |
|
| 77 | + array ( |
|
| 78 | + 'name' => 'first_name', |
|
| 79 | 79 | ), |
| 80 | 80 | 1 => |
| 81 | 81 | array ( |
| 82 | - 'name' => 'phone_work', |
|
| 82 | + 'name' => 'phone_work', |
|
| 83 | 83 | ), |
| 84 | - ), |
|
| 85 | - 1 => |
|
| 86 | - array ( |
|
| 84 | + ), |
|
| 85 | + 1 => |
|
| 86 | + array ( |
|
| 87 | 87 | 0 => |
| 88 | 88 | array ( |
| 89 | - 'name' => 'last_name', |
|
| 90 | - 'displayParams'=>array('required'=>true) |
|
| 89 | + 'name' => 'last_name', |
|
| 90 | + 'displayParams'=>array('required'=>true) |
|
| 91 | 91 | ), |
| 92 | 92 | 1 => |
| 93 | 93 | array ( |
| 94 | - 'name' => 'phone_mobile', |
|
| 94 | + 'name' => 'phone_mobile', |
|
| 95 | + ), |
|
| 95 | 96 | ), |
| 96 | - ), |
|
| 97 | - 2 => |
|
| 98 | - array ( |
|
| 97 | + 2 => |
|
| 98 | + array ( |
|
| 99 | 99 | 0 => |
| 100 | 100 | array ( |
| 101 | - 'name' => 'account_name', |
|
| 101 | + 'name' => 'account_name', |
|
| 102 | 102 | ), |
| 103 | 103 | 1 => |
| 104 | 104 | array ( |
| 105 | - 'name' => 'phone_fax', |
|
| 105 | + 'name' => 'phone_fax', |
|
| 106 | + ), |
|
| 106 | 107 | ), |
| 107 | - ), |
|
| 108 | - 3 => |
|
| 109 | - array ( |
|
| 108 | + 3 => |
|
| 109 | + array ( |
|
| 110 | 110 | 0 => |
| 111 | 111 | array ( |
| 112 | - 'name' => 'title', |
|
| 112 | + 'name' => 'title', |
|
| 113 | 113 | ), |
| 114 | 114 | 1 => |
| 115 | 115 | array ( |
| 116 | - 'name' => 'department', |
|
| 116 | + 'name' => 'department', |
|
| 117 | + ), |
|
| 117 | 118 | ), |
| 118 | - ), |
|
| 119 | - 4 => |
|
| 120 | - array ( |
|
| 119 | + 4 => |
|
| 120 | + array ( |
|
| 121 | 121 | 0 => |
| 122 | 122 | array ( |
| 123 | - 'name' => 'team_name', |
|
| 123 | + 'name' => 'team_name', |
|
| 124 | 124 | ), |
| 125 | 125 | 1 => |
| 126 | 126 | array ( |
| 127 | - 'name' => 'do_not_call', |
|
| 127 | + 'name' => 'do_not_call', |
|
| 128 | + ), |
|
| 128 | 129 | ), |
| 129 | - ), |
|
| 130 | - 5 => |
|
| 131 | - array ( |
|
| 130 | + 5 => |
|
| 131 | + array ( |
|
| 132 | 132 | 0 => |
| 133 | 133 | array ( |
| 134 | - 'name' => 'assigned_user_name', |
|
| 134 | + 'name' => 'assigned_user_name', |
|
| 135 | + ), |
|
| 135 | 136 | ), |
| 136 | - ), |
|
| 137 | 137 | ), |
| 138 | 138 | 'lbl_email_addresses' => |
| 139 | 139 | array ( |
| 140 | - 0 => |
|
| 141 | - array ( |
|
| 142 | 140 | 0 => |
| 143 | 141 | array ( |
| 144 | - 'name' => 'email1', |
|
| 142 | + 0 => |
|
| 143 | + array ( |
|
| 144 | + 'name' => 'email1', |
|
| 145 | + ), |
|
| 145 | 146 | ), |
| 146 | - ), |
|
| 147 | 147 | ), |
| 148 | 148 | 'LBL_ADDRESS_INFORMATION' => |
| 149 | 149 | array ( |
| 150 | - 0 => |
|
| 151 | - array ( |
|
| 152 | 150 | 0 => |
| 153 | 151 | array ( |
| 154 | - 'name' => 'primary_address_street', |
|
| 152 | + 0 => |
|
| 153 | + array ( |
|
| 154 | + 'name' => 'primary_address_street', |
|
| 155 | 155 | ), |
| 156 | 156 | 1 => |
| 157 | 157 | array ( |
| 158 | - 'name' => 'alt_address_street', |
|
| 158 | + 'name' => 'alt_address_street', |
|
| 159 | + ), |
|
| 159 | 160 | ), |
| 160 | - ), |
|
| 161 | 161 | ), |
| 162 | - ), |
|
| 162 | + ), |
|
| 163 | + ), |
|
| 163 | 164 | ), |
| 164 | - ), |
|
| 165 | 165 | ); |
| 166 | 166 | ?> |
@@ -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. |
@@ -45,116 +45,116 @@ discard block |
||
| 45 | 45 | * Contributor(s): ______________________________________.. |
| 46 | 46 | ********************************************************************************/ |
| 47 | 47 | |
| 48 | -$viewdefs = array ( |
|
| 48 | +$viewdefs = array( |
|
| 49 | 49 | 'Prospects' => |
| 50 | - array ( |
|
| 50 | + array( |
|
| 51 | 51 | 'QuickCreate' => |
| 52 | - array ( |
|
| 52 | + array( |
|
| 53 | 53 | 'templateMeta' => |
| 54 | - array ( |
|
| 54 | + array( |
|
| 55 | 55 | 'maxColumns' => '2', |
| 56 | 56 | 'widths' => |
| 57 | - array ( |
|
| 57 | + array( |
|
| 58 | 58 | 0 => |
| 59 | - array ( |
|
| 59 | + array( |
|
| 60 | 60 | 'label' => '10', |
| 61 | 61 | 'field' => '30', |
| 62 | 62 | ), |
| 63 | 63 | 1 => |
| 64 | - array ( |
|
| 64 | + array( |
|
| 65 | 65 | 'label' => '10', |
| 66 | 66 | 'field' => '30', |
| 67 | 67 | ), |
| 68 | 68 | ), |
| 69 | 69 | ), |
| 70 | 70 | 'panels' => |
| 71 | - array ( |
|
| 71 | + array( |
|
| 72 | 72 | 'LBL_PROSPECT_INFORMATION' => |
| 73 | - array ( |
|
| 73 | + array( |
|
| 74 | 74 | 0 => |
| 75 | - array ( |
|
| 75 | + array( |
|
| 76 | 76 | 0 => |
| 77 | - array ( |
|
| 77 | + array( |
|
| 78 | 78 | 'name' => 'first_name', |
| 79 | 79 | ), |
| 80 | 80 | 1 => |
| 81 | - array ( |
|
| 81 | + array( |
|
| 82 | 82 | 'name' => 'phone_work', |
| 83 | 83 | ), |
| 84 | 84 | ), |
| 85 | 85 | 1 => |
| 86 | - array ( |
|
| 86 | + array( |
|
| 87 | 87 | 0 => |
| 88 | - array ( |
|
| 88 | + array( |
|
| 89 | 89 | 'name' => 'last_name', |
| 90 | 90 | 'displayParams'=>array('required'=>true) |
| 91 | 91 | ), |
| 92 | 92 | 1 => |
| 93 | - array ( |
|
| 93 | + array( |
|
| 94 | 94 | 'name' => 'phone_mobile', |
| 95 | 95 | ), |
| 96 | 96 | ), |
| 97 | 97 | 2 => |
| 98 | - array ( |
|
| 98 | + array( |
|
| 99 | 99 | 0 => |
| 100 | - array ( |
|
| 100 | + array( |
|
| 101 | 101 | 'name' => 'account_name', |
| 102 | 102 | ), |
| 103 | 103 | 1 => |
| 104 | - array ( |
|
| 104 | + array( |
|
| 105 | 105 | 'name' => 'phone_fax', |
| 106 | 106 | ), |
| 107 | 107 | ), |
| 108 | 108 | 3 => |
| 109 | - array ( |
|
| 109 | + array( |
|
| 110 | 110 | 0 => |
| 111 | - array ( |
|
| 111 | + array( |
|
| 112 | 112 | 'name' => 'title', |
| 113 | 113 | ), |
| 114 | 114 | 1 => |
| 115 | - array ( |
|
| 115 | + array( |
|
| 116 | 116 | 'name' => 'department', |
| 117 | 117 | ), |
| 118 | 118 | ), |
| 119 | 119 | 4 => |
| 120 | - array ( |
|
| 120 | + array( |
|
| 121 | 121 | 0 => |
| 122 | - array ( |
|
| 122 | + array( |
|
| 123 | 123 | 'name' => 'team_name', |
| 124 | 124 | ), |
| 125 | 125 | 1 => |
| 126 | - array ( |
|
| 126 | + array( |
|
| 127 | 127 | 'name' => 'do_not_call', |
| 128 | 128 | ), |
| 129 | 129 | ), |
| 130 | 130 | 5 => |
| 131 | - array ( |
|
| 131 | + array( |
|
| 132 | 132 | 0 => |
| 133 | - array ( |
|
| 133 | + array( |
|
| 134 | 134 | 'name' => 'assigned_user_name', |
| 135 | 135 | ), |
| 136 | 136 | ), |
| 137 | 137 | ), |
| 138 | 138 | 'lbl_email_addresses' => |
| 139 | - array ( |
|
| 139 | + array( |
|
| 140 | 140 | 0 => |
| 141 | - array ( |
|
| 141 | + array( |
|
| 142 | 142 | 0 => |
| 143 | - array ( |
|
| 143 | + array( |
|
| 144 | 144 | 'name' => 'email1', |
| 145 | 145 | ), |
| 146 | 146 | ), |
| 147 | 147 | ), |
| 148 | 148 | 'LBL_ADDRESS_INFORMATION' => |
| 149 | - array ( |
|
| 149 | + array( |
|
| 150 | 150 | 0 => |
| 151 | - array ( |
|
| 151 | + array( |
|
| 152 | 152 | 0 => |
| 153 | - array ( |
|
| 153 | + array( |
|
| 154 | 154 | 'name' => 'primary_address_street', |
| 155 | 155 | ), |
| 156 | 156 | 1 => |
| 157 | - array ( |
|
| 157 | + array( |
|
| 158 | 158 | 'name' => 'alt_address_street', |
| 159 | 159 | ), |
| 160 | 160 | ), |
@@ -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. |
@@ -42,10 +42,10 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | |
| 44 | 44 | $listViewDefs['Prospects'] = array( |
| 45 | - 'FULL_NAME' => array( |
|
| 46 | - 'width' => '20', |
|
| 47 | - 'label' => 'LBL_LIST_NAME', |
|
| 48 | - 'link' => true, |
|
| 45 | + 'FULL_NAME' => array( |
|
| 46 | + 'width' => '20', |
|
| 47 | + 'label' => 'LBL_LIST_NAME', |
|
| 48 | + 'link' => true, |
|
| 49 | 49 | 'related_fields' => array('first_name', 'last_name'), |
| 50 | 50 | 'orderBy' => 'last_name', |
| 51 | 51 | 'default' => true), |
@@ -65,11 +65,11 @@ discard block |
||
| 65 | 65 | 'label' => 'LBL_LIST_PHONE', |
| 66 | 66 | 'link' => false, |
| 67 | 67 | 'default' => true), |
| 68 | - 'DATE_ENTERED' => array ( |
|
| 69 | - 'type' => 'datetime', |
|
| 70 | - 'label' => 'LBL_DATE_ENTERED', |
|
| 71 | - 'width' => '10', |
|
| 72 | - 'default' => true, |
|
| 73 | - ), |
|
| 68 | + 'DATE_ENTERED' => array ( |
|
| 69 | + 'type' => 'datetime', |
|
| 70 | + 'label' => 'LBL_DATE_ENTERED', |
|
| 71 | + 'width' => '10', |
|
| 72 | + 'default' => true, |
|
| 73 | + ), |
|
| 74 | 74 | ); |
| 75 | 75 | ?> |
@@ -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. |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | 'label' => 'LBL_LIST_STATUS', |
| 102 | 102 | 'link' => false, |
| 103 | 103 | 'default' => false), |
| 104 | - 'DATE_ENTERED' => array ( |
|
| 104 | + 'DATE_ENTERED' => array( |
|
| 105 | 105 | 'width' => '10', |
| 106 | 106 | 'label' => 'LBL_DATE_ENTERED', |
| 107 | 107 | 'default' => true), |
@@ -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. |
@@ -45,12 +45,12 @@ |
||
| 45 | 45 | require_once('include/formbase.php'); |
| 46 | 46 | if (!empty($_REQUEST['record'])) { |
| 47 | 47 | |
| 48 | - $document = new Document(); |
|
| 49 | - $document->retrieve($_REQUEST['record']); |
|
| 50 | - if (!empty($document->document_revision_id) && !empty($_REQUEST['get_latest_for_id'])) { |
|
| 51 | - $query="update linked_documents set document_revision_id='{$document->document_revision_id}', date_modified='".TimeDate::getInstance()->nowDb()."' where id ='{$_REQUEST['get_latest_for_id']}' "; |
|
| 52 | - $document->db->query($query); |
|
| 53 | - } |
|
| 48 | + $document = new Document(); |
|
| 49 | + $document->retrieve($_REQUEST['record']); |
|
| 50 | + if (!empty($document->document_revision_id) && !empty($_REQUEST['get_latest_for_id'])) { |
|
| 51 | + $query="update linked_documents set document_revision_id='{$document->document_revision_id}', date_modified='".TimeDate::getInstance()->nowDb()."' where id ='{$_REQUEST['get_latest_for_id']}' "; |
|
| 52 | + $document->db->query($query); |
|
| 53 | + } |
|
| 54 | 54 | } |
| 55 | 55 | handleRedirect(); |
| 56 | 56 | ?> |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 3 | 3 | /********************************************************************************* |
| 4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $document = new Document(); |
| 49 | 49 | $document->retrieve($_REQUEST['record']); |
| 50 | - if (!empty($document->document_revision_id) && !empty($_REQUEST['get_latest_for_id'])) { |
|
| 51 | - $query="update linked_documents set document_revision_id='{$document->document_revision_id}', date_modified='".TimeDate::getInstance()->nowDb()."' where id ='{$_REQUEST['get_latest_for_id']}' "; |
|
| 50 | + if (!empty($document->document_revision_id) && !empty($_REQUEST['get_latest_for_id'])) { |
|
| 51 | + $query = "update linked_documents set document_revision_id='{$document->document_revision_id}', date_modified='".TimeDate::getInstance()->nowDb()."' where id ='{$_REQUEST['get_latest_for_id']}' "; |
|
| 52 | 52 | $document->db->query($query); |
| 53 | 53 | } |
| 54 | 54 | } |
@@ -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,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | if(!defined('sugarEntry') || !sugarEntry) |
| 3 | - die('Not A Valid Entry Point'); |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | 4 | /********************************************************************************* |
| 5 | 5 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 6 | 6 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) |
|
| 2 | +if (!defined('sugarEntry') || !sugarEntry) |
|
| 3 | 3 | die('Not A Valid Entry Point'); |
| 4 | 4 | /********************************************************************************* |
| 5 | 5 | * SugarCRM Community Edition is a customer relationship management program developed by |
@@ -44,8 +44,8 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | $apiList = ExternalAPIFactory::getModuleDropDown('Documents'); |
| 46 | 46 | |
| 47 | - $apiList = array_merge(array('Sugar'=>$GLOBALS['app_list_strings']['eapm_list']['Sugar']),$apiList); |
|
| 48 | - if(!empty($value) && empty($apiList[$value])){ |
|
| 47 | + $apiList = array_merge(array('Sugar'=>$GLOBALS['app_list_strings']['eapm_list']['Sugar']), $apiList); |
|
| 48 | + if (!empty($value) && empty($apiList[$value])) { |
|
| 49 | 49 | $apiList[$value] = $value; |
| 50 | 50 | } |
| 51 | 51 | return $apiList; |
@@ -1,6 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | 3 | die('Not A Valid Entry Point'); |
| 4 | +} |
|
| 4 | 5 | /********************************************************************************* |
| 5 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 6 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) |
|
| 2 | +if (!defined('sugarEntry') || !sugarEntry) |
|
| 3 | 3 | die('Not A Valid Entry Point'); |
| 4 | 4 | /********************************************************************************* |
| 5 | 5 | * SugarCRM Community Edition is a customer relationship management program developed by |
@@ -84,10 +84,10 @@ discard block |
||
| 84 | 84 | var $object_name = "Document"; |
| 85 | 85 | var $user_preferences; |
| 86 | 86 | |
| 87 | - var $encodeFields = Array (); |
|
| 87 | + var $encodeFields = Array(); |
|
| 88 | 88 | |
| 89 | 89 | // This is used to retrieve related fields from form posts. |
| 90 | - var $additional_column_fields = Array ('revision'); |
|
| 90 | + var $additional_column_fields = Array('revision'); |
|
| 91 | 91 | |
| 92 | 92 | var $new_schema = true; |
| 93 | 93 | var $module_dir = 'Documents'; |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $this->new_with_id = true; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - if ( isset($_REQUEST) && isset($_REQUEST['duplicateSave']) && $_REQUEST['duplicateSave'] == true && isset($_REQUEST['filename_old_doctype']) ) { |
|
| 118 | + if (isset($_REQUEST) && isset($_REQUEST['duplicateSave']) && $_REQUEST['duplicateSave'] == true && isset($_REQUEST['filename_old_doctype'])) { |
|
| 119 | 119 | $this->doc_type = $_REQUEST['filename_old_doctype']; |
| 120 | 120 | $isDuplicate = true; |
| 121 | 121 | } else { |
@@ -128,26 +128,26 @@ discard block |
||
| 128 | 128 | $Revision->not_use_rel_in_req = true; |
| 129 | 129 | $Revision->new_rel_id = $this->id; |
| 130 | 130 | $Revision->new_rel_relname = 'Documents'; |
| 131 | - $Revision->change_log = translate('DEF_CREATE_LOG','Documents'); |
|
| 131 | + $Revision->change_log = translate('DEF_CREATE_LOG', 'Documents'); |
|
| 132 | 132 | $Revision->revision = $this->revision; |
| 133 | 133 | $Revision->document_id = $this->id; |
| 134 | 134 | $Revision->filename = $this->filename; |
| 135 | 135 | |
| 136 | - if(isset($this->file_ext)) |
|
| 136 | + if (isset($this->file_ext)) |
|
| 137 | 137 | { |
| 138 | 138 | $Revision->file_ext = $this->file_ext; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | - if(isset($this->file_mime_type)) |
|
| 141 | + if (isset($this->file_mime_type)) |
|
| 142 | 142 | { |
| 143 | 143 | $Revision->file_mime_type = $this->file_mime_type; |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | $Revision->doc_type = $this->doc_type; |
| 147 | - if ( isset($this->doc_id) ) { |
|
| 147 | + if (isset($this->doc_id)) { |
|
| 148 | 148 | $Revision->doc_id = $this->doc_id; |
| 149 | 149 | } |
| 150 | - if ( isset($this->doc_url) ) { |
|
| 150 | + if (isset($this->doc_url)) { |
|
| 151 | 151 | $Revision->doc_url = $this->doc_url; |
| 152 | 152 | } |
| 153 | 153 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | if (!empty($_FILES['filename_file'])) { |
| 160 | 160 | rename("upload://{$this->id}", "upload://{$Revision->id}"); |
| 161 | 161 | $createRevision = true; |
| 162 | - } else if ( $isDuplicate && ( empty($this->doc_type) || $this->doc_type == 'Sugar' ) ) { |
|
| 162 | + } else if ($isDuplicate && (empty($this->doc_type) || $this->doc_type == 'Sugar')) { |
|
| 163 | 163 | // Looks like we need to duplicate a file, this is tricky |
| 164 | 164 | $oldDocument = new Document(); |
| 165 | 165 | $oldDocument->retrieve($_REQUEST['duplicateId']); |
@@ -171,27 +171,27 @@ discard block |
||
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | // For external documents, we just need to make sure we have a doc_id |
| 174 | - if ( !empty($this->doc_id) && $this->doc_type != 'Sugar' ) { |
|
| 174 | + if (!empty($this->doc_id) && $this->doc_type != 'Sugar') { |
|
| 175 | 175 | $createRevision = true; |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | - if ( $createRevision ) { |
|
| 178 | + if ($createRevision) { |
|
| 179 | 179 | $Revision->save(); |
| 180 | 180 | //update document with latest revision id |
| 181 | - $this->process_save_dates=false; //make sure that conversion does not happen again. |
|
| 181 | + $this->process_save_dates = false; //make sure that conversion does not happen again. |
|
| 182 | 182 | $this->document_revision_id = $Revision->id; |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | |
| 186 | 186 | //set relationship field values if contract_id is passed (via subpanel create) |
| 187 | 187 | if (!empty($_POST['contract_id'])) { |
| 188 | - $save_revision['document_revision_id']=$this->document_revision_id; |
|
| 188 | + $save_revision['document_revision_id'] = $this->document_revision_id; |
|
| 189 | 189 | $this->load_relationship('contracts'); |
| 190 | - $this->contracts->add($_POST['contract_id'],$save_revision); |
|
| 190 | + $this->contracts->add($_POST['contract_id'], $save_revision); |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | if ((isset($_POST['load_signed_id']) and !empty($_POST['load_signed_id']))) { |
| 194 | - $query="update linked_documents set deleted=1 where id='".$_POST['load_signed_id']."'"; |
|
| 194 | + $query = "update linked_documents set deleted=1 where id='".$_POST['load_signed_id']."'"; |
|
| 195 | 195 | $this->db->query($query); |
| 196 | 196 | } |
| 197 | 197 | } |
@@ -232,14 +232,14 @@ discard block |
||
| 232 | 232 | $row = $this->db->fetchByAssoc($result); |
| 233 | 233 | |
| 234 | 234 | //populate name |
| 235 | - if(isset($this->document_name)) |
|
| 235 | + if (isset($this->document_name)) |
|
| 236 | 236 | { |
| 237 | 237 | $this->name = $this->document_name; |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | - if(isset($row['filename']))$this->filename = $row['filename']; |
|
| 240 | + if (isset($row['filename']))$this->filename = $row['filename']; |
|
| 241 | 241 | //$this->latest_revision = $row['revision']; |
| 242 | - if(isset($row['revision']))$this->revision = $row['revision']; |
|
| 242 | + if (isset($row['revision']))$this->revision = $row['revision']; |
|
| 243 | 243 | |
| 244 | 244 | //image is selected based on the extension name <ext>_icon_inline, extension is stored in document_revisions. |
| 245 | 245 | //if file is not found then default image file will be used. |
@@ -257,16 +257,16 @@ discard block |
||
| 257 | 257 | } else { |
| 258 | 258 | $img_name = "def_image_inline"; //todo change the default image. |
| 259 | 259 | } |
| 260 | - if($this->ACLAccess('DetailView')) { |
|
| 261 | - if(!empty($this->doc_type) && $this->doc_type != 'Sugar' && !empty($this->doc_url)) { |
|
| 262 | - $file_url= "<a href='".$this->doc_url."' target='_blank'>".SugarThemeRegistry::current()->getImage($this->doc_type.'_image_inline', 'border="0"',null,null,'.png',$mod_strings['LBL_LIST_VIEW_DOCUMENT'])."</a>"; |
|
| 260 | + if ($this->ACLAccess('DetailView')) { |
|
| 261 | + if (!empty($this->doc_type) && $this->doc_type != 'Sugar' && !empty($this->doc_url)) { |
|
| 262 | + $file_url = "<a href='".$this->doc_url."' target='_blank'>".SugarThemeRegistry::current()->getImage($this->doc_type.'_image_inline', 'border="0"', null, null, '.png', $mod_strings['LBL_LIST_VIEW_DOCUMENT'])."</a>"; |
|
| 263 | 263 | } else { |
| 264 | - $file_url = "<a href='index.php?entryPoint=download&id={$this->document_revision_id}&type=Documents' target='_blank'>".SugarThemeRegistry::current()->getImage($img_name, 'border="0"', null,null,'.gif',$mod_strings['LBL_LIST_VIEW_DOCUMENT'])."</a>"; |
|
| 264 | + $file_url = "<a href='index.php?entryPoint=download&id={$this->document_revision_id}&type=Documents' target='_blank'>".SugarThemeRegistry::current()->getImage($img_name, 'border="0"', null, null, '.gif', $mod_strings['LBL_LIST_VIEW_DOCUMENT'])."</a>"; |
|
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | $this->file_url = $file_url; |
| 268 | 268 | $this->file_url_noimage = "index.php?entryPoint=download&type=Documents&id={$this->document_revision_id}"; |
| 269 | - }else{ |
|
| 269 | + } else { |
|
| 270 | 270 | $this->file_url = ""; |
| 271 | 271 | $this->file_url_noimage = ""; |
| 272 | 272 | } |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | global $app_list_strings; |
| 283 | - if(!empty($this->status_id)) { |
|
| 283 | + if (!empty($this->status_id)) { |
|
| 284 | 284 | //_pp($this->status_id); |
| 285 | 285 | $this->status = $app_list_strings['document_status_dom'][$this->status_id]; |
| 286 | 286 | } |
@@ -294,15 +294,15 @@ discard block |
||
| 294 | 294 | return $list_form; |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | - function create_export_query($order_by, $where, $relate_link_join='') |
|
| 297 | + function create_export_query($order_by, $where, $relate_link_join = '') |
|
| 298 | 298 | { |
| 299 | 299 | $custom_join = $this->getCustomJoin(true, true, $where); |
| 300 | 300 | $custom_join['join'] .= $relate_link_join; |
| 301 | 301 | $query = "SELECT |
| 302 | 302 | documents.*"; |
| 303 | - $query .= $custom_join['select']; |
|
| 303 | + $query .= $custom_join['select']; |
|
| 304 | 304 | $query .= " FROM documents "; |
| 305 | - $query .= $custom_join['join']; |
|
| 305 | + $query .= $custom_join['join']; |
|
| 306 | 306 | |
| 307 | 307 | $where_auto = " documents.deleted = 0"; |
| 308 | 308 | |
@@ -351,11 +351,11 @@ discard block |
||
| 351 | 351 | function mark_relationships_deleted($id) |
| 352 | 352 | { |
| 353 | 353 | $this->load_relationships('revisions'); |
| 354 | - $revisions= $this->get_linked_beans('revisions','DocumentRevision'); |
|
| 354 | + $revisions = $this->get_linked_beans('revisions', 'DocumentRevision'); |
|
| 355 | 355 | |
| 356 | 356 | if (!empty($revisions) && is_array($revisions)) { |
| 357 | - foreach($revisions as $key=>$version) { |
|
| 358 | - UploadFile::unlink_file($version->id,$version->filename); |
|
| 357 | + foreach ($revisions as $key=>$version) { |
|
| 358 | + UploadFile::unlink_file($version->id, $version->filename); |
|
| 359 | 359 | //mark the version deleted. |
| 360 | 360 | $version->mark_deleted($version->id); |
| 361 | 361 | } |
@@ -373,14 +373,14 @@ discard block |
||
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | //static function. |
| 376 | - function get_document_name($doc_id){ |
|
| 376 | + function get_document_name($doc_id) { |
|
| 377 | 377 | if (empty($doc_id)) return null; |
| 378 | 378 | |
| 379 | 379 | $db = DBManagerFactory::getInstance(); |
| 380 | - $query="select document_name from documents where id='$doc_id' and deleted=0"; |
|
| 381 | - $result=$db->query($query); |
|
| 380 | + $query = "select document_name from documents where id='$doc_id' and deleted=0"; |
|
| 381 | + $result = $db->query($query); |
|
| 382 | 382 | if (!empty($result)) { |
| 383 | - $row=$db->fetchByAssoc($result); |
|
| 383 | + $row = $db->fetchByAssoc($result); |
|
| 384 | 384 | if (!empty($row)) { |
| 385 | 385 | return $row['document_name']; |
| 386 | 386 | } |
@@ -1,6 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | 3 | die('Not A Valid Entry Point'); |
| 4 | +} |
|
| 4 | 5 | /********************************************************************************* |
| 5 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 6 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -237,9 +238,13 @@ discard block |
||
| 237 | 238 | $this->name = $this->document_name; |
| 238 | 239 | } |
| 239 | 240 | |
| 240 | - if(isset($row['filename']))$this->filename = $row['filename']; |
|
| 241 | + if(isset($row['filename'])) { |
|
| 242 | + $this->filename = $row['filename']; |
|
| 243 | + } |
|
| 241 | 244 | //$this->latest_revision = $row['revision']; |
| 242 | - if(isset($row['revision']))$this->revision = $row['revision']; |
|
| 245 | + if(isset($row['revision'])) { |
|
| 246 | + $this->revision = $row['revision']; |
|
| 247 | + } |
|
| 243 | 248 | |
| 244 | 249 | //image is selected based on the extension name <ext>_icon_inline, extension is stored in document_revisions. |
| 245 | 250 | //if file is not found then default image file will be used. |
@@ -266,7 +271,7 @@ discard block |
||
| 266 | 271 | |
| 267 | 272 | $this->file_url = $file_url; |
| 268 | 273 | $this->file_url_noimage = "index.php?entryPoint=download&type=Documents&id={$this->document_revision_id}"; |
| 269 | - }else{ |
|
| 274 | + } else{ |
|
| 270 | 275 | $this->file_url = ""; |
| 271 | 276 | $this->file_url_noimage = ""; |
| 272 | 277 | } |
@@ -306,15 +311,17 @@ discard block |
||
| 306 | 311 | |
| 307 | 312 | $where_auto = " documents.deleted = 0"; |
| 308 | 313 | |
| 309 | - if ($where != "") |
|
| 310 | - $query .= " WHERE $where AND ".$where_auto; |
|
| 311 | - else |
|
| 312 | - $query .= " WHERE ".$where_auto; |
|
| 314 | + if ($where != "") { |
|
| 315 | + $query .= " WHERE $where AND ".$where_auto; |
|
| 316 | + } else { |
|
| 317 | + $query .= " WHERE ".$where_auto; |
|
| 318 | + } |
|
| 313 | 319 | |
| 314 | - if ($order_by != "") |
|
| 315 | - $query .= " ORDER BY $order_by"; |
|
| 316 | - else |
|
| 317 | - $query .= " ORDER BY documents.document_name"; |
|
| 320 | + if ($order_by != "") { |
|
| 321 | + $query .= " ORDER BY $order_by"; |
|
| 322 | + } else { |
|
| 323 | + $query .= " ORDER BY documents.document_name"; |
|
| 324 | + } |
|
| 318 | 325 | |
| 319 | 326 | return $query; |
| 320 | 327 | } |
@@ -374,7 +381,9 @@ discard block |
||
| 374 | 381 | |
| 375 | 382 | //static function. |
| 376 | 383 | function get_document_name($doc_id){ |
| 377 | - if (empty($doc_id)) return null; |
|
| 384 | + if (empty($doc_id)) { |
|
| 385 | + return null; |
|
| 386 | + } |
|
| 378 | 387 | |
| 379 | 388 | $db = DBManagerFactory::getInstance(); |
| 380 | 389 | $query="select document_name from documents where id='$doc_id' and deleted=0"; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if(!defined('sugarEntry') || !sugarEntry) |
| 3 | - die('Not A Valid Entry Point'); |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | 4 | /********************************************************************************* |
| 5 | 5 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 6 | 6 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -45,71 +45,71 @@ discard block |
||
| 45 | 45 | // User is used to store Forecast information. |
| 46 | 46 | class Document extends File { |
| 47 | 47 | |
| 48 | - var $id; |
|
| 49 | - var $document_name; |
|
| 50 | - var $description; |
|
| 51 | - var $category_id; |
|
| 52 | - var $subcategory_id; |
|
| 53 | - var $status_id; |
|
| 54 | - var $status; |
|
| 55 | - var $created_by; |
|
| 56 | - var $date_entered; |
|
| 57 | - var $date_modified; |
|
| 58 | - var $modified_user_id; |
|
| 48 | + var $id; |
|
| 49 | + var $document_name; |
|
| 50 | + var $description; |
|
| 51 | + var $category_id; |
|
| 52 | + var $subcategory_id; |
|
| 53 | + var $status_id; |
|
| 54 | + var $status; |
|
| 55 | + var $created_by; |
|
| 56 | + var $date_entered; |
|
| 57 | + var $date_modified; |
|
| 58 | + var $modified_user_id; |
|
| 59 | 59 | var $assigned_user_id; |
| 60 | - var $active_date; |
|
| 61 | - var $exp_date; |
|
| 62 | - var $document_revision_id; |
|
| 63 | - var $filename; |
|
| 64 | - var $doc_type; |
|
| 65 | - |
|
| 66 | - var $img_name; |
|
| 67 | - var $img_name_bare; |
|
| 68 | - var $related_doc_id; |
|
| 69 | - var $related_doc_name; |
|
| 70 | - var $related_doc_rev_id; |
|
| 71 | - var $related_doc_rev_number; |
|
| 72 | - var $is_template; |
|
| 73 | - var $template_type; |
|
| 74 | - |
|
| 75 | - //additional fields. |
|
| 76 | - var $revision; |
|
| 77 | - var $last_rev_create_date; |
|
| 78 | - var $last_rev_created_by; |
|
| 79 | - var $last_rev_created_name; |
|
| 80 | - var $file_url; |
|
| 81 | - var $file_url_noimage; |
|
| 82 | - |
|
| 83 | - var $table_name = "documents"; |
|
| 84 | - var $object_name = "Document"; |
|
| 85 | - var $user_preferences; |
|
| 86 | - |
|
| 87 | - var $encodeFields = Array (); |
|
| 88 | - |
|
| 89 | - // This is used to retrieve related fields from form posts. |
|
| 90 | - var $additional_column_fields = Array ('revision'); |
|
| 91 | - |
|
| 92 | - var $new_schema = true; |
|
| 93 | - var $module_dir = 'Documents'; |
|
| 94 | - |
|
| 95 | - var $relationship_fields = Array( |
|
| 96 | - 'contract_id'=>'contracts', |
|
| 97 | - ); |
|
| 98 | - |
|
| 99 | - |
|
| 100 | - function __construct() { |
|
| 101 | - parent::__construct(); |
|
| 102 | - $this->setupCustomFields('Documents'); //parameter is module name |
|
| 103 | - $this->disable_row_level_security = false; |
|
| 104 | - } |
|
| 105 | - |
|
| 106 | - function save($check_notify = false) { |
|
| 60 | + var $active_date; |
|
| 61 | + var $exp_date; |
|
| 62 | + var $document_revision_id; |
|
| 63 | + var $filename; |
|
| 64 | + var $doc_type; |
|
| 65 | + |
|
| 66 | + var $img_name; |
|
| 67 | + var $img_name_bare; |
|
| 68 | + var $related_doc_id; |
|
| 69 | + var $related_doc_name; |
|
| 70 | + var $related_doc_rev_id; |
|
| 71 | + var $related_doc_rev_number; |
|
| 72 | + var $is_template; |
|
| 73 | + var $template_type; |
|
| 74 | + |
|
| 75 | + //additional fields. |
|
| 76 | + var $revision; |
|
| 77 | + var $last_rev_create_date; |
|
| 78 | + var $last_rev_created_by; |
|
| 79 | + var $last_rev_created_name; |
|
| 80 | + var $file_url; |
|
| 81 | + var $file_url_noimage; |
|
| 82 | + |
|
| 83 | + var $table_name = "documents"; |
|
| 84 | + var $object_name = "Document"; |
|
| 85 | + var $user_preferences; |
|
| 86 | + |
|
| 87 | + var $encodeFields = Array (); |
|
| 88 | + |
|
| 89 | + // This is used to retrieve related fields from form posts. |
|
| 90 | + var $additional_column_fields = Array ('revision'); |
|
| 91 | + |
|
| 92 | + var $new_schema = true; |
|
| 93 | + var $module_dir = 'Documents'; |
|
| 94 | + |
|
| 95 | + var $relationship_fields = Array( |
|
| 96 | + 'contract_id'=>'contracts', |
|
| 97 | + ); |
|
| 98 | + |
|
| 99 | + |
|
| 100 | + function __construct() { |
|
| 101 | + parent::__construct(); |
|
| 102 | + $this->setupCustomFields('Documents'); //parameter is module name |
|
| 103 | + $this->disable_row_level_security = false; |
|
| 104 | + } |
|
| 105 | + |
|
| 106 | + function save($check_notify = false) { |
|
| 107 | 107 | |
| 108 | 108 | if (empty($this->doc_type)) { |
| 109 | - $this->doc_type = 'Sugar'; |
|
| 110 | - } |
|
| 109 | + $this->doc_type = 'Sugar'; |
|
| 110 | + } |
|
| 111 | 111 | if (empty($this->id) || $this->new_with_id) |
| 112 | - { |
|
| 112 | + { |
|
| 113 | 113 | if (empty($this->id)) { |
| 114 | 114 | $this->id = create_guid(); |
| 115 | 115 | $this->new_with_id = true; |
@@ -135,12 +135,12 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | if(isset($this->file_ext)) |
| 137 | 137 | { |
| 138 | - $Revision->file_ext = $this->file_ext; |
|
| 138 | + $Revision->file_ext = $this->file_ext; |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | if(isset($this->file_mime_type)) |
| 142 | 142 | { |
| 143 | - $Revision->file_mime_type = $this->file_mime_type; |
|
| 143 | + $Revision->file_mime_type = $this->file_mime_type; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | $Revision->doc_type = $this->doc_type; |
@@ -196,29 +196,29 @@ discard block |
||
| 196 | 196 | } |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | - return parent :: save($check_notify); |
|
| 200 | - } |
|
| 201 | - function get_summary_text() { |
|
| 202 | - return "$this->document_name"; |
|
| 203 | - } |
|
| 199 | + return parent :: save($check_notify); |
|
| 200 | + } |
|
| 201 | + function get_summary_text() { |
|
| 202 | + return "$this->document_name"; |
|
| 203 | + } |
|
| 204 | 204 | |
| 205 | - function is_authenticated() { |
|
| 206 | - return $this->authenticated; |
|
| 207 | - } |
|
| 205 | + function is_authenticated() { |
|
| 206 | + return $this->authenticated; |
|
| 207 | + } |
|
| 208 | 208 | |
| 209 | - function fill_in_additional_list_fields() { |
|
| 210 | - $this->fill_in_additional_detail_fields(); |
|
| 211 | - } |
|
| 209 | + function fill_in_additional_list_fields() { |
|
| 210 | + $this->fill_in_additional_detail_fields(); |
|
| 211 | + } |
|
| 212 | 212 | |
| 213 | - function fill_in_additional_detail_fields() { |
|
| 214 | - global $theme; |
|
| 215 | - global $current_language; |
|
| 216 | - global $timedate; |
|
| 217 | - global $locale; |
|
| 213 | + function fill_in_additional_detail_fields() { |
|
| 214 | + global $theme; |
|
| 215 | + global $current_language; |
|
| 216 | + global $timedate; |
|
| 217 | + global $locale; |
|
| 218 | 218 | |
| 219 | - parent::fill_in_additional_detail_fields(); |
|
| 219 | + parent::fill_in_additional_detail_fields(); |
|
| 220 | 220 | |
| 221 | - $mod_strings = return_module_language($current_language, 'Documents'); |
|
| 221 | + $mod_strings = return_module_language($current_language, 'Documents'); |
|
| 222 | 222 | |
| 223 | 223 | if (!empty($this->document_revision_id)) { |
| 224 | 224 | |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | //populate name |
| 235 | 235 | if(isset($this->document_name)) |
| 236 | 236 | { |
| 237 | - $this->name = $this->document_name; |
|
| 237 | + $this->name = $this->document_name; |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | if(isset($row['filename']))$this->filename = $row['filename']; |
@@ -251,93 +251,93 @@ discard block |
||
| 251 | 251 | } |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | - //set default file name. |
|
| 255 | - if (!empty ($img_name) && file_exists($img_name)) { |
|
| 256 | - $img_name = $img_name_bare; |
|
| 257 | - } else { |
|
| 258 | - $img_name = "def_image_inline"; //todo change the default image. |
|
| 259 | - } |
|
| 260 | - if($this->ACLAccess('DetailView')) { |
|
| 261 | - if(!empty($this->doc_type) && $this->doc_type != 'Sugar' && !empty($this->doc_url)) { |
|
| 254 | + //set default file name. |
|
| 255 | + if (!empty ($img_name) && file_exists($img_name)) { |
|
| 256 | + $img_name = $img_name_bare; |
|
| 257 | + } else { |
|
| 258 | + $img_name = "def_image_inline"; //todo change the default image. |
|
| 259 | + } |
|
| 260 | + if($this->ACLAccess('DetailView')) { |
|
| 261 | + if(!empty($this->doc_type) && $this->doc_type != 'Sugar' && !empty($this->doc_url)) { |
|
| 262 | 262 | $file_url= "<a href='".$this->doc_url."' target='_blank'>".SugarThemeRegistry::current()->getImage($this->doc_type.'_image_inline', 'border="0"',null,null,'.png',$mod_strings['LBL_LIST_VIEW_DOCUMENT'])."</a>"; |
| 263 | - } else { |
|
| 264 | - $file_url = "<a href='index.php?entryPoint=download&id={$this->document_revision_id}&type=Documents' target='_blank'>".SugarThemeRegistry::current()->getImage($img_name, 'border="0"', null,null,'.gif',$mod_strings['LBL_LIST_VIEW_DOCUMENT'])."</a>"; |
|
| 265 | - } |
|
| 263 | + } else { |
|
| 264 | + $file_url = "<a href='index.php?entryPoint=download&id={$this->document_revision_id}&type=Documents' target='_blank'>".SugarThemeRegistry::current()->getImage($img_name, 'border="0"', null,null,'.gif',$mod_strings['LBL_LIST_VIEW_DOCUMENT'])."</a>"; |
|
| 265 | + } |
|
| 266 | 266 | |
| 267 | - $this->file_url = $file_url; |
|
| 268 | - $this->file_url_noimage = "index.php?entryPoint=download&type=Documents&id={$this->document_revision_id}"; |
|
| 269 | - }else{ |
|
| 267 | + $this->file_url = $file_url; |
|
| 268 | + $this->file_url_noimage = "index.php?entryPoint=download&type=Documents&id={$this->document_revision_id}"; |
|
| 269 | + }else{ |
|
| 270 | 270 | $this->file_url = ""; |
| 271 | 271 | $this->file_url_noimage = ""; |
| 272 | - } |
|
| 272 | + } |
|
| 273 | 273 | |
| 274 | - //get last_rev_by user name. |
|
| 275 | - if (!empty ($row)) { |
|
| 276 | - $this->last_rev_created_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']); |
|
| 274 | + //get last_rev_by user name. |
|
| 275 | + if (!empty ($row)) { |
|
| 276 | + $this->last_rev_created_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']); |
|
| 277 | 277 | |
| 278 | - $this->last_rev_create_date = $timedate->to_display_date_time($this->db->fromConvert($row['rev_date'], 'datetime')); |
|
| 279 | - $this->last_rev_mime_type = $row['file_mime_type']; |
|
| 280 | - } |
|
| 278 | + $this->last_rev_create_date = $timedate->to_display_date_time($this->db->fromConvert($row['rev_date'], 'datetime')); |
|
| 279 | + $this->last_rev_mime_type = $row['file_mime_type']; |
|
| 280 | + } |
|
| 281 | 281 | |
| 282 | - global $app_list_strings; |
|
| 283 | - if(!empty($this->status_id)) { |
|
| 284 | - //_pp($this->status_id); |
|
| 285 | - $this->status = $app_list_strings['document_status_dom'][$this->status_id]; |
|
| 286 | - } |
|
| 282 | + global $app_list_strings; |
|
| 283 | + if(!empty($this->status_id)) { |
|
| 284 | + //_pp($this->status_id); |
|
| 285 | + $this->status = $app_list_strings['document_status_dom'][$this->status_id]; |
|
| 286 | + } |
|
| 287 | 287 | if (!empty($this->related_doc_id)) { |
| 288 | 288 | $this->related_doc_name = Document::get_document_name($this->related_doc_id); |
| 289 | 289 | $this->related_doc_rev_number = DocumentRevision::get_document_revision_name($this->related_doc_rev_id); |
| 290 | 290 | } |
| 291 | - } |
|
| 291 | + } |
|
| 292 | 292 | |
| 293 | - function list_view_parse_additional_sections(&$list_form/*, $xTemplateSection*/) { |
|
| 294 | - return $list_form; |
|
| 295 | - } |
|
| 293 | + function list_view_parse_additional_sections(&$list_form/*, $xTemplateSection*/) { |
|
| 294 | + return $list_form; |
|
| 295 | + } |
|
| 296 | 296 | |
| 297 | 297 | function create_export_query($order_by, $where, $relate_link_join='') |
| 298 | 298 | { |
| 299 | 299 | $custom_join = $this->getCustomJoin(true, true, $where); |
| 300 | 300 | $custom_join['join'] .= $relate_link_join; |
| 301 | - $query = "SELECT |
|
| 301 | + $query = "SELECT |
|
| 302 | 302 | documents.*"; |
| 303 | 303 | $query .= $custom_join['select']; |
| 304 | - $query .= " FROM documents "; |
|
| 304 | + $query .= " FROM documents "; |
|
| 305 | 305 | $query .= $custom_join['join']; |
| 306 | 306 | |
| 307 | - $where_auto = " documents.deleted = 0"; |
|
| 307 | + $where_auto = " documents.deleted = 0"; |
|
| 308 | 308 | |
| 309 | - if ($where != "") |
|
| 310 | - $query .= " WHERE $where AND ".$where_auto; |
|
| 311 | - else |
|
| 312 | - $query .= " WHERE ".$where_auto; |
|
| 309 | + if ($where != "") |
|
| 310 | + $query .= " WHERE $where AND ".$where_auto; |
|
| 311 | + else |
|
| 312 | + $query .= " WHERE ".$where_auto; |
|
| 313 | 313 | |
| 314 | - if ($order_by != "") |
|
| 315 | - $query .= " ORDER BY $order_by"; |
|
| 316 | - else |
|
| 317 | - $query .= " ORDER BY documents.document_name"; |
|
| 314 | + if ($order_by != "") |
|
| 315 | + $query .= " ORDER BY $order_by"; |
|
| 316 | + else |
|
| 317 | + $query .= " ORDER BY documents.document_name"; |
|
| 318 | 318 | |
| 319 | - return $query; |
|
| 320 | - } |
|
| 319 | + return $query; |
|
| 320 | + } |
|
| 321 | 321 | |
| 322 | - function get_list_view_data() { |
|
| 323 | - global $current_language; |
|
| 324 | - $app_list_strings = return_app_list_strings_language($current_language); |
|
| 322 | + function get_list_view_data() { |
|
| 323 | + global $current_language; |
|
| 324 | + $app_list_strings = return_app_list_strings_language($current_language); |
|
| 325 | 325 | |
| 326 | - $document_fields = $this->get_list_view_array(); |
|
| 326 | + $document_fields = $this->get_list_view_array(); |
|
| 327 | 327 | |
| 328 | 328 | $this->fill_in_additional_list_fields(); |
| 329 | 329 | |
| 330 | 330 | |
| 331 | - $document_fields['FILENAME'] = $this->filename; |
|
| 332 | - $document_fields['FILE_URL'] = $this->file_url; |
|
| 333 | - $document_fields['FILE_URL_NOIMAGE'] = $this->file_url_noimage; |
|
| 334 | - $document_fields['LAST_REV_CREATED_BY'] = $this->last_rev_created_name; |
|
| 335 | - $document_fields['CATEGORY_ID'] = empty ($this->category_id) ? "" : $app_list_strings['document_category_dom'][$this->category_id]; |
|
| 336 | - $document_fields['SUBCATEGORY_ID'] = empty ($this->subcategory_id) ? "" : $app_list_strings['document_subcategory_dom'][$this->subcategory_id]; |
|
| 331 | + $document_fields['FILENAME'] = $this->filename; |
|
| 332 | + $document_fields['FILE_URL'] = $this->file_url; |
|
| 333 | + $document_fields['FILE_URL_NOIMAGE'] = $this->file_url_noimage; |
|
| 334 | + $document_fields['LAST_REV_CREATED_BY'] = $this->last_rev_created_name; |
|
| 335 | + $document_fields['CATEGORY_ID'] = empty ($this->category_id) ? "" : $app_list_strings['document_category_dom'][$this->category_id]; |
|
| 336 | + $document_fields['SUBCATEGORY_ID'] = empty ($this->subcategory_id) ? "" : $app_list_strings['document_subcategory_dom'][$this->subcategory_id]; |
|
| 337 | 337 | $document_fields['NAME'] = $this->document_name; |
| 338 | - $document_fields['DOCUMENT_NAME_JAVASCRIPT'] = $GLOBALS['db']->quote($document_fields['DOCUMENT_NAME']); |
|
| 339 | - return $document_fields; |
|
| 340 | - } |
|
| 338 | + $document_fields['DOCUMENT_NAME_JAVASCRIPT'] = $GLOBALS['db']->quote($document_fields['DOCUMENT_NAME']); |
|
| 339 | + return $document_fields; |
|
| 340 | + } |
|
| 341 | 341 | |
| 342 | 342 | |
| 343 | 343 | /** |
@@ -348,45 +348,45 @@ discard block |
||
| 348 | 348 | * |
| 349 | 349 | * @param $id String The record id of the Document instance |
| 350 | 350 | */ |
| 351 | - function mark_relationships_deleted($id) |
|
| 351 | + function mark_relationships_deleted($id) |
|
| 352 | 352 | { |
| 353 | 353 | $this->load_relationships('revisions'); |
| 354 | - $revisions= $this->get_linked_beans('revisions','DocumentRevision'); |
|
| 355 | - |
|
| 356 | - if (!empty($revisions) && is_array($revisions)) { |
|
| 357 | - foreach($revisions as $key=>$version) { |
|
| 358 | - UploadFile::unlink_file($version->id,$version->filename); |
|
| 359 | - //mark the version deleted. |
|
| 360 | - $version->mark_deleted($version->id); |
|
| 361 | - } |
|
| 362 | - } |
|
| 363 | - |
|
| 364 | - } |
|
| 365 | - |
|
| 366 | - |
|
| 367 | - function bean_implements($interface) { |
|
| 368 | - switch ($interface) { |
|
| 369 | - case 'ACL' : |
|
| 370 | - return true; |
|
| 371 | - } |
|
| 372 | - return false; |
|
| 373 | - } |
|
| 374 | - |
|
| 375 | - //static function. |
|
| 376 | - function get_document_name($doc_id){ |
|
| 377 | - if (empty($doc_id)) return null; |
|
| 378 | - |
|
| 379 | - $db = DBManagerFactory::getInstance(); |
|
| 380 | - $query="select document_name from documents where id='$doc_id' and deleted=0"; |
|
| 381 | - $result=$db->query($query); |
|
| 382 | - if (!empty($result)) { |
|
| 383 | - $row=$db->fetchByAssoc($result); |
|
| 384 | - if (!empty($row)) { |
|
| 385 | - return $row['document_name']; |
|
| 386 | - } |
|
| 387 | - } |
|
| 388 | - return null; |
|
| 389 | - } |
|
| 354 | + $revisions= $this->get_linked_beans('revisions','DocumentRevision'); |
|
| 355 | + |
|
| 356 | + if (!empty($revisions) && is_array($revisions)) { |
|
| 357 | + foreach($revisions as $key=>$version) { |
|
| 358 | + UploadFile::unlink_file($version->id,$version->filename); |
|
| 359 | + //mark the version deleted. |
|
| 360 | + $version->mark_deleted($version->id); |
|
| 361 | + } |
|
| 362 | + } |
|
| 363 | + |
|
| 364 | + } |
|
| 365 | + |
|
| 366 | + |
|
| 367 | + function bean_implements($interface) { |
|
| 368 | + switch ($interface) { |
|
| 369 | + case 'ACL' : |
|
| 370 | + return true; |
|
| 371 | + } |
|
| 372 | + return false; |
|
| 373 | + } |
|
| 374 | + |
|
| 375 | + //static function. |
|
| 376 | + function get_document_name($doc_id){ |
|
| 377 | + if (empty($doc_id)) return null; |
|
| 378 | + |
|
| 379 | + $db = DBManagerFactory::getInstance(); |
|
| 380 | + $query="select document_name from documents where id='$doc_id' and deleted=0"; |
|
| 381 | + $result=$db->query($query); |
|
| 382 | + if (!empty($result)) { |
|
| 383 | + $row=$db->fetchByAssoc($result); |
|
| 384 | + if (!empty($row)) { |
|
| 385 | + return $row['document_name']; |
|
| 386 | + } |
|
| 387 | + } |
|
| 388 | + return null; |
|
| 389 | + } |
|
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | require_once('modules/Documents/DocumentExternalApiDropDown.php'); |
@@ -1,131 +1,131 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $viewdefs ['Documents'] = |
| 3 | 3 | array ( |
| 4 | - 'EditView' => |
|
| 5 | - array ( |
|
| 4 | + 'EditView' => |
|
| 5 | + array ( |
|
| 6 | 6 | 'templateMeta' => |
| 7 | 7 | array ( |
| 8 | - 'form' => |
|
| 9 | - array ( |
|
| 8 | + 'form' => |
|
| 9 | + array ( |
|
| 10 | 10 | 'enctype' => 'multipart/form-data', |
| 11 | 11 | 'hidden' => |
| 12 | 12 | array ( |
| 13 | - 0 => '<input type="hidden" name="old_id" value="{$fields.document_revision_id.value}">', |
|
| 14 | - 1 => '<input type="hidden" name="contract_id" value="{$smarty.request.contract_id}">', |
|
| 13 | + 0 => '<input type="hidden" name="old_id" value="{$fields.document_revision_id.value}">', |
|
| 14 | + 1 => '<input type="hidden" name="contract_id" value="{$smarty.request.contract_id}">', |
|
| 15 | 15 | ), |
| 16 | - ), |
|
| 17 | - 'maxColumns' => '2', |
|
| 18 | - 'widths' => |
|
| 19 | - array ( |
|
| 16 | + ), |
|
| 17 | + 'maxColumns' => '2', |
|
| 18 | + 'widths' => |
|
| 19 | + array ( |
|
| 20 | 20 | 0 => |
| 21 | 21 | array ( |
| 22 | - 'label' => '10', |
|
| 23 | - 'field' => '30', |
|
| 22 | + 'label' => '10', |
|
| 23 | + 'field' => '30', |
|
| 24 | 24 | ), |
| 25 | 25 | 1 => |
| 26 | 26 | array ( |
| 27 | - 'label' => '10', |
|
| 28 | - 'field' => '30', |
|
| 27 | + 'label' => '10', |
|
| 28 | + 'field' => '30', |
|
| 29 | 29 | ), |
| 30 | - ), |
|
| 31 | - 'javascript' => '{sugar_getscript file="include/javascript/popup_parent_helper.js"} |
|
| 30 | + ), |
|
| 31 | + 'javascript' => '{sugar_getscript file="include/javascript/popup_parent_helper.js"} |
|
| 32 | 32 | {sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"} |
| 33 | 33 | {sugar_getscript file="modules/Documents/documents.js"}', |
| 34 | - 'useTabs' => false, |
|
| 35 | - 'tabDefs' => |
|
| 36 | - array ( |
|
| 34 | + 'useTabs' => false, |
|
| 35 | + 'tabDefs' => |
|
| 36 | + array ( |
|
| 37 | 37 | 'LBL_DOCUMENT_INFORMATION' => |
| 38 | 38 | array ( |
| 39 | - 'newTab' => false, |
|
| 40 | - 'panelDefault' => 'expanded', |
|
| 39 | + 'newTab' => false, |
|
| 40 | + 'panelDefault' => 'expanded', |
|
| 41 | + ), |
|
| 41 | 42 | ), |
| 42 | - ), |
|
| 43 | 43 | ), |
| 44 | 44 | 'panels' => |
| 45 | 45 | array ( |
| 46 | - 'lbl_document_information' => |
|
| 47 | - array ( |
|
| 46 | + 'lbl_document_information' => |
|
| 47 | + array ( |
|
| 48 | 48 | 0 => |
| 49 | 49 | array ( |
| 50 | - 0 => |
|
| 51 | - array ( |
|
| 50 | + 0 => |
|
| 51 | + array ( |
|
| 52 | 52 | 'name' => 'filename', |
| 53 | 53 | 'displayParams' => |
| 54 | 54 | array ( |
| 55 | - 'onchangeSetFileNameTo' => 'document_name', |
|
| 55 | + 'onchangeSetFileNameTo' => 'document_name', |
|
| 56 | + ), |
|
| 56 | 57 | ), |
| 57 | - ), |
|
| 58 | - 1 => |
|
| 59 | - array ( |
|
| 58 | + 1 => |
|
| 59 | + array ( |
|
| 60 | 60 | 'name' => 'status_id', |
| 61 | 61 | 'label' => 'LBL_DOC_STATUS', |
| 62 | - ), |
|
| 62 | + ), |
|
| 63 | 63 | ), |
| 64 | 64 | 1 => |
| 65 | 65 | array ( |
| 66 | - 0 => 'document_name', |
|
| 67 | - 1 => |
|
| 68 | - array ( |
|
| 66 | + 0 => 'document_name', |
|
| 67 | + 1 => |
|
| 68 | + array ( |
|
| 69 | 69 | 'name' => 'revision', |
| 70 | 70 | 'customCode' => '<input name="revision" type="text" value="{$fields.revision.value}" {$DISABLED}>', |
| 71 | - ), |
|
| 71 | + ), |
|
| 72 | 72 | ), |
| 73 | 73 | 2 => |
| 74 | 74 | array ( |
| 75 | - 0 => |
|
| 76 | - array ( |
|
| 75 | + 0 => |
|
| 76 | + array ( |
|
| 77 | 77 | 'name' => 'template_type', |
| 78 | 78 | 'label' => 'LBL_DET_TEMPLATE_TYPE', |
| 79 | - ), |
|
| 80 | - 1 => |
|
| 81 | - array ( |
|
| 79 | + ), |
|
| 80 | + 1 => |
|
| 81 | + array ( |
|
| 82 | 82 | 'name' => 'is_template', |
| 83 | 83 | 'label' => 'LBL_DET_IS_TEMPLATE', |
| 84 | - ), |
|
| 84 | + ), |
|
| 85 | 85 | ), |
| 86 | 86 | 3 => |
| 87 | 87 | array ( |
| 88 | - 0 => |
|
| 89 | - array ( |
|
| 88 | + 0 => |
|
| 89 | + array ( |
|
| 90 | 90 | 'name' => 'active_date', |
| 91 | - ), |
|
| 92 | - 1 => 'exp_date', |
|
| 91 | + ), |
|
| 92 | + 1 => 'exp_date', |
|
| 93 | 93 | ), |
| 94 | 94 | 4 => |
| 95 | 95 | array ( |
| 96 | - 0 => 'category_id', |
|
| 97 | - 1 => 'subcategory_id', |
|
| 96 | + 0 => 'category_id', |
|
| 97 | + 1 => 'subcategory_id', |
|
| 98 | 98 | ), |
| 99 | 99 | 5 => |
| 100 | 100 | array ( |
| 101 | - 0 => |
|
| 102 | - array ( |
|
| 101 | + 0 => |
|
| 102 | + array ( |
|
| 103 | 103 | 'name' => 'description', |
| 104 | - ), |
|
| 104 | + ), |
|
| 105 | 105 | ), |
| 106 | 106 | 6 => |
| 107 | 107 | array ( |
| 108 | - 0 => |
|
| 109 | - array ( |
|
| 108 | + 0 => |
|
| 109 | + array ( |
|
| 110 | 110 | 'name' => 'related_doc_name', |
| 111 | 111 | 'customCode' => '<input name="related_document_name" type="text" size="30" maxlength="255" value="{$RELATED_DOCUMENT_NAME}" readonly><input name="related_doc_id" type="hidden" value="{$fields.related_doc_id.value}"/> <input title="{$APP.LBL_SELECT_BUTTON_TITLE}" type="{$RELATED_DOCUMENT_BUTTON_AVAILABILITY}" class="button" value="{$APP.LBL_SELECT_BUTTON_LABEL}" name="btn2" onclick=\'open_popup("Documents", 600, 400, "", true, false, {$encoded_document_popup_request_data}, "single", true);\'/>', |
| 112 | - ), |
|
| 113 | - 1 => |
|
| 114 | - array ( |
|
| 112 | + ), |
|
| 113 | + 1 => |
|
| 114 | + array ( |
|
| 115 | 115 | 'name' => 'related_doc_rev_number', |
| 116 | 116 | 'customCode' => '<select name="related_doc_rev_id" id="related_doc_rev_id" {$RELATED_DOCUMENT_REVISION_DISABLED}>{$RELATED_DOCUMENT_REVISION_OPTIONS}</select>', |
| 117 | - ), |
|
| 117 | + ), |
|
| 118 | 118 | ), |
| 119 | 119 | 7 => |
| 120 | 120 | array ( |
| 121 | - 0 => |
|
| 122 | - array ( |
|
| 121 | + 0 => |
|
| 122 | + array ( |
|
| 123 | 123 | 'name' => 'assigned_user_name', |
| 124 | 124 | 'label' => 'LBL_ASSIGNED_TO_NAME', |
| 125 | - ), |
|
| 125 | + ), |
|
| 126 | + ), |
|
| 126 | 127 | ), |
| 127 | - ), |
|
| 128 | 128 | ), |
| 129 | - ), |
|
| 129 | + ), |
|
| 130 | 130 | ); |
| 131 | 131 | ?> |
@@ -1,29 +1,29 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | $viewdefs ['Documents'] = |
| 3 | -array ( |
|
| 3 | +array( |
|
| 4 | 4 | 'EditView' => |
| 5 | - array ( |
|
| 5 | + array( |
|
| 6 | 6 | 'templateMeta' => |
| 7 | - array ( |
|
| 7 | + array( |
|
| 8 | 8 | 'form' => |
| 9 | - array ( |
|
| 9 | + array( |
|
| 10 | 10 | 'enctype' => 'multipart/form-data', |
| 11 | 11 | 'hidden' => |
| 12 | - array ( |
|
| 12 | + array( |
|
| 13 | 13 | 0 => '<input type="hidden" name="old_id" value="{$fields.document_revision_id.value}">', |
| 14 | 14 | 1 => '<input type="hidden" name="contract_id" value="{$smarty.request.contract_id}">', |
| 15 | 15 | ), |
| 16 | 16 | ), |
| 17 | 17 | 'maxColumns' => '2', |
| 18 | 18 | 'widths' => |
| 19 | - array ( |
|
| 19 | + array( |
|
| 20 | 20 | 0 => |
| 21 | - array ( |
|
| 21 | + array( |
|
| 22 | 22 | 'label' => '10', |
| 23 | 23 | 'field' => '30', |
| 24 | 24 | ), |
| 25 | 25 | 1 => |
| 26 | - array ( |
|
| 26 | + array( |
|
| 27 | 27 | 'label' => '10', |
| 28 | 28 | 'field' => '30', |
| 29 | 29 | ), |
@@ -33,93 +33,93 @@ discard block |
||
| 33 | 33 | {sugar_getscript file="modules/Documents/documents.js"}', |
| 34 | 34 | 'useTabs' => false, |
| 35 | 35 | 'tabDefs' => |
| 36 | - array ( |
|
| 36 | + array( |
|
| 37 | 37 | 'LBL_DOCUMENT_INFORMATION' => |
| 38 | - array ( |
|
| 38 | + array( |
|
| 39 | 39 | 'newTab' => false, |
| 40 | 40 | 'panelDefault' => 'expanded', |
| 41 | 41 | ), |
| 42 | 42 | ), |
| 43 | 43 | ), |
| 44 | 44 | 'panels' => |
| 45 | - array ( |
|
| 45 | + array( |
|
| 46 | 46 | 'lbl_document_information' => |
| 47 | - array ( |
|
| 47 | + array( |
|
| 48 | 48 | 0 => |
| 49 | - array ( |
|
| 49 | + array( |
|
| 50 | 50 | 0 => |
| 51 | - array ( |
|
| 51 | + array( |
|
| 52 | 52 | 'name' => 'filename', |
| 53 | 53 | 'displayParams' => |
| 54 | - array ( |
|
| 54 | + array( |
|
| 55 | 55 | 'onchangeSetFileNameTo' => 'document_name', |
| 56 | 56 | ), |
| 57 | 57 | ), |
| 58 | 58 | 1 => |
| 59 | - array ( |
|
| 59 | + array( |
|
| 60 | 60 | 'name' => 'status_id', |
| 61 | 61 | 'label' => 'LBL_DOC_STATUS', |
| 62 | 62 | ), |
| 63 | 63 | ), |
| 64 | 64 | 1 => |
| 65 | - array ( |
|
| 65 | + array( |
|
| 66 | 66 | 0 => 'document_name', |
| 67 | 67 | 1 => |
| 68 | - array ( |
|
| 68 | + array( |
|
| 69 | 69 | 'name' => 'revision', |
| 70 | 70 | 'customCode' => '<input name="revision" type="text" value="{$fields.revision.value}" {$DISABLED}>', |
| 71 | 71 | ), |
| 72 | 72 | ), |
| 73 | 73 | 2 => |
| 74 | - array ( |
|
| 74 | + array( |
|
| 75 | 75 | 0 => |
| 76 | - array ( |
|
| 76 | + array( |
|
| 77 | 77 | 'name' => 'template_type', |
| 78 | 78 | 'label' => 'LBL_DET_TEMPLATE_TYPE', |
| 79 | 79 | ), |
| 80 | 80 | 1 => |
| 81 | - array ( |
|
| 81 | + array( |
|
| 82 | 82 | 'name' => 'is_template', |
| 83 | 83 | 'label' => 'LBL_DET_IS_TEMPLATE', |
| 84 | 84 | ), |
| 85 | 85 | ), |
| 86 | 86 | 3 => |
| 87 | - array ( |
|
| 87 | + array( |
|
| 88 | 88 | 0 => |
| 89 | - array ( |
|
| 89 | + array( |
|
| 90 | 90 | 'name' => 'active_date', |
| 91 | 91 | ), |
| 92 | 92 | 1 => 'exp_date', |
| 93 | 93 | ), |
| 94 | 94 | 4 => |
| 95 | - array ( |
|
| 95 | + array( |
|
| 96 | 96 | 0 => 'category_id', |
| 97 | 97 | 1 => 'subcategory_id', |
| 98 | 98 | ), |
| 99 | 99 | 5 => |
| 100 | - array ( |
|
| 100 | + array( |
|
| 101 | 101 | 0 => |
| 102 | - array ( |
|
| 102 | + array( |
|
| 103 | 103 | 'name' => 'description', |
| 104 | 104 | ), |
| 105 | 105 | ), |
| 106 | 106 | 6 => |
| 107 | - array ( |
|
| 107 | + array( |
|
| 108 | 108 | 0 => |
| 109 | - array ( |
|
| 109 | + array( |
|
| 110 | 110 | 'name' => 'related_doc_name', |
| 111 | 111 | 'customCode' => '<input name="related_document_name" type="text" size="30" maxlength="255" value="{$RELATED_DOCUMENT_NAME}" readonly><input name="related_doc_id" type="hidden" value="{$fields.related_doc_id.value}"/> <input title="{$APP.LBL_SELECT_BUTTON_TITLE}" type="{$RELATED_DOCUMENT_BUTTON_AVAILABILITY}" class="button" value="{$APP.LBL_SELECT_BUTTON_LABEL}" name="btn2" onclick=\'open_popup("Documents", 600, 400, "", true, false, {$encoded_document_popup_request_data}, "single", true);\'/>', |
| 112 | 112 | ), |
| 113 | 113 | 1 => |
| 114 | - array ( |
|
| 114 | + array( |
|
| 115 | 115 | 'name' => 'related_doc_rev_number', |
| 116 | 116 | 'customCode' => '<select name="related_doc_rev_id" id="related_doc_rev_id" {$RELATED_DOCUMENT_REVISION_DISABLED}>{$RELATED_DOCUMENT_REVISION_OPTIONS}</select>', |
| 117 | 117 | ), |
| 118 | 118 | ), |
| 119 | 119 | 7 => |
| 120 | - array ( |
|
| 120 | + array( |
|
| 121 | 121 | 0 => |
| 122 | - array ( |
|
| 122 | + array( |
|
| 123 | 123 | 'name' => 'assigned_user_name', |
| 124 | 124 | 'label' => 'LBL_ASSIGNED_TO_NAME', |
| 125 | 125 | ), |