N°6219 - 1:n Read: tooltip, modal title and message on Add-Edit-Remove-Delete

This commit is contained in:
Benjamin Dalsass
2023-05-31 10:10:02 +02:00
parent d07bce3063
commit 31a96d24dd
8 changed files with 50 additions and 35 deletions

View File

@@ -2321,10 +2321,15 @@ class MenuBlock extends DisplayBlock
false
);
// creation form title
if (array_key_exists('creation_in_modal_form_title', $aExtraParams)) {
$oAddLinkActionButton->AddDataAttribute('modal-title', $aExtraParams['creation_in_modal_form_title']);
}
// - If we are used in a Datatable, 'datatable_' will be prefixed to our $sId, so we do the same here
$sRealId = $sId;
if(in_array($this->m_sStyle, [static::ENUM_STYLE_LIST, 'links', static::ENUM_STYLE_LIST_IN_OBJECT])){
$sRealId = 'datatable_' . $sId;
if (in_array($this->m_sStyle, [static::ENUM_STYLE_LIST, 'links', static::ENUM_STYLE_LIST_IN_OBJECT])) {
$sRealId = 'datatable_'.$sId;
}
$oAddLinkActionButton->AddCSSClasses(['ibo-action-button', 'ibo-regular-action-button'])
->SetOnClickJsCode("$('#$sRealId').trigger('open_creation_modal.object.itop');");