mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Popover menu: Refactor to remove the necessity of coupling JS and PHP code to instantiate it correctly
This commit is contained in:
@@ -299,18 +299,18 @@ class CaseLogEntryForm extends UIContentBlock
|
||||
$aSubBlocks = [];
|
||||
$aSubBlocks[$this->GetTextInput()->GetId()] = $this->GetTextInput();
|
||||
|
||||
foreach ($this->GetExtraActionButtons() as $oExtraActionButton)
|
||||
{
|
||||
foreach ($this->GetExtraActionButtons() as $oExtraActionButton) {
|
||||
$aSubBlocks[$oExtraActionButton->GetId()] = $oExtraActionButton;
|
||||
}
|
||||
|
||||
foreach ($this->GetMainActionButtons() as $oMainActionButton)
|
||||
{
|
||||
foreach ($this->GetMainActionButtons() as $oMainActionButton) {
|
||||
$aSubBlocks[$oMainActionButton->GetId()] = $oMainActionButton;
|
||||
}
|
||||
|
||||
$aSubBlocks[$this->GetSendButtonPopoverMenu()->GetId()] = $this->GetSendButtonPopoverMenu();
|
||||
|
||||
if ($this->HasSendButtonPopoverMenu()) {
|
||||
$aSubBlocks[$this->GetSendButtonPopoverMenu()->GetId()] = $this->GetSendButtonPopoverMenu();
|
||||
}
|
||||
|
||||
return $aSubBlocks;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,10 @@ class CaseLogEntryFormFactory
|
||||
$oCaseLogEntryForm = new CaseLogEntryForm($oObject, $sCaseLogAttCode);
|
||||
$oCaseLogEntryForm->SetSubmitModeFromHostObjectMode($sObjectMode)
|
||||
->AddMainActionButtons(static::PrepareCancelButton())
|
||||
->AddMainActionButtons(static::PrepareSaveButton())
|
||||
->SetSendButtonPopoverMenu(static::PrepareSendActionSelectionPopoverMenu($oObject, $sCaseLogAttCode));
|
||||
->AddMainActionButtons(static::PrepareSaveButton());
|
||||
|
||||
// TODO 3.0.0: Will be fixed by N°3649
|
||||
// ->SetSendButtonPopoverMenu(static::PrepareSendActionSelectionPopoverMenu($oObject, $sCaseLogAttCode));
|
||||
|
||||
return $oCaseLogEntryForm;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user