Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Unify parent_type_display and record_type_display.

Currently in sugarcrm code there is two diferent list for parent_type dropdowns:

- record_type_display
- parent_type_display

This commit replaces all ocurrences of record_type_display with record_type_display so
all the values are unified and can be easly customized by only changing one list.
  • Loading branch information...
commit 7dd215e17077d4388d1e9e48732d7ee2c01ca539 1 parent b273ac4
Sergi Almacellas Abellana authored
View
4 include/SugarFields/Fields/Parent/SugarFieldParent.php
@@ -66,7 +66,7 @@ function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex
global $app_list_strings;
- $parent_types = $app_list_strings['record_type_display'];
+ $parent_types = $app_list_strings['parent_type_display'];
$disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
foreach($disabled_parent_types as $disabled_parent_type){
@@ -117,7 +117,7 @@ function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabind
global $app_list_strings;
- $parent_types = $app_list_strings['record_type_display'];
+ $parent_types = $app_list_strings['parent_type_display'];
$disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
foreach($disabled_parent_types as $disabled_parent_type){
if($disabled_parent_type != $focus->parent_type){
View
4 include/language/en_us.lang.php
@@ -477,7 +477,7 @@
//Note: do not translate record_type_default_key
// it is the key for the default record_type_module value
'record_type_default_key' => 'Accounts',
- 'record_type_display' =>
+ 'parent_type_display' =>
array (
'' => '',
'Accounts' => 'Account',
@@ -498,7 +498,7 @@
),
- 'record_type_display_notes' =>
+ 'parent_type_display_notes' =>
array (
'Accounts' => 'Account',
'Contacts' => 'Contact',
View
2  include/utils.php
@@ -4916,7 +4916,7 @@ function getDuplicateRelationListWithTitle($def, $var_def, $module)
*/
function getTypeDisplayList()
{
- return array('record_type_display', 'parent_type_display', 'record_type_display_notes');
+ return array('parent_type_display', 'parent_type_display', 'record_type_display_notes');
}
/**
View
2  modules/Activities/OpenListView.php
@@ -303,7 +303,7 @@
$activity_fields['TITLE'] .= $current_module_strings['LBL_LIST_CONTACT'].": ".$activity['contact_name'];
}
if (!empty($activity['parent_name'])) {
- $activity_fields['TITLE'] .= "\n".$app_list_strings['record_type_display'][$activity['parent_type']].": ".$activity['parent_name'];
+ $activity_fields['TITLE'] .= "\n".$app_list_strings['parent_type_display'][$activity['parent_type']].": ".$activity['parent_name'];
}
$xtpl->assign("ACTIVITY_MODULE_PNG", SugarThemeRegistry::current()->getImage($activity_fields['MODULE'].'','border="0"', null,null,'.gif',$activity_fields['NAME']));
View
2  modules/Calls/Call.php
@@ -374,7 +374,7 @@ function fill_in_additional_detail_fields()
$this->fill_in_additional_parent_fields();
global $app_list_strings;
- $parent_types = $app_list_strings['record_type_display'];
+ $parent_types = $app_list_strings['parent_type_display'];
$disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
foreach($disabled_parent_types as $disabled_parent_type){
if($disabled_parent_type != $this->parent_type){
View
2  modules/Calls/vardefs.php
@@ -114,7 +114,7 @@
'parent_name'=>
array(
'name'=> 'parent_name',
- 'parent_type'=>'record_type_display' ,
+ 'parent_type'=>'parent_type_display' ,
'type_name'=>'parent_type',
'id_name'=>'parent_id',
'vname'=>'LBL_LIST_RELATED_TO',
View
2  modules/DynamicFields/templates/Fields/TemplateParent.php
@@ -47,7 +47,7 @@ function get_field_def(){
$def = parent::get_field_def();
$def['type_name'] = 'parent_type';
$def['id_name'] = 'parent_id';
- $def['parent_type'] = 'record_type_display';
+ $def['parent_type'] = 'parent_type_display';
$def['source'] = 'non-db';
$def['studio'] = 'visible';
return $def;
View
2  modules/EmailTemplates/EditView.php
@@ -233,7 +233,7 @@
}
$xtpl->assign("DESCRIPTION", $focus->description);
-$xtpl->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['record_type_display'], $focus->parent_type));
+$xtpl->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['parent_type_display'], $focus->parent_type));
//$xtpl->assign("DEFAULT_MODULE","Accounts");
if(isset($focus->body)) $xtpl->assign("BODY", $focus->body); else $xtpl->assign("BODY", "");
View
2  modules/Emails/DetailView.php
@@ -262,7 +262,7 @@
if (!empty($focus->parent_type) && $focus->parent_type !='test') {
$xtpl->assign('PARENT_MODULE', $focus->parent_type);
$xtpl->assign('PARENT_TYPE_UNTRANSLATE', $focus->parent_type);
- $xtpl->assign('PARENT_TYPE', $app_list_strings['record_type_display'][$focus->parent_type] . ':');
+ $xtpl->assign('PARENT_TYPE', $app_list_strings['parent_type_display'][$focus->parent_type] . ':');
}
$to_addr = !empty($focus->to_addrs_names) ? htmlspecialchars($focus->to_addrs_names, ENT_COMPAT, 'UTF-8') : nl2br($focus->to_addrs);
View
6 modules/Emails/EditView.php
@@ -103,8 +103,8 @@
$focus->to_addrs = "$focus->contact_name <$contact->email1>";
}
}
- if(!empty($_REQUEST['parent_type']) && empty($app_list_strings['record_type_display'][$_REQUEST['parent_type']])){
- if(!empty($app_list_strings['record_type_display'][$_REQUEST['load_module']])){
+ if(!empty($_REQUEST['parent_type']) && empty($app_list_strings['parent_type_display'][$_REQUEST['parent_type']])){
+ if(!empty($app_list_strings['parent_type_display'][$_REQUEST['load_module']])){
$_REQUEST['parent_type'] = $_REQUEST['load_module'];
$_REQUEST['parent_id'] = $focus->contact_id;
$_REQUEST['parent_name'] = $focus->to_addrs_names;
@@ -477,7 +477,7 @@ function parent_typechangeQS() {
$xtpl->assign('TIME_START', substr($focus->time_start,0,5));
$xtpl->assign('TIME_MERIDIEM', $timedate->AMPMMenu('',$focus->time_start));
-$parent_types = $app_list_strings['record_type_display'];
+$parent_types = $app_list_strings['parent_type_display'];
$disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
foreach($disabled_parent_types as $disabled_parent_type){
View
6 modules/Emails/EmailUI.php
@@ -407,7 +407,7 @@ function _generateComposeConfigData($type = "email_compose_light" )
global $app_list_strings,$current_user, $app_strings, $mod_strings,$current_language,$locale;
//Link drop-downs
- $parent_types = $app_list_strings['record_type_display'];
+ $parent_types = $app_list_strings['parent_type_display'];
$disabled_parent_types = ACLController::disabledModuleList($parent_types, false, 'list');
foreach($disabled_parent_types as $disabled_parent_type) {
@@ -1378,7 +1378,7 @@ function getImportForm($vars, $email, $formName = 'ImportEditView') {
$smarty->assign("userId",$email->assigned_user_id);
$smarty->assign("userName",$email->assigned_user_name);
- $parent_types = $app_list_strings['record_type_display'];
+ $parent_types = $app_list_strings['parent_type_display'];
$smarty->assign('parentOptions', get_select_options_with_id($parent_types, $email->parent_type));
$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . json_encode($sqs_objects) . '</script>';
@@ -1428,7 +1428,7 @@ function getDetailViewForEmail2($emailId) {
//if not empty or set to test (from test campaigns)
if (!empty($focus->parent_type) && $focus->parent_type !='test') {
$smarty->assign('PARENT_MODULE', $focus->parent_type);
- $smarty->assign('PARENT_TYPE', $app_list_strings['record_type_display'][$focus->parent_type] . ":");
+ $smarty->assign('PARENT_TYPE', $app_list_strings['parent_type_display'][$focus->parent_type] . ":");
}
global $gridline;
View
2  modules/Emails/Status.php
@@ -82,7 +82,7 @@
if (isset($focus->parent_type))
{
$xtpl->assign("PARENT_MODULE", $focus->parent_type);
- $xtpl->assign("PARENT_TYPE", $app_list_strings['record_type_display'][$focus->parent_type]);
+ $xtpl->assign("PARENT_TYPE", $app_list_strings['parent_type_display'][$focus->parent_type]);
}
$xtpl->assign("PARENT_ID", $focus->parent_id);
$xtpl->assign("NAME", $focus->name);
View
2  modules/Leads/views/view.convertlead.php
@@ -637,7 +637,7 @@ protected function handleActivities(
global $app_list_strings;
global $sugar_config;
global $app_strings;
- $parent_types = $app_list_strings['record_type_display'];
+ $parent_types = $app_list_strings['parent_type_display'];
$activities = $this->getActivitiesFromLead($lead);
View
2  modules/Meetings/Meeting.php
@@ -436,7 +436,7 @@ function fill_in_additional_detail_fields() {
}
global $app_list_strings;
- $parent_types = $app_list_strings['record_type_display'];
+ $parent_types = $app_list_strings['parent_type_display'];
$disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
foreach($disabled_parent_types as $disabled_parent_type){
if($disabled_parent_type != $this->parent_type){
View
2  modules/Meetings/vardefs.php
@@ -340,7 +340,7 @@
'parent_name'=>
array(
'name'=> 'parent_name',
- 'parent_type'=>'record_type_display' ,
+ 'parent_type'=>'parent_type_display' ,
'type_name'=>'parent_type',
'id_name'=>'parent_id',
'vname'=>'LBL_LIST_RELATED_TO',
View
4 modules/Notes/vardefs.php
@@ -237,12 +237,12 @@
'parent_name'=>
array(
'name'=> 'parent_name',
- 'parent_type'=>'record_type_display' ,
+ 'parent_type'=>'parent_type_display' ,
'type_name'=>'parent_type',
'id_name'=>'parent_id', 'vname'=>'LBL_RELATED_TO',
'type'=>'parent',
'source'=>'non-db',
- 'options'=> 'record_type_display_notes',
+ 'options'=> 'parent_type_display_notes',
),
'contact_name'=>
View
2  modules/Tasks/vardefs.php
@@ -129,7 +129,7 @@
'parent_name'=>
array(
'name'=> 'parent_name',
- 'parent_type'=>'record_type_display' ,
+ 'parent_type'=>'parent_type_display' ,
'type_name'=>'parent_type',
'id_name'=>'parent_id',
'vname'=>'LBL_LIST_RELATED_TO',
View
2  tests/include/database/Bug43466Test.php
@@ -150,7 +150,7 @@ public function providerRepairTableParams()
'parent_name'=>
array(
'name'=> 'parent_name',
- 'parent_type'=>'record_type_display' ,
+ 'parent_type'=>'parent_type_display' ,
'type_name'=>'parent_type',
'id_name'=>'parent_id',
'vname'=>'LBL_LIST_RELATED_TO',
View
2  tests/modules/Import/ImportFieldSanitizeTest.php
@@ -592,7 +592,7 @@ public function testParent()
'studio' => 'visible',
'type_name' => 'parent_type',
'id_name' => 'parent_id',
- 'parent_type' => 'record_type_display',
+ 'parent_type' => 'parent_type_display',
);
$focus->parent_name = '';
$focus->parent_id = '';
View
2  tests/modules/ModuleBuilder/parsers/views/Bug40969Test.php
@@ -74,7 +74,7 @@ class Bug40969Test extends Sugar_PHPUnit_Framework_TestCase
'options' => 'parent_type_display',
'type_name' => 'parent_type',
'id_name' => 'parent_id',
- 'parent_type' => 'record_type_display',
+ 'parent_type' => 'parent_type_display',
'id' => 'Opportunitiesparent_name',
'custom_module' => 'Opportunities',
),
View
4 tests/modules/UpgradeWizard/SugarMerge/metadata_files/610/modules/Notes/vardefs.php
@@ -231,12 +231,12 @@
'parent_name'=>
array(
'name'=> 'parent_name',
- 'parent_type'=>'record_type_display' ,
+ 'parent_type'=>'parent_type_display' ,
'type_name'=>'parent_type',
'id_name'=>'parent_id', 'vname'=>'LBL_RELATED_TO',
'type'=>'parent',
'source'=>'non-db',
- 'options'=> 'record_type_display_notes',
+ 'options'=> 'parent_type_display_notes',
),
'contact_name'=>
Please sign in to comment.
Something went wrong with that request. Please try again.