mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 16:22:20 +02:00
Merge remote-tracking branch 'origin/support/3.2' into develop
# Conflicts: # core/kpi.class.inc.php # datamodels/2.x/itop-profiles-itil/datamodel.itop-profiles-itil.xml
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
namespace Combodo\iTop\Portal\Brick;
|
||||
|
||||
use Combodo\iTop\DesignElement;
|
||||
use Combodo\iTop\Portal\Service\TemplatesProvider\TemplateDefinitionDto;
|
||||
use Combodo\iTop\Portal\Service\TemplatesProvider\TemplatesRegister;
|
||||
use DOMFormatException;
|
||||
|
||||
/**
|
||||
@@ -46,6 +48,17 @@ class CreateBrick extends PortalBrick
|
||||
/** @var array $aRules */
|
||||
protected $aRules;
|
||||
|
||||
const DEFAULT_PAGE_TEMPLATE_PATH = 'itop-portal-base/portal/templates/bricks/create/modal.html.twig';
|
||||
|
||||
/** @inheritdoc */
|
||||
public static function RegisterTemplates(TemplatesRegister $oTemplatesRegister): void
|
||||
{
|
||||
parent::RegisterTemplates($oTemplatesRegister);
|
||||
$oTemplatesRegister->RegisterTemplates(self::class,
|
||||
TemplateDefinitionDto::Create('page', static::TEMPLATES_BASE_PATH . 'create/modal.html.twig')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
||||
@@ -359,7 +359,8 @@ class ObjectFormManager extends FormManager
|
||||
foreach ($this->aFieldsAtts as $sAttCode => $iFieldFlags)
|
||||
{
|
||||
// handle plugins fields
|
||||
if(array_key_exists($sAttCode, $this->aExtraData)
|
||||
if($this->sMode !== 'apply_stimulus'
|
||||
&& array_key_exists($sAttCode, $this->aExtraData)
|
||||
&& array_key_exists('plugin', $this->aExtraData[$sAttCode])){
|
||||
$sPluginName = $this->aExtraData[$sAttCode]['plugin'];
|
||||
switch($sPluginName){
|
||||
@@ -713,7 +714,8 @@ class ObjectFormManager extends FormManager
|
||||
|
||||
// fallback Checking if the instance has attachments
|
||||
// (in case attachment is not explicitly declared in layout)
|
||||
if (class_exists('Attachment') && class_exists('AttachmentPlugIn')
|
||||
if ($this->sMode !== 'apply_stimulus'
|
||||
&& class_exists('Attachment') && class_exists('AttachmentPlugIn')
|
||||
&& !$this->IsPluginInitialized(AttachmentPlugIn::class)
|
||||
&& AttachmentPlugIn::IsAttachmentAllowedForObject($this->oObject)){
|
||||
$this->AddAttachmentField($this->oForm, 'attachments_plugin', $this->aExtraData);
|
||||
|
||||
Reference in New Issue
Block a user