mirror of
https://github.com/Combodo/iTop.git
synced 2026-06-07 16:42:21 +02:00
* N°9144 - correct next button in audit page * N°9567 - WIP code style * N°9412 - Screen Analysis results wip + test endpoint * N°9412 - next button label * N°9412 - Mask CI pbs * N°9412 - Analysis results screen wip * N°9412 - Analysis results screen wip * N°9567 - fix extension map init of installation choices * N°9567 - fix test * N°9567 - link from ext mgt to setup WIP * N°9567 - add enc_type in UIForm to be able to change content type in twigs * N°9412 - wip * N°9567 - Extension Mgmt : Run setup * N°9567 - Extension Mgmt : Run setup * N°9567 - Extension Mgmt : Run setup (fix post-deletion button inputs) * N°9567 - Extension Mgmt : Run setup * N°9567 - Extension Mgmt : Run setup * N°9567 - Extension Mgmt : Run setup --------- Co-authored-by: Eric Espie <eric.espie@combodo.com>
92 lines
1.6 KiB
PHP
92 lines
1.6 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
|
* @license http://opensource.org/licenses/AGPL-3.0
|
|
*/
|
|
|
|
namespace Combodo\iTop\Application\UI\Base\Component\Form;
|
|
|
|
use Combodo\iTop\Application\UI\Base\Layout\UIContentBlock;
|
|
|
|
/**
|
|
* Class Form
|
|
*
|
|
* @package Combodo\iTop\Application\UI\Base\Component\Form
|
|
*/
|
|
class Form extends UIContentBlock
|
|
{
|
|
// Overloaded constants
|
|
public const BLOCK_CODE = 'ibo-form';
|
|
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/form/layout';
|
|
|
|
/** @var string */
|
|
protected $sOnSubmitJsCode;
|
|
/** @var string */
|
|
protected $sAction;
|
|
/** @var string */
|
|
protected $sEncType = "multipart/form-data";
|
|
|
|
public function __construct(?string $sId = null)
|
|
{
|
|
parent::__construct($sId);
|
|
$this->sOnSubmitJsCode = null;
|
|
$this->sAction = null;
|
|
}
|
|
|
|
public function SetOnSubmitJsCode(string $sJsCode)
|
|
{
|
|
$this->sOnSubmitJsCode = $sJsCode;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function GetOnSubmitJsCode(): ?string
|
|
{
|
|
return $this->sOnSubmitJsCode;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function GetAction(): ?string
|
|
{
|
|
return $this->sAction;
|
|
}
|
|
|
|
/**
|
|
* @param string $sAction
|
|
*
|
|
* @return Form
|
|
*/
|
|
public function SetAction(string $sAction)
|
|
{
|
|
$this->sAction = $sAction;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Override default enctype (default : "multipart/form-data")
|
|
* @param string $sEncType
|
|
* @return $this
|
|
* @since 3.3.0
|
|
*/
|
|
public function SetEncType(string $sEncType)
|
|
{
|
|
$this->sEncType = $sEncType;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
* @since 3.3.0
|
|
*/
|
|
public function GetEncType(): string
|
|
{
|
|
return $this->sEncType;
|
|
}
|
|
|
|
}
|