Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Misplaced organizeB...
 
Notifications
Clear all

Misplaced organizeButtonsEnd() call

2 Posts
2 Users
0 Reactions
2,298 Views
(@antonio-grr)
Posts: 84
Active Member
Topic starter
 
[#4352]

Hi.
At first sight it seems that the call to the function organizeButtonsEnd() in objectButtns is inside the if ($mailable and $mailable->id) ;
but I believe it must be called in any case, as the organizeButtons() sequence is alredy started. Please check.
In my version I created function fro each button ( e.g. function drawMultiUpdateButton($objectClass, $objectClassi18n, $noselect) ) so the code appears more readable, like
....
//$displayButton=( $buttonCheckListVisible=="visible")?'void':'none';
if ($buttonCheckListVisible == "visible" and $obj->id) {
$this->organizeButtons($obj);
}
$this->drawCheckListButton($objectClass, $buttonCheckListVisible);
$paramHistoryVisible = Parameter::getUserParameter('displayHistory');
if ($paramHistoryVisible == 'REQ' and $obj->id) {
$this->organizeButtons($obj);
}
$this->drawHistoryButton($objectClass, $objectId, $paramHistoryVisible);
}
$this->organizeButtonsEnd();
....
Best regards


 
Posted : 16 May 2017 10H59
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

You're right,

In fact, it is the closure for test "if ($mailable and $mailable->id" that is much to far.
In encloses several buttons that should be displayed even if not mailable (history, checklist, ...)

Thanks for reporting.


 
Posted : 17 May 2017 11H00
Share:

Scroll to Top