diff --git a/application/ui.extkeywidget.class.inc.php b/application/ui.extkeywidget.class.inc.php index bebaa9d54..24af82c9e 100644 --- a/application/ui.extkeywidget.class.inc.php +++ b/application/ui.extkeywidget.class.inc.php @@ -4,8 +4,8 @@ * @license http://opensource.org/licenses/AGPL-3.0 */ +use Combodo\iTop\Application\Helper\LegacyFormHelper; use Combodo\iTop\Application\UI\Base\Component\Form\FormUIBlockFactory; -use Combodo\iTop\Application\UI\Base\Component\Input\InputUIBlockFactory; use Combodo\iTop\Application\UI\Base\Layout\UIContentBlockUIBlockFactory; use Combodo\iTop\Core\MetaModel\FriendlyNameType; @@ -968,15 +968,16 @@ JS
';
- }
- }
- cmdbAbstractObject::DisplayCreationForm($oPage, $this->sTargetClass, $oNewObj, array(), array('formPrefix' => $this->iId, 'noRelations' => true, 'fieldsFlags' => $aFieldsFlags, 'fieldsComments' => $aFieldsComments));
+
+ $aFormExtraParams = array(
+ 'formPrefix' => $this->iId,
+ 'noRelations' => true,
+ );
+
+ // Remove blob edition from creation form @see N°5863 to allow blob edition in modal context
+ LegacyFormHelper::DisableAttributeBlobInputs($this->sTargetClass, $aFormExtraParams);
+
+ cmdbAbstractObject::DisplayCreationForm($oPage, $this->sTargetClass, $oNewObj, array(), $aFormExtraParams);
$oPage->add(<<
';
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sources/Controller/Base/Layout/ObjectController.php b/sources/Controller/Base/Layout/ObjectController.php
index e68aff1e0..8a2ca12d7 100644
--- a/sources/Controller/Base/Layout/ObjectController.php
+++ b/sources/Controller/Base/Layout/ObjectController.php
@@ -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
diff --git a/sources/Controller/Links/LinkSetController.php b/sources/Controller/Links/LinkSetController.php
index f1040c352..70b642353 100644
--- a/sources/Controller/Links/LinkSetController.php
+++ b/sources/Controller/Links/LinkSetController.php
@@ -8,6 +8,7 @@ namespace Combodo\iTop\Controller\Links;
use AjaxPage;
use cmdbAbstractObject;
+use Combodo\iTop\Application\Helper\LegacyFormHelper;
use Combodo\iTop\Application\UI\Base\Component\Form\FormUIBlockFactory;
use Combodo\iTop\Controller\AbstractController;
use Combodo\iTop\Service\Base\ObjectRepository;
@@ -213,6 +214,10 @@ JS
,
],
];
+
+ // Remove blob edition from creation form @see N°5863 to allow blob edition in modal context
+ LegacyFormHelper::DisableAttributeBlobInputs($sRealClass, $aExtraParams);
+
cmdbAbstractObject::DisplayCreationForm($oPage, $sRealClass, $oObj, array(), $aExtraParams);
}
else