N°5958 - 1:n - edit_mode=ADD_ONLY - Location -> Person

This commit is contained in:
Benjamin Dalsass
2023-04-18 15:28:45 +02:00
parent 425fb14188
commit acf26754ef
8 changed files with 89 additions and 16 deletions

View File

@@ -11,6 +11,7 @@ use ApplicationContext;
use ApplicationException;
use cmdbAbstractObject;
use CMDBObjectSet;
use Combodo\iTop\Application\Helper\LegacyFormHelper;
use Combodo\iTop\Application\Helper\Session;
use Combodo\iTop\Application\UI\Base\Component\Alert\AlertUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Component\QuickCreate\QuickCreateHelper;
@@ -172,6 +173,10 @@ JS;
$oPage->set_title(Dict::Format('UI:CreationPageTitle_Class', $sClassLabel));
$oPage->SetContentLayout(PageContentFactory::MakeForObjectDetails($oObjToClone, cmdbAbstractObject::ENUM_DISPLAY_MODE_CREATE));
}
// Remove blob edition from creation form @see N°5863 to allow blob edition in modal context
LegacyFormHelper::DisableAttributeBlobInputs($sRealClass, $aFormExtraParams);
cmdbAbstractObject::DisplayCreationForm($oPage, $sRealClass, $oObjToClone, array(), $aFormExtraParams);
} else {
if ($this->IsHandlingXmlHttpRequest()) {
@@ -283,6 +288,9 @@ JS;
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().$sJsFileRelPath);
}
// Remove blob edition from creation form @see N°5863 to allow blob edition in modal context
LegacyFormHelper::DisableAttributeBlobInputs($sClass, $aFormExtraParams);
// Note: Code duplicated to the case 'apply_modify' in UI.php when a data integrity issue has been found
$oObj->DisplayModifyForm($oPage, $aFormExtraParams); // wizard_container: Display the title above the form