Hi, I want to remove the SELECT button from module Project with subpanel Calls. Where to do that?
Thankss
Hi, I want to remove the SELECT button from module Project with subpanel Calls. Where to do that?
Thankss
Kind regards,
De Kleine Media
SugarCRM CE v.5.2.0h
Windows platform
MySQL v.5.1
phpMyAdmin - 2.11.2.2
Apache Server v.2.0
Where do you want to remove the SELECT button? can you post a screen shot highlighting?
If it's for calls - it may prove to be difficult, b/c that's a mixture of meetings, tasks, emails, calls.
Sugar University for training
Sugar Wiki for developer and user help
SugarForge for modules, themes, lang packs
SugarExchange for production-ready extensions
Enter/view bugs via the Sugar bug tracker
Kind regards,
De Kleine Media
SugarCRM CE v.5.2.0h
Windows platform
MySQL v.5.1
phpMyAdmin - 2.11.2.2
Apache Server v.2.0
In a raw way you can just copy the code from the file in modules/Calls/metadata/subpanels/default.php in the same location and rename it as ForProjects.php for example. In the new file you comment the code refering the select button:
You will also have to tell Project to take the new subpanel file.PHP Code:array (
'widget_class'=>'SubPanelTopSelectButton', 'popup_module' => 'Calls'
),
But in an upgrade safe way you should do this:
-create the new file ForProject.php in custom/modules/Calls/metadata/subpanels/ForProject.php (copied from default.php in modules/metadata/subpanels and commented the select button code)
-in custom/Extension/modules/Project/Ext/Layoutdefs/ create a file {name_you_want}.php, here we are going to override the subpanelname so it takes the subpanel from custom, not from modules.
code to write:
After this you should repair (admin/repair/Quick Repair and Rebuild) you can check in custom/modules/Project/Ext/Layouts if it has been created a file called layoutdefs.ext.php if there is such a file it should work but this change is only for Project if you want to remove the select button everywhere that's other solution.PHP Code:$layout_defs['Accounts']['subpanel_setup']['contacts']['override_subpanel_name'] = "ForProject";
Elisabeth Escribano
Webdeveloper
MADCAP verademing in ict
e.escribano@madcap.nl
Schapedrift 89
3371 JJ Hardinxveld-Giessendam
Netherlands
Tel 088 99 088 99
Fax 088 99 088 98
www.madcap.nl
Hi Elisabeth,
Thanks for your reply! I followed your instructions, but the select button still appears in the List.
Here is my ForProject.php file which i copied from modules\Calls\metadata\subpanels\default.php
and stored in custom\modules\Calls\metadata\subpanels\ForProject .php
In custom\modules\Project\Ext\Layoutdefs the file layoutdefs.ext.php appears with this code;PHP Code:<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
$subpanel_layout = array(
//Removed button because this layout def is a component of
//the activities sub-panel.
'top_buttons' => array(
array (
'widget_class'=>'SubPanelTopCreateButton',
),
/* array (
'widget_class'=>'SubPanelTopSelectButton', 'popup_module' => 'Calls'
),
*/
),
'list_fields' => array(
'object_image'=>array(
'vname' => 'LBL_OBJECT_IMAGE',
'widget_class' => 'SubPanelIcon',
'width' => '2%',
),
'close_button'=>array(
'widget_class' => 'SubPanelCloseButton',
'vname' => 'LBL_LIST_CLOSE',
'width' => '6%',
'sortable'=>false,
),
'name'=>array(
'vname' => 'LBL_LIST_SUBJECT',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '30%',
),
'status'=>array(
'widget_class' => 'SubPanelActivitiesStatusField',
'vname' => 'LBL_STATUS',
'width' => '15%',
),
'contact_name'=>array(
'widget_class' => 'SubPanelDetailViewLink',
'target_record_key' => 'contact_id',
'target_module' => 'Contacts',
'module' => 'Contacts',
'vname' => 'LBL_LIST_CONTACT',
'width' => '11%',
'sortable'=>false,
),
'date_start'=>array(
'vname' => 'LBL_DATE_TIME',
'width' => '10%',
),
'assigned_user_name' => array (
'name' => 'assigned_user_name',
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
),
'edit_button'=>array(
'vname' => 'LBL_EDIT_BUTTON',
'widget_class' => 'SubPanelEditButton',
'width' => '2%',
),
'remove_button'=>array(
'vname' => 'LBL_REMOVE',
'widget_class' => 'SubPanelRemoveButton',
'width' => '2%',
),
'time_start'=>array(
'usage'=>'query_only',
),
),
);
?>
// In Project Module override subpanel Calls
$layout_defs['Project']['subpanel_setup']['project_calls']['override_subpanel_name'] = 'ForProject';
Everthing seems fine but still I see the 'Select' Button. Do you know what's the problem?
Thanksss
Kind regards,
De Kleine Media
SugarCRM CE v.5.2.0h
Windows platform
MySQL v.5.1
phpMyAdmin - 2.11.2.2
Apache Server v.2.0
Other solution I can think of is in custom/Extension/modules/Project/Ext/Layouts
In stead to try to override the panel just override the buttons:
$layout_defs['Project']['subpanel_setup']['project_calls']['top_buttons'] = array (
'widget_class'=>'SubPanelTopCreateButton',
);
And after this repair
Elisabeth Escribano
Webdeveloper
MADCAP verademing in ict
e.escribano@madcap.nl
Schapedrift 89
3371 JJ Hardinxveld-Giessendam
Netherlands
Tel 088 99 088 99
Fax 088 99 088 98
www.madcap.nl
Hi,
Go to custom/Extension/modules/Projects/Ext/Layoutdefs/layoutdefs.ext.php
Then use the script in the following way .
<?php
$buttons_to_remove = array('SubPanelTopSelectButton');
foreach($layout_defs['Project']['subpanel_setup']['bugs']['top_buttons'] as $id => $button_def) {
if(in_array($button_def['widget_class'], $buttons_to_remove)) {
unset($layout_defs['Project']['subpanel_setup']['bugs']['top_buttons'][$id]);
}
}
?>
I have done for bug you can use it for Calls
Hi there, thanks for all your help!
I found the solution;
In custom\Extension\modules\Project\Ext\Layoutdefs there was already the file customproject_calls.php
In this file I have removed the code
1 =>
array (
'widget_class' => 'SubPanelTopSelectButton',
'popup_module' => 'Calls',
'mode' => 'MultiSelect',
),
and now its working fine. Again thanks for the help, I appreciate![]()
Kind regards,
De Kleine Media
SugarCRM CE v.5.2.0h
Windows platform
MySQL v.5.1
phpMyAdmin - 2.11.2.2
Apache Server v.2.0
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks