mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°6385 - Allow to disable LinkedSet (1:n & n:n) edition by XML in host edition
This commit is contained in:
@@ -744,7 +744,11 @@ HTML
|
||||
$oPage->SetCurrentTab($sTabCode, $oAttDef->GetLabel().$sCount, $sTabDescription);
|
||||
|
||||
$aArgs = array('this' => $this);
|
||||
$bReadOnly = ($iFlags & (OPT_ATT_READONLY | OPT_ATT_SLAVE));
|
||||
|
||||
$sEditWhen = $oAttDef->GetEditWhen();
|
||||
$bIsEditableBasedOnEditWhen = ($sEditWhen === LINKSET_EDITWHEN_ALWAYS || $sEditWhen === LINKSET_EDITWHEN_ON_HOST_EDITION);
|
||||
|
||||
$bReadOnly = ($iFlags & (OPT_ATT_READONLY | OPT_ATT_SLAVE)) || !$bIsEditableBasedOnEditWhen;
|
||||
if ($bEditMode && (!$bReadOnly)) {
|
||||
$sInputId = $this->m_iFormId.'_'.$sAttCode;
|
||||
$sDisplayValue = ''; // not used
|
||||
|
||||
@@ -281,7 +281,7 @@ EOF
|
||||
|
||||
if ($bReadOnly) {
|
||||
$aRow['form::checkbox'] = "";
|
||||
foreach ($this->m_aEditableFields as $sFieldCode) {
|
||||
foreach ($this->oUILinksWidget->GetEditableFields() as $sFieldCode) {
|
||||
$sDisplayValue = $linkObjOrId->GetEditValue($sFieldCode);
|
||||
$aRow[$sFieldCode] = $sDisplayValue;
|
||||
}
|
||||
@@ -435,7 +435,7 @@ JS
|
||||
$oAttDef = MetaModel::GetAttributeDef($this->oUILinksWidget->GetLinkedClass(), $sFieldCode);
|
||||
|
||||
if ($bReadOnlyField) {
|
||||
$sFieldForHtml = $sDisplayValue;
|
||||
$sFieldForHtml = $oAttDef->GetAsHTML($sValue);
|
||||
} else {
|
||||
$sFieldForHtml = cmdbAbstractObject::GetFormElementForField(
|
||||
$oP,
|
||||
|
||||
Reference in New Issue
Block a user