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

@@ -142,6 +142,7 @@ class LinkSetController extends AbstractController
$sAttCode = utils::ReadParam('att_code', '', false, 'raw');
$sClass = utils::ReadParam('host_class', '', false, 'class');
$sId = utils::ReadParam('host_id', '', false, 'integer');
$sFormTitle = utils::ReadPostedParam('form_title', null, utils::ENUM_SANITIZATION_FILTER_STRING);
// For security reasons: check that the "proposed" class is actually a subclass of the linked class
// and that the current user is allowed to create objects of this class
@@ -202,17 +203,7 @@ class LinkSetController extends AbstractController
}
JS;
// Form title
/** @var \AttributeLinkedSet $oLinksetDef */
$oLinksetDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
$oHostObj = MetaModel::GetObject($sClass, $sId);
$sFormTitle = $oLinksetDef->SearchSpecificLabel('UI:Links:Add:Modal:Title', '', true,
MetaModel::GetName($sClass),
$oHostObj->Get('friendlyname'),
$oLinksetDef->GetLabel(),
MetaModel::GetName(LinkSetModel::GetTargetClass($oLinksetDef)));
$aExtraParams = [
'noRelations' => true,
'hide_transitions' => true,