mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°1986 - Revert feature
This commit is contained in:
@@ -80,8 +80,6 @@ class ObjectFormManager extends FormManager
|
||||
protected $aFormProperties;
|
||||
/** @var array $aCallbackUrls */
|
||||
protected $aCallbackUrls = array();
|
||||
/** @var boolean $bIsSubmittable */
|
||||
protected $bIsSubmittable = true;
|
||||
|
||||
/**
|
||||
* Creates an instance of \Combodo\iTop\Portal\Form\ObjectFormManager from JSON data that must contain at least :
|
||||
@@ -222,29 +220,7 @@ class ObjectFormManager extends FormManager
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function GetIsSubmittable()
|
||||
{
|
||||
return $this->bIsSubmittable;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param boolean $bIsSubmittable
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetIsSubmittable($bIsSubmittable)
|
||||
{
|
||||
$this->bIsSubmittable = $bIsSubmittable;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
@@ -663,8 +639,7 @@ class ObjectFormManager extends FormManager
|
||||
// Failsafe for AttributeType that would not have MakeFormField and therefore could not be used in a form
|
||||
if ($oField !== null)
|
||||
{
|
||||
// If a form is in edit mode and can't be submitted to update an object (only transitions available), we have no reason to allow fields to be editable
|
||||
if ($this->sMode !== static::ENUM_MODE_VIEW && $this->GetIsSubmittable())
|
||||
if ($this->sMode !== static::ENUM_MODE_VIEW)
|
||||
{
|
||||
// Field dependencies
|
||||
$aFieldDependencies = $oAttDef->GetPrerequisiteAttributes();
|
||||
|
||||
@@ -277,8 +277,7 @@ class ObjectFormHandlerHelper
|
||||
->SetMode($sMode)
|
||||
->SetActionRulesToken($sActionRulesToken)
|
||||
->SetRenderer($oFormRenderer)
|
||||
->SetFormProperties($aFormProperties)
|
||||
->SetIsSubmittable(isset($aFormData['buttons']['submit']) || ($sMode === self::ENUM_MODE_CREATE));
|
||||
->SetFormProperties($aFormProperties);
|
||||
|
||||
$oFormManager->Build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user