diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index ed8bfaf7f..ebdad6b02 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -4819,110 +4819,6 @@ HTML; } } - /** - * Special display where the case log uses the whole "screen" at the bottom of the "Properties" tab - * - * @param WebPage $oPage - * @param string $sAttCode - * @param string $sComment - * @param string $sPrefix - * @param bool $bEditMode - * - * @throws \ArchivedObjectException - * @throws \CoreException - * @throws \CoreUnexpectedValue - * @throws \DictExceptionMissingString - * @throws \MySQLException - * @throws \OQLException - * @throws \Exception - * @deprecated 3.0.0, will be removed in 3.1.0 - */ - public function DisplayCaseLog(WebPage $oPage, $sAttCode, $sComment = '', $sPrefix = '', $bEditMode = false) - { - DeprecatedCallsLog::NotifyDeprecatedPhpMethod(); - $oPage->SetCurrentTab('UI:PropertiesTab'); - $sClass = get_class($this); - - if ($this->IsNew()) { - $iFlags = $this->GetInitialStateAttributeFlags($sAttCode); - } else { - $iFlags = $this->GetAttributeFlags($sAttCode); - } - - if ($iFlags & OPT_ATT_HIDDEN) { - // The case log is hidden do nothing - } else - { - $oAttDef = MetaModel::GetAttributeDef(get_class($this), $sAttCode); - $sAttDefClass = get_class($oAttDef); - $sAttLabel = $oAttDef->GetLabel(); - $sAttMetaDataLabel = utils::HtmlEntities($sAttLabel); - $sAttMetaDataFlagHidden = (($iFlags & OPT_ATT_HIDDEN) === OPT_ATT_HIDDEN) ? 'true' : 'false'; - $sAttMetaDataFlagReadOnly = (($iFlags & OPT_ATT_READONLY) === OPT_ATT_READONLY) ? 'true' : 'false'; - $sAttMetaDataFlagMandatory = (($iFlags & OPT_ATT_MANDATORY) === OPT_ATT_MANDATORY) ? 'true' : 'false'; - $sAttMetaDataFlagMustChange = (($iFlags & OPT_ATT_MUSTCHANGE) === OPT_ATT_MUSTCHANGE) ? 'true' : 'false'; - $sAttMetaDataFlagMustPrompt = (($iFlags & OPT_ATT_MUSTPROMPT) === OPT_ATT_MUSTPROMPT) ? 'true' : 'false'; - $sAttMetaDataFlagSlave = (($iFlags & OPT_ATT_SLAVE) === OPT_ATT_SLAVE) ? 'true' : 'false'; - - $sInputId = $this->m_iFormId.'_'.$sAttCode; - - if ((!$bEditMode) || ($iFlags & (OPT_ATT_READONLY | OPT_ATT_SLAVE))) - { - // Check if the attribute is not read-only because of a synchro... - if ($iFlags & OPT_ATT_SLAVE) - { - $aReasons = array(); - $sTip = ''; - foreach($aReasons as $aRow) { - $sDescription = utils::EscapeHtml($aRow['description']); - $sDescription = str_replace(array("\r\n", "\n"), "
", $sDescription); - $sTip .= "
"; - $sTip .= "
Synchronized with {$aRow['name']}
"; - $sTip .= "
$sDescription
"; - } - $sTip = addslashes($sTip); - $oPage->add_ready_script("$('#synchro_$sInputId').qtip( { content: '$sTip', show: 'mouseover', hide: 'mouseout', style: { name: 'dark', tip: 'leftTop' }, position: { corner: { target: 'rightMiddle', tooltip: 'leftTop' }} } );"); - } - - // Attribute is read-only - $sHTMLValue = $this->GetAsHTML($sAttCode); - $sHTMLValue .= ''; - $aFieldsMap[$sAttCode] = $sInputId; - } - else - { - $sValue = $this->Get($sAttCode); - $sDisplayValue = $this->GetEditValue($sAttCode); - $aArgs = array('this' => $this, 'formPrefix' => $sPrefix); - - $sCommentAsHtml = ($sComment != '') ? ''.$sComment.'
' : ''; - $sFieldAsHtml = self::GetFormElementForField($oPage, $sClass, $sAttCode, $oAttDef, $sValue, $sDisplayValue, $sInputId, '', $iFlags, $aArgs); - $sHTMLValue = << -
- $sCommentAsHtml - $sFieldAsHtml -
-
-HTML; - - $aFieldsMap[$sAttCode] = $sInputId; - } - - $oPage->add(<< - {$sAttLabel} -
- {$sHTMLValue} -
- -HTML - ); - } - } - /** * Special display where the case log uses the whole "screen" at the bottom of the "Properties" tab *