N°6385 - Allow to disable LinkedSet (1:n & n:n) edition by XML

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
This commit is contained in:
Stephen Abello
2023-10-24 11:09:12 +02:00
committed by GitHub
parent 4f336abeb8
commit a9bd62dc43
7 changed files with 90 additions and 7 deletions

View File

@@ -216,8 +216,20 @@ abstract class AbstractBlockLinkSetViewTable extends UIContentBlock
{
$iFlags = $this->oDbObject->GetAttributeFlags($this->sAttCode);
}
$bEditWhen = $this->IsEditableBasedOnEditWhen();
$this->bIsAttEditable = !($iFlags & (OPT_ATT_READONLY | OPT_ATT_SLAVE | OPT_ATT_HIDDEN));
$this->bIsAttEditable = !($iFlags & (OPT_ATT_READONLY | OPT_ATT_SLAVE | OPT_ATT_HIDDEN)) && $bEditWhen;
}
/**
* Compares Linkset attribute edit_when values with its usage requirements
*
* @return bool
* @since 3.1.1 3.2.0 N°6385
*/
protected function IsEditableBasedOnEditWhen(): bool{
return true;
}
/**