N°5922 - Fix plus button semantic on ext. key widget (#448)

* N°5922 - Enhance plus button on extkeywidget

* Properly reset the target class when closing the dialog

* Make icon buttons as actual clickable links for BeHat

* Apply suggestions from code review

Review by Guillaume. Thanks!

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
This commit is contained in:
Denis
2023-03-03 14:12:09 +01:00
committed by GitHub
parent 0533916dad
commit 9c0b906ded
4 changed files with 24 additions and 12 deletions

View File

@@ -410,9 +410,10 @@ try
$iInputId = utils::ReadParam('iInputId', '');
$sAttCode = utils::ReadParam('sAttCode', '');
$sJson = utils::ReadParam('json', '', false, 'raw_data');
// Building form, if target class is abstract we ask the user for the desired leaf class
$bTargetClassSelected = utils::ReadParam('bTargetClassSelected', '', false, 'raw_data');
// Building form, if target class has child classes we ask the user for the desired leaf class, unless we've already done just that
$oWidget = new UIExtKeyWidget($sTargetClass, $iInputId, $sAttCode, false);
if(MetaModel::IsAbstract($sTargetClass))
if(!$bTargetClassSelected && MetaModel::HasChildrenClasses($sTargetClass))
{
$oWidget->GetClassSelectionForm($oPage);
}